From 87fd27adfe84478c52186107fc383890544eeeba Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 20 Jan 2012 22:21:12 +0000 Subject: 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. --- src/tls/tls_policy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tls/tls_policy.h') diff --git a/src/tls/tls_policy.h b/src/tls/tls_policy.h index c14709e7e..5bf60742b 100644 --- a/src/tls/tls_policy.h +++ b/src/tls/tls_policy.h @@ -75,7 +75,7 @@ class BOTAN_DLL TLS_Policy /* * @return the version we would prefer to negotiate */ - virtual Version_Code pref_version() const { return TLS_V11; } + virtual Version_Code pref_version() const { return TLS_V12; } virtual ~TLS_Policy() {} }; -- cgit v1.2.3