debug("read tag = " + val.getTag());
  private void parse(InputStream in) throws Exception  {    DERReader der = new DERReader(in);    DERValue val = der.read();    if (!val.isConstructed())      throw new ASN1ParsingException("malformed CertificateList");    encoded = val.getEncoded();    val = der.read();    if (!val.isConstructed())      throw new ASN1ParsingException("malformed TBSCertList");    tbsCRLBytes = val.getEncoded();    val = der.read();    if (val.getValue() instanceof BigInteger)      {        version = ((BigInteger) val.getValue()).intValue() + 1;        val = der.read();      }    else      version = 1;    if (!val.isConstructed())      throw new ASN1ParsingException("malformed AlgorithmIdentifier");    DERValue algIdVal = der.read();    algId = (OID) algIdVal.getValue();    if (val.getLength() > algIdVal.getEncodedLength())      {        val = der.read();        algParams = val.getEncoded();        if (val.isConstructed())          in.skip(val.getLength());      }    issuerDN = new X500Principal(in);    thisUpdate = (Date) der.read().getValue();    val = der.read();    if (val.getValue() instanceof Date)      {        nextUpdate = (Date) val.getValue();        val = der.read();      }    if (val.getTag() != 0)      {        int len = 0;        while (len < val.getLength())          {            X509CRLEntry entry =               new gnu.java.security.x509.X509CRLEntry(version, in);            revokedCerts.put(entry.getSerialNumber(), entry);            len += entry.getEncoded().length;          }      }    if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 0)      {        val = der.read();        int len = 0;        while (len < val.getLength())          {            DERValue ext = der.read();            OID extId = (OID) der.read().getValue();            DERValue val2 = der.read();            Boolean crit = Boolean.valueOf(false);            if (val2.getValue() instanceof Boolean)              {                crit = (Boolean) val2.getValue();                val2 = der.read();              }            byte[] extVal = (byte[]) val2.getValue();            extensions.put(extId.toString(), extVal);            if (crit.booleanValue())              critOids.add(extId.toString());            else              nonCritOids.add(extId.toString());            len += ext.getEncodedLength();          }      }    val = der.read();    if (!val.isConstructed())      throw new ASN1ParsingException("malformed AlgorithmIdentifier");    DERValue sigAlgVal = der.read();    sigAlg = (OID) sigAlgVal.getValue();    if (val.getLength() > sigAlgVal.getEncodedLength())      {        val = der.read();        sigAlgParams = (byte[]) val.getEncoded();        if (val.isConstructed())          in.skip(val.getLength());      }    val = der.read();    rawSig = val.getEncoded();    signature = ((BitString) val.getValue()).toByteArray();  }