Browse Source

Merge 4164fc3d02 into f0d7eddcfb

pull/5430/merge
Pär 8 years ago
committed by GitHub
parent
commit
ccb2a807fe
  1. 12
      libs/tornado/tcpserver.py

12
libs/tornado/tcpserver.py

@ -106,6 +106,18 @@ class TCPServer(object):
if 'certfile' not in self.ssl_options:
raise KeyError('missing key "certfile" in ssl_options')
# Run os.stat against cert and keyfile to test permissions,
# if not, just raise the exception
try:
os.stat(self.ssl_options['certfile'])
except:
raise
try:
os.stat(self.ssl_options['keyfile'])
except:
raise
if not os.path.exists(self.ssl_options['certfile']):
raise ValueError('certfile "%s" does not exist' %
self.ssl_options['certfile'])

Loading…
Cancel
Save