addressed review comments

This commit is contained in:
Hideki Miyazaki
2021-06-30 13:52:46 +09:00
parent 5bb52915b9
commit b0688688c1
2 changed files with 2 additions and 6 deletions

View File

@@ -1592,7 +1592,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#endif #endif
int version = CLIENT_INVALID_VERSION; int version = CLIENT_INVALID_VERSION;
int minVersion = CLIENT_INVALID_VERSION; int minVersion = CLIENT_INVALID_VERSION;
int setMinVersion = 0;
int usePsk = 0; int usePsk = 0;
int useAnon = 0; int useAnon = 0;
int sendGET = 0; int sendGET = 0;
@@ -2269,7 +2268,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
simulateWantWrite = 1; simulateWantWrite = 1;
break; break;
case '7' : case '7' :
setMinVersion = 1;
minVersion = atoi(myoptarg); minVersion = atoi(myoptarg);
if (minVersion < 0 || minVersion > 4) { if (minVersion < 0 || minVersion > 4) {
Usage(); Usage();
@@ -2563,7 +2561,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
err_sys("unable to get ctx"); err_sys("unable to get ctx");
} }
#endif #endif
if (setMinVersion) { if (minVersion != CLIENT_INVALID_VERSION) {
wolfSSL_CTX_SetMinVersion(ctx, minVersion); wolfSSL_CTX_SetMinVersion(ctx, minVersion);
} }
if (simulateWantWrite) { if (simulateWantWrite) {

View File

@@ -1135,7 +1135,6 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
wolfsentry_errcode_t wolfsentry_ret; wolfsentry_errcode_t wolfsentry_ret;
#endif #endif
int minVersion = SERVER_INVALID_VERSION; int minVersion = SERVER_INVALID_VERSION;
int setMinVersion = 0;
int useWebServerMsg = 0; int useWebServerMsg = 0;
char input[SRV_READ_SZ]; char input[SRV_READ_SZ];
#ifndef WOLFSSL_VXWORKS #ifndef WOLFSSL_VXWORKS
@@ -1800,7 +1799,6 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
simulateWantWrite = 1; simulateWantWrite = 1;
break; break;
case '7' : case '7' :
setMinVersion = 1;
minVersion = atoi(myoptarg); minVersion = atoi(myoptarg);
if (minVersion < 0 || minVersion > 4) { if (minVersion < 0 || minVersion > 4) {
Usage(); Usage();
@@ -2004,7 +2002,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
if (ctx == NULL) if (ctx == NULL)
err_sys_ex(catastrophic, "unable to get ctx"); err_sys_ex(catastrophic, "unable to get ctx");
if (setMinVersion) { if (minVersion != SERVER_INVALID_VERSION) {
wolfSSL_CTX_SetMinVersion(ctx, minVersion); wolfSSL_CTX_SetMinVersion(ctx, minVersion);
} }