Assignment 7 #4
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
|
// create ecc keypair
|
||||||
if((status = sgx_ecc256_create_key_pair(&private, &public, ecc_handle)) != SGX_SUCCESS) {
|
if((status = sgx_ecc256_create_key_pair(&private, &public, ecc_handle)) != SGX_SUCCESS) {
|
||||||
sgx_ecc256_close_context(ecc_handle);
|
goto exit;
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return status of sealing
|
// seal keypair
|
||||||
return seal_key_pair(&private, &public, &sealed);
|
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) {
|
sgx_status_t get_public_key(const uint8_t *sealed, uint32_t sealed_size, uint8_t *public) {
|
||||||
|
|
Loading…
Reference in a new issue