mirror of
https://github.com/moparisthebest/HttpUploadComponent
synced 2024-11-24 09:52:15 -05:00
optional ssl support (recommended)
This commit is contained in:
parent
c09664797d
commit
8bd4ad6803
@ -9,6 +9,7 @@ import string
|
||||
import hashlib
|
||||
import random
|
||||
import os
|
||||
import ssl
|
||||
from threading import Thread
|
||||
from threading import Lock
|
||||
try:
|
||||
@ -172,6 +173,8 @@ if __name__ == "__main__":
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format='%(levelname)-8s %(message)s')
|
||||
server = ThreadedHTTPServer(('0.0.0.0', config['http_port']), HttpHandler)
|
||||
if 'keyfile' in config and 'certfile' in config:
|
||||
server.socket = ssl.wrap_socket(server.socket, keyfile=config['keyfile'], certfile=config['certfile'])
|
||||
xmpp = MissingComponent(config['jid'],config['secret'])
|
||||
if xmpp.connect():
|
||||
xmpp.process()
|
||||
|
Loading…
Reference in New Issue
Block a user