Python和SSL [英] Python and SSL
问题描述
我需要在服务器之间使用Python与SSL通信。
(我使用hhtplib但我认为也可以使用urllib2)
我想我需要使用SSL根证书并告诉程序
信任这个证书。
但是我怎么能告诉我的Python程序信任我的SSL证书?
什么时候在我收到错误之前我试过了。
谢谢你的帮助
L,
I need to use Python with SSL comunication betweeen servers.
(I use hhtplib but I think urllib2 can also be used )
I think I need to use SSL root certificate and tell a program to
trust this certificate.
But how can I tell my Python program to trust my SSL certificate?
When I tried before I received the error 503
Thank you for help
L,
推荐答案
Johny写道:
Johny wrote:
我需要在服务器之间使用Python与SSL通信。
(我使用hhtplib但我认为也可以使用urllib2)
我想我需要使用SSL根证书并告诉程序
信任这个证书。
I need to use Python with SSL comunication betweeen servers.
(I use hhtplib but I think urllib2 can also be used )
I think I need to use SSL root certificate and tell a program to
trust this certificate.
您无法使用内置SSL支持来保护SSL,您需要使用
第三方模块。有一些可用,包括M2Crypto,TLS
Lite,pyOpenSSL和pyOpenSSL-extended。由于我是
M2Crypto的维护者,我自然会建议;)
http://chandlerproject.org/Projects/MeTooCrypto
-
Heikki Toivonen >
我听说python 2.6将包含完整的服务器端SSL
支持 (无论这意味着什么)。
这是真的吗?
I heard that python 2.6 will include full "server-side SSL
support" (whatever this means).
Is it true?
我需要在服务器之间使用Python与SSL通信。
I need to use Python with SSL comunication betweeen servers.
(我使用hhtplib,但我认为也可以使用urllib2)
我想我需要使用SSL根证书并告诉程序
相信这个证书。
(I use hhtplib but I think urllib2 can also be used )
I think I need to use SSL root certificate and tell a program to
trust this certificate.
我不这么认为 - SSL模块做的对你来说已经很好了。
I don''t think so - what the SSL module does is already fine for you.
但是,如何告诉我的Python程序信任我的SSL证书?
But how can I tell my Python program to trust my SSL certificate?
为什么要告诉它? SSL模块将信任*任何*
服务器证书,无需明确说明哪些是
信任。
Why do you want to tell it that? The SSL module will trust *any*
server certificate, no need to tell it explicitly which ones to
trust.
当我尝试之前收到错误503
When I tried before I received the error 503
这必须是一个独立错误。
问候,
马丁
That must be an independent error.
Regards,
Martin
这篇关于Python和SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!