Fix the ssl verification turn on code.

This commit is contained in:
poljar (Damir Jelić) 2018-01-27 14:40:01 +01:00
parent 02557f67fb
commit 0e4c29b0c6

View file

@ -135,8 +135,8 @@ class MatrixServer:
elif option_name == "ssl_verify": elif option_name == "ssl_verify":
value = W.config_boolean(option) value = W.config_boolean(option)
if value: if value:
self.ssl_context.check_hostname = True
self.ssl_context.verify_mode = ssl.CERT_REQUIRED self.ssl_context.verify_mode = ssl.CERT_REQUIRED
self.ssl_context.check_hostname = True
else: else:
self.ssl_context.check_hostname = False self.ssl_context.check_hostname = False
self.ssl_context.verify_mode = ssl.CERT_NONE self.ssl_context.verify_mode = ssl.CERT_NONE