def _load_verify_locations_test(self, *args):
    '\n        Create a client context which will verify the peer certificate and call\n        its `load_verify_locations` method with the given arguments.\n        Then connect it to a server and ensure that the handshake succeeds.\n        '
    (server, client) = socket_pair()
    clientContext = Context(TLSv1_METHOD)
    clientContext.load_verify_locations(*args)
    clientContext.set_verify(VERIFY_PEER, (lambda conn, cert, errno, depth, preverify_ok: preverify_ok))
    clientSSL = Connection(clientContext, client)
    clientSSL.set_connect_state()
    serverContext = Context(TLSv1_METHOD)
    serverContext.use_certificate(load_certificate(FILETYPE_PEM, cleartextCertificatePEM))
    serverContext.use_privatekey(load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM))
    serverSSL = Connection(serverContext, server)
    serverSSL.set_accept_state()
    handshake(clientSSL, serverSSL)
    cert = clientSSL.get_peer_certificate()
    assert (cert.get_subject().CN == 'Testing Root CA')
Create a client context which will verify the peer certificate and call
its `load_verify_locations` method with the given arguments.
Then connect it to a server and ensure that the handshake succeeds.
def _load_verify_locations_test(self, *args):
    '\n        Create a client context which will verify the peer certificate and call\n        its `load_verify_locations` method with the given arguments.\n        Then connect it to a server and ensure that the handshake succeeds.\n        '
    (server, client) = socket_pair()
    clientContext = Context(TLSv1_METHOD)
    clientContext.load_verify_locations(*args)
    clientContext.set_verify(VERIFY_PEER, (lambda conn, cert, errno, depth, preverify_ok: preverify_ok))
    clientSSL = Connection(clientContext, client)
    clientSSL.set_connect_state()
    serverContext = Context(TLSv1_METHOD)
    serverContext.use_certificate(load_certificate(FILETYPE_PEM, cleartextCertificatePEM))
    serverContext.use_privatekey(load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM))
    serverSSL = Connection(serverContext, server)
    serverSSL.set_accept_state()
    handshake(clientSSL, serverSSL)
    cert = clientSSL.get_peer_certificate()
    assert (cert.get_subject().CN == 'Testing Root CA')