'do_ssl_handshake with ssl'

def do_ssl_handshake(self, handler):

    certfile = CertUtil.get_cert(handler.host)
    ssl_sock = ssl.wrap_socket(handler.connection, keyfile=certfile, certfile=certfile, server_side=True, ssl_version=self.ssl_method, ciphers=self.ciphers)
    handler.connection = ssl_sock
    handler.rfile = handler.connection.makefile('rb', handler.bufsize)
    handler.wfile = handler.connection.makefile('wb', 0)
    handler.scheme = 'https'
