]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_ssl: clear *SSL errors before loading certificates and checking
authorStefan Eissing <icing@apache.org>
Mon, 5 Nov 2018 10:37:32 +0000 (10:37 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 5 Nov 2018 10:37:32 +0000 (10:37 +0000)
     afterwards. Otherwise errors are reported when other SSL using modules
     are in play. Fixes PR 62880. [Michael Kaufmann]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1845768 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_util_ocsp.c

diff --git a/CHANGES b/CHANGES
index 5e4d4d49cfc4e99387929d055fee4cc29fab6f8d..bc0d220193e2d09b09ad7ec36da5acd7a438cb96 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_ssl: clear *SSL errors before loading certificates and checking
+     afterwards. Otherwise errors are reported when other SSL using modules
+     are in play. Fixes PR 62880. [Michael Kaufmann]
+
   *) mod_ssl: Correctly merge configurations that have client certificates set
      by SSLProxyMachineCertificate{File|Path}. [Ruediger Pluem]
 
index 654ea052a734883ab213137a6230472f4feb8e00..972ce1adc4856486b0908c3a218c0f29cdfc84f1 100644 (file)
@@ -1063,8 +1063,10 @@ static int use_certificate_chain(
         ctx->extra_certs = NULL;
     }
 #endif
+
     /* create new extra chain by loading the certs */
     n = 0;
+    ERR_clear_error();
     while ((x509 = PEM_read_bio_X509(bio, NULL, cb, NULL)) != NULL) {
         if (!SSL_CTX_add_extra_chain_cert(ctx, x509)) {
             X509_free(x509);
index b11a6e924e5786241986e5dd22dbcc47978880dd..b66e15146c85478398d3a610836026c72477eac5 100644 (file)
@@ -363,7 +363,9 @@ static STACK_OF(X509) *modssl_read_ocsp_certificates(const char *file)
         BIO_free(bio);
         return NULL;
     }
+
     /* create new extra chain by loading the certs */
+    ERR_clear_error();
     while ((x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL)) != NULL) {
         if (!other_certs) {
                 other_certs = sk_X509_new_null();