Fixes from review
This commit is contained in:
parent
5ef977aa3d
commit
8920cd89e4
@ -628,10 +628,10 @@ static void Usage(void)
|
||||
#ifdef HAVE_ECC
|
||||
printf("-Y Key Share with ECC named groups only\n");
|
||||
#endif
|
||||
#endif /* WOLFSSL_TLS13 */
|
||||
#ifdef HAVE_CURVE25519
|
||||
printf("-t Use X25519 for key exchange\n");
|
||||
#endif
|
||||
#endif /* WOLFSSL_TLS13 */
|
||||
}
|
||||
|
||||
THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
@ -1458,6 +1458,18 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
err_sys("DisableExtendedMasterSecret failed");
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_CURVE25519
|
||||
if (useX25519) {
|
||||
if (wolfSSL_CTX_UseSupportedCurve(ctx, WOLFSSL_ECC_X25519)
|
||||
!= SSL_SUCCESS) {
|
||||
err_sys("unable to support X25519");
|
||||
}
|
||||
if (wolfSSL_CTX_UseSupportedCurve(ctx, WOLFSSL_ECC_SECP256R1)
|
||||
!= SSL_SUCCESS) {
|
||||
err_sys("unable to support secp256r1");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (benchmark) {
|
||||
((func_args*)args)->return_code =
|
||||
@ -1505,11 +1517,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
wolfSSL_KeepArrays(ssl);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CURVE25519
|
||||
if (useX25519)
|
||||
wolfSSL_UseSupportedCurve(ssl, WOLFSSL_ECC_X25519);
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
if (!helloRetry) {
|
||||
if (onlyKeyShare == 0 || onlyKeyShare == 2) {
|
||||
@ -1943,11 +1950,6 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
(void*)"resumed session");
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CURVE25519
|
||||
if (useX25519)
|
||||
wolfSSL_UseSupportedCurve(sslResume, WOLFSSL_ECC_X25519);
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
if (useX25519) {
|
||||
if (wolfSSL_UseKeyShare(ssl, WOLFSSL_ECC_X25519) != SSL_SUCCESS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user