[sslproc] Use certificate file if key file is not present

This commit is contained in:
Aaron Jones 2016-05-05 04:10:57 +00:00
parent 883f3833ed
commit f5960b830b
No known key found for this signature in database
GPG key ID: 6E854C0FAAD4CEA4
2 changed files with 3 additions and 1 deletions

View file

@ -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))

View file

@ -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)