[openssl-commits] [openssl] master update

Viktor Dukhovni viktor at openssl.org
Sat Dec 3 00:37:46 UTC 2016


The branch master has been updated
       via  c53f7355b93885d1f12237f94b363ad747f03dad (commit)
      from  ef2bf0f57c2282d3b4fd47138052d0ab9a8f2b6a (commit)


- Log -----------------------------------------------------------------
commit c53f7355b93885d1f12237f94b363ad747f03dad
Author: Viktor Dukhovni <openssl-users at dukhovni.org>
Date:   Fri Nov 25 00:38:04 2016 -0500

    Restore last-resort expired untrusted intermediate issuers
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/x509/x509_vfy.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 9fbef11..ebc4424 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -308,16 +308,17 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
 static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x)
 {
     int i;
+    X509 *issuer, *rv = NULL;
 
     for (i = 0; i < sk_X509_num(sk); i++) {
-        X509 *issuer = sk_X509_value(sk, i);
-
-        if (!ctx->check_issued(ctx, x, issuer))
-            continue;
-        if (x509_check_cert_time(ctx, issuer, -1))
-            return issuer;
+        issuer = sk_X509_value(sk, i);
+        if (ctx->check_issued(ctx, x, issuer)) {
+            rv = issuer;
+            if (x509_check_cert_time(ctx, rv, -1))
+                break;
+        }
     }
-    return NULL;
+    return rv;
 }
 
 /* Given a possible certificate and issuer check them */


More information about the openssl-commits mailing list