aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_ciphersuite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/tls_ciphersuite.h')
-rw-r--r--src/lib/tls/tls_ciphersuite.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/tls/tls_ciphersuite.h b/src/lib/tls/tls_ciphersuite.h
index 2ee3df20e..7ef7623bb 100644
--- a/src/lib/tls/tls_ciphersuite.h
+++ b/src/lib/tls/tls_ciphersuite.h
@@ -10,6 +10,7 @@
#include <botan/types.h>
#include <botan/tls_algos.h>
+#include <botan/tls_version.h>
#include <string>
#include <vector>
@@ -31,6 +32,13 @@ class BOTAN_PUBLIC_API(2,0) Ciphersuite final
static Ciphersuite by_id(uint16_t suite);
/**
+ * Convert an SSL/TLS ciphersuite name to algorithm fields
+ * @param name the IANA name for the desired ciphersuite
+ * @return ciphersuite object
+ */
+ static Ciphersuite from_name(const std::string& name);
+
+ /**
* Returns true iff this suite is a known SCSV
*/
static bool is_scsv(uint16_t suite);
@@ -115,6 +123,8 @@ class BOTAN_PUBLIC_API(2,0) Ciphersuite final
*/
bool valid() const { return m_usable; }
+ bool usable_in_version(Protocol_Version version) const;
+
bool operator<(const Ciphersuite& o) const { return ciphersuite_code() < o.ciphersuite_code(); }
bool operator<(const uint16_t c) const { return ciphersuite_code() < c; }