summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
authorjsing <>2026-06-14 14:25:55 +0000
committerjsing <>2026-06-14 14:25:55 +0000
commit299a1344c51031d924e952fa2df617b31de379db (patch)
tree66d38a628797029d8fe4ac017628c5759db894a6 /src/lib/libssl
parent38befe6989390abba9a0b8a347ca4922ab7d7992 (diff)
downloadopenbsd-299a1344c51031d924e952fa2df617b31de379db.tar.gz
openbsd-299a1344c51031d924e952fa2df617b31de379db.tar.bz2
openbsd-299a1344c51031d924e952fa2df617b31de379db.zip
Remove SSL_OP_LEGACY_SERVER_CONNECT from default options.
Remove SSL_OP_LEGACY_SERVER_CONNECT from the default SSL options and the SSL_OP_ALL define. This means that we will now refuse to connect to a TLSv1.2 server if it does not support the Renegotiation Indication (RI) extension. This prevents a class of attacks against TLS clients that are talking to TLSv1.2-only servers that permit client initiated renegotiation. Raised by Lucca Hirschi et al from Inria. ok beck@ tb@
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/ssl.h5
-rw-r--r--src/lib/libssl/ssl_lib.c8
2 files changed, 4 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 4ad73af722..28ee7f56bc 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.250 2026/04/03 13:11:00 jsing Exp $ */ 1/* $OpenBSD: ssl.h,v 1.251 2026/06/14 14:25:55 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -402,8 +402,7 @@ typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len,
402#define SSL_OP_NO_DTLSv1_2 0x80000000L 402#define SSL_OP_NO_DTLSv1_2 0x80000000L
403 403
404/* SSL_OP_ALL: various bug workarounds that should be rather harmless. */ 404/* SSL_OP_ALL: various bug workarounds that should be rather harmless. */
405#define SSL_OP_ALL \ 405#define SSL_OP_ALL 0x0
406 (SSL_OP_LEGACY_SERVER_CONNECT)
407 406
408/* Obsolete flags kept for compatibility. No sane code should use them. */ 407/* Obsolete flags kept for compatibility. No sane code should use them. */
409#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x0 408#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x0
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 8cce446036..b81713a637 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.334 2026/05/09 11:29:51 tb Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.335 2026/06/14 14:25:55 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -2178,11 +2178,7 @@ SSL_CTX_new(const SSL_METHOD *meth)
2178 ret->tlsext_status_cb = 0; 2178 ret->tlsext_status_cb = 0;
2179 ret->tlsext_status_arg = NULL; 2179 ret->tlsext_status_arg = NULL;
2180 2180
2181 /* 2181 ret->options = 0;
2182 * Default is to connect to non-RI servers. When RI is more widely
2183 * deployed might change this.
2184 */
2185 ret->options |= SSL_OP_LEGACY_SERVER_CONNECT;
2186 2182
2187 return (ret); 2183 return (ret);
2188 err: 2184 err: