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