aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-04-18 15:35:54 +0000
committerlloyd <[email protected]>2012-04-18 15:35:54 +0000
commit7ab8373cc2dd32ce45c119134b05121459b2789e (patch)
treee286d606effc765b5ae9150ffa1e7f9c16ef61e5
parent35101fb41e188f45b1a5661607ee00f918af9bd9 (diff)
Send almost all of the extensions on a renegotiation on an existing
channel, except NPN which is strictly a per-connection extension. Makes life easier for servers. OpenSSL seems to behave the same way.
-rw-r--r--src/tls/c_hello.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp
index e52d34bc6..f498258b7 100644
--- a/src/tls/c_hello.cpp
+++ b/src/tls/c_hello.cpp
@@ -174,23 +174,21 @@ MemoryVector<byte> Client_Hello::serialize() const
Extensions extensions;
- // Extensions only used on an initial handshake
- if(m_renegotiation_info.empty())
- {
- extensions.add(new Server_Name_Indicator(m_hostname));
- extensions.add(new SRP_Identifier(m_srp_identifier));
- extensions.add(new Supported_Elliptic_Curves(m_supported_curves));
- extensions.add(new Heartbeat_Support_Indicator(true));
+ extensions.add(new Renegotation_Extension(m_renegotiation_info));
+ extensions.add(new Session_Ticket(m_session_ticket));
- if(m_version >= Protocol_Version::TLS_V12)
- extensions.add(new Signature_Algorithms(m_supported_algos));
+ extensions.add(new Server_Name_Indicator(m_hostname));
+ extensions.add(new SRP_Identifier(m_srp_identifier));
- if(m_next_protocol)
- extensions.add(new Next_Protocol_Notification());
- }
+ extensions.add(new Supported_Elliptic_Curves(m_supported_curves));
- extensions.add(new Renegotation_Extension(m_renegotiation_info));
- extensions.add(new Session_Ticket(m_session_ticket));
+ if(m_version >= Protocol_Version::TLS_V12)
+ extensions.add(new Signature_Algorithms(m_supported_algos));
+
+ extensions.add(new Heartbeat_Support_Indicator(true));
+
+ if(m_renegotiation_info.empty() && m_next_protocol)
+ extensions.add(new Next_Protocol_Notification());
buf += extensions.serialize();