mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-29 18:12:16 +01:00
Merge pull request #2932 from kaleb-himes/ZD10223
Fix building with one-side only tls13/dtls
This commit is contained in:
@@ -19527,6 +19527,30 @@ exit_dpk:
|
||||
|
||||
#endif /* WOLFSSL_TLS13 || !NO_WOLFSSL_CLIENT */
|
||||
|
||||
#if defined(WOLFSSL_TLS13) && !defined(WOLFSSL_NO_TLS12)
|
||||
/* returns 1 if able to do TLS 1.3 otherwise 0 */
|
||||
static int TLSv1_3_Capable(WOLFSSL* ssl)
|
||||
{
|
||||
#ifndef WOLFSSL_TLS13
|
||||
return 0;
|
||||
#else
|
||||
int ret = 0;
|
||||
|
||||
if (IsAtLeastTLSv1_3(ssl->ctx->method->version)) {
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
if ((wolfSSL_get_options(ssl) & SSL_OP_NO_TLSv1_3)) {
|
||||
/* option set at run time to disable TLS 1.3 */
|
||||
ret = 0;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
#endif /* WOLFSSL_TLS13 */
|
||||
|
||||
/* client only parts */
|
||||
#ifndef NO_WOLFSSL_CLIENT
|
||||
|
||||
@@ -20191,30 +20215,6 @@ exit_dpk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
/* returns 1 if able to do TLS 1.3 otherwise 0 */
|
||||
static int TLSv1_3_Capable(WOLFSSL* ssl)
|
||||
{
|
||||
#ifndef WOLFSSL_TLS13
|
||||
return 0;
|
||||
#else
|
||||
int ret = 0;
|
||||
|
||||
if (IsAtLeastTLSv1_3(ssl->ctx->method->version)) {
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
if ((wolfSSL_get_options(ssl) & SSL_OP_NO_TLSv1_3)) {
|
||||
/* option set at run time to disable TLS 1.3 */
|
||||
ret = 0;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
#endif /* WOLFSSL_TLS13 */
|
||||
|
||||
int CompleteServerHello(WOLFSSL* ssl)
|
||||
{
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user