[Assignment-7] .

This commit is contained in:
Sascha Tommasone 2024-07-06 15:02:27 +02:00
parent b0cfbae0f8
commit 0c3e06858b
Signed by: saschato
GPG key ID: 751068A86FCAA217

View file

@ -168,12 +168,15 @@ sgx_status_t generate_key_pair(uint8_t *sealed, uint32_t sealed_size) {
// create ecc keypair
if((status = sgx_ecc256_create_key_pair(&private, &public, ecc_handle)) != SGX_SUCCESS) {
sgx_ecc256_close_context(ecc_handle);
return status;
goto exit;
}
// return status of sealing
return seal_key_pair(&private, &public, &sealed);
// seal keypair
status = seal_key_pair(&private, &public, &sealed);
exit: ;
sgx_ecc256_close_context(ecc_handle);
return status;
}
sgx_status_t get_public_key(const uint8_t *sealed, uint32_t sealed_size, uint8_t *public) {