Add PSA_ERROR_INSUFFICIENT_MEMORY to psa_export_key

It may be possible that the implementation runs out of
memory when exporting a key from storage or a secure
element. For example, it may not be possible to directly
move the data from storage to the caller, so the implementation
will have to buffer the material temporarily (an issue if dynamic
memory allocation scheme is used). For a large key
this is more likely to return.
This commit is contained in:
Adrian L. Shaw 2019-08-06 16:34:44 +01:00
parent 15731c1422
commit 7f1863c905

View file

@ -832,6 +832,7 @@ psa_status_t psa_copy_key(psa_key_handle_t source_handle,
* \retval #PSA_ERROR_HARDWARE_FAILURE
* \retval #PSA_ERROR_CORRUPTION_DETECTED
* \retval #PSA_ERROR_STORAGE_FAILURE
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
* \retval #PSA_ERROR_BAD_STATE
* The library has not been previously initialized by psa_crypto_init().
* It is implementation-dependent whether a failure to initialize