[sslproc] Use certificate file if key file is not present
This commit is contained in:
parent
883f3833ed
commit
f5960b830b
2 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue