code: @Override
      public void check(Certificate cert, Collection<String> unresCritExts)
          throws CertPathValidatorException
      {
          X509Certificate currCert = (X509Certificate)cert;
  
          i++;
          // MUST run NC check second, since it depends on BC check to
          // update remainingCerts
          checkBasicConstraints(currCert);
          verifyNameConstraints(currCert);
  
          if (unresCritExts != null && !unresCritExts.isEmpty()) {
              unresCritExts.remove(BasicConstraints_Id.toString());
              unresCritExts.remove(NameConstraints_Id.toString());
          }
      }
docs: Performs the basic constraints and name constraints
  checks on the certificate using its internal state.
  
  @param cert the <code>Certificate</code> to be checked
  @param unresCritExts a <code>Collection</code> of OID strings
  representing the current set of unresolved critical extensions
  @throws CertPathValidatorException if the specified certificate
  does not pass the check