'Create a client context which will verify the peer certificate and call
its :py:obj:`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):

    (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()
    self.assertEqual(cert.get_subject().CN, 'Testing    Root    CA')
