Open Enclave  0.15.0

◆ oe_unseal()

oe_result_t oe_unseal ( const uint8_t *  blob,
size_t  blob_size,
const uint8_t *  additional_data,
size_t  additional_data_size,
uint8_t **  plaintext,
size_t *  plaintext_size 
)

Unseal a blob sealed by oe_seal().

Parameters
[in]blobThe blob to be unsealed.
[in]blob_sizeSize of blob.
[in]additional_dataOptional additional data for verification. This must match additional_data passed to oe_seal().
[in]additional_data_sizeSize of additional_data.
[out]plaintextOptional parameter to receive the pointer to the decrypted data on success. Freed by oe_free().
[out]plaintext_sizeOptional parameter to receive the size of plaintext on success. This parameter must be NULL if plaintext is NULL.
Return values
OE_OKUnsealed blob successfully.
OE_INVALID_PARAMETERAt least one parameter is invalid.
OE_OUT_OF_MEMORYFailed to allocate memory.
OE_UNSUPPORTEDError occurred during decryption, due to either tampered blob or missing plug-in.