diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 55319c4bdb..8c9deffadf 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -877,19 +877,6 @@ static psa_status_t psa_restrict_key_policy( return( PSA_SUCCESS ); } -/** Get the description of a key given its identifier and policy constraints - * and lock it. - * - * The key must have allow all the usage flags set in \p usage. If \p alg is - * nonzero, the key must allow operations with this algorithm. If \p alg is - * zero, the algorithm is not checked. - * - * In case of a persistent key, the function loads the description of the key - * into a key slot if not already done. - * - * On success, the returned key slot is locked. It is the responsibility of - * the caller to unlock the key slot when it does not access it anymore. - */ psa_status_t psa_get_and_lock_key_slot_with_policy( mbedtls_svc_key_id_t key, psa_key_slot_t **p_slot, diff --git a/library/psa_crypto_core.h b/library/psa_crypto_core.h index 37f8162de7..5cefa273aa 100644 --- a/library/psa_crypto_core.h +++ b/library/psa_crypto_core.h @@ -185,6 +185,16 @@ static inline psa_key_slot_number_t psa_key_slot_get_slot_number( /** Get the description of a key given its identifier and policy constraints * and lock it. + * + * The key must have allow all the usage flags set in \p usage. If \p alg is + * nonzero, the key must allow operations with this algorithm. If \p alg is + * zero, the algorithm is not checked. + * + * In case of a persistent key, the function loads the description of the key + * into a key slot if not already done. + * + * On success, the returned key slot is locked. It is the responsibility of + * the caller to unlock the key slot when it does not access it anymore. */ psa_status_t psa_get_and_lock_key_slot_with_policy( mbedtls_svc_key_id_t key, psa_key_slot_t **p_slot,