Verify server TLS certificates
This commit is contained in:
parent
b768ba71ed
commit
3576f18a82
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue