gpt4 book ai didi

org.bouncycastle.cert.X509v2CRLBuilder.build()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 13:43:05 26 4
gpt4 key购买 nike

本文整理了Java中org.bouncycastle.cert.X509v2CRLBuilder.build()方法的一些代码示例,展示了X509v2CRLBuilder.build()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509v2CRLBuilder.build()方法的具体详情如下:
包路径:org.bouncycastle.cert.X509v2CRLBuilder
类名称:X509v2CRLBuilder
方法名:build

X509v2CRLBuilder.build介绍

暂无

代码示例

代码示例来源:origin: apache/zookeeper

private void buildCRL(X509Certificate x509Certificate, String crlPath) throws Exception {
  X509v2CRLBuilder builder = new JcaX509v2CRLBuilder(x509Certificate.getIssuerX500Principal(), certStartTime);
  builder.addCRLEntry(x509Certificate.getSerialNumber(), certStartTime, CRLReason.cACompromise);
  builder.setNextUpdate(certEndTime);
  builder.addExtension(Extension.authorityKeyIdentifier, false, new JcaX509ExtensionUtils()
      .createAuthorityKeyIdentifier(rootCertificate));
  builder.addExtension(Extension.cRLNumber, false, new CRLNumber(new BigInteger("1000")));
  X509CRLHolder cRLHolder = builder.build(contentSigner);
  PemWriter pemWriter = new PemWriter(new FileWriter(crlPath));
  pemWriter.writeObject(new MiscPEMGenerator(cRLHolder));
  pemWriter.flush();
  pemWriter.close();
}

代码示例来源:origin: gitblit/fathom

X509CRLHolder crl = crlBuilder.build(signer);

代码示例来源: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: puppetlabs/certificate-authority

builder.addExtension(Extension.cRLNumber, false, new CRLNumber(BigInteger.ZERO));
ContentSigner signer =
  new JcaContentSignerBuilder("SHA256withRSA").build(issuerPrivateKey);
return new JcaX509CRLConverter().getCRL(builder.build(signer));

代码示例来源:origin: puppetlabs/ssl-utils

builder.addExtension(Extension.cRLNumber, false, new CRLNumber(BigInteger.ZERO));
ContentSigner signer =
  new JcaContentSignerBuilder("SHA256withRSA").build(issuerPrivateKey);
return new JcaX509CRLConverter().getCRL(builder.build(signer));

代码示例来源:origin: puppetlabs/certificate-authority

new JcaContentSignerBuilder("SHA256withRSA").build(issuerPrivateKey);
return new JcaX509CRLConverter().getCRL(builder.build(signer));

代码示例来源:origin: puppetlabs/ssl-utils

new JcaContentSignerBuilder("SHA256withRSA").build(issuerPrivateKey);
return new JcaX509CRLConverter().getCRL(builder.build(signer));

代码示例来源:origin: org.xipki/ca-server

crlHolder = crlBuilder.build(signer0.value());
} finally {
 concurrentSigner.requiteSigner(signer0);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com