summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/x509/x509_verify.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c
index 640558b685..af35cb0007 100644
--- a/src/lib/libcrypto/x509/x509_verify.c
+++ b/src/lib/libcrypto/x509/x509_verify.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_verify.c,v 1.76 2026/05/04 13:55:20 tb Exp $ */ 1/* $OpenBSD: x509_verify.c,v 1.77 2026/06/10 04:26:58 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -909,7 +909,8 @@ x509_verify_cert_extensions(struct x509_verify_ctx *ctx, X509 *cert, int need_ca
909 ctx->error = X509_V_ERR_INVALID_CA; 909 ctx->error = X509_V_ERR_INVALID_CA;
910 return 0; 910 return 0;
911 } 911 }
912 if (ctx->purpose > 0 && X509_check_purpose(cert, ctx->purpose, need_ca)) { 912 if (ctx->purpose > 0 &&
913 X509_check_purpose(cert, ctx->purpose, need_ca) != 1) {
913 ctx->error = X509_V_ERR_INVALID_PURPOSE; 914 ctx->error = X509_V_ERR_INVALID_PURPOSE;
914 return 0; 915 return 0;
915 } 916 }