aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/msg_client_hello.cpp
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-09-28 13:06:36 +0200
committerRenĂ© Korthaus <[email protected]>2016-10-03 12:18:24 +0200
commitf38841305ecd3fd0d13285823497a5a9d3b5c19f (patch)
treed01a3263baa7df488cf58fc997d1c9710dbfb0a4 /src/lib/tls/msg_client_hello.cpp
parentab2842d6f28680b1cac18d5ff6b70b395d1ffb65 (diff)
Support encoding of supported point formats extension
Diffstat (limited to 'src/lib/tls/msg_client_hello.cpp')
-rw-r--r--src/lib/tls/msg_client_hello.cpp16
1 files changed, 15 insertions, 1 deletions
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()));