debug("sig params tag = " + val.getTag() + " len == " + val.getEncodedLength());
if (Configuration.DEBUG) log.fine("sig params tag = " + val.getTag() + " len == " + val.getEncodedLength());
  private void parse(InputStream in) throws Exception  {    // CertificateList ::= SEQUENCE {    DERReader der = new DERReader(in);    DERValue val = der.read();    debug("start CertificateList len == " + val.getLength());    if (!val.isConstructed())      throw new IOException("malformed CertificateList");    encoded = val.getEncoded();    //   tbsCertList ::= SEQUENCE {  -- TBSCertList    val = der.read();    if (!val.isConstructed())      throw new IOException("malformed TBSCertList");    debug("start tbsCertList  len == " + val.getLength());    tbsCRLBytes = val.getEncoded();    //     version    Version OPTIONAL,    //                  -- If present must be v2    val = der.read();    if (val.getValue() instanceof BigInteger)      {        version = ((BigInteger) val.getValue()).intValue() + 1;        val = der.read();      }    else      version = 1;    debug("read version == " + version);    //     signature   AlgorithmIdentifier,    debug("start AlgorithmIdentifier len == " + val.getLength());    if (!val.isConstructed())      throw new IOException("malformed AlgorithmIdentifier");    DERValue algIdVal = der.read();    algId = (OID) algIdVal.getValue();    debug("read object identifier == " + algId);    if (val.getLength() > algIdVal.getEncodedLength())      {        val = der.read();        debug("read parameters  len == " + val.getEncodedLength());        algParams = val.getEncoded();        if (val.isConstructed())          in.skip(val.getLength());      }    //     issuer   Name,    val = der.read();    issuerDN = new X500DistinguishedName(val.getEncoded());    der.skip(val.getLength());    debug("read issuer == " + issuerDN);    //     thisUpdate   Time,    thisUpdate = (Date) der.read().getValue();    debug("read thisUpdate == " + thisUpdate);    //     nextUpdate   Time OPTIONAL,    val = der.read();    if (val.getValue() instanceof Date)      {        nextUpdate = (Date) val.getValue();        debug("read nextUpdate == " + nextUpdate);        val = der.read();      }    //     revokedCertificates SEQUENCE OF SEQUENCE {    //       -- X509CRLEntry objects...    //     } OPTIONAL,    if (val.getTag() != 0)      {        int len = 0;        while (len < val.getLength())          {            X509CRLEntry entry = new X509CRLEntry(version, der);            revokedCerts.put(entry.getSerialNumber(), entry);            len += entry.getEncoded().length;          }        val = der.read();      }    //    crlExtensions   [0] EXPLICIT Extensions OPTIONAL    //                        -- if present MUST be v2    if (val.getTagClass() != DER.UNIVERSAL && val.getTag() == 0)      {        if (version < 2)          throw new IOException("extra data in CRL");        DERValue exts = der.read();        if (!exts.isConstructed())          throw new IOException("malformed Extensions");        debug("start Extensions  len == " + exts.getLength());        int len = 0;        while (len < exts.getLength())          {            DERValue ext = der.read();            if (!ext.isConstructed())              throw new IOException("malformed Extension");            Extension e = new Extension(ext.getEncoded());            extensions.put(e.getOid(), e);            der.skip(ext.getLength());            len += ext.getEncodedLength();            debug("current count == " + len);          }        val = der.read();      }    debug("read tag == " + val.getTag());    if (!val.isConstructed())      throw new IOException("malformed AlgorithmIdentifier");    debug("start AlgorithmIdentifier  len == " + val.getLength());    DERValue sigAlgVal = der.read();    debug("read tag == " + sigAlgVal.getTag());    if (sigAlgVal.getTag() != DER.OBJECT_IDENTIFIER)      throw new IOException("malformed AlgorithmIdentifier");    sigAlg = (OID) sigAlgVal.getValue();    debug("signature id == " + sigAlg);    debug("sigAlgVal length == " + sigAlgVal.getEncodedLength());    if (val.getLength() > sigAlgVal.getEncodedLength())      {        val = der.read();        debug("sig params tag = " + val.getTag() + " len == " + val.getEncodedLength());        sigAlgParams = (byte[]) val.getEncoded();        if (val.isConstructed())          in.skip(val.getLength());      }    val = der.read();    debug("read tag = " + val.getTag());    rawSig = val.getEncoded();    signature = ((BitString) val.getValue()).toByteArray();  }