|
@@ -717,16 +717,16 @@ uint32_t create_and_seal_signing_key_pair_to_disk( __attribute__((unused)) int
|
|
if(length == 0xFFFFFFFF)
|
|
if(length == 0xFFFFFFFF)
|
|
return 0xFFFFFFFF;
|
|
return 0xFFFFFFFF;
|
|
printf("0x%x input msg, 0x%x bytes for sealed msg in parameter value\n", SGX_ECP256_KEY_SIZE, length); fflush(stdout);
|
|
printf("0x%x input msg, 0x%x bytes for sealed msg in parameter value\n", SGX_ECP256_KEY_SIZE, length); fflush(stdout);
|
|
- uint8_t* sealed_data2=(uint8_t*) malloc(*actual_sealed_msg_length);
|
|
+ uint8_t* sealed_data2=(uint8_t*) malloc(length);
|
|
printf("Made call to sgx_calc_sealed_data_size\n"); fflush(stdout);
|
|
printf("Made call to sgx_calc_sealed_data_size\n"); fflush(stdout);
|
|
- Decryptor_create_and_seal_ecdsa_signing_key_pair(e2_enclave_id, &ret_status, pub_key, actual_sealed_msg_length, sealed_data2);
|
|
+ Decryptor_create_and_seal_ecdsa_signing_key_pair(e2_enclave_id, &ret_status, pub_key, &length, sealed_data2);
|
|
if(ret_status != SGX_SUCCESS)
|
|
if(ret_status != SGX_SUCCESS)
|
|
{
|
|
{
|
|
printf("create_and_seal called returned an error: %x", ret_status);
|
|
printf("create_and_seal called returned an error: %x", ret_status);
|
|
free(sealed_data2);
|
|
free(sealed_data2);
|
|
return 0xFFFFFFFF;
|
|
return 0xFFFFFFFF;
|
|
}
|
|
}
|
|
- printf("It returned sgx_success\n"); fflush(stdout);
|
|
+ printf("It returned sgx_success\n"); fflush(stdout); *actual_sealed_msg_length=length;
|
|
|
|
|
|
ret_status = write_to_fd(fd, sealed_data, actual_sealed_msg_length);
|
|
ret_status = write_to_fd(fd, sealed_data, actual_sealed_msg_length);
|
|
free(sealed_data);
|
|
free(sealed_data);
|