Exemplo n.º 1
0
  private CRL getCRL() throws CRLException {
    if (sCrlData == null || sCrlDataObjectCount >= sCrlData.size()) {
      return null;
    }

    return createCRL(CertificateList.getInstance(sCrlData.getObjectAt(sCrlDataObjectCount++)));
  }
Exemplo n.º 2
0
  private CRL readPEMCRL(InputStream in) throws IOException, CRLException {
    ASN1Sequence seq = PEM_CRL_PARSER.readPEMObject(in);

    if (seq != null) {
      return createCRL(CertificateList.getInstance(seq));
    }

    return null;
  }
Exemplo n.º 3
0
  private CRL readDERCRL(ASN1InputStream aIn) throws IOException, CRLException {
    ASN1Sequence seq = (ASN1Sequence) aIn.readObject();

    if (seq.size() > 1 && seq.getObjectAt(0) instanceof ASN1ObjectIdentifier) {
      if (seq.getObjectAt(0).equals(PKCSObjectIdentifiers.signedData)) {
        sCrlData =
            SignedData.getInstance(
                    ASN1Sequence.getInstance((ASN1TaggedObject) seq.getObjectAt(1), true))
                .getCRLs();

        return getCRL();
      }
    }

    return createCRL(CertificateList.getInstance(seq));
  }