diff options
author | lloyd <[email protected]> | 2013-11-20 10:05:42 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-11-20 10:05:42 +0000 |
commit | f0e34d0262b708c9b8bb3e57096aa9c2acebb2cf (patch) | |
tree | 72b57964f5b27e6e06cb2b12810c6fe3945db55e /src | |
parent | d2f6455b2f5d4f4c092d6999469928dd033c7cdf (diff) |
Add a basic DTLS policy
Diffstat (limited to 'src')
-rw-r--r-- | src/tls/tls_policy.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tls/tls_policy.h b/src/tls/tls_policy.h index 0b7a10ca5..6a51f2bbf 100644 --- a/src/tls/tls_policy.h +++ b/src/tls/tls_policy.h @@ -171,6 +171,19 @@ class BOTAN_DLL NSA_Suite_B_128 : public Policy { return version == Protocol_Version::TLS_V12; } }; +/** +* Policy for DTLS. We require DTLS v1.2 and an AEAD mode +*/ +class BOTAN_DLL Datagram_Policy : public Policy + { + public: + std::vector<std::string> allowed_macs() const override + { return std::vector<std::string>({"AEAD"}); } + + bool acceptable_protocol_version(Protocol_Version version) const override + { return version == Protocol_Version::DTLS_V12; } + }; + } } |