https://bz.apache.org/bugzilla/show_bug.cgi?id=64699

--- Comment #2 from jiangxiaolong <[email protected]> ---
>From 8d043c184e103faa94d278eaa2f28db7699d6b1b Mon Sep 17 00:00:00 2001
From: Xiaolong Jiang <[email protected]>
Date: Sun, 30 Aug 2020 02:14:44 +0000
Subject: [PATCH] ab support TLS1.3

Signed-off-by: Xiaolong Jiang <[email protected]>
---
 support/ab.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/support/ab.c b/support/ab.c
index 71cf484..3b1c699 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -2160,7 +2160,7 @@ static void usage(const char *progname)
 #endif

 #ifdef HAVE_TLSV1_X
-#define TLS1_X_HELP_MSG ", TLS1.1, TLS1.2"
+#define TLS1_X_HELP_MSG ", TLS1.1, TLS1.2, TLS1.3"
 #else
 #define TLS1_X_HELP_MSG ""
 #endif
@@ -2294,7 +2294,7 @@ int main(int argc, const char * const argv[])
     const char *opt_arg;
     char c;
 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
-    int max_prot = TLS1_2_VERSION;
+    int max_prot = TLS1_3_VERSION;
 #ifndef OPENSSL_NO_SSL3
     int min_prot = SSL3_VERSION;
 #else
@@ -2559,7 +2559,7 @@ int main(int argc, const char * const argv[])
 #else /* #if OPENSSL_VERSION_NUMBER < 0x10100000L */
                 meth = TLS_client_method();
                 if (strncasecmp(opt_arg, "ALL", 3) == 0) {
-                    max_prot = TLS1_2_VERSION;
+                    max_prot = TLS1_3_VERSION;
 #ifndef OPENSSL_NO_SSL3
                     min_prot = SSL3_VERSION;
 #else
@@ -2576,6 +2576,9 @@ int main(int argc, const char * const argv[])
                 } else if (strncasecmp(opt_arg, "TLS1.2", 6) == 0) {
                     max_prot = TLS1_2_VERSION;
                     min_prot = TLS1_2_VERSION;
+                } else if (strncasecmp(opt_arg, "TLS1.3", 6) == 0) {
+                    max_prot = TLS1_3_VERSION;
+                    min_prot = TLS1_3_VERSION;
                 } else if (strncasecmp(opt_arg, "TLS1", 4) == 0) {
                     max_prot = TLS1_VERSION;
                     min_prot = TLS1_VERSION;
-- 
2.17.1

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to