From fe8b4602750c0e229aba15ce76259784c8674991 Mon Sep 17 00:00:00 2001 From: James Denness Date: Thu, 20 Jul 2017 10:02:18 +0100 Subject: [PATCH] enable TLSv1.1 and TLSv1.2 --- src/tlsdate-helper-plan9.c | 8 ++++++++ src/tlsdate-helper.c | 8 ++++++++ src/tlsdate.c | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/tlsdate-helper-plan9.c b/src/tlsdate-helper-plan9.c index 3c532aa..2d64702 100644 --- a/src/tlsdate-helper-plan9.c +++ b/src/tlsdate-helper-plan9.c @@ -986,6 +986,14 @@ run_ssl (uint32_t *time_map, int time_is_an_illusion) { verb ("V: using TLSv1_client_method()\n"); ctx = SSL_CTX_new(TLSv1_client_method()); + } else if (0 == strcmp("tlsv11", protocol)) + { + verb ("V: using TLSv1_1_client_method()"); + ctx = SSL_CTX_new(TLSv1_1_client_method()); + } else if (0 == strcmp("tlsv12", protocol)) + { + verb ("V: using TLSv1_2_client_method()"); + ctx = SSL_CTX_new(TLSv1_2_client_method()); } else die("Unsupported protocol `%s'\n", protocol); diff --git a/src/tlsdate-helper.c b/src/tlsdate-helper.c index 877c67e..e730c81 100644 --- a/src/tlsdate-helper.c +++ b/src/tlsdate-helper.c @@ -1141,6 +1141,14 @@ run_ssl (uint32_t *time_map, int time_is_an_illusion, int http) { verb ("V: using TLSv1_client_method()"); ctx = SSL_CTX_new(TLSv1_client_method()); + } else if (0 == strcmp("tlsv11", protocol)) + { + verb ("V: using TLSv1_1_client_method()"); + ctx = SSL_CTX_new(TLSv1_1_client_method()); + } else if (0 == strcmp("tlsv12", protocol)) + { + verb ("V: using TLSv1_2_client_method()"); + ctx = SSL_CTX_new(TLSv1_2_client_method()); } else die("Unsupported protocol `%s'", protocol); diff --git a/src/tlsdate.c b/src/tlsdate.c index dd7f993..93c6d2d 100644 --- a/src/tlsdate.c +++ b/src/tlsdate.c @@ -88,7 +88,7 @@ usage (void) " [-n|--dont-set-clock]\n" " [-H|--host] [hostname|ip]\n" " [-p|--port] [port number]\n" - " [-P|--protocol] [sslv23|sslv3|tlsv1]\n" + " [-P|--protocol] [sslv23|sslv3|tlsv1|tlsv11|tlsv12]\n" " [-C|--certcontainer] [dirname|filename]\n" " [-v|--verbose]\n" " [-V|--showtime] [human|raw]\n"