aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-04-19 23:33:17 +0000
committerlloyd <[email protected]>2010-04-19 23:33:17 +0000
commitcc691a3c2468f7870af3b5d778061806ef3ea557 (patch)
tree69f563f14ac8bf054445b5585186b449ff368330 /src
parent358a943a1772bb491983a3f227bf03dc861dbf76 (diff)
Expose function breaking down ciphersuite to algo values
Diffstat (limited to 'src')
-rw-r--r--src/ssl/tls_suites.cpp6
-rw-r--r--src/ssl/tls_suites.h2
2 files changed, 5 insertions, 3 deletions
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; }