From f6cc435a8a09f6dff383433a775583a0f691ba1c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 3 Dec 2018 17:44:43 +0100 Subject: [PATCH] Remove psa_key_slot_t from public headers This commit marks the beginning of the removal of support for direct access to key slots. From this commit on, programs that use psa_key_slot_t will no longer compile. Subsequent commits will remove the now-unused legacy support in psa_crypto.c. --- include/psa/crypto_platform.h | 3 --- library/psa_crypto.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/psa/crypto_platform.h b/include/psa/crypto_platform.h index c20396619a..50ca546fb6 100644 --- a/include/psa/crypto_platform.h +++ b/include/psa/crypto_platform.h @@ -46,9 +46,6 @@ /* PSA requires several types which C99 provides in stdint.h. */ #include -/* Integral type representing a key slot number. */ -typedef uint16_t psa_key_slot_t; - /* Integral type representing a key handle. */ typedef uint16_t psa_key_handle_t; diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 1a038a12a5..bff0ce7097 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -43,6 +43,10 @@ #include "psa/crypto.h" +/* Transitional definition while moving away from directly-accessible key + * slots and to a handle-only interface. */ +typedef psa_key_handle_t psa_key_slot_t; + #include "psa_crypto_invasive.h" #include "psa_crypto_slot_management.h" /* Include internal declarations that are useful for implementing persistently