From 73a218513baee92b5f804e4238cf1b20bbd8275c Mon Sep 17 00:00:00 2001 From: Valerio Setti Date: Fri, 24 Feb 2023 09:19:22 +0100 Subject: [PATCH] psa_crypto_rsa: add comment/explanation for residual PK_WRITE_C guard Signed-off-by: Valerio Setti --- library/psa_crypto_rsa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/psa_crypto_rsa.c b/library/psa_crypto_rsa.c index 6e90f1cea..0db425f11 100644 --- a/library/psa_crypto_rsa.c +++ b/library/psa_crypto_rsa.c @@ -172,6 +172,9 @@ psa_status_t mbedtls_psa_rsa_export_key(psa_key_type_t type, size_t data_size, size_t *data_length) { +/* Currently this is always true due to the fact that build_info.h auto-enables + * MBEDTLS_PK_WRITE_C whenever both PSA and RSA_C are enabled. + * However we keep the guard here to emphasize this dependency explicitly. */ #if defined(MBEDTLS_PK_WRITE_C) int ret; mbedtls_pk_context pk;