def verify_certificate(certificate):
    # Get now in UTC, since certificate returns times in UTC
    now = timeutils.utcnow()

    # Confirm the certificate valid time range includes now
    if now < certificate.not_valid_before:
        raise exception.SignatureVerificationError(
            reason=_('Certificate is not valid before: %s UTC')
            % certificate.not_valid_before)
    elif now > certificate.not_valid_after:
        raise exception.SignatureVerificationError(
            reason=_('Certificate is not valid after: %s UTC')
            % certificate.not_valid_after)
Verify that the certificate has not expired.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/signature_utils.py/verify_certificate