diff options
author | Gord Thompson <gord@gordthompson.com> | 2020-11-13 14:13:32 -0500 |
---|---|---|
committer | Gord Thompson <gord@gordthompson.com> | 2020-11-13 12:59:31 -0700 |
commit | 2e4dec934cb5215d628e02ed717454c165a33e4d (patch) | |
tree | adb3310197b6b1c6d33ace8c50b606c077ff8900 /lib/sqlalchemy/dialects/mysql/mysqldb.py | |
parent | e1891931b799defb86621a1cfbab26647afd362e (diff) | |
download | sqlalchemy-2e4dec934cb5215d628e02ed717454c165a33e4d.tar.gz |
Added ssl_mode flag to mysqldb
Fixes: #5692
ssl_mode flag is added to mysqldb
### Description
mysqldb driver supports "ssl_mode" flag, which can be one of following values:
"DISABLED", "PREFERRED", "REQUIRED", "VERIFY_CA", "VERIFY_IDENTITY".
Depending on these values MySQL will behave accordingly to them.
So this flag has been added to the sqlaclhemy. So in case if TLS is not supported on the server, we can drop the connection right away.
Closes: #5693
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5693
Pull-request-sha: 94aed8b17d21da9a20be4b092f6a60b12f60b761
Change-Id: I7657b9c812d3a40ccacebbd8f4d5f20659d447c3
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/mysqldb.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/mysqldb.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py index b20e061fb..664c7a047 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@ -189,6 +189,7 @@ class MySQLDialect_mysqldb(MySQLDialect): util.coerce_kw_type(opts, "write_timeout", int) util.coerce_kw_type(opts, "client_flag", int) util.coerce_kw_type(opts, "local_infile", int) + util.coerce_kw_type(opts, "ssl_mode", str) # Note: using either of the below will cause all strings to be # returned as Unicode, both in raw SQL operations and with column # types like String and MSString. |