diff options
author | lloyd <[email protected]> | 2010-10-28 20:05:21 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-28 20:05:21 +0000 |
commit | 7c2ac02f29fd4b5d629e187381baa783b53bd2e4 (patch) | |
tree | 9d07a452f0a7bd44a2b9d3aaac16f9d9e692fde5 /src/ssl/tls_policy.cpp | |
parent | b502cefaf0f9396354d58c4c18a78ac7870f6168 (diff) | |
parent | 7e4c62045c8216138dbed1c586139a1de7cd7f27 (diff) |
propagate from branch 'net.randombit.botan' (head 2841fb518e20d2fe0a374e4f6b08bdbb14d5d158)
to branch 'net.randombit.botan.c++0x' (head 0b9275139d6346bd3aa28d63bf8b8a03851d853d)
Diffstat (limited to 'src/ssl/tls_policy.cpp')
-rw-r--r-- | src/ssl/tls_policy.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/ssl/tls_policy.cpp b/src/ssl/tls_policy.cpp index e7e25a877..38fcf58cc 100644 --- a/src/ssl/tls_policy.cpp +++ b/src/ssl/tls_policy.cpp @@ -10,7 +10,7 @@ namespace Botan { -/** +/* * Return allowed ciphersuites */ std::vector<u16bit> TLS_Policy::ciphersuites() const @@ -18,7 +18,7 @@ std::vector<u16bit> TLS_Policy::ciphersuites() const return suite_list(allow_static_rsa(), allow_edh_rsa(), allow_edh_dsa()); } -/** +/* * Return allowed ciphersuites */ std::vector<u16bit> TLS_Policy::suite_list(bool use_rsa, @@ -60,7 +60,7 @@ std::vector<u16bit> TLS_Policy::suite_list(bool use_rsa, return suites; } -/** +/* * Return allowed compression algorithms */ std::vector<byte> TLS_Policy::compression() const @@ -70,7 +70,7 @@ std::vector<byte> TLS_Policy::compression() const return algs; } -/** +/* * Choose which ciphersuite to use */ u16bit TLS_Policy::choose_suite(const std::vector<u16bit>& c_suites, @@ -84,30 +84,30 @@ u16bit TLS_Policy::choose_suite(const std::vector<u16bit>& c_suites, std::vector<u16bit> s_suites = suite_list(use_static_rsa, use_edh_rsa, use_edh_dsa); - for(u32bit j = 0; j != s_suites.size(); j++) - for(u32bit k = 0; k != c_suites.size(); k++) - if(s_suites[j] == c_suites[k]) - return s_suites[j]; + for(size_t i = 0; i != s_suites.size(); ++i) + for(size_t j = 0; j != c_suites.size(); ++j) + if(s_suites[i] == c_suites[j]) + return s_suites[i]; return 0; } -/** +/* * Choose which compression algorithm to use */ byte TLS_Policy::choose_compression(const std::vector<byte>& c_comp) const { std::vector<byte> s_comp = compression(); - for(u32bit j = 0; j != s_comp.size(); j++) - for(u32bit k = 0; k != c_comp.size(); k++) - if(s_comp[j] == c_comp[k]) - return s_comp[j]; + for(size_t i = 0; i != s_comp.size(); ++i) + for(size_t j = 0; j != c_comp.size(); ++j) + if(s_comp[i] == c_comp[j]) + return s_comp[i]; return NO_COMPRESSION; } -/** +/* * Return the group to use for empheral DH */ DL_Group TLS_Policy::dh_group() const @@ -115,7 +115,7 @@ DL_Group TLS_Policy::dh_group() const return DL_Group("modp/ietf/1024"); } -/** +/* * Default certificate check */ bool TLS_Policy::check_cert(const std::vector<X509_Certificate>& certs) const |