diff options
author | jsing <> | 2020-11-16 17:43:37 +0000 |
---|---|---|
committer | jsing <> | 2020-11-16 17:43:37 +0000 |
commit | abffca736d5ed1aaca940a97ae97979bc46699f8 (patch) | |
tree | 3b45937e1895c3a91109f5d2fe9e57abfb472b7a | |
parent | 6ba36f769980f2d0ef8a398b5bf7d1f8430b962d (diff) | |
download | openbsd-abffca736d5ed1aaca940a97ae97979bc46699f8.tar.gz openbsd-abffca736d5ed1aaca940a97ae97979bc46699f8.tar.bz2 openbsd-abffca736d5ed1aaca940a97ae97979bc46699f8.zip |
Use X509_V_OK instead of 0.
ok beck@ tb@
-rw-r--r-- | src/lib/libcrypto/x509/x509_verify.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 39f86d383e..763adda227 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.21 2020/11/16 17:42:35 jsing Exp $ */ | 1 | /* $OpenBSD: x509_verify.c,v 1.22 2020/11/16 17:43:37 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -1002,11 +1002,10 @@ x509_verify(struct x509_verify_ctx *ctx, X509 *leaf, char *name) | |||
1002 | * We could not find a validated chain, and for some reason do not | 1002 | * We could not find a validated chain, and for some reason do not |
1003 | * have an error set. | 1003 | * have an error set. |
1004 | */ | 1004 | */ |
1005 | if (ctx->chains_count == 0 && ctx->error == 0) { | 1005 | if (ctx->chains_count == 0 && ctx->error == X509_V_OK) { |
1006 | ctx->error = X509_V_ERR_UNSPECIFIED; | 1006 | ctx->error = X509_V_ERR_UNSPECIFIED; |
1007 | if (ctx->xsc != NULL && ctx->xsc->error != 0) | 1007 | if (ctx->xsc != NULL && ctx->xsc->error != X509_V_OK) |
1008 | ctx->error = ctx->xsc->error; | 1008 | ctx->error = ctx->xsc->error; |
1009 | |||
1010 | } | 1009 | } |
1011 | 1010 | ||
1012 | /* Clear whatever errors happened if we have any validated chain */ | 1011 | /* Clear whatever errors happened if we have any validated chain */ |