From 6dce4bbe3645d8c57ddbec5143307d585c275f52 Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Wed, 10 Feb 2021 17:07:20 +0100 Subject: [PATCH 1/3] Fix unused argument when compiling with MBEDTLS_ECDSA_SIGN_ALT Signed-off-by: Steven Cooreman --- library/ecdsa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/ecdsa.c b/library/ecdsa.c index 355bd90f8..7dc8708a3 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -470,6 +470,8 @@ static int ecdsa_sign_det_restartable( mbedtls_ecp_group *grp, sign: #endif #if defined(MBEDTLS_ECDSA_SIGN_ALT) + (void) f_rng_blind; + (void) p_rng_blind; ret = mbedtls_ecdsa_sign( grp, r, s, d, buf, blen, mbedtls_hmac_drbg_random, p_rng ); #else From 7196fefeef84fd4549f6a20beada9bb921e6baa7 Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Wed, 10 Feb 2021 17:13:28 +0100 Subject: [PATCH 2/3] Fix unused variable in PSA core when no AEAD algorithm is present Signed-off-by: Steven Cooreman --- library/psa_crypto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index c00875bd0..6dec490c8 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -4584,6 +4584,7 @@ psa_status_t psa_aead_encrypt( mbedtls_svc_key_id_t key, else #endif /* MBEDTLS_CHACHAPOLY_C */ { + (void) tag; return( PSA_ERROR_NOT_SUPPORTED ); } From 74afe47cc8552b53433d516dc576579b32284edf Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Wed, 10 Feb 2021 17:19:22 +0100 Subject: [PATCH 3/3] Fix unused variables in PSA core when no KDF algorithm is present Signed-off-by: Steven Cooreman --- library/psa_crypto.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 6dec490c8..53da54616 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5091,6 +5091,7 @@ psa_status_t psa_key_derivation_output_bytes( #endif /* MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF || * MBEDTLS_PSA_BUILTIN_ALG_TLS12_PSK_TO_MS */ { + (void) kdf_alg; return( PSA_ERROR_BAD_STATE ); } @@ -5575,6 +5576,9 @@ static psa_status_t psa_key_derivation_input_internal( #endif /* MBEDTLS_PSA_BUILTIN_ALG_TLS12_PSK_TO_MS */ { /* This can't happen unless the operation object was not initialized */ + (void) data; + (void) data_length; + (void) kdf_alg; return( PSA_ERROR_BAD_STATE ); }