Report TLS 1.0 as backwards-compatible TLSv1
[openssl.git] / ssl / ssl_ciph.c
index aaeeb8da2752afa47f60fbc1e1c88626d3a0fd48..c62b1935b6746485758e66659a599e4ca954e7ff 100644 (file)
@@ -1822,6 +1822,13 @@ const char *SSL_CIPHER_get_version(const SSL_CIPHER *c)
 {
     if (c == NULL)
         return "(NONE)";
+
+    /*
+     * Backwards-compatibility crutch.  In almost all contexts we report TLS
+     * 1.0 as "TLSv1", but for ciphers we report "TLSv1.0".
+     */
+    if (c->min_tls == TLS1_VERSION)
+        return "TLSv1.0";
     return ssl_protocol_to_string(c->min_tls);
 }