本文整理了Java中org.bouncycastle.cert.X509v2CRLBuilder.<init>()
方法的一些代码示例,展示了X509v2CRLBuilder.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509v2CRLBuilder.<init>()
方法的具体详情如下:
包路径:org.bouncycastle.cert.X509v2CRLBuilder
类名称:X509v2CRLBuilder
方法名:<init>
暂无
代码示例来源:origin: org.opendaylight.snbi/southplugin
public static void createCRL(String name) {
X500NameBuilder builder = new X500NameBuilder(BCStyle.INSTANCE);
// builder.addRDN(BCStyle.C, defaults.get("COUNTRY"));
// builder.addRDN(BCStyle.O, defaults.get("ORGANIZATION"));
// builder.addRDN(BCStyle.ST, defaults.get("STATE"));
// builder.addRDN(BCStyle.T, defaults.get("TITLE"));
builder.addRDN(BCStyle.SN, BigInteger.valueOf(System.currentTimeMillis()).toString());
builder.addRDN(BCStyle.CN, name);
Calendar now = Calendar.getInstance();
Date notBefore = now.getTime();
now.add(Calendar.YEAR, 3);
Date notAfter = now.getTime();
X509v2CRLBuilder crlGen = new X509v2CRLBuilder(builder.build(),notBefore);
crlGen.setNextUpdate(notAfter);
}
代码示例来源:origin: gitblit/fathom
X509v2CRLBuilder crlBuilder = new X509v2CRLBuilder(issuerDN, new Date());
代码示例来源:origin: org.xipki.scep/scep-server-emulator
public synchronized CertificateList getCrl(X500Name issuer, BigInteger serialNumber)
throws Exception {
if (crl != null) {
return crl;
}
Date thisUpdate = new Date();
X509v2CRLBuilder crlBuilder = new X509v2CRLBuilder(caSubject, thisUpdate);
Date nextUpdate = new Date(thisUpdate.getTime() + 30 * DAY_IN_MS);
crlBuilder.setNextUpdate(nextUpdate);
Date caStartTime = caCert.getTBSCertificate().getStartDate().getDate();
Date revocationTime = new Date(caStartTime.getTime() + 1);
if (revocationTime.after(thisUpdate)) {
revocationTime = caStartTime;
}
crlBuilder.addCRLEntry(BigInteger.valueOf(2), revocationTime, CRLReason.keyCompromise);
crlBuilder.addExtension(Extension.cRLNumber, false, new ASN1Integer(crlNumber.getAndAdd(1)));
String signatureAlgorithm = ScepUtil.getSignatureAlgorithm(caKey, ScepHashAlgo.SHA256);
ContentSigner contentSigner = new JcaContentSignerBuilder(signatureAlgorithm).build(caKey);
X509CRLHolder crl = crlBuilder.build(contentSigner);
return crl.toASN1Structure();
}
代码示例来源:origin: org.xipki/ca-server
X500Name crlIssuer = indirectCrl ? crlSigner.getSubjectAsX500Name() : pci.getX500Subject();
X509v2CRLBuilder crlBuilder = new X509v2CRLBuilder(crlIssuer, thisUpdate);
if (nextUpdate != null) {
crlBuilder.setNextUpdate(nextUpdate);
内容来源于网络,如有侵权,请联系作者删除!