Assignment-7-sgximpl #13
1 changed files with 7 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue