private function _checkValidity(Certificate $cert)
    {
        $refdt = $this->_config->dateTime();
        $validity = $cert->tbsCertificate()->validity();
        if ($validity->notBefore()
            ->dateTime()
            ->diff($refdt)->invert) {
            throw new PathValidationException(
                "Certificate validity period has not started.");
        }
        if ($refdt->diff($validity->notAfter()
            ->dateTime())->invert) {
            throw new PathValidationException("Certificate has expired.");
        }
    }
private function _checkValidity(Certificate $cert)
    {
        $refdt = $this->_config->dateTime();
        $validity = $cert->tbsCertificate()->validity();
        if ($validity->notBefore()
            ->dateTime()
            ->diff($refdt)->invert) {
            throw new PathValidationException(
                "Certificate validity period has not started.");
        }
        if ($refdt->diff($validity->notAfter()
            ->dateTime())->invert) {
            throw new PathValidationException("Certificate has expired.");
        }
    }
private function _checkValidity ( Certificate $ cert ) { $ refdt = $ this -> _config -> dateTime ( ) ; $ validity = $ cert -> tbsCertificate ( ) -> validity ( ) ; if ( $ validity -> notBefore ( ) -> dateTime ( ) -> diff ( $ refdt ) -> invert ) { throw new PathValidationException ( "Certificate validity period has not started." ) ; } if ( $ refdt -> diff ( $ validity -> notAfter ( ) -> dateTime ( ) ) -> invert ) { throw new PathValidationException ( "Certificate has expired." ) ; } }
Check certificate validity.

@param Certificate $cert
@throws PathValidationException
Check certificate validity .