diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509_verify.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 74316cb941..124d4ba34e 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.15 2020/10/26 11:59:16 tb Exp $ */ | 1 | /* $OpenBSD: x509_verify.c,v 1.16 2020/10/26 12:01:01 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -932,6 +932,8 @@ x509_verify(struct x509_verify_ctx *ctx, X509 *leaf, char *name) | |||
932 | return (ctx->chains_count); | 932 | return (ctx->chains_count); |
933 | 933 | ||
934 | err: | 934 | err: |
935 | if (ctx->error == X509_V_OK) | ||
936 | ctx->error = X509_V_ERR_UNSPECIFIED; | ||
935 | if (ctx->xsc != NULL) | 937 | if (ctx->xsc != NULL) |
936 | ctx->xsc->error = ctx->error; | 938 | ctx->xsc->error = ctx->error; |
937 | return 0; | 939 | return 0; |