From b0688688c18070267b4593963c6a4d1027018c69 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Wed, 30 Jun 2021 13:52:46 +0900 Subject: [PATCH] addressed review comments --- examples/client/client.c | 4 +--- examples/server/server.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index 3f3a0ed0a..6772c82cd 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -1592,7 +1592,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) #endif int version = CLIENT_INVALID_VERSION; int minVersion = CLIENT_INVALID_VERSION; - int setMinVersion = 0; int usePsk = 0; int useAnon = 0; int sendGET = 0; @@ -2269,7 +2268,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) simulateWantWrite = 1; break; case '7' : - setMinVersion = 1; minVersion = atoi(myoptarg); if (minVersion < 0 || minVersion > 4) { Usage(); @@ -2563,7 +2561,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) err_sys("unable to get ctx"); } #endif - if (setMinVersion) { + if (minVersion != CLIENT_INVALID_VERSION) { wolfSSL_CTX_SetMinVersion(ctx, minVersion); } if (simulateWantWrite) { diff --git a/examples/server/server.c b/examples/server/server.c index 603dadba1..180e09eb1 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -1135,7 +1135,6 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args) wolfsentry_errcode_t wolfsentry_ret; #endif int minVersion = SERVER_INVALID_VERSION; - int setMinVersion = 0; int useWebServerMsg = 0; char input[SRV_READ_SZ]; #ifndef WOLFSSL_VXWORKS @@ -1800,7 +1799,6 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args) simulateWantWrite = 1; break; case '7' : - setMinVersion = 1; minVersion = atoi(myoptarg); if (minVersion < 0 || minVersion > 4) { Usage(); @@ -2004,7 +2002,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args) if (ctx == NULL) err_sys_ex(catastrophic, "unable to get ctx"); - if (setMinVersion) { + if (minVersion != SERVER_INVALID_VERSION) { wolfSSL_CTX_SetMinVersion(ctx, minVersion); }