'Verify the return value of the :py:obj:`get_client_ca_list` method for server and client connections.
:param func: A function which will be called with the server context
before the client and server are connected to each other.  This
function should specify a list of CAs for the server to send to the
client and return that same list.  The list will be used to verify
that :py:obj:`get_client_ca_list` returns the proper value at various
times.'

def _check_client_ca_list(self, func):

    server = self._server(None)
    client = self._client(None)
    self.assertEqual(client.get_client_ca_list(), [])
    self.assertEqual(server.get_client_ca_list(), [])
    ctx = server.get_context()
    expected = func(ctx)
    self.assertEqual(client.get_client_ca_list(), [])
    self.assertEqual(server.get_client_ca_list(), expected)
    self._interactInMemory(client, server)
    self.assertEqual(client.get_client_ca_list(), expected)
    self.assertEqual(server.get_client_ca_list(), expected)
