aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/msg_server_hello.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-01-03 18:27:44 -0500
committerJack Lloyd <[email protected]>2016-01-03 18:27:44 -0500
commit2713825275950737441a063b8ea8df25981d53b1 (patch)
tree652ce64b676ab10f1a3161d92e9d398a2abf8298 /src/lib/tls/msg_server_hello.cpp
parent4658f3094d652a012c29837910aef89788654b55 (diff)
Add extended master secret extension (RFC 7627) to TLS
Interop tested with mbed TLS
Diffstat (limited to 'src/lib/tls/msg_server_hello.cpp')
-rw-r--r--src/lib/tls/msg_server_hello.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/tls/msg_server_hello.cpp b/src/lib/tls/msg_server_hello.cpp
index ba7eee3d9..25d53b81b 100644
--- a/src/lib/tls/msg_server_hello.cpp
+++ b/src/lib/tls/msg_server_hello.cpp
@@ -1,6 +1,6 @@
/*
* TLS Server Hello and Server Hello Done
-* (C) 2004-2011,2015 Jack Lloyd
+* (C) 2004-2011,2015,2016 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
@@ -35,6 +35,9 @@ Server_Hello::Server_Hello(Handshake_IO& io,
m_ciphersuite(ciphersuite),
m_comp_method(compression)
{
+ if(client_hello.supports_extended_master_secret())
+ m_extensions.add(new Extended_Master_Secret);
+
if(client_hello.secure_renegotiation())
m_extensions.add(new Renegotiation_Extension(reneg_info));
@@ -90,6 +93,9 @@ Server_Hello::Server_Hello(Handshake_IO& io,
m_ciphersuite(resumed_session.ciphersuite_code()),
m_comp_method(resumed_session.compression_method())
{
+ if(client_hello.supports_extended_master_secret())
+ m_extensions.add(new Extended_Master_Secret);
+
if(client_hello.secure_renegotiation())
m_extensions.add(new Renegotiation_Extension(reneg_info));