Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. self.context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
  2. self.context.verify_mode = ssl.CERT_REQUIRED
  3. self.context.load_verify_locations(cafile="/path/to/ca.pem")
  4. self.context.load_cert_chain(certfile="/path/to/server.pem", keyfile="/path/to/server.key")
  5.  
  6. context.wrap_socket(newsocket,server_side=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement