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


Java IssuerSerial.getInstance方法代码示例

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


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

示例1: OtherCertID

import org.bouncycastle.asn1.x509.IssuerSerial; //导入方法依赖的package包/类
/**
 * constructor
 */
private OtherCertID(ASN1Sequence seq)
{
    if (seq.size() < 1 || seq.size() > 2)
    {
        throw new IllegalArgumentException("Bad sequence size: "
                + seq.size());
    }

    if (seq.getObjectAt(0).toASN1Primitive() instanceof ASN1OctetString)
    {
        otherCertHash = ASN1OctetString.getInstance(seq.getObjectAt(0));
    }
    else
    {
        otherCertHash = DigestInfo.getInstance(seq.getObjectAt(0));

    }

    if (seq.size() > 1)
    {
        issuerSerial = IssuerSerial.getInstance(seq.getObjectAt(1));
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:27,代码来源:OtherCertID.java

示例2: ProcurationSyntax

import org.bouncycastle.asn1.x509.IssuerSerial; //导入方法依赖的package包/类
/**
 * Constructor from ASN1Sequence.
 * <p/>
 * The sequence is of type ProcurationSyntax:
 * <p/>
 * <pre>
 *               ProcurationSyntax ::= SEQUENCE {
 *                 country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
 *                 typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
 *                 signingFor [3] EXPLICIT SigningFor
 *               }
 * <p/>
 *               SigningFor ::= CHOICE
 *               {
 *                 thirdPerson GeneralName,
 *                 certRef IssuerSerial
 *               }
 * </pre>
 *
 * @param seq The ASN.1 sequence.
 */
private ProcurationSyntax(ASN1Sequence seq)
{
    if (seq.size() < 1 || seq.size() > 3)
    {
        throw new IllegalArgumentException("Bad sequence size: " + seq.size());
    }
    Enumeration e = seq.getObjects();

    while (e.hasMoreElements())
    {
        ASN1TaggedObject o = ASN1TaggedObject.getInstance(e.nextElement());
        switch (o.getTagNo())
        {
            case 1:
                country = DERPrintableString.getInstance(o, true).getString();
                break;
            case 2:
                typeOfSubstitution = DirectoryString.getInstance(o, true);
                break;
            case 3:
                ASN1Encodable signingFor = o.getObject();
                if (signingFor instanceof ASN1TaggedObject)
                {
                    thirdPerson = GeneralName.getInstance(signingFor);
                }
                else
                {
                    certRef = IssuerSerial.getInstance(signingFor);
                }
                break;
            default:
                throw new IllegalArgumentException("Bad tag number: " + o.getTagNo());
        }
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:57,代码来源:ProcurationSyntax.java

示例3: ESSCertIDv2

import org.bouncycastle.asn1.x509.IssuerSerial; //导入方法依赖的package包/类
private ESSCertIDv2(
    ASN1Sequence seq)
{
    if (seq.size() > 3)
    {
        throw new IllegalArgumentException("Bad sequence size: " + seq.size());
    }

    int count = 0;

    if (seq.getObjectAt(0) instanceof ASN1OctetString)
    {
        // Default value
        this.hashAlgorithm = DEFAULT_ALG_ID;
    }
    else
    {
        this.hashAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(count++).toASN1Primitive());
    }

    this.certHash = ASN1OctetString.getInstance(seq.getObjectAt(count++).toASN1Primitive()).getOctets();

    if (seq.size() > count)
    {
        this.issuerSerial = IssuerSerial.getInstance(seq.getObjectAt(count));
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:28,代码来源:ESSCertIDv2.java

示例4: ESSCertID

import org.bouncycastle.asn1.x509.IssuerSerial; //导入方法依赖的package包/类
/**
 * constructor
 */
private ESSCertID(ASN1Sequence seq)
{
    if (seq.size() < 1 || seq.size() > 2)
    {
        throw new IllegalArgumentException("Bad sequence size: " + seq.size());
    }

    certHash = ASN1OctetString.getInstance(seq.getObjectAt(0));
 
    if (seq.size() > 1)
    {
        issuerSerial = IssuerSerial.getInstance(seq.getObjectAt(1));
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:18,代码来源:ESSCertID.java

示例5: ProcurationSyntax

import org.bouncycastle.asn1.x509.IssuerSerial; //导入方法依赖的package包/类
/**
 * Constructor from ASN1Sequence.
 * <p>
 * The sequence is of type ProcurationSyntax:
 * <pre>
 *               ProcurationSyntax ::= SEQUENCE {
 *                 country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
 *                 typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
 *                 signingFor [3] EXPLICIT SigningFor
 *               }
 *
 *               SigningFor ::= CHOICE
 *               {
 *                 thirdPerson GeneralName,
 *                 certRef IssuerSerial
 *               }
 * </pre>
 * </p>
 * @param seq The ASN.1 sequence.
 */
private ProcurationSyntax(ASN1Sequence seq)
{
    if (seq.size() < 1 || seq.size() > 3)
    {
        throw new IllegalArgumentException("Bad sequence size: " + seq.size());
    }
    Enumeration e = seq.getObjects();

    while (e.hasMoreElements())
    {
        ASN1TaggedObject o = ASN1TaggedObject.getInstance(e.nextElement());
        switch (o.getTagNo())
        {
            case 1:
                country = DERPrintableString.getInstance(o, true).getString();
                break;
            case 2:
                typeOfSubstitution = DirectoryString.getInstance(o, true);
                break;
            case 3:
                ASN1Encodable signingFor = o.getObject();
                if (signingFor instanceof ASN1TaggedObject)
                {
                    thirdPerson = GeneralName.getInstance(signingFor);
                }
                else
                {
                    certRef = IssuerSerial.getInstance(signingFor);
                }
                break;
            default:
                throw new IllegalArgumentException("Bad tag number: " + o.getTagNo());
        }
    }
}
 
开发者ID:ttt43ttt,项目名称:gwt-crypto,代码行数:56,代码来源:ProcurationSyntax.java


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