aboutsummaryrefslogtreecommitdiff
path: root/ssl/statem/extensions_srvr.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2021-09-01 02:23:22 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2021-09-01 02:23:22 +0000
commitc1d1798abd60f12527b70443cb7d0b9cd78ef7b1 (patch)
tree1ac1ccb6b23135a8b57efdff5c4a84ad03202f7a /ssl/statem/extensions_srvr.c
parent94fa08a4bcdfbb3434b025d67d014af3b18e5380 (diff)
downloadsrc-vendor/openssl.tar.gz
src-vendor/openssl.zip
Diffstat (limited to 'ssl/statem/extensions_srvr.c')
-rw-r--r--ssl/statem/extensions_srvr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c
index 3c7395c0eb26..04f64f810640 100644
--- a/ssl/statem/extensions_srvr.c
+++ b/ssl/statem/extensions_srvr.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -1714,6 +1714,13 @@ EXT_RETURN tls_construct_stoc_key_share(SSL *s, WPACKET *pkt,
}
return EXT_RETURN_NOT_SENT;
}
+ if (s->hit && (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE_DHE) == 0) {
+ /*
+ * PSK ('hit') and explicitly not doing DHE (if the client sent the
+ * DHE option we always take it); don't send key share.
+ */
+ return EXT_RETURN_NOT_SENT;
+ }
if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
|| !WPACKET_start_sub_packet_u16(pkt)