use TLS1_get_version macro to check version so TLS v1.2 changes don't interfere with DTLS

This commit is contained in:
Dr. Stephen Henson
2011-05-25 11:43:07 +00:00
parent 87f6b97e89
commit 238b63613b
6 changed files with 22 additions and 20 deletions

View File

@@ -3780,7 +3780,7 @@ need to go to SSL_ST_ACCEPT.
long ssl_get_algorithm2(SSL *s)
{
long alg2 = s->s3->tmp.new_cipher->algorithm2;
if (s->version >= TLS1_2_VERSION &&
if (TLS1_get_version(s) >= TLS1_2_VERSION &&
alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF))
return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
return alg2;