mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-22 20:10:32 -04:00
Switch to mbedtls_pk_verify_new
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
parent
b5fd7b9a54
commit
306ffd3a36
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user