diff options
author | lloyd <[email protected]> | 2012-01-20 22:21:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-20 22:21:12 +0000 |
commit | 87fd27adfe84478c52186107fc383890544eeeba (patch) | |
tree | f6b360af3115ae7203e15bc834d4397b0dcf28b9 /src/tls/c_hello.cpp | |
parent | 5ccc1b53e9f20ba3d074e68844285d15b5a00912 (diff) |
When generating a signature in TLS 1.2, respect the request of the
counterparty by using the highest preference hash they have available
for the signature type we are generating. This does mean we will do
stupid things, if the counterparty is stupid (for instance some
versions of GnuTLS will prefer SHA-1 over the SHA-2s - likely someone
misread the spec and ordered the list backwards). But because we
filter out MD5 we'll never use that; even in the worst case, if
someone requests only MD5, we'll skip over it and use SHA-1 as the
fallback algorithm. Theoretically this is against the spec because we
"MUST" send something compatible, but seriously, fuck em. Right in the
eye.
Diffstat (limited to 'src/tls/c_hello.cpp')
-rw-r--r-- | src/tls/c_hello.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp index d821482fd..2d94de462 100644 --- a/src/tls/c_hello.cpp +++ b/src/tls/c_hello.cpp @@ -301,6 +301,7 @@ void Client_Hello::deserialize(const MemoryRegion<byte>& buf) */ m_supported_algos.push_back(std::make_pair("SHA-1", "RSA")); m_supported_algos.push_back(std::make_pair("SHA-1", "DSA")); + m_supported_algos.push_back(std::make_pair("SHA-1", "ECDSA")); } else { @@ -308,8 +309,8 @@ void Client_Hello::deserialize(const MemoryRegion<byte>& buf) m_supported_algos.push_back(std::make_pair("TLS.Digest.0", "RSA")); m_supported_algos.push_back(std::make_pair("SHA-1", "DSA")); + m_supported_algos.push_back(std::make_pair("SHA-1", "ECDSA")); } - } if(value_exists(m_suites, static_cast<u16bit>(TLS_EMPTY_RENEGOTIATION_INFO_SCSV))) |