'ssl-certificate'/'ssl-key' -> 'tls-certificate'/'tls-key'

This commit is contained in:
jesopo 2018-10-05 23:01:12 +01:00
parent 95e7b9ea77
commit 60ec6fe2db
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[bot] [bot]
ssl-certificate = tls-certificate =
ssl-key = tls-key =
# https://openweathermap.org/api # https://openweathermap.org/api
openweathermap-api-key = openweathermap-api-key =
# https://products.wolframalpha.com/api/ # https://products.wolframalpha.com/api/

View file

@ -93,8 +93,8 @@ class Server(IRCObject.Object):
if self.get_setting("ssl-verify", True): if self.get_setting("ssl-verify", True):
context.verify_mode = ssl.CERT_REQUIRED context.verify_mode = ssl.CERT_REQUIRED
client_certificate = self.bot.config.get("ssl-certificate", None) client_certificate = self.bot.config.get("tls-certificate", None)
client_key = self.bot.config.get("ssl-key", None) client_key = self.bot.config.get("tls-key", None)
if client_certificate and client_key: if client_certificate and client_key:
context.load_cert_chain(client_certificate, keyfile=client_key) context.load_cert_chain(client_certificate, keyfile=client_key)