소스 검색

Not working commit

dettanym 6 년 전
부모
커밋
833692e0c3
2개의 변경된 파일4개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 2
      Makefile
  2. 2 6
      ProtobufLAInitiator.cpp

+ 2 - 2
Makefile

@@ -2,7 +2,7 @@ CXX             = g++
 RM              = rm -f
 CXX_FLAGS       = -Wall  -O2 -std=c++11 -fpic -fdata-sections -ffunction-sections
 LD              = ${CXX} -v
-LD_FLAGS        = -Wall -shared -O2
+LD_FLAGS        = -Wall -O2
 
 all_non_sgx_obj := $(system_obj) $(protobuf_obj) #$(patsubst %.cpp,%.o,$(all_non_sgx_cpp)}
 
@@ -44,4 +44,4 @@ crypto.o: crypto.cpp
 
 verifier:  systemMain.o systemSealerWrapper.o SgxSealer.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o
 #	echo $(system_obj)
-	${CXX} ${CXX_FLAGS} -Wl,--no-undefined -Wl,-rpath,${Openssl_Path}/lib systemMain.o systemSealerWrapper.o SgxSealer.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o -L${Openssl_Path}/lib -lssl -lcrypto  -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive  -L$(SGX_LIBRARY_PATH) -l$(Service_Library_Name) -l$(Crypto_Library_Name) -l$(Uae_Library_Name) -lsgx_tstdc -lsgx_urts -lprotobuf -lsgx_tstdcxx -Wl,--verbose -o $@
+	${CXX} ${CXX_FLAGS} -Wl,--no-undefined  -Wl,-rpath,$(SGX_SDK)/lib64  systemMain.o systemSealerWrapper.o SgxSealer.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive  -L$(SGX_LIBRARY_PATH) -l$(Service_Library_Name) -l$(Crypto_Library_Name) -l$(Uae_Library_Name) -lsgx_tstdc -lsgx_urts -lprotobuf -lsgx_tstdcxx  -L${Openssl_Path}/lib -lssl -lcrypto   -Wl,--verbose -o $@

+ 2 - 6
ProtobufLAInitiator.cpp

@@ -141,7 +141,7 @@ int local_attestation_initiator(int port)
   {
       printf("Error in process_protobuf_dh_msg3: 0x%x", protobuf_sgx_ret); fflush(stdout); return protobuf_sgx_ret;
   }
-  memset(encrypted_hash,0, 32); memset(encrypted_tag, 0, 16);
+/*  memset(encrypted_hash,0, 32); memset(encrypted_tag, 0, 16);
   protobuf_sgx_ret=generate_encrypted_rsa_keypair_hash(encrypted_hash, encrypted_tag); 
   if(protobuf_sgx_ret==0)
   {
@@ -151,11 +151,6 @@ int local_attestation_initiator(int port)
 	{
 		printf("Error in enc/dec of hash: 0x%x", protobuf_sgx_ret); fflush(stdout); return protobuf_sgx_ret; 
 	}
-/*   uint32_t count;
-   for(count=0;count<32;count++)
-	printf("0x%x ", hash_and_tag[count]);
-   printf("\n");fflush(stdout); 
-*/
   
 
    post_la_bytes_written = write(decryptor_fd, encrypted_hash, 32);
@@ -167,6 +162,7 @@ int local_attestation_initiator(int port)
 
    }
    printf("Wrote the hash and the tag to the decryptor socket.\n"); fflush(stdout); 
+*/
    if(close(decryptor_fd)!= 0)
    {
 	printf("Error in closing the socket connection.\n"); fflush(stdout); return 0xfd;