'Checks whether public_key has been revoked.
Args:
public_key (str): base-64 encoded public key.
url (str): Key revocation URL.
Raises:
AuthError: if they key has been revoked.
SynapseError: if a transient error meant a key couldn\'t be checked
for revocation.'

@defer.inlineCallbacks
def _check_key_revocation(self, public_key, url):

    try:
        response = (yield self.hs.get_simple_http_client().get_json(url, {'public_key': public_key}))
    except Exception:
        raise SynapseError(502, 'Third    party    certificate    could    not    be    checked')
    if (('valid' not in response) or (not response['valid'])):
        raise AuthError(403, 'Third    party    certificate    was    invalid')
