Package org.bouncycastle.cert.ocsp

Examples of org.bouncycastle.cert.ocsp.OCSPRespBuilder


        ContentSigner contentSigner = new JcaContentSignerBuilder("SHA1withRSA")
            .setProvider("BC").build(ocspResponderPrivateKey);
        BasicOCSPResp basicOCSPResp = basicOCSPRespBuilder.build(contentSigner, chain, new Date(nonceTimeinMillis));

       
        OCSPRespBuilder ocspRespBuilder = new OCSPRespBuilder();
        OCSPResp ocspResp = ocspRespBuilder.build(OCSPRespBuilder.SUCCESSFUL, basicOCSPResp);

        return ocspResp;
    }
View Full Code Here


      ContentSigner contentSigner = contentSignerBuilder.build(bcRequest.getIssuerPrivateKey());

      X509CertificateHolder[] chain = new X509CertificateHolder[] { new X509CertificateHolder(bcRequest.getIssuerCertificate().getEncoded()) };

      BasicOCSPResp basicResp = builder.build(contentSigner, chain, new Date());
      OCSPResp ocspResp = new OCSPRespBuilder().build(OCSPRespBuilder.SUCCESSFUL, basicResp);

      OCSPResponse response = new OCSPResponse(ocspResp.getEncoded());
      return response;
    } catch (Exception e) {
      throw new CertificateException(e);
View Full Code Here

TOP

Related Classes of org.bouncycastle.cert.ocsp.OCSPRespBuilder

Copyright © 2018 www.massapicom. 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.