aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/rest_api.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/rest_api.py b/modules/rest_api.py
index a8411648..9efb2768 100644
--- a/modules/rest_api.py
+++ b/modules/rest_api.py
@@ -116,10 +116,12 @@ class Module(ModuleManager.BaseModule):
self.httpd = None
if self.bot.get_setting("rest-api", False):
self.httpd = http.server.HTTPServer(("", 5000), Handler)
- self.httpd.socket = ssl.wrap_socket(self.httpd.socket,
- keyfile=self.bot.config["tls-api-key"],
- certfile=self.bot.config["tls-api-certificate"],
+
+ self.httpd.socket = utils.security.wrap_scket(self.httpd.socket,
+ cert=self.bot.config["tls-api-certificate"],
+ key=self.bot.config["tls-api-key"],
server_side=True)
+
self.thread = threading.Thread(target=self.httpd.serve_forever)
self.thread.daemon = True
self.thread.start()