From cc691a3c2468f7870af3b5d778061806ef3ea557 Mon Sep 17 00:00:00 2001 From: lloyd <lloyd@randombit.net> Date: Mon, 19 Apr 2010 23:33:17 +0000 Subject: Expose function breaking down ciphersuite to algo values --- src/ssl/tls_suites.cpp | 6 +++--- src/ssl/tls_suites.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ssl') diff --git a/src/ssl/tls_suites.cpp b/src/ssl/tls_suites.cpp index f48994b3c..5abd8accd 100644 --- a/src/ssl/tls_suites.cpp +++ b/src/ssl/tls_suites.cpp @@ -10,12 +10,10 @@ namespace Botan { -namespace { - /** * Convert an SSL/TLS ciphersuite to algorithm fields */ -TLS_Ciphersuite_Algos lookup_ciphersuite(u16bit suite) +TLS_Ciphersuite_Algos TLS_Suites::lookup_ciphersuite(u16bit suite) { if(suite == TLS_RSA_WITH_RC4_128_MD5) return TLS_Ciphersuite_Algos(TLS_ALGO_SIGNER_RSA | @@ -212,6 +210,8 @@ TLS_Ciphersuite_Algos lookup_ciphersuite(u16bit suite) return TLS_Ciphersuite_Algos(0); } +namespace { + std::pair<std::string, u32bit> cipher_code_to_name(TLS_Ciphersuite_Algos algo) { if((algo & TLS_ALGO_CIPHER_MASK) == TLS_ALGO_CIPHER_RC4_128) diff --git a/src/ssl/tls_suites.h b/src/ssl/tls_suites.h index 837d76422..fa015c28f 100644 --- a/src/ssl/tls_suites.h +++ b/src/ssl/tls_suites.h @@ -20,6 +20,8 @@ namespace Botan { class BOTAN_DLL CipherSuite { public: + static TLS_Ciphersuite_Algos lookup_ciphersuite(u16bit suite); + std::string cipher_algo() const { return cipher; } std::string mac_algo() const { return mac; } -- cgit v1.2.3