From 7f1863c905c7b565a64d284303c79b9fecf52999 Mon Sep 17 00:00:00 2001 From: "Adrian L. Shaw" Date: Tue, 6 Aug 2019 16:34:44 +0100 Subject: [PATCH] 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. --- include/psa/crypto.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index 05d76e1c1..57d3766ab 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -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