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:00:02 +0000 (12:00 +0000)
Reviewed-by: Emilia Käsper <emilia@openssl.org>
ssl/ssl_lib.c

index a5eb3dba61e0d100873e6c449aff50e23dfff5d9..1e9b34f78aaeb5a6c9b2b8dc0515363e1f83e0b5 100644 (file)
@@ -2735,6 +2735,12 @@ const char *SSL_get_version(const SSL *s)
         return ("TLSv1");
     else if (s->version == SSL3_VERSION)
         return ("SSLv3");
+    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");
 }