From 0542d595ce7b9f3f9af0873fcf9c93c831641427 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 96ffa0bbb..d62c2a9dd 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -618,6 +618,7 @@ psa_status_t psa_destroy_key(psa_key_handle_t 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