From f38841305ecd3fd0d13285823497a5a9d3b5c19f Mon Sep 17 00:00:00 2001 From: René Korthaus Date: Wed, 28 Sep 2016 13:06:36 +0200 Subject: Support encoding of supported point formats extension --- src/lib/tls/msg_client_hello.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/lib/tls/msg_client_hello.cpp') diff --git a/src/lib/tls/msg_client_hello.cpp b/src/lib/tls/msg_client_hello.cpp index b493fd3ee..36335e7ce 100644 --- a/src/lib/tls/msg_client_hello.cpp +++ b/src/lib/tls/msg_client_hello.cpp @@ -98,8 +98,12 @@ Client_Hello::Client_Hello(Handshake_IO& io, if(reneg_info.empty() && !next_protocols.empty()) m_extensions.add(new Application_Layer_Protocol_Notification(next_protocols)); + if(m_version.supports_negotiable_signature_algorithms()) + m_extensions.add(new Signature_Algorithms(policy.allowed_signature_hashes(), + policy.allowed_signature_methods())); + if(m_version.is_datagram_protocol()) - m_extensions.add(new SRTP_Protection_Profiles(policy.srtp_profiles())); + m_extensions.add(new SRTP_Protection_Profiles(policy.srtp_profiles())); #if defined(BOTAN_HAS_SRP6) m_extensions.add(new SRP_Identifier(client_settings.srp_identifier())); @@ -112,6 +116,11 @@ Client_Hello::Client_Hello(Handshake_IO& io, m_extensions.add(new Supported_Elliptic_Curves(policy.allowed_ecc_curves())); + if(!policy.allowed_ecc_curves().empty() && policy.use_ecc_point_compression()) + { + m_extensions.add(new Supported_Point_Formats()); + } + if(m_version.supports_negotiable_signature_algorithms()) m_extensions.add(new Signature_Algorithms(policy.allowed_signature_hashes(), policy.allowed_signature_methods())); @@ -156,6 +165,11 @@ Client_Hello::Client_Hello(Handshake_IO& io, m_extensions.add(new Session_Ticket(session.session_ticket())); m_extensions.add(new Supported_Elliptic_Curves(policy.allowed_ecc_curves())); + if(!policy.allowed_ecc_curves().empty() && policy.use_ecc_point_compression()) + { + m_extensions.add(new Supported_Point_Formats()); + } + if(m_version.supports_negotiable_signature_algorithms()) m_extensions.add(new Signature_Algorithms(policy.allowed_signature_hashes(), policy.allowed_signature_methods())); -- cgit v1.2.3