From fdb2fa5f5991e1df0a0d61badb64cda67918ae95 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Thu, 26 Jul 2018 11:25:57 -0300 Subject: [PATCH] Let the library choose the min and max versions Some protocols can be disable with 'options'. --- src/context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context.c b/src/context.c index cc9706a..3186f34 100644 --- a/src/context.c +++ b/src/context.c @@ -66,9 +66,9 @@ static int set_option_flag(const char *opt, unsigned long *flag) */ static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax) { - if (!strcmp(method, "any") || !strcmp(method, "sslv23")) { - *vmin = TLS1_VERSION; - *vmax = TLS1_2_VERSION; + if (!strcmp(method, "any") || !strcmp(method, "sslv23")) { // 'sslv23' is deprecated + *vmin = 0; + *vmax = 0; return TLS_method(); } else if (!strcmp(method, "tlsv1")) {