当前位置: 首页>>代码示例>>Java>>正文


Java CertificateList类代码示例

本文整理汇总了Java中org.bouncycastle.asn1.x509.CertificateList的典型用法代码示例。如果您正苦于以下问题:Java CertificateList类的具体用法?Java CertificateList怎么用?Java CertificateList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CertificateList类属于org.bouncycastle.asn1.x509包,在下文中一共展示了CertificateList类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: X509CRLObject

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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);
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:27,代码来源:X509CRLObject.java

示例2: readDERCRL

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:22,代码来源:X509CRLParser.java

示例3: getCrls

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:17,代码来源:RevRepContent.java

示例4: readDERCRL

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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));
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:22,代码来源:CertificateFactory.java

示例5: getCRLs

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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());
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:22,代码来源:CMSSignedHelper.java

示例6: getCRLs

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
/**
 * 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());
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:29,代码来源:OriginatorInformation.java

示例7: execute0

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
@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;
}
 
开发者ID:xipki,项目名称:xitk,代码行数:23,代码来源:CrlInfoCmd.java

示例8: readDERCRL

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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));
}
 
开发者ID:thedrummeraki,项目名称:Aki-SSL,代码行数:22,代码来源:X509CRLParser.java

示例9: X509CRLObject

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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);
    }
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:27,代码来源:X509CRLObject.java

示例10: getCrl

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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());
}
 
开发者ID:xipki,项目名称:xipki,代码行数:23,代码来源:ScepImpl.java

示例11: getCRLs

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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());
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:27,代码来源:CMSSignedDataParser.java

示例12: getCRLs

import org.bouncycastle.asn1.x509.CertificateList; //导入依赖的package包/类
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());
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:24,代码来源:CMSSignedData.java


注:本文中的org.bouncycastle.asn1.x509.CertificateList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。