Browse Source

Not linking commit - some protobuf error

dettanym 4 years ago
parent
commit
8caba2d27f
2 changed files with 6 additions and 5 deletions
  1. 2 2
      Makefile
  2. 4 3
      systemMain.cpp

+ 2 - 2
Makefile

@@ -2,7 +2,7 @@ CXX             = g++
 RM              = rm -f
 CXX_FLAGS       = -Wall  -O2 -std=c++11 -fpic
 LD              = ${CXX} -v
-LD_FLAGS        = -Wall -shared -Wl,--no-undefined
+LD_FLAGS        = -Wall -shared -Wl,--no-undefined -Wl,--verbose
 
 OBJECTS := systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o 
 
@@ -39,7 +39,7 @@ crypto.o: crypto.cpp
 	g++ -I${Openssl_Path}/include ${CXX_FLAGS} -c $^ -o $@
 
 localattestation_decryption.so:  systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o PostLAMessages.pb.o crypto.o
-	${CXX} ${LD_FLAGS} systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o PostLAMessages.pb.o crypto.o  -lphpcpp -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive  -l$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tstdc -L/usr/local/lib  -lprotobuf -Wl,--rpath /home/m2mazmud/plain-openssl/lib    -L${Openssl_Path}/lib -lssl -lcrypto   -Wl,-Bsymbolic -Wl,-pie,-eenclave_entry -Wl,--export-dynamic  -o $@
+	${CXX} ${LD_FLAGS} systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o PostLAMessages.pb.o crypto.o  -lphpcpp -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive  -l$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tstdc -lprotobuf -Wl,--rpath /home/m2mazmud/plain-openssl/lib    -L${Openssl_Path}/lib -lssl -lcrypto   -Wl,-Bsymbolic -Wl,-pie,-eenclave_entry -Wl,--export-dynamic  -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$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tstdc -lprotobuf -Wl,--rpath /home/m2mazmud/plain-openssl/lib   -L${Openssl_Path}/lib -lssl -lcrypto  -Wl,-Bsymbolic -Wl,-pie,-eenclave_entry -Wl,--export-dynamic  -Wl,--verbose -lphpcpp -lprotobuf  -o $@
 #ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o 

+ 4 - 3
systemMain.cpp

@@ -94,7 +94,7 @@ class Mitigator : public Php::Base
 
             input_base64_array = params;
             base64_fields = Php::array_values(input_base64_array);
-
+            /*
             for (auto &base64_field : base64_fields)
             {
                 field_size= base64_field.size();
@@ -117,9 +117,10 @@ class Mitigator : public Php::Base
 			    ret_object["error"]="Received the following error code when trying to decrypt data thru decryptor " + std::to_string(ret_status);
 				return ret_object;
 			}
-
+            */
             ret_object["success"]="true";
-            ret_object["fields"]=Php::Array(plaintext_client_fields);
+            ret_object["fields"]=Php::Array(base64_fields);
+            //ret_object["fields"]=Php::Array(plaintext_client_fields);
 
 			/*gettimeofday(&tv2, NULL);
 			new_time=tv2.tv_usec + tv2.tv_sec * 1000000;