'Verifies the certificate using the given key.
Args:
public_key: The public key to use.
Returns:
True: Everything went well.
Raises:
VerificationError: The certificate did not verify.'

def Verify(self, public_key):

    now = rdfvalue.RDFDatetime.Now().AsDatetime()
    if (now > self._value.not_valid_after):
        raise VerificationError('Certificate    expired!')
    if (now < self._value.not_valid_before):
        raise VerificationError('Certificate    not    yet    valid!')
    public_key.Verify(self._value.tbs_certificate_bytes, self._value.signature, hash_algorithm=self._value.signature_hash_algorithm)
    return True
