File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -988,6 +988,10 @@ Crypt_methods prepare_crypt_methods(const Tls_versions& tls_versions)
988
988
{
989
989
int tls_crypt_methods{ 0 };
990
990
for (Tls_version tls_version : tls_versions) {
991
+ if ( tls_version == Tls_version::tls_v1_0 || tls_version == Tls_version::tls_v1_1 ) {
992
+ // Those crypto methods should not be used.
993
+ php_error_docref (nullptr , E_WARNING, " TLSv1 and TLSv1.1 are deprecated starting from MySQL 8.0.25 and should not be used." );
994
+ }
991
995
php_stream_xport_crypt_method_t tls_crypt_method{ to_stream_crypt_method (tls_version) };
992
996
tls_crypt_methods |= tls_crypt_method;
993
997
}
@@ -3005,9 +3009,6 @@ void Extract_client_option::set_tls_versions(const std::string& raw_tls_versions
3005
3009
}
3006
3010
for (const auto & tls_version_str : tls_versions) {
3007
3011
const Tls_version tls_version{ parse_tls_version (tls_version_str) };
3008
- if ( tls_version == Tls_version::tls_v1_0 || tls_version == Tls_version::tls_v1_1 ) {
3009
- php_error_docref (nullptr , E_WARNING, " TLSv1 and TLSv1.1 are deprecated starting from MySQL 8.0.25 and should not be used." );
3010
- }
3011
3012
auth.tls_versions .push_back (tls_version);
3012
3013
}
3013
3014
}
You can’t perform that action at this time.
0 commit comments