summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2017-01-22 08:27:50 +0000
committerclaudio <claudio@openbsd.org>2017-01-22 08:27:50 +0000
commit8aee94d7fb2372d90a732c9a81b3cb0d08ad8db0 (patch)
treeb78ddec7411e6ec5a3c1b37b14321c3a3b2f05b9
parentUpdate the TLS ALPN unit tests to work with internal/opaque data. (diff)
downloadwireguard-openbsd-8aee94d7fb2372d90a732c9a81b3cb0d08ad8db0.tar.xz
wireguard-openbsd-8aee94d7fb2372d90a732c9a81b3cb0d08ad8db0.zip
Disable session cache and tickets by default.
OK beck@ jsing@
-rw-r--r--lib/libtls/tls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libtls/tls.c b/lib/libtls/tls.c
index 85ed883e8e9..c028d19539b 100644
--- a/lib/libtls/tls.c
+++ b/lib/libtls/tls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls.c,v 1.57 2017/01/13 17:09:51 deraadt Exp $ */
+/* $OpenBSD: tls.c,v 1.58 2017/01/22 08:27:50 claudio Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
@@ -359,6 +359,10 @@ tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx)
X509_V_FLAG_NO_CHECK_TIME);
}
+ /* Disable any form of session caching by default */
+ SSL_CTX_set_session_cache_mode(ssl_ctx, SSL_SESS_CACHE_OFF);
+ SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TICKET);
+
return (0);
err: