]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make sure SSL certificate errors gets logged and complained about
authorhno <>
Sat, 7 Dec 2002 08:55:22 +0000 (08:55 +0000)
committerhno <>
Sat, 7 Dec 2002 08:55:22 +0000 (08:55 +0000)
loudly.

src/cache_cf.cc
src/ssl_support.cc

index 8fa55733cc7df943cd4727adc0b81d0b4aa844c3..3d063d56899031c28a847bf1b8ede6df3e52eb32 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.422 2002/12/06 23:19:13 hno Exp $
+ * $Id: cache_cf.cc,v 1.423 2002/12/07 01:55:22 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -2468,6 +2468,8 @@ parse_https_port_list(https_port_list ** head)
     while (*head)
        head = &(*head)->next;
     s->sslContext = sslCreateServerContext(s->cert, s->key, s->version, s->cipher, s->options, s->sslflags, s->clientca, s->cafile, s->capath);
+    if (!s->sslContext)
+       self_destruct();
     *head = s;
 }
 
index 3731c8fb76c41301877dd58afb4b41b77e51814f..e5af6a5a8aa1285d78e339b2eac83db60b559686 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl_support.cc,v 1.8 2002/12/06 23:19:16 hno Exp $
+ * $Id: ssl_support.cc,v 1.9 2002/12/07 01:55:22 hno Exp $
  *
  * AUTHOR: Benno Rice
  * DEBUG: section 83    SSL accelerator support
@@ -381,14 +381,14 @@ sslCreateServerContext(const char *certfile, const char *keyfile, int version, c
     debug(83, 1) ("Using certificate in %s\n", certfile);
     if (!SSL_CTX_use_certificate_chain_file(sslContext, certfile)) {
        ssl_error = ERR_get_error();
-       debug(83, 1) ("Failed to acquire SSL certificate '%s': %s\n",
+       debug(83, 0) ("Failed to acquire SSL certificate '%s': %s\n",
            certfile, ERR_error_string(ssl_error, NULL));
        goto error;
     }
     debug(83, 1) ("Using private key in %s\n", keyfile);
     if (!SSL_CTX_use_PrivateKey_file(sslContext, keyfile, SSL_FILETYPE_PEM)) {
        ssl_error = ERR_get_error();
-       debug(83, 1) ("Failed to acquire SSL private key '%s': %s\n",
+       debug(83, 0) ("Failed to acquire SSL private key '%s': %s\n",
            keyfile, ERR_error_string(ssl_error, NULL));
        goto error;
     }