Browse Source

Decryptor-verifier works

Miti Mazmudar 4 years ago
parent
commit
d73f0e4f87
1 changed files with 22 additions and 8 deletions
  1. 22 8
      docker/Dockerfile

+ 22 - 8
docker/Dockerfile

@@ -1,6 +1,6 @@
 FROM graphene
 ENV SGX_SDK=/opt/intel/sgxsdk/
-RUN apt install -y nano gdb #tmux #TODO Move tmux to run script and nano to sgx-docker script. 
+
 RUN mkdir source
 WORKDIR source
 ## Setting up prereqs for decryptor - Intel SGX SSL 
@@ -16,9 +16,9 @@ RUN git clone https://github.com/intel/intel-sgx-ssl.git && \
 	cd Linux &&  make && make install
 
 #Temp - TODO: Make the git repo public and remove these commands and retest.  
-COPY gitcrysp-docker-deploy-key.id_rsa /root/.ssh/id_rsa
-COPY gitcrysp-docker-deploy-key.id_rsa.pub /root/.ssh/id_rsa.pub
-RUN ssh-keyscan git-crysp.uwaterloo.ca > /root/.ssh/known_hosts
+#COPY gitcrysp-docker-deploy-key.id_rsa /root/.ssh/id_rsa
+#COPY gitcrysp-docker-deploy-key.id_rsa.pub /root/.ssh/id_rsa.pub
+#RUN ssh-keyscan git-crysp.uwaterloo.ca > /root/.ssh/known_hosts
 
 #Setting up protobuf definitions for exchanging LA and post-LA messages between enclaves.
 RUN git clone gogs@git-crysp.uwaterloo.ca:miti/dhmsgs_proto_defs.git && \ 
@@ -31,16 +31,27 @@ RUN git clone gogs@git-crysp.uwaterloo.ca:miti/Decryptor.git && \
 #Setting up common files used in the verifier, PHP extension for LA/post-LA message processing. 
 RUN git clone gogs@git-crysp.uwaterloo.ca:miti/commonVerifierPHPfiles.git
 
+#Setting up a patched version of the linux-sgx repo's SDK for running LA on graphene.
+RUN git clone gogs@git-crysp.uwaterloo.ca:miti/linux-sgx-trts-modified.git && \
+	cd linux-sgx-trts-modified && git checkout local_attestation_for_graphene && \ 
+	bash ./download_prebuilt.sh && make USE_OPT_LIBS=0
+
 #Setting up the verifier. 
 RUN git clone gogs@git-crysp.uwaterloo.ca:miti/verifier.git && \ 
-	cd verifier/ && make && cp verifier /root/graphene/LibOS/shim/test/native
+	cd verifier/ && git checkout recreating_state_for_teeter && \ 
+	export SGX_SDK_TRTS_MODIFIED=/root/source/linux-sgx-trts-modified/build/linux && make && \ 
+	cp verifier /root/graphene/LibOS/shim/test/native && \
+	git checkout master && \ 
+	cp verifier.manifest.template /root/graphene/LibOS/shim/test/native && \
+	cp grapheneMakefile /root/graphene/LibOS/shim/test/native/Makefile 
 
 #Verifier manifest file, makefile changes - comment out JDK/python related content
-#WORKDIR /root/graphene/LibOS/shim/test/native
-#RUN make SGX=1 && make SGX_RUN=1 
+WORKDIR /root/graphene/LibOS/shim/test/native
+RUN make SGX=1 #&& make SGX_RUN=1 
 
-RUN apt install -y php7.0-dev
+RUN apt update && apt install -y php7.0-dev tmux
 
+WORKDIR /root/source
 RUN git clone --recursive https://github.com/CopernicaMarketingSoftware/PHP-CPP.git && \
 	cd PHP-CPP/ && git checkout tags/v2.1.4 &&  make all && \
 	cp libphpcpp.so.* /usr/lib/ && make install 
@@ -49,3 +60,6 @@ RUN git clone gogs@git-crysp.uwaterloo.ca:miti/Apache_PHP_extension.git && \
 	cd Apache_PHP_extension && \
 	make 
 
+#WORKDIR /root/graphene/LibOS/shim/test/apps/apache
+#RUN make SGX=1 && make SGX_RUN=1
+