CA SSL parameter for Python MySQLdb not working, but key does? -


I am trying to connect to a MySQL DB which requires SSL (only the server is authenticating, Not mutual). My server's CA is saved in the same directory as a .pem, I'm running the script from. My connection string looks like this:

  ssl_settings = {'ca': 'ca.pem'} conn = MySQLdb.connect (host = HOST) The result is "Error 2026: SSL connection error." However, if I change ssl_settings to: User = USER, passwd = PASS, db = db, ssl = ssl_settings}   

  ssl_settings = {'key': 'ca.pem'}   

database connects properly and Script implemented by my understanding of the SSL parameters, the 'cert' and 'key' server's clients For the same reason, there is no reason why SSL settings work and why does not the CA file specify later?

Python 2.4.3 (old, I know)
MySQL-Python 1.2.1

Note: This bug has been fixed since. :

5.1.66, 5.5.28, 5.6.7, 5.7.0 was noted in changelog.

--sl-key option argument does not exist And maybe a valid key resulted in using SSL connections Or was, but the key was not used.


Old Answer

I can give, see and

By understanding my (clearly uneducated), this is a MySQL bug. Unless you specify a key only (as you are working in the example), the MySQL SSL connection sets and you are granted access. The other interesting thing is that you can change the value to change anything, so in your example, you can do this:

  ssl_settings = {'key': 'randomstuff' }   

and it should still be connected.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -