'Finds a verification key for the server with one of the key ids.
Args:
server_name (str): The name of the server to fetch a key for.
keys_ids (list of str): The key_ids to check for.'

@defer.inlineCallbacks
def get_server_verify_key_v1_direct(self, server_name, key_ids):

    (response, tls_certificate) = (yield fetch_server_key(server_name, self.hs.tls_server_context_factory))
    x509_certificate_bytes = crypto.dump_certificate(crypto.FILETYPE_ASN1, tls_certificate)
    if (('signatures' not in response) or (server_name not in response['signatures'])):
        raise KeyLookupError('Key    response    not    signed    by    remote    server')
    if ('tls_certificate' not in response):
        raise KeyLookupError('Key    response    missing    TLS    certificate')
    tls_certificate_b64 = response['tls_certificate']
    if (encode_base64(x509_certificate_bytes) != tls_certificate_b64):
        raise KeyLookupError("TLS    certificate    doesn't    match")
    time_now_ms = self.clock.time_msec()
    verify_keys = {}
    for (key_id, key_base64) in response['verify_keys'].items():
        if is_signing_algorithm_supported(key_id):
            key_bytes = decode_base64(key_base64)
            verify_key = decode_verify_key_bytes(key_id, key_bytes)
            verify_key.time_added = time_now_ms
            verify_keys[key_id] = verify_key
    for key_id in response['signatures'][server_name]:
        if (key_id not in response['verify_keys']):
            raise KeyLookupError('Key    response    must    include    verification    keys    for    all    signatures')
        if (key_id in verify_keys):
            verify_signed_json(response, server_name, verify_keys[key_id])
    (yield self.store.store_server_certificate(server_name, server_name, time_now_ms, tls_certificate))
    (yield self.store_keys(server_name=server_name, from_server=server_name, verify_keys=verify_keys))
    defer.returnValue(verify_keys)
