diff options
author | 2020-11-16 17:43:37 +0000 | |
---|---|---|
committer | 2020-11-16 17:43:37 +0000 | |
commit | 1e2ba4e8f158d5fea57821807d6a0a7defba2133 (patch) | |
tree | 3853e75eb9563f81d39a6845c516243b7f50e964 | |
parent | Add back an X509_STORE_CTX error code assignment. (diff) | |
download | wireguard-openbsd-1e2ba4e8f158d5fea57821807d6a0a7defba2133.tar.xz wireguard-openbsd-1e2ba4e8f158d5fea57821807d6a0a7defba2133.zip |
Use X509_V_OK instead of 0.
ok beck@ tb@
-rw-r--r-- | lib/libcrypto/x509/x509_verify.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libcrypto/x509/x509_verify.c b/lib/libcrypto/x509/x509_verify.c index 39f86d383e5..763adda227e 100644 --- a/lib/libcrypto/x509/x509_verify.c +++ b/lib/libcrypto/x509/x509_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_verify.c,v 1.21 2020/11/16 17:42:35 jsing Exp $ */ +/* $OpenBSD: x509_verify.c,v 1.22 2020/11/16 17:43:37 jsing Exp $ */ /* * Copyright (c) 2020 Bob Beck <beck@openbsd.org> * @@ -1002,11 +1002,10 @@ x509_verify(struct x509_verify_ctx *ctx, X509 *leaf, char *name) * We could not find a validated chain, and for some reason do not * have an error set. */ - if (ctx->chains_count == 0 && ctx->error == 0) { + if (ctx->chains_count == 0 && ctx->error == X509_V_OK) { ctx->error = X509_V_ERR_UNSPECIFIED; - if (ctx->xsc != NULL && ctx->xsc->error != 0) + if (ctx->xsc != NULL && ctx->xsc->error != X509_V_OK) ctx->error = ctx->xsc->error; - } /* Clear whatever errors happened if we have any validated chain */ |