summary refs log tree commit diff
path: root/tls_util.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2026-06-01 14:50:25 -0400
committerJune McEnroe <june@causal.agency>2026-06-01 14:50:25 -0400
commit8a5bd6dcd6f7780354ed2e297edfddfec0273253 (patch)
treed6a47d1f9ce63cf523a845f426d0b879bc008eda /tls_util.c
parentImport LibreSSL 4.2.1 (diff)
downloadlibretls-8a5bd6dcd6f7780354ed2e297edfddfec0273253.tar.gz
libretls-8a5bd6dcd6f7780354ed2e297edfddfec0273253.zip
Import LibreSSL 4.3.0
Diffstat (limited to 'tls_util.c')
-rw-r--r--tls_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tls_util.c b/tls_util.c
index b276d2c..d93efb8 100644
--- a/tls_util.c
+++ b/tls_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_util.c,v 1.16 2023/05/14 07:26:25 op Exp $ */
+/* $OpenBSD: tls_util.c,v 1.17 2026/03/10 05:26:04 deraadt Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
@@ -162,7 +162,7 @@ tls_load_file(const char *name, size_t *len, char *password)
 
 	*len = 0;
 
-	if ((fd = open(name, O_RDONLY)) == -1)
+	if ((fd = open(name, O_RDONLY|O_CLOEXEC)) == -1)
 		return (NULL);
 
 	/* Just load the file into memory without decryption */