Add --key option for separate cert and key file.

If only --cert is specified then continue to assume both certificate
and key are in the same file (key first).
This commit is contained in:
Joel Martin
2010-11-06 10:55:09 -05:00
parent e70f1d947e
commit 3205a3dee8
5 changed files with 43 additions and 17 deletions
+3 -1
View File
@@ -28,6 +28,7 @@ settings = {
'handler' : None,
'handler_id' : 1,
'cert' : None,
'key' : None,
'ssl_only' : False,
'daemon' : True,
'record' : None, }
@@ -114,7 +115,8 @@ def do_handshake(sock):
retsock = ssl.wrap_socket(
sock,
server_side=True,
certfile=settings['cert'])
certfile=settings['cert'],
keyfile=settings['key'])
scheme = "wss"
handler_msg("using SSL/TLS")
elif settings['ssl_only']: