aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_handshake_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/tls_handshake_state.cpp')
-rw-r--r--src/tls/tls_handshake_state.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tls/tls_handshake_state.cpp b/src/tls/tls_handshake_state.cpp
index d79ed15d4..023b1816a 100644
--- a/src/tls/tls_handshake_state.cpp
+++ b/src/tls/tls_handshake_state.cpp
@@ -153,10 +153,6 @@ KDF* Handshake_State::protocol_specific_prf()
{
return get_kdf("SSL3-PRF");
}
- else if(version() == Protocol_Version::TLS_V10 || version() == Protocol_Version::TLS_V11)
- {
- return get_kdf("TLS-PRF");
- }
else if(version().supports_ciphersuite_specific_prf())
{
if(suite.mac_algo() == "MD5" || suite.mac_algo() == "SHA-1")
@@ -164,6 +160,11 @@ KDF* Handshake_State::protocol_specific_prf()
return get_kdf("TLS-12-PRF(" + suite.mac_algo() + ")");
}
+ else
+ {
+ // TLS v1.0, v1.1 and DTLS v1.0
+ return get_kdf("TLS-PRF");
+ }
throw Internal_Error("Unknown version code " + version().to_string());
}