/** * Cancels a recurrent order. * * @since 2.3 */ public void cancelRecurrent() throws AcmeException { if (!getSession().getMetadata().isStarEnabled()) { throw new AcmeException("CA does not support short-term automatic renewals"); } LOG.debug("cancel"); try (Connection conn = getSession().connect()) { JSONBuilder claims = new JSONBuilder(); claims.put("status", "canceled"); conn.sendSignedRequest(getLocation(), claims, getLogin()); JSON json = conn.readJsonResponse(); if (json != null) { setJSON(json); } } }
/** * Cancels a recurrent order. * * @since 2.3 */ public void cancelRecurrent() throws AcmeException { if (!getSession().getMetadata().isStarEnabled()) { throw new AcmeException("CA does not support short-term automatic renewals"); } LOG.debug("cancel"); try (Connection conn = getSession().connect()) { JSONBuilder claims = new JSONBuilder(); claims.put("status", "canceled"); conn.sendSignedRequest(getLocation(), claims, getLogin()); JSON json = conn.readJsonResponse(); if (json != null) { setJSON(json); } } }
/** * Finalizes the order, by providing a CSR. * <p> * After a successful finalization, the certificate is available at * {@link #getCertificate()}. * <p> * Even though the ACME protocol uses the term "finalize an order", this method is * called {@link #execute(byte[])} to avoid confusion with the general * {@link Object#finalize()} method. * * @param csr * CSR containing the parameters for the certificate being requested, in * DER format */ public void execute(byte[] csr) throws AcmeException { LOG.debug("finalize"); try (Connection conn = getSession().connect()) { JSONBuilder claims = new JSONBuilder(); claims.putBase64("csr", csr); conn.sendSignedRequest(getFinalizeLocation(), claims, getLogin()); } invalidate(); }
/** * Finalizes the order, by providing a CSR. * <p> * After a successful finalization, the certificate is available at * {@link #getCertificate()}. * <p> * Even though the ACME protocol uses the term "finalize an order", this method is * called {@link #execute(byte[])} to avoid confusion with the general * {@link Object#finalize()} method. * * @param csr * CSR containing the parameters for the certificate being requested, in * DER format */ public void execute(byte[] csr) throws AcmeException { LOG.debug("finalize"); try (Connection conn = getSession().connect()) { JSONBuilder claims = new JSONBuilder(); claims.putBase64("csr", csr); conn.sendSignedRequest(getFinalizeLocation(), claims, getLogin()); } invalidate(); }