1

我正在编写一个内部应用程序,其中我的主 Web 服务器是 Apache Web 服务器,它托管通过 HTTPS 访问的主 Web 门户。证书是自签名证书,网站不会通过互联网访问,但 VPN 可以。

在我的应用程序中的一个网页上,我再次使用 HTTPS 但在不同的端口上建立与基于 socketio 的服务器的单独连接。主 URL 和 socketio 的 URL 的主机名相同。

如果我对两个 URL 使用两个不同的 SSL 证书,一切都会好起来的。但是,如果我尝试使用相同的 SSL 证书,应用程序将无法连接到套接字 io 服务器。

我想为两个 URL 使用相同的证书(相同的主机,不同的端口)。不可能吗?

我通过 gevent socketio 在后端收到以下错误。

Traceback (most recent call last):
  File "/nobackup/kdhotre/Intracer/16.0.293/C-Int/3rdparty/python2.6.1/lib/python2.6/site-packages/gevent-1.0-py2.6-linux-x86_64.egg/gevent/greenlet.py", line 327, in run
    result = self._run(*self.args, **self.kwargs)
  File "/nobackup/kdhotre/Intracer/16.0.293/C-Int/3rdparty/python2.6.1/lib/python2.6/site-packages/gevent-1.0-py2.6-linux-x86_64.egg/gevent/server.py", line 102, in wrap_socket_and_handle
    ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
  File "/nobackup/kdhotre/Intracer/16.0.293/C-Int/3rdparty/python2.6.1/lib/python2.6/site-packages/gevent-1.0-py2.6-linux-x86_64.egg/gevent/ssl.py", line 383, in wrap_socket
    ciphers=ciphers)
  File "/nobackup/kdhotre/Intracer/16.0.293/C-Int/3rdparty/python2.6.1/lib/python2.6/site-packages/gevent-1.0-py2.6-linux-x86_64.egg/gevent/ssl.py", line 87, in __init__
    cert_reqs, ssl_version, ca_certs)
SSLError: [Errno 336445442] _ssl.c:351: error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib
<Greenlet at 0x1b363050: <bound method SocketIOServer.wrap_socket_and_handle of

<SocketIOServer at 0x1b25bc90 fileno=10 address=72.163.134.156:5501>>

(<socket at 0x1b35de50 fileno=11 sock=72.163.134.15, ('10.142.149.112', 64062))> failed with SSLError
4

0 回答 0