summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-12-13 14:05:32 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-12-13 15:29:26 +0000
commit53a8f8c26d43b2fb1a0a4a6d2b12c27abf97ea77 (patch)
treef450c7cdd8d669d2458b2bc084b4e87e33ef385c /crypto/x509
parentbf4863b3f5729f3679c4270dc8125f2bded67caf (diff)
Fix for partial chain notification.
For consistency with other cases if we are performing partial chain verification with just one certificate notify the callback with ok==1.
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_vfy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index f5bcec352a..15dd25fce5 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -1725,7 +1725,10 @@ static int internal_verify(X509_STORE_CTX *ctx)
else
{
if (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN && n == 0)
- return check_cert_time(ctx, xi);
+ {
+ xs = xi;
+ goto check_cert;
+ }
if (n <= 0)
{
ctx->error=X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
@@ -1776,6 +1779,7 @@ static int internal_verify(X509_STORE_CTX *ctx)
xs->valid = 1;
+ check_cert:
ok = check_cert_time(ctx, xs);
if (!ok)
goto end;