From 87ec2a09e412e8c85ffab9c89d07c3c35c121257 Mon Sep 17 00:00:00 2001 From: hno <> Date: Sat, 7 Dec 2002 08:55:22 +0000 Subject: [PATCH] Make sure SSL certificate errors gets logged and complained about loudly. --- src/cache_cf.cc | 4 +++- src/ssl_support.cc | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 8fa55733cc..3d063d5689 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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; } diff --git a/src/ssl_support.cc b/src/ssl_support.cc index 3731c8fb76..e5af6a5a8a 100644 --- a/src/ssl_support.cc +++ b/src/ssl_support.cc @@ -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; } -- 2.47.3