diff options
author | Jack Lloyd <[email protected]> | 2016-11-16 01:34:19 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-26 12:41:03 -0500 |
commit | 10244d3fa88365a3740eb66ccfd9c90f3a866fcd (patch) | |
tree | 54a746fdcdebd327bbd71d023ce6d02ef7e66b44 /src/lib/tls/msg_server_hello.cpp | |
parent | 5372d0b499ad317ab3776c9ac92df866cc6a1e84 (diff) |
Add OCSP stapling support to TLS client
Diffstat (limited to 'src/lib/tls/msg_server_hello.cpp')
-rw-r--r-- | src/lib/tls/msg_server_hello.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/tls/msg_server_hello.cpp b/src/lib/tls/msg_server_hello.cpp index 3e8a8dda9..37e521403 100644 --- a/src/lib/tls/msg_server_hello.cpp +++ b/src/lib/tls/msg_server_hello.cpp @@ -35,12 +35,15 @@ Server_Hello::Server_Hello(Handshake_IO& io, if(client_hello.supports_extended_master_secret()) m_extensions.add(new Extended_Master_Secret); + // Sending the extension back does not commit us to sending a stapled response + if(client_hello.supports_cert_status_message()) + m_extensions.add(new Certificate_Status_Request); + Ciphersuite c = Ciphersuite::by_id(m_ciphersuite); - if(client_hello.supports_encrypt_then_mac() && policy.negotiate_encrypt_then_mac()) + if(c.cbc_ciphersuite() && client_hello.supports_encrypt_then_mac() && policy.negotiate_encrypt_then_mac()) { - if(c.cbc_ciphersuite()) - m_extensions.add(new Encrypt_then_MAC); + m_extensions.add(new Encrypt_then_MAC); } if(c.ecc_ciphersuite()) @@ -100,6 +103,10 @@ Server_Hello::Server_Hello(Handshake_IO& io, if(client_hello.supports_extended_master_secret()) m_extensions.add(new Extended_Master_Secret); + // Sending the extension back does not commit us to sending a stapled response + if(client_hello.supports_cert_status_message()) + m_extensions.add(new Certificate_Status_Request); + if(client_hello.supports_encrypt_then_mac() && policy.negotiate_encrypt_then_mac()) { Ciphersuite c = resumed_session.ciphersuite(); @@ -107,6 +114,11 @@ Server_Hello::Server_Hello(Handshake_IO& io, m_extensions.add(new Encrypt_then_MAC); } + if(client_hello.supports_cert_status_message()) + { + m_extensions.add(new Certificate_Status_Request); + } + if(resumed_session.ciphersuite().ecc_ciphersuite()) { m_extensions.add(new Supported_Point_Formats(policy.use_ecc_point_compression())); |