From db2b8db7150183e15169636027f87c4145e5645c Mon Sep 17 00:00:00 2001 From: Darryl Green Date: Fri, 15 Jun 2018 13:06:04 +0100 Subject: psa: Add storage implementation for files Add new functions, psa_load_persistent_key(), psa_free_persistent_key_data(), and psa_save_persistent_key(), for managing persistent keys. These functions load to or save from our internal representation of key slots. Serialization is a concern of the storage backend implementation and doesn't abstraction-leak into the lifetime management code. An initial implementation for files is provided. Additional storage backends can implement this interface for other storage types. --- configs/config-psa-crypto.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'configs') diff --git a/configs/config-psa-crypto.h b/configs/config-psa-crypto.h index 870e335..27e9ef1 100644 --- a/configs/config-psa-crypto.h +++ b/configs/config-psa-crypto.h @@ -1523,6 +1523,31 @@ #define MBEDTLS_PSA_CRYPTO_C /** + * \def MBEDTLS_PSA_CRYPTO_STORAGE_C + * + * Enable the Platform Security Architecture persistent key storage. + * + * Module: library/psa_crypto_storage.c + * + * Requires: MBEDTLS_PSA_CRYPTO_C, MBEDTLS_PSA_CRYPTO_STORAGE_FILE_C + * + */ +#define MBEDTLS_PSA_CRYPTO_STORAGE_C + +/** + * \def MBEDTLS_PSA_CRYPTO_STORAGE_FILE_C + * + * Enable persistent key storage over files for the + * Platform Security Architecture cryptography API. + * + * Module: library/psa_crypto_storage_file.c + * + * Requires: MBEDTLS_PSA_CRYPTO_C, MBEDTLS_FS_IO + * + */ +#define MBEDTLS_PSA_CRYPTO_STORAGE_FILE_C + +/** * \def MBEDTLS_RIPEMD160_C * * Enable the RIPEMD-160 hash algorithm. -- cgit v1.1