• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java OtherRevocationInfoFormat类的典型用法和代码示例

java 1次浏览

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

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

示例1: getOthersFromStore

点赞 3

import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat; //导入依赖的package包/类
static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
{
    List others = new ArrayList();

    for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
    {
        ASN1Encodable info = (ASN1Encodable)it.next();

        if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(otherRevocationInfoFormat))
        {
            OCSPResponse resp = OCSPResponse.getInstance(info);

            if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
            {
                throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
            }
        }

        others.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, info)));
    }

    return others;
}
 

开发者ID:Appdome,
项目名称:ipack,
代码行数:24,
代码来源:CMSUtils.java

示例2: getOthersFromStore

点赞 3

import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat; //导入依赖的package包/类
static Collection getOthersFromStore(ASN1ObjectIdentifier otherRevocationInfoFormat, Store otherRevocationInfos)
{
    List others = new ArrayList();

    for (Iterator it = otherRevocationInfos.getMatches(null).iterator(); it.hasNext();)
    {
        ASN1Encodable info = (ASN1Encodable)it.next();
        OtherRevocationInfoFormat infoFormat = new OtherRevocationInfoFormat(otherRevocationInfoFormat, info);

        validateInfoFormat(infoFormat);

        others.add(new DERTaggedObject(false, 1, infoFormat));
    }

    return others;
}
 

开发者ID:ttt43ttt,
项目名称:gwt-crypto,
代码行数:17,
代码来源:CMSUtils.java

示例3: getOtherRevocationInfo

点赞 2

import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat; //导入依赖的package包/类
Store getOtherRevocationInfo(ASN1ObjectIdentifier otherRevocationInfoFormat, 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 ASN1TaggedObject)
            {
                ASN1TaggedObject tObj = ASN1TaggedObject.getInstance(obj);

                if (tObj.getTagNo() == 1)
                {
                    OtherRevocationInfoFormat other = OtherRevocationInfoFormat.getInstance(tObj, false);

                    if (otherRevocationInfoFormat.equals(other.getInfoFormat()))
                    {
                        crlList.add(other.getInfo());
                    }
                }
            }
        }

        return new CollectionStore(crlList);
    }

    return new CollectionStore(new ArrayList());
}
 

开发者ID:Appdome,
项目名称:ipack,
代码行数:32,
代码来源:CMSSignedHelper.java

示例4: addOtherRevocationInfo

点赞 2

import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat; //导入依赖的package包/类
/**
 * Add a single instance of otherRevocationData to the CRL set to be included with the generated SignedData message.
 *
 * @param otherRevocationInfoFormat the OID specifying the format of the otherRevocationInfo data.
 * @param otherRevocationInfo the otherRevocationInfo ASN.1 structure.
 */
public void addOtherRevocationInfo(
    ASN1ObjectIdentifier   otherRevocationInfoFormat,
    ASN1Encodable          otherRevocationInfo)
{
    crls.add(new DERTaggedObject(false, 1, new OtherRevocationInfoFormat(otherRevocationInfoFormat, otherRevocationInfo)));
}
 

开发者ID:Appdome,
项目名称:ipack,
代码行数:13,
代码来源:CMSSignedGenerator.java

示例5: getCRLsFromStore

点赞 2

import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat; //导入依赖的package包/类
static List getCRLsFromStore(Store crlStore)
    throws CMSException
{
    List crls = new ArrayList();

    try
    {
        for (Iterator it = crlStore.getMatches(null).iterator(); it.hasNext();)
        {
            Object rev = it.next();

            if (rev instanceof X509CRLHolder)
            {
                X509CRLHolder c = (X509CRLHolder)rev;

                crls.add(c.toASN1Structure());
            }
            else if (rev instanceof OtherRevocationInfoFormat)
            {
                OtherRevocationInfoFormat infoFormat = OtherRevocationInfoFormat.getInstance(rev);

                validateInfoFormat(infoFormat);

                crls.add(new DERTaggedObject(false, 1, infoFormat));
            }
            else if (rev instanceof ASN1TaggedObject)
            {
                crls.add(rev);
            }
        }

        return crls;
    }
    catch (ClassCastException e)
    {
        throw new CMSException("error processing certs", e);
    }
}
 

开发者ID:ttt43ttt,
项目名称:gwt-crypto,
代码行数:39,
代码来源:CMSUtils.java

示例6: validateInfoFormat

点赞 2

import org.bouncycastle.asn1.cms.OtherRevocationInfoFormat; //导入依赖的package包/类
private static void validateInfoFormat(OtherRevocationInfoFormat infoFormat)
{
    if (CMSObjectIdentifiers.id_ri_ocsp_response.equals(infoFormat.getInfoFormat()))
    {
        OCSPResponse resp = OCSPResponse.getInstance(infoFormat.getInfo());

        if (resp.getResponseStatus().getValue().intValue() != OCSPResponseStatus.SUCCESSFUL)
        {
            throw new IllegalArgumentException("cannot add unsuccessful OCSP response to CMS SignedData");
        }
    }
}
 

开发者ID:ttt43ttt,
项目名称:gwt-crypto,
代码行数:13,
代码来源:CMSUtils.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)