aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_extensions.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-04-11 22:13:07 +0000
committerlloyd <[email protected]>2014-04-11 22:13:07 +0000
commitd96b4425121bfeb122d90c73405f951b220a839c (patch)
tree20cca858ce4aa844f9067391f7380507cca6a2d1 /src/lib/tls/tls_extensions.cpp
parenta69436e3cb4b91ec835673145fd4dbe703342a4c (diff)
Verify that the server did not send any extension that the client didn't
offer. Previously the client only checked a couple of special cases.
Diffstat (limited to 'src/lib/tls/tls_extensions.cpp')
-rw-r--r--src/lib/tls/tls_extensions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/tls/tls_extensions.cpp b/src/lib/tls/tls_extensions.cpp
index 1ae9f1749..0860006e6 100644
--- a/src/lib/tls/tls_extensions.cpp
+++ b/src/lib/tls/tls_extensions.cpp
@@ -115,6 +115,14 @@ std::vector<byte> Extensions::serialize() const
return buf;
}
+std::set<Handshake_Extension_Type> Extensions::extension_types() const
+ {
+ std::set<Handshake_Extension_Type> offers;
+ for(auto i = extensions.begin(); i != extensions.end(); ++i)
+ offers.insert(i->first);
+ return offers;
+ }
+
Server_Name_Indicator::Server_Name_Indicator(TLS_Data_Reader& reader,
u16bit extension_size)
{