aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_extensions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/tls_extensions.h')
-rw-r--r--src/lib/tls/tls_extensions.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/tls/tls_extensions.h b/src/lib/tls/tls_extensions.h
index ac1f75a2b..f26970b47 100644
--- a/src/lib/tls/tls_extensions.h
+++ b/src/lib/tls/tls_extensions.h
@@ -33,6 +33,7 @@ enum Handshake_Extension_Type {
TLSEXT_EC_POINT_FORMATS = 11,
TLSEXT_SRP_IDENTIFIER = 12,
TLSEXT_SIGNATURE_ALGORITHMS = 13,
+ TLSEXT_USE_SRTP = 14,
TLSEXT_HEARTBEAT_SUPPORT = 15,
TLSEXT_SESSION_TICKET = 35,
@@ -353,6 +354,32 @@ class Heartbeat_Support_Indicator : public Extension
};
/**
+* Used to indicate SRTP algorithms for DTLS (RFC 5764)
+*/
+class SRTP_Protection_Profiles : public Extension
+ {
+ public:
+ static Handshake_Extension_Type static_type()
+ { return TLSEXT_USE_SRTP; }
+
+ Handshake_Extension_Type type() const { return static_type(); }
+
+ const std::vector<u16bit>& profiles() const { return m_pp; }
+
+ std::vector<byte> serialize() const;
+
+ bool empty() const { return m_pp.empty(); }
+
+ SRTP_Protection_Profiles(const std::vector<u16bit>& pp) : m_pp(pp) {}
+
+ SRTP_Protection_Profiles(u16bit pp) : m_pp(1, pp) {}
+
+ SRTP_Protection_Profiles(TLS_Data_Reader& reader, u16bit extension_size);
+ private:
+ std::vector<u16bit> m_pp;
+ };
+
+/**
* Represents a block of extensions in a hello message
*/
class Extensions