summary refs log tree commit diff
path: root/tls_config.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-02-27 09:57:33 -0500
committerJune McEnroe <june@causal.agency>2022-02-27 09:57:33 -0500
commit913a7ee3584b9cdb05b473123b529677f16e4e0b (patch)
tree45ed028bf5e09339cd815eb1277b6343213d44b6 /tls_config.c
parentImport LibreSSL 3.4.2 (diff)
downloadlibretls-913a7ee3584b9cdb05b473123b529677f16e4e0b.tar.gz
libretls-913a7ee3584b9cdb05b473123b529677f16e4e0b.zip
Import LibreSSL 3.5.0
Diffstat (limited to '')
-rw-r--r--tls_config.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tls_config.c b/tls_config.c
index 9144dad..15e218b 100644
--- a/tls_config.c
+++ b/tls_config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_config.c,v 1.63 2021/01/21 22:03:25 eric Exp $ */
+/* $OpenBSD: tls_config.c,v 1.65 2022/01/25 21:51:24 eric Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -722,7 +722,7 @@ tls_config_set_session_fd(struct tls_config *config, int session_fd)
 
 	if (sb.st_uid != getuid()) {
 		tls_config_set_errorx(config, "session file has incorrect "
-		    "owner (uid %i != %i)", sb.st_uid, getuid());
+		    "owner (uid %u != %u)", sb.st_uid, getuid());
 		return (-1);
 	}
 	mugo = sb.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO);
@@ -738,6 +738,17 @@ tls_config_set_session_fd(struct tls_config *config, int session_fd)
 }
 
 int
+tls_config_set_sign_cb(struct tls_config *config, tls_sign_cb cb, void *cb_arg)
+{
+	config->use_fake_private_key = 1;
+	config->skip_private_key_check = 1;
+	config->sign_cb = cb;
+	config->sign_cb_arg = cb_arg;
+
+	return (0);
+}
+
+int
 tls_config_set_verify_depth(struct tls_config *config, int verify_depth)
 {
 	config->verify_depth = verify_depth;