code: static void check(PublicKey key, AlgorithmId algorithmId)
                          throws CertPathValidatorException {
          String sigAlgName = algorithmId.getName();
          AlgorithmParameters sigAlgParams = algorithmId.getParameters();
  
          if (!certPathDefaultConstraints.permits(
                  SIGNATURE_PRIMITIVE_SET, sigAlgName, key, sigAlgParams)) {
              throw new CertPathValidatorException(
                  "algorithm check failed: " + sigAlgName + " is disabled",
                  null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
          }
      }
docs: Check the signature algorithm with the specified public key.
  
  @param key the public key to verify the CRL signature
  @param crl the target CRL