From f5960b830baf130b08e205f6a3a8241ca8cfbe6c Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Thu, 5 May 2016 04:10:57 +0000 Subject: [PATCH] [sslproc] Use certificate file if key file is not present --- ircd/ircd.c | 2 +- ssld/ssld.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ircd/ircd.c b/ircd/ircd.c index 3a16a40c..9bd415d2 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -827,7 +827,7 @@ charybdis_main(int argc, char * const argv[]) } rb_strlcpy(me.info, ServerInfo.description, sizeof(me.info)); - if(ServerInfo.ssl_cert != NULL && ServerInfo.ssl_private_key != NULL) + if(ServerInfo.ssl_cert != NULL) { /* just do the rb_setup_ssl_server to validate the config */ if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list)) diff --git a/ssld/ssld.c b/ssld/ssld.c index 93491004..ea0d462d 100644 --- a/ssld/ssld.c +++ b/ssld/ssld.c @@ -910,6 +910,8 @@ ssl_new_keys(mod_ctl_t * ctl, mod_ctl_buf_t * ctl_buf) dhparam = buf; buf += strlen(dhparam) + 1; cipher_list = buf; + if(strlen(key) == 0) + key = cert; if(strlen(dhparam) == 0) dhparam = NULL; if(strlen(cipher_list) == 0)