aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/msg_client_hello.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/msg_client_hello.cpp')
-rw-r--r--src/tls/msg_client_hello.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tls/msg_client_hello.cpp b/src/tls/msg_client_hello.cpp
index 2149ac5e5..6176ca6bf 100644
--- a/src/tls/msg_client_hello.cpp
+++ b/src/tls/msg_client_hello.cpp
@@ -74,13 +74,15 @@ Client_Hello::Client_Hello(Handshake_IO& io,
m_suites(ciphersuite_list(policy, m_version, (srp_identifier != ""))),
m_comp_methods(policy.compression())
{
- m_extensions.add(new Heartbeat_Support_Indicator(true));
m_extensions.add(new Renegotiation_Extension(reneg_info));
m_extensions.add(new SRP_Identifier(srp_identifier));
m_extensions.add(new Server_Name_Indicator(hostname));
m_extensions.add(new Session_Ticket());
m_extensions.add(new Supported_Elliptic_Curves(policy.allowed_ecc_curves()));
+ if(policy.negotiate_heartbeat_support())
+ m_extensions.add(new Heartbeat_Support_Indicator(true));
+
if(m_version.supports_negotiable_signature_algorithms())
m_extensions.add(new Signature_Algorithms(policy.allowed_signature_hashes(),
policy.allowed_signature_methods()));
@@ -113,13 +115,15 @@ Client_Hello::Client_Hello(Handshake_IO& io,
if(!value_exists(m_comp_methods, session.compression_method()))
m_comp_methods.push_back(session.compression_method());
- m_extensions.add(new Heartbeat_Support_Indicator(true));
m_extensions.add(new Renegotiation_Extension(reneg_info));
m_extensions.add(new SRP_Identifier(session.srp_identifier()));
- m_extensions.add(new Server_Name_Indicator(session.sni_hostname()));
+ m_extensions.add(new Server_Name_Indicator(session.server_info().hostname()));
m_extensions.add(new Session_Ticket(session.session_ticket()));
m_extensions.add(new Supported_Elliptic_Curves(policy.allowed_ecc_curves()));
+ if(policy.negotiate_heartbeat_support())
+ m_extensions.add(new Heartbeat_Support_Indicator(true));
+
if(session.fragment_size() != 0)
m_extensions.add(new Maximum_Fragment_Length(session.fragment_size()));