openssl: fix build for version < 1.1.0

Closes #8470
This commit is contained in:
MAntoniak 2022-02-17 21:29:15 +01:00 committed by Daniel Stenberg
parent df957e1003
commit bbe7042113
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2409,6 +2409,7 @@ set_ssl_version_min_max_legacy(ctx_option_t *ctx_options,
#ifdef TLS1_3_VERSION
{
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
struct ssl_backend_data *backend = connssl->backend;
SSL_CTX_set_max_proto_version(backend->ctx, TLS1_3_VERSION);
*ctx_options |= SSL_OP_NO_TLSv1_2;
}