From efcf06ef7c10b493674d1c2c76e46a668ba6b4b7 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Fri, 7 Jun 2019 19:13:46 +0900 Subject: [PATCH] use tlsv1_2 client method when tls13 is enabled --- examples/benchmark/tls_bench.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/benchmark/tls_bench.c b/examples/benchmark/tls_bench.c index 5be7f63db..cd3f8fedd 100644 --- a/examples/benchmark/tls_bench.c +++ b/examples/benchmark/tls_bench.c @@ -611,7 +611,12 @@ static int bench_tls_client(info_t* info) cli_ctx = wolfSSL_CTX_new(wolfTLSv1_3_client_method()); #endif if (!tls13) +#if !defined(WOLFSSL_TLS13) cli_ctx = wolfSSL_CTX_new(wolfSSLv23_client_method()); +#elif !defined(WOLFSSL_NO_TLS12) + cli_ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method()); +#endif + if (cli_ctx == NULL) { printf("error creating ctx\n"); ret = MEMORY_E; goto exit;