Package org.bouncycastle.cert

Examples of org.bouncycastle.cert.X509v2CRLBuilder.build()


      X500Name issuerDN = new X500Name(PrincipalUtil.getIssuerX509Principal(caCert).getName());
      X509v2CRLBuilder crlBuilder = new X509v2CRLBuilder(issuerDN, new Date());

      // build and sign CRL with CA private key
      ContentSigner signer = new JcaContentSignerBuilder(SIGNING_ALGORITHM).setProvider(BC).build(caPrivateKey);
      X509CRLHolder crl = crlBuilder.build(signer);

      File tmpFile = new File(caRevocationList.getParentFile(), Long.toHexString(System.currentTimeMillis()) + ".tmp");
      FileOutputStream fos = null;
      try {
        fos = new FileOutputStream(tmpFile);
View Full Code Here


      }
      crlBuilder.addCRLEntry(cert.getSerialNumber(), new Date(), reason.ordinal());

      // build and sign CRL with CA private key
      ContentSigner signer = new JcaContentSignerBuilder("SHA1WithRSA").setProvider(BC).build(caPrivateKey);
      X509CRLHolder crl = crlBuilder.build(signer);

      File tmpFile = new File(caRevocationList.getParentFile(), Long.toHexString(System.currentTimeMillis()) + ".tmp");
      FileOutputStream fos = null;
      try {
        fos = new FileOutputStream(tmpFile);
View Full Code Here

        JcaContentSignerBuilder contentBuilder = new JcaContentSignerBuilder("SHA1withRSA").setProvider("BC");

        CRLNumber crlNumber = new CRLNumber(new BigInteger("1234"));
       
        crlBuilder.addExtension(Extension.cRLNumber, false, crlNumber);
        X509CRLHolder x509Crl = crlBuilder.build(contentBuilder.build(issuerPrivateKey));
        return new JcaX509CRLConverter().setProvider("BC").getCRL(x509Crl);
    }

    public static OCSPResp createOcspResp(X509Certificate certificate,
            boolean revoked, X509Certificate issuerCertificate,
View Full Code Here

      for (CRLEntry entry : bcRequest.getEntries()) {
        builder.addCRLEntry(entry.getSerialNumber(), entry.getDate(), entry.getReason().getCode());
      }

      X509CRLHolder crlh = builder.build(contentSigner);

      JcaX509CRLConverter crlConverter = new JcaX509CRLConverter();
      crlConverter.setProvider(BouncyCastleProviderHelper.PROVIDER_NAME);
      X509CRL crl = crlConverter.getCRL(crlh);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.