aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_extensions.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-22 01:50:19 +0000
committerlloyd <[email protected]>2012-01-22 01:50:19 +0000
commite0065f2af522b9573aaf364391139ac12e77eecb (patch)
tree3a673666026c4345c39558a7c235e78a1aca9d24 /src/tls/tls_extensions.h
parent8566e2784dc83c6d8c02de42cf2448cb408100f1 (diff)
Basic outline of the supported curves extension from RFC 4492
Diffstat (limited to 'src/tls/tls_extensions.h')
-rw-r--r--src/tls/tls_extensions.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tls/tls_extensions.h b/src/tls/tls_extensions.h
index 2b386d9f5..d0aee6d04 100644
--- a/src/tls/tls_extensions.h
+++ b/src/tls/tls_extensions.h
@@ -189,6 +189,31 @@ class Next_Protocol_Notification : public TLS_Extension
};
/**
+* Supported Elliptic Curves Extension (RFC 4492)
+*/
+class Supported_Elliptic_Curves : public TLS_Extension
+ {
+ public:
+ static TLS_Handshake_Extension_Type static_type()
+ { return TLSEXT_USABLE_ELLIPTIC_CURVES; }
+
+ TLS_Handshake_Extension_Type type() const { return static_type(); }
+
+ const std::vector<std::string>& curves() const { return m_curves; }
+
+ MemoryVector<byte> serialize() const;
+
+ Supported_Elliptic_Curves(); // default values, for client
+
+ Supported_Elliptic_Curves(TLS_Data_Reader& reader,
+ u16bit extension_size);
+
+ bool empty() const { return m_curves.empty(); }
+ private:
+ std::vector<std::string> m_curves;
+ };
+
+/**
* Signature Algorithms Extension for TLS 1.2 (RFC 5246)
*/
class Signature_Algorithms : public TLS_Extension