private function _prepareNext(ValidatorState $state, Certificate $cert): ValidatorState
    {
        // (a)(b) if policy mappings extension is present
        $state = $this->_preparePolicyMappings($state, $cert);
        // (c) assign working_issuer_name
        $state = $state->withWorkingIssuerName(
            $cert->tbsCertificate()
                ->subject());
        // (d)(e)(f)
        $state = $this->_setPublicKeyState($state, $cert);
        // (g) if name constraints extension is present
        $state = $this->_prepareNameConstraints($state, $cert);
        // (h) if certificate is not self-issued
        if (!$cert->isSelfIssued()) {
            $state = $this->_prepareNonSelfIssued($state);
        }
        // (i) if policy constraints extension is present
        $state = $this->_preparePolicyConstraints($state, $cert);
        // (j) if inhibit any policy extension is present
        $state = $this->_prepareInhibitAnyPolicy($state, $cert);
        // (k) check basic constraints
        $this->_processBasicContraints($cert);
        // (l) verify max_path_length
        $state = $this->_verifyMaxPathLength($state, $cert);
        // (m) check pathLenContraint
        $state = $this->_processPathLengthContraint($state, $cert);
        // (n) check key usage
        $this->_checkKeyUsage($cert);
        // (o) process relevant extensions
        $state = $this->_processExtensions($state, $cert);
        return $state;
    }
private function _prepareNext(ValidatorState $state, Certificate $cert): ValidatorState
    {
        // (a)(b) if policy mappings extension is present
        $state = $this->_preparePolicyMappings($state, $cert);
        // (c) assign working_issuer_name
        $state = $state->withWorkingIssuerName(
            $cert->tbsCertificate()
                ->subject());
        // (d)(e)(f)
        $state = $this->_setPublicKeyState($state, $cert);
        // (g) if name constraints extension is present
        $state = $this->_prepareNameConstraints($state, $cert);
        // (h) if certificate is not self-issued
        if (!$cert->isSelfIssued()) {
            $state = $this->_prepareNonSelfIssued($state);
        }
        // (i) if policy constraints extension is present
        $state = $this->_preparePolicyConstraints($state, $cert);
        // (j) if inhibit any policy extension is present
        $state = $this->_prepareInhibitAnyPolicy($state, $cert);
        // (k) check basic constraints
        $this->_processBasicContraints($cert);
        // (l) verify max_path_length
        $state = $this->_verifyMaxPathLength($state, $cert);
        // (m) check pathLenContraint
        $state = $this->_processPathLengthContraint($state, $cert);
        // (n) check key usage
        $this->_checkKeyUsage($cert);
        // (o) process relevant extensions
        $state = $this->_processExtensions($state, $cert);
        return $state;
    }
private function _prepareNext ( ValidatorState $ state , Certificate $ cert ) : ValidatorState { // (a)(b) if policy mappings extension is present $ state = $ this -> _preparePolicyMappings ( $ state , $ cert ) ; // (c) assign working_issuer_name $ state = $ state -> withWorkingIssuerName ( $ cert -> tbsCertificate ( ) -> subject ( ) ) ; // (d)(e)(f) $ state = $ this -> _setPublicKeyState ( $ state , $ cert ) ; // (g) if name constraints extension is present $ state = $ this -> _prepareNameConstraints ( $ state , $ cert ) ; // (h) if certificate is not self-issued if ( ! $ cert -> isSelfIssued ( ) ) { $ state = $ this -> _prepareNonSelfIssued ( $ state ) ; } // (i) if policy constraints extension is present $ state = $ this -> _preparePolicyConstraints ( $ state , $ cert ) ; // (j) if inhibit any policy extension is present $ state = $ this -> _prepareInhibitAnyPolicy ( $ state , $ cert ) ; // (k) check basic constraints $ this -> _processBasicContraints ( $ cert ) ; // (l) verify max_path_length $ state = $ this -> _verifyMaxPathLength ( $ state , $ cert ) ; // (m) check pathLenContraint $ state = $ this -> _processPathLengthContraint ( $ state , $ cert ) ; // (n) check key usage $ this -> _checkKeyUsage ( $ cert ) ; // (o) process relevant extensions $ state = $ this -> _processExtensions ( $ state , $ cert ) ; return $ state ; }
Apply preparation for the certificate i+1 according to rfc5280 section
6.1.4.

@link https://tools.ietf.org/html/rfc5280#section-6.1.4
@param ValidatorState $state
@param Certificate $cert
@return ValidatorState
Apply preparation for the certificate i + 1 according to rfc5280 section 6 . 1 . 4 .