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.
diff --git a/scripts/mbed_crypto.make b/scripts/mbed_crypto.make
index e5e6ded..ab54d55 100644
--- a/scripts/mbed_crypto.make
+++ b/scripts/mbed_crypto.make
@@ -70,6 +70,10 @@
platform.c \
platform_util.c \
psa_crypto.c \
+ psa_crypto_storage.h \
+ psa_crypto_storage.c \
+ psa_crypto_storage_backend.h \
+ psa_crypto_storage_file.c \
ripemd160.c \
rsa_internal.c \
rsa.c \
@@ -154,6 +158,8 @@
tests/suites/test_suite_psa_crypto_hash.function \
tests/suites/test_suite_psa_crypto_metadata.data \
tests/suites/test_suite_psa_crypto_metadata.function \
+ tests/suites/test_suite_psa_crypto_storage_file.data \
+ tests/suites/test_suite_psa_crypto_storage_file.function \
# Don't delete this line.
OTHER_FILES := \