Add ability to not vertify a server's certificate ('ssl-verify')

This commit is contained in:
jesopo 2018-09-17 11:38:25 +01:00
parent fad61c2664
commit c3482e78ba

View file

@ -87,6 +87,7 @@ class Server(object):
context.options |= ssl.OP_NO_TLSv1
context.load_default_certs()
if self.get_setting("ssl-verify", True):
context.verify_mode = ssl.CERT_REQUIRED
client_certificate = self.bot.config.get("ssl-certificate", None)