Fix OCSP_basic_verify() cert chain construction in case bs->certs is NULL (backport)
[openssl.git] / crypto / ocsp / ocsp_vfy.c
index d4a257c33bb593af42578d81e288a7e24068c569..7a7d06094edfe41c54952da50018da02c4fc8d17 100644 (file)
@@ -118,6 +118,8 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
                     goto end;
                 }
             }
+        } else if (certs != NULL) {
+            untrusted = certs;
         } else {
             untrusted = bs->certs;
         }