|
@@ -314,8 +314,8 @@ int decrypt_client_data_wrapper(unsigned char* op_plaintext , uint32_t own_encla
|
|
// Just so that the ciphertext is returned back to Apache in case decrypt_client_data fails.
|
|
// Just so that the ciphertext is returned back to Apache in case decrypt_client_data fails.
|
|
for(counter=0;counter<ciphertext_length;counter++)
|
|
for(counter=0;counter<ciphertext_length;counter++)
|
|
client_data_to_apache[counter]=client_data_from_apache[counter+64];
|
|
client_data_to_apache[counter]=client_data_from_apache[counter+64];
|
|
-
|
|
|
|
- Decryptor_decrypt_client_data(own_enclave_id, &sgx_ret_status, client_data_from_apache, ciphertext_length, client_data_from_apache + 64, client_data_to_apache);
|
|
|
|
|
|
+ uint8_t clen;
|
|
|
|
+ Decryptor_decrypt_client_data(own_enclave_id, &sgx_ret_status, client_data_from_apache, ciphertext_length, client_data_from_apache + 64, client_data_to_apache, &clen);
|
|
if(sgx_ret_status != 0)
|
|
if(sgx_ret_status != 0)
|
|
{
|
|
{
|
|
printf("decrypt_client_data returned :0x%x\n", sgx_ret_status); fflush(stdout); //return sgx_ret_status;
|
|
printf("decrypt_client_data returned :0x%x\n", sgx_ret_status); fflush(stdout); //return sgx_ret_status;
|
|
@@ -337,6 +337,15 @@ int decrypt_client_data_wrapper(unsigned char* op_plaintext , uint32_t own_encla
|
|
for(counter=ciphertext_length+32;counter<64+ciphertext_length;counter++)
|
|
for(counter=ciphertext_length+32;counter<64+ciphertext_length;counter++)
|
|
printf("0x%02x ", client_data_to_apache[counter]);
|
|
printf("0x%02x ", client_data_to_apache[counter]);
|
|
printf("\n"); fflush(stdout);
|
|
printf("\n"); fflush(stdout);
|
|
|
|
+ printf("Ciphertext for the string Miti \n");
|
|
|
|
+ for(counter=ciphertext_length+64;counter<64+ciphertext_length + 4;counter++)
|
|
|
|
+ printf("%d ", client_data_to_apache[counter]);
|
|
|
|
+ printf("\n"); fflush(stdout);
|
|
|
|
+ printf("Tag for the string Miti \n");
|
|
|
|
+ for(counter=ciphertext_length+64+4;counter<80+ciphertext_length + 4;counter++)
|
|
|
|
+ printf("%d ", client_data_to_apache[counter]);
|
|
|
|
+ printf("\n"); fflush(stdout);
|
|
|
|
+
|
|
|
|
|
|
protobuf_encrypted_msg.set_msg((void*) client_data_to_apache, ciphertext_length);// Is this message set tho?
|
|
protobuf_encrypted_msg.set_msg((void*) client_data_to_apache, ciphertext_length);// Is this message set tho?
|
|
if(write_protobuf_msg_to_fd(apache_fd, protobuf_encrypted_msg)!=0)
|
|
if(write_protobuf_msg_to_fd(apache_fd, protobuf_encrypted_msg)!=0)
|