无法选择密码
我在 python 2.7 / Win XP 上与 IDEA-CBC-SHA 建立 ssl 连接时遇到问题。
这是代码:
ciphers = "IDEA-CBC-SHA"
ssl_sock = ssl.wrap_socket(self.sock,
keyfile = keyfile,
certfile = certfile,
ciphers = ciphers)
ssl_sock.connect((address, port))
这是结果:
SSLError: _ssl.c:319: No cipher can be selected.
的列出的密码之一
OpenSSL> ciphers
DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DES-CBC3-MD5:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:IDEA-CBC-SHA:IDEA-CBC-MD5:RC2-CBC-MD5:RC4-SHA:RC4-MD5:RC4-MD5:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:DES-CBC-MD5:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC2-CBC-MD5:EXP-RC4-MD5:EXP-RC4-MD5
当我查询 openssl 时,我将 IDEA-CBC-SHA 视为我用其他密码(DES-CBC3-SHA、RC4-SHA、AES256-SHA)测试过 ,AES128-SHA),它们都工作得很好。
知道为什么我的 ssl 连接对于这个特定的密码可能会失败吗?
有没有办法禁用(然后启用)密码?
谢谢!
I am having problems making ssl connections with IDEA-CBC-SHA on python 2.7 / Win XP.
This is the code:
ciphers = "IDEA-CBC-SHA"
ssl_sock = ssl.wrap_socket(self.sock,
keyfile = keyfile,
certfile = certfile,
ciphers = ciphers)
ssl_sock.connect((address, port))
And this is the result:
SSLError: _ssl.c:319: No cipher can be selected.
When I query openssl, I see IDEA-CBC-SHA as one of the listed ciphers
OpenSSL> ciphers
DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:DES-CBC3-SHA:DES-CBC3-MD5:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:IDEA-CBC-SHA:IDEA-CBC-MD5:RC2-CBC-MD5:RC4-SHA:RC4-MD5:RC4-MD5:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:DES-CBC-MD5:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC2-CBC-MD5:EXP-RC4-MD5:EXP-RC4-MD5
I've tested with other ciphers (DES-CBC3-SHA ,RC4-SHA, AES256-SHA, AES128-SHA), and they all worked fine.
Any idea why my ssl connection might be failing for this specific cipher?
Is there some way to disable (and then enable) ciphers?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您正在连接的服务器不支持 IDEA。数据包捕获可以证实这一点。
编辑:在 ssl 连接中,客户端建议它愿意使用的密码选项列表。服务器从该列表中选择服务器认为可接受的选项之一。如果服务器不喜欢客户端提出的任何选项,则连接将失败,因为服务器无法选择密码套件。
Perhaps the server you are connecting to does not support IDEA. A packet capture would confirm this.
EDIT: In an ssl connection, the client suggests a list of cipher options it is willing to use. The server selects one of the options from that list that the server finds acceptable. If the server does not like any options the client proposed, then the connection will fail, because the server is unable to select a cipher suite.