summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_txt.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2016-02-07 20:56:40 +0100
committerKurt Roeckx <kurt@roeckx.be>2016-03-09 19:10:28 +0100
commit7d65007238e86e59fcf31d23fcefa01e3b30cc37 (patch)
tree31759a4f07e71ff011edfa01ca858fc9fb9d3f95 /ssl/ssl_txt.c
parente4646a8963fa6bc6f475afe7a9b9a46b151cfd1a (diff)
Make function to convert version to string
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> MR: #1595
Diffstat (limited to 'ssl/ssl_txt.c')
-rw-r--r--ssl/ssl_txt.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c
index bdd802f600..5bc5a72887 100644
--- a/ssl/ssl_txt.c
+++ b/ssl/ssl_txt.c
@@ -111,22 +111,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
goto err;
if (BIO_puts(bp, "SSL-Session:\n") <= 0)
goto err;
- if (x->ssl_version == SSL3_VERSION)
- s = "SSLv3";
- else if (x->ssl_version == TLS1_2_VERSION)
- s = "TLSv1.2";
- else if (x->ssl_version == TLS1_1_VERSION)
- s = "TLSv1.1";
- else if (x->ssl_version == TLS1_VERSION)
- s = "TLSv1";
- else if (x->ssl_version == DTLS1_VERSION)
- s = "DTLSv1";
- else if (x->ssl_version == DTLS1_2_VERSION)
- s = "DTLSv1.2";
- else if (x->ssl_version == DTLS1_BAD_VER)
- s = "DTLSv1-bad";
- else
- s = "unknown";
+ s = version_to_string(x->ssl_version);
if (BIO_printf(bp, " Protocol : %s\n", s) <= 0)
goto err;