Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Tornado https ssl错误_Python_Ssl_Https_Ssl Certificate_Tornado - Fatal编程技术网

Python Tornado https ssl错误

Python Tornado https ssl错误,python,ssl,https,ssl-certificate,tornado,Python,Ssl,Https,Ssl Certificate,Tornado,当我启动tornado https服务器时,会要求我输入PEM密码(我没有设置密码,所以只需按enter键) 我根据以下说明生成了密钥: 然后修改了龙卷风的旋转,如下所示 SSL_OPTIONS = { "certfile": "path/to/crt", "keyfile": "path/to/private/key", } https_server = tornado.httpserver.HTTPServer(application, ssl_options=SSL_OP

当我启动tornado https服务器时,会要求我输入PEM密码(我没有设置密码,所以只需按enter键)

我根据以下说明生成了密钥: 然后修改了龙卷风的旋转,如下所示

SSL_OPTIONS = {
    "certfile": "path/to/crt",
    "keyfile": "path/to/private/key", } 
https_server = tornado.httpserver.HTTPServer(application, ssl_options=SSL_OPTIONS)
我找不到解决这个问题的办法。我使用的是最新的tornado版本和python 2.7


谢谢

如果您按照该页面上的说明操作,您的密钥仍然有密码,它只是空的。我不确定在Python2中是否可以非交互地使用带有密码的密钥(Python3.2中新增了
SSLContext.load\u cert\u chain
方法)。您可以通过在第一步中将
-des3
更改为
-nodes
来创建一个根本没有密码的密钥(这将禁用提示):
openssl genrsa-nodes-out www.thegeekstuff.com.key 1024
(然后对新密钥重复其余步骤),或者使用
openssl rsa
从您已经获得的密钥中删除密码(请参见)

是的,我查看了,但没有帮助:/my openssl genrsa上没有-node标志,但是如果您根本不提供-des3,它也可以工作()-谢谢!
SSL_OPTIONS = {
    "certfile": "path/to/crt",
    "keyfile": "path/to/private/key", } 
https_server = tornado.httpserver.HTTPServer(application, ssl_options=SSL_OPTIONS)