mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
Merge pull request #5518 from CallumMcLoughlin/master
Allow Post Quantum Keyshare for DTLS 1.3
This commit is contained in:
@@ -2838,8 +2838,8 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"WARNING: If a TLS 1.3 connection is not negotiated, you "
|
"WARNING: If a TLS 1.3 connection is not negotiated, you "
|
||||||
"will not be using a post-quantum group.\n");
|
"will not be using a post-quantum group.\n");
|
||||||
else if (version != 4)
|
else if (version != 4 && version != -4)
|
||||||
err_sys("can only use post-quantum groups with TLS 1.3");
|
err_sys("can only use post-quantum groups with TLS 1.3 or DTLS 1.3");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2368,8 +2368,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"WARNING: If a TLS 1.3 connection is not negotiated, you "
|
"WARNING: If a TLS 1.3 connection is not negotiated, you "
|
||||||
"will not be using a post-quantum group.\n");
|
"will not be using a post-quantum group.\n");
|
||||||
} else if (version != 4) {
|
} else if (version != 4 && version != -4) {
|
||||||
err_sys("can only use post-quantum groups with TLS 1.3");
|
err_sys("can only use post-quantum groups with TLS 1.3 or DTLS 1.3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -3104,7 +3104,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WOLFSSL_TLS13) && defined(HAVE_SUPPORTED_CURVES)
|
#if defined(WOLFSSL_TLS13) && defined(HAVE_SUPPORTED_CURVES)
|
||||||
if (version >= 4) {
|
if (version >= 4 || version == -4) {
|
||||||
#ifdef CAN_FORCE_CURVE
|
#ifdef CAN_FORCE_CURVE
|
||||||
if (force_curve_group_id > 0) {
|
if (force_curve_group_id > 0) {
|
||||||
do {
|
do {
|
||||||
|
@@ -10659,7 +10659,7 @@ int wolfSSL_UseKeyShare(WOLFSSL* ssl, word16 group)
|
|||||||
if (WOLFSSL_NAMED_GROUP_IS_PQC(group)) {
|
if (WOLFSSL_NAMED_GROUP_IS_PQC(group)) {
|
||||||
|
|
||||||
if (ssl->ctx != NULL && ssl->ctx->method != NULL &&
|
if (ssl->ctx != NULL && ssl->ctx->method != NULL &&
|
||||||
ssl->ctx->method->version.minor != TLSv1_3_MINOR) {
|
!IsAtLeastTLSv1_3(ssl->version)) {
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user