fixed: ssl call error at function load_cert_chain.

If option '--key' is not specified. 'WebSockifyServer class' will
       inital self.key as empty string. but ssl load_cert_chain function
       will raise error 'no such file' with keyfile param empty string.
This commit is contained in:
wention 2017-11-09 16:13:15 +08:00
parent 8b2a949276
commit ade9d61c22
1 changed files with 4 additions and 1 deletions

View File

@ -353,9 +353,12 @@ class WebSockifyServer(object):
self.tcp_keepidle = tcp_keepidle
self.tcp_keepintvl = tcp_keepintvl
# keyfile path must be None if not specified
self.key = None
# Make paths settings absolute
self.cert = os.path.abspath(cert)
self.key = self.web = self.record = self.cafile = ''
self.web = self.record = self.cafile = ''
if key:
self.key = os.path.abspath(key)
if web: