Skip to content

Commit 09e6fb4

Browse files
authored
Merge pull request #8865 from daverodgman/iar-fixes-feb27
Add missing casts to fix IAR warnings
2 parents 5b5faf0 + 6a3da2d commit 09e6fb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/pk_wrap.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static int rsa_decrypt_wrap(mbedtls_pk_context *pk,
306306
psa_set_key_type(&attributes, PSA_KEY_TYPE_RSA_KEY_PAIR);
307307
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_DECRYPT);
308308
if (mbedtls_rsa_get_padding_mode(rsa) == MBEDTLS_RSA_PKCS_V21) {
309-
psa_md_alg = mbedtls_md_psa_alg_from_type(mbedtls_rsa_get_md_alg(rsa));
309+
psa_md_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) mbedtls_rsa_get_md_alg(rsa));
310310
decrypt_alg = PSA_ALG_RSA_OAEP(psa_md_alg);
311311
} else {
312312
decrypt_alg = PSA_ALG_RSA_PKCS1V15_CRYPT;
@@ -388,7 +388,7 @@ static int rsa_encrypt_wrap(mbedtls_pk_context *pk,
388388

389389
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT);
390390
if (mbedtls_rsa_get_padding_mode(rsa) == MBEDTLS_RSA_PKCS_V21) {
391-
psa_md_alg = mbedtls_md_psa_alg_from_type(mbedtls_rsa_get_md_alg(rsa));
391+
psa_md_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) mbedtls_rsa_get_md_alg(rsa));
392392
psa_set_key_algorithm(&attributes, PSA_ALG_RSA_OAEP(psa_md_alg));
393393
} else {
394394
psa_set_key_algorithm(&attributes, PSA_ALG_RSA_PKCS1V15_CRYPT);

0 commit comments

Comments
 (0)