aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/s_kex.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-07-12 21:25:46 +0000
committerlloyd <[email protected]>2012-07-12 21:25:46 +0000
commit43836c6fd15a944dce1ca25bb0d019ede3ef75e7 (patch)
treea6ea3bd16cb4b4d2ea94428ccafaa2bd54d8ba6a /src/tls/s_kex.cpp
parent71c8f3803819464db90226c22e77f5a13ef2c38d (diff)
Changes to version handling in support of DTLS work.
Add a few 'feature tests' to Protocol_Version which helps avoid some explicit comparisons. Additionally, remove the relational comparisons, except for operator> which is still used in a few locations. TLS::Policy has changed and no longer has min_version. The new hook that replaces it is acceptable_protocol_version, which should return true if and only if we are willing to negotiate the version returned. This leads to a somewhat cleaner result and additionally allows one to do maybe interesting though mostly useless things like allowing TLS 1.0 or 1.2 but not 1.1. Fix the version sent in the (unused) DTLS hello verify message.
Diffstat (limited to 'src/tls/s_kex.cpp')
-rw-r--r--src/tls/s_kex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tls/s_kex.cpp b/src/tls/s_kex.cpp
index e6ea14dbe..834dff979 100644
--- a/src/tls/s_kex.cpp
+++ b/src/tls/s_kex.cpp
@@ -216,7 +216,7 @@ Server_Key_Exchange::Server_Key_Exchange(const std::vector<byte>& buf,
if(sig_algo != "")
{
- if(version >= Protocol_Version::TLS_V12)
+ if(version.supports_negotiable_signature_algorithms())
{
m_hash_algo = Signature_Algorithms::hash_algo_name(reader.get_byte());
m_sig_algo = Signature_Algorithms::sig_algo_name(reader.get_byte());