本文整理汇总了Java中org.bouncycastle.asn1.x509.AttributeCertificate.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeCertificate.getInstance方法的具体用法?Java AttributeCertificate.getInstance怎么用?Java AttributeCertificate.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bouncycastle.asn1.x509.AttributeCertificate
的用法示例。
在下文中一共展示了AttributeCertificate.getInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
public static CMPCertificate getInstance(Object o)
{
if (o == null || o instanceof CMPCertificate)
{
return (CMPCertificate)o;
}
if (o instanceof ASN1Sequence || o instanceof byte[])
{
return new CMPCertificate(Certificate.getInstance(o));
}
if (o instanceof ASN1TaggedObject)
{
return new CMPCertificate(AttributeCertificate.getInstance(((ASN1TaggedObject)o).getObject()));
}
throw new IllegalArgumentException("Invalid object: " + o.getClass().getName());
}
示例2: generateAttrStructure
import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
private static AttributeCertificate generateAttrStructure(AttributeCertificateInfo attrInfo, AlgorithmIdentifier sigAlgId, byte[] signature)
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(attrInfo);
v.add(sigAlgId);
v.add(new DERBitString(signature));
return AttributeCertificate.getInstance(new DERSequence(v));
}
示例3: SignerAttribute
import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
private SignerAttribute(
ASN1Sequence seq)
{
int index = 0;
values = new Object[seq.size()];
for (Enumeration e = seq.getObjects(); e.hasMoreElements();)
{
ASN1TaggedObject taggedObject = ASN1TaggedObject.getInstance(e.nextElement());
if (taggedObject.getTagNo() == 0)
{
ASN1Sequence attrs = ASN1Sequence.getInstance(taggedObject, true);
Attribute[] attributes = new Attribute[attrs.size()];
for (int i = 0; i != attributes.length; i++)
{
attributes[i] = Attribute.getInstance(attrs.getObjectAt(i));
}
values[index] = attributes;
}
else if (taggedObject.getTagNo() == 1)
{
values[index] = AttributeCertificate.getInstance(ASN1Sequence.getInstance(taggedObject, true));
}
else
{
throw new IllegalArgumentException("illegal tag: " + taggedObject.getTagNo());
}
index++;
}
}
示例4: X509V2AttributeCertificate
import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
public X509V2AttributeCertificate(
InputStream encIn)
throws IOException
{
this(AttributeCertificate.getInstance(new ASN1InputStream(encIn).readObject()));
}
示例5: JcaX509AttributeCertificateHolder
import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
/**
* Base constructor.
*
* @param cert AttributeCertificate to be used a the source for the holder creation.
* @throws IOException if there is a problem extracting the attribute certificate information.
*/
public JcaX509AttributeCertificateHolder(X509AttributeCertificate cert)
throws IOException
{
super(AttributeCertificate.getInstance(cert.getEncoded()));
}
示例6: getX509v2AttrCert
import org.bouncycastle.asn1.x509.AttributeCertificate; //导入方法依赖的package包/类
/**
* Return an AttributeCertificate interpretation of otherCert.
* @deprecated use getOtherCert and getOtherTag to make sure message is really what it should be.
*
* @return an AttributeCertificate
*/
public AttributeCertificate getX509v2AttrCert()
{
return AttributeCertificate.getInstance(otherCert);
}