def __init__(self, server_address, HandlerClass):
    BaseServer.__init__(self, server_address, HandlerClass)
ctx = Context(SSLv23_METHOD)
ctx.use_privatekey_file('keys/server.key')
ctx.use_certificate_file('keys/server.crt')
ctx.set_session_id('My_experimental_AJAX_Server')
ctx.set_verify(VERIFY_PEER | VERIFY_FAIL_IF_NO_PEER_CERT |
    VERIFY_CLIENT_ONCE, verify_callback)
self.socket = Connection(ctx, socket.socket(self.address_family, self.
    socket_type))
self.server_bind()
self.server_activate()
Validating client certificates in PyOpenSSL