Examples of MiscPEMGenerator


Examples of org.bouncycastle.openssl.MiscPEMGenerator

    Object obj = ks.getCertificate("RootCAPriKey");
    // final Certificate cert =
    // rootca.getCertificate(SslCertificateService.ZAPROXY_JKS_ALIAS);
    final PemWriter pw = new PemWriter(new FileWriter(
            "Fake-ACRoot-Certificate.cer"));
    pw.writeObject(new MiscPEMGenerator(cert));
    pw.flush();
  }
View Full Code Here

Examples of org.bouncycastle.openssl.MiscPEMGenerator

      boolean addLine = false;

      PemWriter writer = new PemWriter(new OutputStreamWriter(outputStream));

      if (privateKey != null) {
        PemObjectGenerator generator = new MiscPEMGenerator(privateKey);
        writer.writeObject(generator);
        addLine = true;
      }

      if (publicKey != null) {
        if (addLine) {
          outputStream.write(CrypterIOHelper.NEW_LINE.getBytes());
        }

        PemObjectGenerator generator = new MiscPEMGenerator(publicKey);
        writer.writeObject(generator);
      }

      writer.close();
    } catch (IOException e) {
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.