|
|
@ -1894,8 +1894,11 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options( |
|
|
|
#else |
|
|
|
#else |
|
|
|
ssl_context = SSL_CTX_new(TLSv1_2_method()); |
|
|
|
ssl_context = SSL_CTX_new(TLSv1_2_method()); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
// TODO(mattstev): Re-enable TLS 1.3 by using |options.min_tls_version| and
|
|
|
|
|
|
|
|
// |options.max_tls_version|, rather than hardcoding in TLS 1.2 as the min and
|
|
|
|
|
|
|
|
// max.
|
|
|
|
result = tsi_set_min_and_max_tls_versions( |
|
|
|
result = tsi_set_min_and_max_tls_versions( |
|
|
|
ssl_context, options->min_tls_version, options->max_tls_version); |
|
|
|
ssl_context, tsi_tls_version::TSI_TLS1_2, tsi_tls_version::TSI_TLS1_2); |
|
|
|
if (result != TSI_OK) return result; |
|
|
|
if (result != TSI_OK) return result; |
|
|
|
if (ssl_context == nullptr) { |
|
|
|
if (ssl_context == nullptr) { |
|
|
|
gpr_log(GPR_ERROR, "Could not create ssl context."); |
|
|
|
gpr_log(GPR_ERROR, "Could not create ssl context."); |
|
|
@ -2061,9 +2064,12 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options( |
|
|
|
#else |
|
|
|
#else |
|
|
|
impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); |
|
|
|
impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
// TODO(mattstev): Re-enable TLS 1.3 by using |options.min_tls_version|
|
|
|
|
|
|
|
|
// and |options.max_tls_version|, rather than hardcoding in TLS 1.2 as the
|
|
|
|
|
|
|
|
// min and max.
|
|
|
|
result = tsi_set_min_and_max_tls_versions(impl->ssl_contexts[i], |
|
|
|
result = tsi_set_min_and_max_tls_versions(impl->ssl_contexts[i], |
|
|
|
options->min_tls_version, |
|
|
|
tsi_tls_version::TSI_TLS1_2, |
|
|
|
options->max_tls_version); |
|
|
|
tsi_tls_version::TSI_TLS1_2); |
|
|
|
if (result != TSI_OK) return result; |
|
|
|
if (result != TSI_OK) return result; |
|
|
|
if (impl->ssl_contexts[i] == nullptr) { |
|
|
|
if (impl->ssl_contexts[i] == nullptr) { |
|
|
|
gpr_log(GPR_ERROR, "Could not create ssl context."); |
|
|
|
gpr_log(GPR_ERROR, "Could not create ssl context."); |
|
|
|