Dual DTLS version methods.
Add new methods DTLS_*_method() which support both DTLS 1.0 and DTLS 1.2 and
pick the highest version the peer supports during negotiation.
As with SSL/TLS options can change this behaviour specifically
SSL_OP_NO_DTLSv1 and SSL_OP_NO_DTLSv1_2.
(cherry picked from commit c6913eeb76
)
Conflicts:
CHANGES
This commit is contained in:
@@ -267,6 +267,8 @@ void dtls1_clear(SSL *s)
|
||||
ssl3_clear(s);
|
||||
if (s->options & SSL_OP_CISCO_ANYCONNECT)
|
||||
s->version=DTLS1_BAD_VER;
|
||||
else if (s->method->version == DTLS_ANY_VERSION)
|
||||
s->version=DTLS1_2_VERSION;
|
||||
else
|
||||
s->version=s->method->version;
|
||||
}
|
||||
@@ -522,5 +524,3 @@ static int dtls1_handshake_write(SSL *s)
|
||||
{
|
||||
return dtls1_do_write(s, SSL3_RT_HANDSHAKE);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user