且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python MySQLdb的CA SSL参数不起作用,但是密钥起作用吗?

更新时间:2023-08-22 22:40:58

注意:此错误已得到修复.根据错误:

Note: this bug has since been fixed. Per the bug:

在5.1.66、5.5.28、5.6.7、5.7.0更改日志中注明.

Noted in 5.1.66, 5.5.28, 5.6.7, 5.7.0 changelogs.

--ssl-key选项的参数未验证是否存在且为 有效密钥.产生的连接使用SSL,但是密钥不是 使用.

The argument to the --ssl-key option was not verified to exist and be a valid key. The resulting connection used SSL, but the key was not used.


旧答案

要获得比我能提供的更好的描述,请参见 http://bugs.mysql .com/bug.php?id = 62743 http://www.chriscalender.com /?p = 325 .

For a much better description than I can give, see http://bugs.mysql.com/bug.php?id=62743 and http://www.chriscalender.com/?p=325.

从我(未经接受的教育)的理解来看,这是一个MySQL错误.只要您指定键(如在示例中所做的那样),MySQL就会设置SSL连接,并授予您访问权限.另一个有趣的部分是您可以将键值更改为任何值,因此在您的示例中,您可以执行以下操作:

From my (admittedly uneducated) understanding, it is a MySQL bug. As long as you specify only a key (as you're doing in the example that works), MySQL sets the SSL connection and you're granted access. The other interesting part is that you can change the key value to be anything at all, so in your example, you could do:

ssl_settings = {'key': 'randomstuff'}

它仍然应该连接.