Add DTLS to SSL_get_version
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 3 Mar 2015 15:39:26 +0000 (15:39 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 20 Mar 2015 12:06:12 +0000 (12:06 +0000)
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 504e643e0996fb842ac183023c3a6b9049af50ea)

Conflicts:
ssl/ssl_lib.c

ssl/ssl_lib.c

index e9ad2bc81beb677f3d627088820e7a9cb396fa0b..38426b4f9c96a7684841831059c94415e6ce569f 100644 (file)
@@ -2832,6 +2832,12 @@ const char *SSL_get_version(const SSL *s)
         return ("SSLv3");
     else if (s->version == SSL2_VERSION)
         return ("SSLv2");
+    else if (s->version == DTLS1_BAD_VER)
+        return ("DTLSv0.9");
+    else if (s->version == DTLS1_VERSION)
+        return ("DTLSv1");
+    else if (s->version == DTLS1_2_VERSION)
+        return ("DTLSv1.2");
     else
         return ("unknown");
 }