当我启动龙卷风https服务器时,系统会要求我输入PEM密码(我没有设置该密码,因此只按Enter键)Enter PEM pass phrase: 2013-10-17 14:24:46,730 ioloop.py:660 Exceptionin I/O handler for fd 3 Traceback (most recent call last): File"/usr/lib/python2.7/site-packages/tornado/ioloop.py", line 653, instart self._handlers[fd](fd, events) File "/usr/lib/python2.7/site-packages/tornado/stack_context.py", line 241,in wrapped callback(*args, **kwargs) File "/usr/lib/python2.7/site-packages/tornado/netutil.py", line 141, inaccept_handler callback(connection, address) File "/usr/lib/python2.7/site-packages/tornado/tcpserver.py", line 212, in_handle_connection do_handshake_on_connect=False) File "/usr/lib/python2.7/site-packages/tornado/netutil.py", line 322, inssl_wrap_socket return ssl.wrap_socket(socket, **dict(context, **kwargs)) File "/usr/lib64/python2.7/ssl.py", line 387, in wrap_socket ciphers=ciphers) File "/usr/lib64/python2.7/ssl.py", line 141, in __init__ ciphers) SSLError: [Errno 336265225] _ssl.c:351: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib EnterPEM pass phrase:我使用以下指令生成了密钥:http://www.thegeekstuff.com/2009/07/linux-apache-mod-ssl-generate-key-csr-crt-file/然后修改龙卷风旋转,如下所示SSL_OPTIONS = { "certfile": "path/to/crt", "keyfile": "path/to/private/key", }https_server = tornado.httpserver.HTTPServer(application, ssl_options=SSL_OPTIONS)我找不到这个问题的解决方案。我正在使用最新的龙卷风版本和python 2.7谢谢! 最佳答案 如果您按照该页面上的说明进行操作,则您的密钥仍然具有密码,只是空的。我不确定在Python 2中是否可以非交互地使用带有密码的密钥(SSLContext.load_cert_chain方法在Python 3.2中是新功能)。您可以通过在第一步中将-des3更改为-nodes来创建完全没有密码的密钥(将禁用提示):openssl genrsa -nodes -out www.thegeekstuff.com.key 1024(然后为新密钥重复其余步骤),或使用从您已经拥有的密钥中剥离密码(请参见http://www.mnxsolutions.com/apache/removing-a-passphrase-from-an-ssl-key.html)