private function _processPathLengthContraint(ValidatorState $state,
        Certificate $cert): ValidatorState
    {
        $extensions = $cert->tbsCertificate()->extensions();
        if ($extensions->hasBasicConstraints()) {
            $ext = $extensions->basicConstraints();
            if ($ext->hasPathLen()) {
                if ($ext->pathLen() < $state->maxPathLength()) {
                    $state = $state->withMaxPathLength($ext->pathLen());
                }
            }
        }
        return $state;
    }
private function _processPathLengthContraint(ValidatorState $state,
        Certificate $cert): ValidatorState
    {
        $extensions = $cert->tbsCertificate()->extensions();
        if ($extensions->hasBasicConstraints()) {
            $ext = $extensions->basicConstraints();
            if ($ext->hasPathLen()) {
                if ($ext->pathLen() < $state->maxPathLength()) {
                    $state = $state->withMaxPathLength($ext->pathLen());
                }
            }
        }
        return $state;
    }
private function _processPathLengthContraint ( ValidatorState $ state , Certificate $ cert ) : ValidatorState { $ extensions = $ cert -> tbsCertificate ( ) -> extensions ( ) ; if ( $ extensions -> hasBasicConstraints ( ) ) { $ ext = $ extensions -> basicConstraints ( ) ; if ( $ ext -> hasPathLen ( ) ) { if ( $ ext -> pathLen ( ) < $ state -> maxPathLength ( ) ) { $ state = $ state -> withMaxPathLength ( $ ext -> pathLen ( ) ) ; } } } return $ state ; }
Process pathLenConstraint.

@param ValidatorState $state
@param Certificate $cert
@return ValidatorState
Process pathLenConstraint .