summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorsthen <>2019-06-07 15:09:44 +0000
committersthen <>2019-06-07 15:09:44 +0000
commit0bf5879252bed3b1820cbb108739af35cb476d61 (patch)
treed2e3ede61e41cd4a9a8e09122af8a3aadcbe3e9b /src/lib
parent950be137865e7f7582b1486db4ef418b541a19ee (diff)
downloadopenbsd-0bf5879252bed3b1820cbb108739af35cb476d61.tar.gz
openbsd-0bf5879252bed3b1820cbb108739af35cb476d61.tar.bz2
openbsd-0bf5879252bed3b1820cbb108739af35cb476d61.zip
MFC libssl fix - rev 1.49 (commitid: DLpHk0vyoFEK0Baa)
--- Relax parsing of TLS key share extensions on the server. The RFC does not require X25519 and it also allows clients to send an empty key share when the want the server to select a group. The current behaviour results in handshake failures where the client supports TLS 1.3 and sends a TLS key share extension that does not contain X25519. --- (this fixes server side in some cases with TLS 1.3 clients with what would normally be unusual config - however triggered by recent Firefox packages on Fedora, https://bugzilla.redhat.com/show_bug.cgi?id=1713777)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl_tlsext.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index 00afe1e586..5e9f73536f 100644
--- a/src/lib/libssl/ssl_tlsext.c
+++ b/src/lib/libssl/ssl_tlsext.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_tlsext.c,v 1.44.2.1 2019/05/15 19:25:15 tb Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.44.2.2 2019/06/07 15:09:44 sthen Exp $ */
2/* 2/*
3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -1269,7 +1269,6 @@ tlsext_keyshare_server_parse(SSL *s, CBS *cbs, int *alert)
1269 CBS key_exchange; 1269 CBS key_exchange;
1270 uint16_t group; 1270 uint16_t group;
1271 size_t out_len; 1271 size_t out_len;
1272 int ret = 0;
1273 1272
1274 if (!CBS_get_u16_length_prefixed(cbs, &client_shares)) 1273 if (!CBS_get_u16_length_prefixed(cbs, &client_shares))
1275 goto err; 1274 goto err;
@@ -1301,11 +1300,9 @@ tlsext_keyshare_server_parse(SSL *s, CBS *cbs, int *alert)
1301 if (!CBS_stow(&key_exchange, &S3I(s)->hs_tls13.x25519_peer_public, 1300 if (!CBS_stow(&key_exchange, &S3I(s)->hs_tls13.x25519_peer_public,
1302 &out_len)) 1301 &out_len))
1303 goto err; 1302 goto err;
1304
1305 ret = 1;
1306 } 1303 }
1307 1304
1308 return ret; 1305 return 1;
1309 1306
1310 err: 1307 err:
1311 *alert = SSL_AD_DECODE_ERROR; 1308 *alert = SSL_AD_DECODE_ERROR;