From 3b310c69a5acd77ac93b01fb288db69af7a53310 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 9 Sep 2019 18:22:50 +0200 Subject: [PATCH] Add a note to some invasive tests Signed-off-by: Gilles Peskine --- .../test_suite_psa_crypto_persistent_key.function | 12 ++++++++++++ tests/suites/test_suite_psa_its.function | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/tests/suites/test_suite_psa_crypto_persistent_key.function b/tests/suites/test_suite_psa_crypto_persistent_key.function index 4edc6979c..e2d87efd8 100644 --- a/tests/suites/test_suite_psa_crypto_persistent_key.function +++ b/tests/suites/test_suite_psa_crypto_persistent_key.function @@ -1,4 +1,12 @@ /* BEGIN_HEADER */ + +/* The tests in this module verify the contents of key store files. They + * access internal key storage functions directly. Some of the tests depend + * on the the storage format. On the other hand, these tests treat the storage + * subsystem as a black box, and in particular have no reliance on the + * internals of the ITS implementation. + */ + #include #include "psa_crypto_helpers.h" @@ -9,6 +17,10 @@ #define PSA_KEY_STORAGE_MAGIC_HEADER "PSA\0KEY" #define PSA_KEY_STORAGE_MAGIC_HEADER_LENGTH ( sizeof( PSA_KEY_STORAGE_MAGIC_HEADER ) ) +/* Enforce the storage format for keys. The storage format is not a public + * documented interface, but it must be preserved between versions so that + * upgrades work smoothly, so it's a stable interface nonetheless. + */ typedef struct { uint8_t magic[PSA_KEY_STORAGE_MAGIC_HEADER_LENGTH]; uint8_t version[4]; diff --git a/tests/suites/test_suite_psa_its.function b/tests/suites/test_suite_psa_its.function index a1d39bf54..04a735a29 100644 --- a/tests/suites/test_suite_psa_its.function +++ b/tests/suites/test_suite_psa_its.function @@ -1,4 +1,10 @@ /* BEGIN_HEADER */ + +/* This test file is specific to the ITS implementation in PSA Crypto + * on top of stdio. It expects to know what the stdio name of a file is + * based on its keystore name. + */ + #include "../library/psa_crypto_its.h" #include "psa_helpers.h"