summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-05 16:19:14 -0500
committerJune McEnroe <june@causal.agency>2019-11-05 16:19:14 -0500
commit37217e23127a1d66d68de06a615c613fd3ac9141 (patch)
treee1e83cb027c4de3b85007c55c4883a6b545533fd
parentImplement SASL EXTERNAL (diff)
downloadpounce-37217e23127a1d66d68de06a615c613fd3ac9141.tar.gz
pounce-37217e23127a1d66d68de06a615c613fd3ac9141.zip
Use one call to set client cert and key
-rw-r--r--server.c15
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)
 			);
 		}
rc?id=8db86d36298a78e381771d63f1b17ced79712e21&follow=1'>Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe