Switch to mbedtls_pk_verify_new

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
Ben Taylor 2025-07-07 09:41:34 +01:00
parent b5fd7b9a54
commit 306ffd3a36
3 changed files with 4 additions and 5 deletions

View File

@ -2082,8 +2082,7 @@ start_processing:
#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT)
if (pk_alg == MBEDTLS_PK_RSASSA_PSS) {
ret = mbedtls_pk_verify_ext(pk_alg, NULL,
peer_pk,
ret = mbedtls_pk_verify_new(pk_alg, peer_pk,
md_alg, hash, hashlen,
p, sig_len);
} else

View File

@ -300,7 +300,7 @@ static int ssl_tls13_parse_certificate_verify(mbedtls_ssl_context *ssl,
MBEDTLS_SSL_DEBUG_BUF(3, "verify hash", verify_hash, verify_hash_len);
if ((ret = mbedtls_pk_verify_ext(sig_alg, NULL,
if ((ret = mbedtls_pk_verify_new(sig_alg,
&ssl->session_negotiate->peer_cert->pk,
md_alg, verify_hash, verify_hash_len,
p, signature_len)) == 0) {

View File

@ -2060,7 +2060,7 @@ static int x509_crt_verifycrl(mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
}
if (mbedtls_pk_verify_ext(crl_list->sig_pk, NULL, &ca->pk,
if (mbedtls_pk_verify_new(crl_list->sig_pk, &ca->pk,
crl_list->sig_md, hash, hash_length,
crl_list->sig.p, crl_list->sig.len) != 0) {
flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED;
@ -2134,7 +2134,7 @@ static int x509_crt_check_signature(const mbedtls_x509_crt *child,
(void) rs_ctx;
#endif
return mbedtls_pk_verify_ext(child->sig_pk, NULL, &parent->pk,
return mbedtls_pk_verify_new(child->sig_pk, &parent->pk,
child->sig_md, hash, hash_len,
child->sig.p, child->sig.len);
}