diff options
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/server.c b/server.c index 5ca517c..cb11d84 100644 --- a/server.c +++ b/server.c @@ -46,21 +46,10 @@ void serverConfig(bool insecure, const char *cert, const char *priv) { } if (cert) { - error = tls_config_set_cert_file(config, cert); + error = tls_config_set_keypair_file(config, cert, (priv ? priv : cert)); if (error) { errx( - EX_SOFTWARE, "tls_config_set_cert_file: %s", - tls_config_error(config) - ); - } - } - - if (cert && !priv) priv = cert; - if (priv) { - error = tls_config_set_key_file(config, priv); - if (error) { - errx( - EX_SOFTWARE, "tls_config_set_key_file: %s", + EX_SOFTWARE, "tls_config_set_keypair_file: %s", tls_config_error(config) ); } |