diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-04-06 15:50:12 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-09-18 13:46:02 +0100 |
commit | 65a87d3cc3c21bb54e6e813ee21ad049fea1310a (patch) | |
tree | 945c6b15877c4263588e251455ad534c04bd7a00 /ssl/d1_lib.c | |
parent | b60b9e7afe649a564db13dbf10ca571e973844c1 (diff) |
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 c6913eeb762edffddecaaba5c84909d7a7962927)
Conflicts:
CHANGES
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r-- | ssl/d1_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index b07ee3551a..d372a61bea 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -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); } - - |