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.
This commit is contained in:
Dr. Stephen Henson
2013-04-06 15:50:12 +01:00
parent 04638f2fc3
commit c6913eeb76
12 changed files with 151 additions and 11 deletions

View File

@@ -881,6 +881,11 @@ static char *jpake_secret = NULL;
meth=TLSv1_client_method();
#endif
#ifndef OPENSSL_NO_DTLS1
else if (strcmp(*argv,"-dtls") == 0)
{
meth=DTLS_client_method();
socket_type=SOCK_DGRAM;
}
else if (strcmp(*argv,"-dtls1") == 0)
{
meth=DTLSv1_client_method();