Java 类org.bouncycastle.asn1.x509.CertificateList 实例源码

项目:ipack    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:ipack    文件:X509CRLParser.java   
private CRL readDERCRL(
    InputStream in)
    throws IOException, CRLException
{
    ASN1InputStream dIn = new ASN1InputStream(in);
    ASN1Sequence seq = (ASN1Sequence)dIn.readObject();

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

            return getCRL();
        }
    }

    return new X509CRLObject(CertificateList.getInstance(seq));
}
项目:ipack    文件:RevRepContent.java   
public CertificateList[] getCrls()
{
    if (crls == null)
    {
        return null;
    }

    CertificateList[] results = new CertificateList[crls.size()];

    for (int i = 0; i != results.length; i++)
    {
        results[i] = CertificateList.getInstance(crls.getObjectAt(i));
    }

    return results;
}
项目:ipack    文件:CertificateFactory.java   
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));
}
项目:ipack    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:ipack    文件:CMSSignedHelper.java   
Store getCRLs(ASN1Set crlSet)
{
    if (crlSet != null)
    {
        List crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:ipack    文件:OriginatorInformation.java   
/**
 * Return the CRLs stored in the underlying OriginatorInfo object.
 *
 * @return a Store of X509CRLHolder objects.
 */
public Store getCRLs()
{
    ASN1Set crlSet = originatorInfo.getCRLs();

    if (crlSet != null)
    {
        List    crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:xitk    文件:CrlInfoCmd.java   
@Override
protected Object execute0() throws Exception {
    CertificateList crl = CertificateList.getInstance(IoUtil.read(inFile));

    if (crlNumber != null && crlNumber) {
        ASN1Encodable asn1 = crl.getTBSCertList().getExtensions().getExtensionParsedValue(
                Extension.cRLNumber);
        if (asn1 == null) {
            return "null";
        }
        return getNumber(ASN1Integer.getInstance(asn1).getPositiveValue());
    } else if (issuer != null && issuer) {
        return crl.getIssuer().toString();
    } else if (thisUpdate != null && thisUpdate) {
        return toUtcTimeyyyyMMddhhmmssZ(crl.getThisUpdate().getDate());
    } else if (nextUpdate != null && nextUpdate) {
        return crl.getNextUpdate() == null ? "null" :
            toUtcTimeyyyyMMddhhmmssZ(crl.getNextUpdate().getDate());
    }

    return null;
}
项目:gwt-crypto    文件:RevRepContent.java   
public CertificateList[] getCrls()
{
    if (crls == null)
    {
        return null;
    }

    CertificateList[] results = new CertificateList[crls.size()];

    for (int i = 0; i != results.length; i++)
    {
        results[i] = CertificateList.getInstance(crls.getObjectAt(i));
    }

    return results;
}
项目:gwt-crypto    文件:CMSSignedHelper.java   
Store getCRLs(ASN1Set crlSet)
{
    if (crlSet != null)
    {
        List crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:gwt-crypto    文件:OriginatorInformation.java   
/**
 * Return the CRLs stored in the underlying OriginatorInfo object.
 *
 * @return a Store of X509CRLHolder objects.
 */
public Store getCRLs()
{
    ASN1Set crlSet = originatorInfo.getCRLs();

    if (crlSet != null)
    {
        List    crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:Aki-SSL    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:Aki-SSL    文件:X509CRLParser.java   
private CRL readDERCRL(
    InputStream in)
    throws IOException, CRLException
{
    ASN1InputStream dIn = new ASN1InputStream(in);
    ASN1Sequence seq = (ASN1Sequence)dIn.readObject();

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

            return getCRL();
        }
    }

    return new X509CRLObject(CertificateList.getInstance(seq));
}
项目:Aki-SSL    文件:RevRepContent.java   
public CertificateList[] getCrls()
{
    if (crls == null)
    {
        return null;
    }

    CertificateList[] results = new CertificateList[crls.size()];

    for (int i = 0; i != results.length; i++)
    {
        results[i] = CertificateList.getInstance(crls.getObjectAt(i));
    }

    return results;
}
项目:Aki-SSL    文件:CertificateFactory.java   
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));
}
项目:Aki-SSL    文件:CMSSignedHelper.java   
Store getCRLs(ASN1Set crlSet)
{
    if (crlSet != null)
    {
        List crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:Aki-SSL    文件:OriginatorInformation.java   
/**
 * Return the CRLs stored in the underlying OriginatorInfo object.
 *
 * @return a Store of X509CRLHolder objects.
 */
public Store getCRLs()
{
    ASN1Set crlSet = originatorInfo.getCRLs();

    if (crlSet != null)
    {
        List    crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:TinyTravelTracker    文件:RevRepContent.java   
public CertificateList[] getCrls()
{
    if (crls == null)
    {
        return null;
    }

    CertificateList[] results = new CertificateList[crls.size()];

    for (int i = 0; i != results.length; i++)
    {
        results[i] = CertificateList.getInstance(crls.getObjectAt(i));
    }

    return results;
}
项目:CryptMeme    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:CryptMeme    文件:X509CRLParser.java   
private CRL readDERCRL(
    InputStream in)
    throws IOException, CRLException
{
    ASN1InputStream dIn = new ASN1InputStream(in);
    ASN1Sequence seq = (ASN1Sequence)dIn.readObject();

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

            return getCRL();
        }
    }

    return new X509CRLObject(CertificateList.getInstance(seq));
}
项目:CryptMeme    文件:RevRepContent.java   
public CertificateList[] getCrls()
{
    if (crls == null)
    {
        return null;
    }

    CertificateList[] results = new CertificateList[crls.size()];

    for (int i = 0; i != results.length; i++)
    {
        results[i] = CertificateList.getInstance(crls.getObjectAt(i));
    }

    return results;
}
项目:CryptMeme    文件:CertificateFactory.java   
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));
}
项目:CryptMeme    文件:X509CRLObject.java   
protected X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:xipki    文件:ScepImpl.java   
private SignedData getCrl(X509Ca ca, BigInteger serialNumber)
        throws FailInfoException, OperationException {
    if (!control.supportGetCrl()) {
        throw FailInfoException.BAD_REQUEST;
    }

    CertificateList crl = ca.getBcCurrentCrl();
    if (crl == null) {
        throw FailInfoException.BAD_REQUEST;
    }
    CMSSignedDataGenerator cmsSignedDataGen = new CMSSignedDataGenerator();
    cmsSignedDataGen.addCRL(new X509CRLHolder(crl));

    CMSSignedData signedData;
    try {
        signedData = cmsSignedDataGen.generate(new CMSAbsentContent());
    } catch (CMSException ex) {
        LogUtil.error(LOG, ex, "could not generate CMSSignedData");
        throw new OperationException(ErrorCode.SYSTEM_FAILURE, ex);
    }
    return SignedData.getInstance(signedData.toASN1Structure().getContent());
}
项目:irma_future_id    文件:CMSSignedHelper.java   
Store getCRLs(ASN1Set crlSet)
{
    if (crlSet != null)
    {
        List crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:irma_future_id    文件:CMSSignedHelper.java   
Store getCRLs(ASN1Set crlSet)
{
    if (crlSet != null)
    {
        List crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:irma_future_id    文件:OriginatorInformation.java   
/**
 * Return the CRLs stored in the underlying OriginatorInfo object.
 *
 * @return a Store of X509CRLHolder objects.
 */
public Store getCRLs()
{
    ASN1Set crlSet = originatorInfo.getCRLs();

    if (crlSet != null)
    {
        List    crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:irma_future_id    文件:CMSSignedDataParser.java   
public Store getCRLs()
    throws CMSException
{
    populateCertCrlSets();

    ASN1Set crlSet = _crlSet;

    if (crlSet != null)
    {
        List    crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:irma_future_id    文件:CMSSignedData.java   
public Store getCRLs()
{
    ASN1Set crlSet = signedData.getCRLs();

    if (crlSet != null)
    {
        List    crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
项目:irma_future_id    文件:RevRepContent.java   
public CertificateList[] getCrls()
{
    if (crls == null)
    {
        return null;
    }

    CertificateList[] results = new CertificateList[crls.size()];

    for (int i = 0; i != results.length; i++)
    {
        results[i] = CertificateList.getInstance(crls.getObjectAt(i));
    }

    return results;
}
项目:irma_future_id    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:irma_future_id    文件:X509CRLParser.java   
private CRL readDERCRL(
    InputStream in)
    throws IOException, CRLException
{
    ASN1InputStream dIn = new ASN1InputStream(in);
    ASN1Sequence seq = (ASN1Sequence)dIn.readObject();

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

            return getCRL();
        }
    }

    return new X509CRLObject(CertificateList.getInstance(seq));
}
项目:irma_future_id    文件:CertificateFactory.java   
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));
}
项目:irma_future_id    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:irma_future_id    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:irma_future_id    文件:CertificateFactory.java   
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));
}
项目:irma_future_id    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:irma_future_id    文件:X509CRLObject.java   
public X509CRLObject(
    CertificateList c)
    throws CRLException
{
    this.c = c;

    try
    {
        this.sigAlgName = X509SignatureUtil.getSignatureName(c.getSignatureAlgorithm());

        if (c.getSignatureAlgorithm().getParameters() != null)
        {
            this.sigAlgParams = ((ASN1Encodable)c.getSignatureAlgorithm().getParameters()).toASN1Primitive().getEncoded(ASN1Encoding.DER);
        }
        else
        {
            this.sigAlgParams = null;
        }

        this.isIndirect = isIndirectCRL(this);
    }
    catch (Exception e)
    {
        throw new CRLException("CRL contents invalid: " + e);
    }
}
项目:irma_future_id    文件:CertificateFactory.java   
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));
}
项目:bc-java    文件:CMSSignedHelper.java   
Store getCRLs(ASN1Set crlSet)
{
    if (crlSet != null)
    {
        List crlList = new ArrayList(crlSet.size());

        for (Enumeration en = crlSet.getObjects(); en.hasMoreElements();)
        {
            ASN1Primitive obj = ((ASN1Encodable)en.nextElement()).toASN1Primitive();

            if (obj instanceof ASN1Sequence)
            {
                crlList.add(new X509CRLHolder(CertificateList.getInstance(obj)));
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}