We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e403ff3 commit 3ddf7fbCopy full SHA for 3ddf7fb
library/x509_crt.c
@@ -38,6 +38,7 @@
38
#include "psa_util_internal.h"
39
#include "mbedtls/psa_util.h"
40
#include "pk_internal.h"
41
+#include "mbedtls_utils.h"
42
43
#include "mbedtls/platform.h"
44
@@ -2111,7 +2112,9 @@ static int x509_crt_check_signature(const mbedtls_x509_crt *child,
2111
2112
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
2113
2114
/* Skip expensive computation on obvious mismatch */
- if (!mbedtls_pk_can_do(&parent->pk, (mbedtls_pk_type_t) child->sig_pk)) {
2115
+ if (!mbedtls_pk_can_do_psa(&parent->pk,
2116
+ mbedtls_psa_alg_from_pk_sigalg(child->sig_pk, hash_alg),
2117
+ PSA_KEY_USAGE_VERIFY_HASH)) {
2118
return -1;
2119
}
2120
0 commit comments