aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_extensions.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-01-07 16:48:07 -0500
committerJack Lloyd <[email protected]>2018-01-27 09:43:13 -0500
commit936da0514b06b341e6fab372477e32c90df05d57 (patch)
tree0b5b87ae056c8efe8c3f4e1a63075b546bae329a /src/lib/tls/tls_extensions.cpp
parentcfe57137e5957b84b6b749db8d9f02c3ee1f8c1e (diff)
Add ability for application to control which TLS extensions are used
GH #1186
Diffstat (limited to 'src/lib/tls/tls_extensions.cpp')
-rw-r--r--src/lib/tls/tls_extensions.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/tls/tls_extensions.cpp b/src/lib/tls/tls_extensions.cpp
index d521f6bf8..6497c3c11 100644
--- a/src/lib/tls/tls_extensions.cpp
+++ b/src/lib/tls/tls_extensions.cpp
@@ -124,6 +124,15 @@ std::vector<uint8_t> Extensions::serialize() const
return buf;
}
+bool Extensions::remove_extension(Handshake_Extension_Type typ)
+ {
+ auto i = m_extensions.find(typ);
+ if(i == m_extensions.end())
+ return false;
+ m_extensions.erase(i);
+ return true;
+ }
+
std::set<Handshake_Extension_Type> Extensions::extension_types() const
{
std::set<Handshake_Extension_Type> offers;