aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/c_hello.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-03-22 15:59:24 +0000
committerlloyd <[email protected]>2012-03-22 15:59:24 +0000
commit544171d3e20d65f17a1d3955388a8db4f04cfe44 (patch)
tree18cffe0f9fae50ed2ba935d4bb1c882a05200f17 /src/tls/c_hello.cpp
parentcc9e16e623466d3d7a71b69736a816e665302bd4 (diff)
Working client-side session tickets. Tested against gmail.com and
OpenSSL 1.0.1-beta2 running on localhost.
Diffstat (limited to 'src/tls/c_hello.cpp')
-rw-r--r--src/tls/c_hello.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp
index df76c748f..0798bfaf3 100644
--- a/src/tls/c_hello.cpp
+++ b/src/tls/c_hello.cpp
@@ -102,7 +102,8 @@ Client_Hello::Client_Hello(Record_Writer& writer,
m_next_protocol(next_protocol),
m_fragment_size(session.fragment_size()),
m_secure_renegotiation(session.secure_renegotiation()),
- m_supports_session_ticket(true)
+ m_supports_session_ticket(true),
+ m_session_ticket(session.session_ticket())
{
m_suites.push_back(session.ciphersuite_code());
m_comp_methods.push_back(session.compression_method());
@@ -159,18 +160,20 @@ MemoryVector<byte> Client_Hello::serialize() const
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 Session_Ticket());
if(m_version >= Protocol_Version::TLS_V12)
extensions.add(new Signature_Algorithms(m_supported_algos));
if(m_next_protocol)
extensions.add(new Next_Protocol_Notification());
+
+ extensions.add(new Session_Ticket(m_session_ticket));
}
else
{
// renegotiation
extensions.add(new Renegotation_Extension(m_renegotiation_info));
+ extensions.add(new Session_Ticket(m_session_ticket));
}
buf += extensions.serialize();