本文整理汇总了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));
}
}
示例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());
}
}
}
示例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));
}
}
示例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));
}
}
示例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());
}
}
}