Browse Source

Removed printfs in decrypt_client_data for measurement

dettanym 5 years ago
parent
commit
729ae208ed
1 changed files with 8 additions and 9 deletions
  1. 8 9
      App/LocalAttestationUntrusted.cpp

+ 8 - 9
App/LocalAttestationUntrusted.cpp

@@ -144,21 +144,20 @@ using namespace google::protobuf::io;
 
     if(read_protobuf_msg_from_fd(fd, protobuf_msg)!=0)
     {
-	printf("Could not read apache's message post-local attestation\n"); fflush(stdout);
+//	printf("Could not read apache's message post-local attestation\n"); fflush(stdout);
       return 0xfe;
     }
-    printf("Clients data\n"); fflush(stdout); 
+//    printf("Clients data\n"); fflush(stdout); 
 
     input_ciphertext_plus_tag_length = protobuf_msg.msg().length();
-    // TODO: MAKE SURE THIS IS NOT 0XFFFFFFFF.
     input_ciphertext_plus_tag = (uint8_t*) malloc(1000); //malloc(input_ciphertext_plus_tag_length);
-    output_ciphertext_plus_tag = (uint8_t*) malloc(1000); //malloc(input_ciphertext_plus_tag_length); //128 = client public key token length?
+    output_ciphertext_plus_tag = (uint8_t*) malloc(1000); //malloc(input_ciphertext_plus_tag_length); 
     protobuf_msg_ptr = (uint8_t*) protobuf_msg.msg().c_str();
 
     for(counter=0; counter<input_ciphertext_plus_tag_length; counter++)
     {
       input_ciphertext_plus_tag[counter] = *(protobuf_msg_ptr + counter);
-	printf("0x%02x ", input_ciphertext_plus_tag[counter]); 
+//	printf("0x%02x ", input_ciphertext_plus_tag[counter]); 
     }
     // Just so that the ciphertext - client data - is returned back to Apache in case this function fails.
     // client data is after public key (64 bytes) + signature (64 bytes) = 128 bytes.
@@ -174,13 +173,13 @@ using namespace google::protobuf::io;
       {
       	protobuf_msg.set_msg((void*)  output_ciphertext_plus_tag, output_ciphertext_plus_tag_length);
       }
-	else
-		        printf("\n0x%02x\n", sgx_ret_status); 
+//	else
+//		        printf("\n0x%02x\n", sgx_ret_status); 
 
-	printf("Returning this: \n"); 
+/*	printf("Returning this: \n"); 
 	for(counter=0;counter<output_ciphertext_plus_tag_length;counter++)
 		printf("%02x ",output_ciphertext_plus_tag[counter]); 
-	printf("\n"); 
+	printf("\n"); */
        free(output_ciphertext_plus_tag);
      if(write_protobuf_msg_to_fd(fd, protobuf_msg)!=0)
           return 0xfc;