Fix for TLS v1.3 PSK tests work with additional cipher suites (not just TLS13-AES128-GCM-SHA256) and the echo server/client.

This commit is contained in:
David Garske
2020-05-15 15:08:17 -07:00
parent 8823a581d0
commit 3b63e55a68
5 changed files with 35 additions and 18 deletions
+6
View File
@@ -164,12 +164,18 @@ void echoclient_test(void* args)
#ifdef HAVE_NULL_CIPHER
defaultCipherList = "PSK-NULL-SHA256";
#elif defined(HAVE_AESGCM) && !defined(NO_DH)
#ifdef WOLFSSL_TLS13
defaultCipherList = "TLS13-AES128-GCM-SHA256:"
"DHE-PSK-AES128-GCM-SHA256:";
#else
defaultCipherList = "DHE-PSK-AES128-GCM-SHA256";
#endif
#else
defaultCipherList = "PSK-AES128-CBC-SHA256";
#endif
if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=WOLFSSL_SUCCESS)
err_sys("client can't set cipher list 2");
wolfSSL_CTX_set_psk_callback_ctx(ctx, (void*)defaultCipherList);
}
#endif