CSRBuilder csrb = new CSRBuilder(); csrb.addDomain(domain); csrb.setOrganization("Blynk Inc."); csrb.sign(domainKeyPair); order.execute(csrb.getEncoded());
CSRBuilder csrb = new CSRBuilder(); csrb.addDomains(Arrays.asList(aDomain)); csrb.sign(domainKeyPair); csrb.write(out); Certificate certificate = reg.requestCertificate(csrb.getEncoded());
CSRBuilder csrb = new CSRBuilder(); csrb.addDomain(domain); try { csrb.sign(domainKeyPair); } catch (IOException e) { String message = "unable to sign csr"; csrb.write(out); } catch (IOException e) { String message = "unable to save csr";
/** * Writes the signed certificate request to a {@link Writer}. * * @param w * {@link Writer} to write the PEM file to. The {@link Writer} is closed * after use. */ public void write(@WillClose Writer w) throws IOException { if (csr == null) { throw new IllegalStateException("sign CSR first"); } try (PemWriter pw = new PemWriter(w)) { pw.writeObject(new PemObject("CERTIFICATE REQUEST", getEncoded())); } }
/** * Writes the signed certificate request to an {@link OutputStream}. * * @param out * {@link OutputStream} to write the PEM file to. The {@link OutputStream} * is closed after use. */ public void write(@WillClose OutputStream out) throws IOException { write(new OutputStreamWriter(out, "utf-8")); }
CSRBuilder csrb = new CSRBuilder(); csrb.addDomains(domains); csrb.sign(domainKeyPair); csrb.write(out); order.execute(csrb.getEncoded());
/** * Writes the signed certificate request to a {@link Writer}. * * @param w * {@link Writer} to write the PEM file to. The {@link Writer} is closed * after use. */ public void write(@WillClose Writer w) throws IOException { if (csr == null) { throw new IllegalStateException("sign CSR first"); } try (PemWriter pw = new PemWriter(w)) { pw.writeObject(new PemObject("CERTIFICATE REQUEST", getEncoded())); } }
/** * Writes the signed certificate request to an {@link OutputStream}. * * @param out * {@link OutputStream} to write the PEM file to. The {@link OutputStream} * is closed after use. */ public void write(@WillClose OutputStream out) throws IOException { write(new OutputStreamWriter(out, "utf-8")); }
Order order = proxyOrder.getOrder(); CSRBuilder csrb = new CSRBuilder(); csrb.addDomain(domain); csrb.setOrganization(organization); csrb.sign(accountKeyPair); byte[] csr = csrb.getEncoded(); csrb.write(writer);
final CSRBuilder csrBuilder = new CSRBuilder(); csrBuilder.addDomains(config.getDomains()); csrBuilder.sign(domainKeyPair); csrBuilder.write(writer); order.execute(csrBuilder.getEncoded());
csr = csrb.getEncoded(); } catch (IOException e1) { LOG.error("unable to encode csr", e1); certificate = reg.requestCertificate(csrb.getEncoded()); } catch (Exception e1) { LOG.error("unable to renew certificate with new csr", e1);
AsymmetricKeys asymmetricKeys = RSACrypt.RSA_CRYPT.generateKeyPair(4096); CSRBuilder csrb = new CSRBuilder(); csrb.addDomain(domain); csrb.sign(RSATools.createKeyPair(asymmetricKeys)); byte[] csr = csrb.getEncoded(); RSACertificate certificate = acmeService.requestCertificate(challengeByDomain.get(domain).getA(), csr); certificate.setKeysForSigning(asymmetricKeys);
private void doSetup() { messages.add("starting up...", LOG); Registration reg = loadOrCreateRegistration(); if (reg == null) { return; } CSRBuilder csrb = createCSR(reg); if (csrb == null) { return; } messages.add("requesting certificate", LOG); Certificate certificate; try { certificate = reg.requestCertificate(csrb.getEncoded()); } catch (Exception e) { String message = "unable to request certificate"; messages.add(message); LOG.error(message, e); return; } downloadCertificate(certificate); }