summaryrefslogtreecommitdiff
path: root/crypto/x509-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509-utils.c')
-rw-r--r--crypto/x509-utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/x509-utils.c b/crypto/x509-utils.c
index 34cbfca26b..edcc44de80 100644
--- a/crypto/x509-utils.c
+++ b/crypto/x509-utils.c
@@ -319,6 +319,9 @@ int qcrypto_x509_check_ecc_curve_p521(uint8_t *cert, size_t size, Error **errp)
int curve_id;
algo = qcrypto_x509_get_pk_algorithm(cert, size, errp);
+ if (algo < 0) {
+ return -1;
+ }
if (algo != GNUTLS_PK_ECDSA) {
return 0;
}