diff options
| author | beck <> | 2017-04-28 22:46:40 +0000 |
|---|---|---|
| committer | beck <> | 2017-04-28 22:46:40 +0000 |
| commit | 1a022d2b7f958fffe8e920e5510d226f01a2b3d0 (patch) | |
| tree | 3d1f17028c1d6966d7d9ab06847304c2fbde6b98 /src/lib/libcrypto/x509 | |
| parent | f3ff740b7de3b8362cbe53c139cf85019ce7378c (diff) | |
| download | openbsd-1a022d2b7f958fffe8e920e5510d226f01a2b3d0.tar.gz openbsd-1a022d2b7f958fffe8e920e5510d226f01a2b3d0.tar.bz2 openbsd-1a022d2b7f958fffe8e920e5510d226f01a2b3d0.zip | |
revert previous accidental commit
Diffstat (limited to 'src/lib/libcrypto/x509')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 09d33d4cf1..8c2f5b66db 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_vfy.c,v 1.62 2017/04/28 22:38:51 beck Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.63 2017/04/28 22:46:40 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -541,7 +541,15 @@ X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 541 | /* Safety net, error returns must set ctx->error */ | 541 | /* Safety net, error returns must set ctx->error */ |
| 542 | if (ok <= 0 && ctx->error == X509_V_OK) | 542 | if (ok <= 0 && ctx->error == X509_V_OK) |
| 543 | ctx->error = X509_V_ERR_UNSPECIFIED; | 543 | ctx->error = X509_V_ERR_UNSPECIFIED; |
| 544 | return ok; | 544 | |
| 545 | /* | ||
| 546 | * Safety net, if user provided verify callback indicates sucess | ||
| 547 | * make sure they have set error to X509_V_OK | ||
| 548 | */ | ||
| 549 | if (ctx->verify_cb != null_callback && ok == 1) | ||
| 550 | ctx->error = X509_V_OK; | ||
| 551 | |||
| 552 | return(ctx->error == X509_V_OK); | ||
| 545 | } | 553 | } |
| 546 | 554 | ||
| 547 | /* Given a STACK_OF(X509) find the issuer of cert (if any) | 555 | /* Given a STACK_OF(X509) find the issuer of cert (if any) |
