

def _load_and_validate_digest(self, public_keys, bucket, key):
    'Loads and validates a digest from S3.\n\n        :param public_keys: Public key dictionary of fingerprint to dict.\n        :return: Returns a tuple of the digest data as a dict and end_date\n        :rtype: tuple\n        '
    (digest_data, digest) = self.digest_provider.fetch_digest(bucket, key)
    for required_key in self.required_digest_keys:
        if (required_key not in digest_data):
            raise InvalidDigestFormat(bucket, key)
    if ((digest_data['digestS3Bucket'] != bucket) or (digest_data['digestS3Object'] != key)):
        raise DigestError(('Digest file\ts3://%s/%s\tINVALID: has been moved from its original location' % (bucket, key)))
    fingerprint = digest_data['digestPublicKeyFingerprint']
    if (fingerprint not in public_keys):
        raise DigestError(('Digest file\ts3://%s/%s\tINVALID: public key not found in region %s for fingerprint %s' % (bucket, key, self.digest_provider.trail_home_region, fingerprint)))
    public_key_hex = public_keys[end_date]['Value']
    self._digest_validator.validate(bucket, key, public_key_hex, digest_data, digest)
    end_date = normalize_date(parse_date(digest_data['digestEndTime']))
    return (digest_data, end_date)

dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/validation.py DigestTraverser._load_and_validate_digest/VarMisuse@146/363 `fingerprint`->`end_date`