-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLSv1.2 can't be enabled in MySQL 5.7 #567
Comments
The openssl used is from Debian Stretch's stable repos https://packages.debian.org/stretch/openssl $ docker run --rm mysql:5.7 openssl version
OpenSSL 1.1.0f 25 May 2017 |
This seems to be a just limitation of the $ docker run --name sql57 -e MYSQL_ROOT_PASSWORD=example -d mysql:5.7 --ssl
...
$ docker exec -it sql57 bash
root@d20308a71038:/# mysql -uroot -pexample
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW GLOBAL VARIABLES LIKE 'tls_version';
+---------------+---------------+
| Variable_name | Value |
+---------------+---------------+
| tls_version | TLSv1,TLSv1.1 |
+---------------+---------------+
1 row in set (0.01 sec)
mysql>
$ docker run --name sql80 -e MYSQL_ROOT_PASSWORD=example -d mysql:8.0 --ssl
...
$ docker exec -it sql80 bash
root@da2c06eb3649:/# ps
bash: ps: command not found
root@da2c06eb3649:/# mysql -uroot -pexample
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.16 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW GLOBAL VARIABLES LIKE 'tls_version';
+---------------+-----------------------+
| Variable_name | Value |
+---------------+-----------------------+
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
+---------------+-----------------------+
1 row in set (0.01 sec) |
This is a limitation in yaSSL (which is what the community edition of 5.7 uses currently); It only supports 1.1 |
Makes sense, thanks for confirming. ❤️ 👍 (Closing, given there's nothing else we can do here from the image.) |
TLS 1.0 and 1.1 were disabled in the current latest version of JDK8, but these are the only protocols supported by the MySQL 5.7 image. SSL was disabled as a workaround to the problem. JDK release notes: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8202343 Comment about MySQL 5.7 protocol support: docker-library/mysql#567 (comment)
Hello!
I was trying to enable TLSv1.2 in a container based on the mysql:5.7 image, but I get a message saying that:
[Warning] Failed to set up SSL because of the following SSL library error: TLS version is invalid
I can reproduce this doing:
docker run --name sql57 -e MYSQL_ROOT_PASSWORD=example -d mysql:5.7 --ssl --tls-version "TLSv1.2"
The seems to be using OpenSSL, that according to MySQL documentation should be able to handle TLSv1.2.
Maybe
mysql
is being compiled linked to an old version ofopenssl
?The text was updated successfully, but these errors were encountered: