server: fix wrong minVersion setting when non in dtls

This commit is contained in:
Marco Oliverio
2022-06-28 12:10:18 +02:00
parent 94e7eacc5f
commit 060dfe1a69

View File

@ -2328,6 +2328,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
if (minVersion != SERVER_INVALID_VERSION) {
#ifdef WOLFSSL_DTLS13
if (wolfSSL_dtls(ssl)) {
switch (minVersion) {
case 4:
minVersion = WOLFSSL_DTLSV1_3;
@ -2339,6 +2340,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
minVersion = WOLFSSL_DTLSV1;
break;
}
}
#endif /* WOLFSSL_DTLS13 */
wolfSSL_CTX_SetMinVersion(ctx, minVersion);
}