Skip to content
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

Support ssl=True #699

Closed
methane opened this issue Feb 8, 2024 · 0 comments · Fixed by #700
Closed

Support ssl=True #699

methane opened this issue Feb 8, 2024 · 0 comments · Fixed by #700

Comments

@methane
Copy link
Member

methane commented Feb 8, 2024

PyMySQL supports ssl=True.
Additionally, ssl=True meant sslmode="REQUIRED" when MariaDB Connector is used until mysqlclient 2.2.1. See #698.

For better compatibility with them, I will add ssl=True support.

methane added a commit that referenced this issue Feb 8, 2024
MySQL use ssl by default but MariaDB don't.

Until mysqlclient<=2.2.1, `ssl=True` unintentionally allowed and it
called `mysql_ssl_set(mysql, NULL, NULL, NULL, NULL, NULL)`. Although it
is no-op in MySQL Connector, MariaDB Connector silently set
MYSQL_OPT_SSL_ENFORCE when the API is called. (See #698)

In case of PyMySQL, ssl is not used by default but `ssl=True` behave
like `sslmode="PREFERRED"`.

For better backward compatibility and compatibility with PyMySQL and
security, I decided to allow ssl=True and it means sslmode="REQUIRED" on
MySQL Connector and
set MYSQL_OPT_SSL_ENFORCE on MariaDB Connector.

Fix #699
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant