summaryrefslogtreecommitdiffstats
path: root/apps/s_client.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-03-20 15:49:14 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-09-18 13:46:02 +0100
commitacec5a6244b6e54b805a5f7512efc72e18cc693a (patch)
tree458d6b2bb9b943545fd35762f063da7ce62eac45 /apps/s_client.c
parent68039af3e7fbbdef1f8a801c9fe5399015c0e58d (diff)
Provisional DTLS 1.2 support.
Add correct flags for DTLS 1.2, update s_server and s_client to handle DTLS 1.2 methods. Currently no support for version negotiation: i.e. if client/server selects DTLS 1.2 it is that or nothing. (cherry picked from commit c3b344e36a088283731b4f65a70e85b100f55686) Conflicts: apps/s_server.c
Diffstat (limited to 'apps/s_client.c')
-rw-r--r--apps/s_client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index 25bb3d6b86..bec6dbfb4e 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -917,6 +917,11 @@ static char *jpake_secret = NULL;
meth=DTLSv1_client_method();
socket_type=SOCK_DGRAM;
}
+ else if (strcmp(*argv,"-dtls1_2") == 0)
+ {
+ meth=DTLSv1_2_client_method();
+ socket_type=SOCK_DGRAM;
+ }
else if (strcmp(*argv,"-timeout") == 0)
enable_timeouts=1;
else if (strcmp(*argv,"-mtu") == 0)
@@ -1445,7 +1450,7 @@ re_start:
#endif
if (c_Pause & 0x01) SSL_set_debug(con, 1);
- if ( SSL_version(con) == DTLS1_VERSION)
+ if (socket_type == SOCK_DGRAM)
{
sbio=BIO_new_dgram(s,BIO_NOCLOSE);