Verify server TLS certificates

This commit is contained in:
jesopo 2018-09-17 10:47:08 +01:00
parent b768ba71ed
commit 3576f18a82

View file

@ -85,6 +85,8 @@ class Server(object):
context.options |= ssl.OP_NO_SSLv2
context.options |= ssl.OP_NO_SSLv3
context.options |= ssl.OP_NO_TLSv1
context.load_default_certs()
context.verify_mode = ssl.CERT_REQUIRED
self.socket = context.wrap_socket(self.socket)
def connect(self):