/** * Downloads the certificate chain. * <p> * The certificate is downloaded lazily by the other methods. So usually there is no * need to invoke this method, unless the download is to be enforced. If the * certificate has been downloaded already, nothing will happen. * * @throws AcmeException * if the certificate could not be downloaded */ public void download() throws AcmeException { if (certChain == null) { LOG.debug("download"); try (Connection conn = getSession().connect()) { conn.sendCertificateRequest(getLocation(), getLogin()); alternates = new ArrayList<>(conn.getLinks("alternate")); certChain = new ArrayList<>(conn.readCertificates()); } } }
/** * Downloads the certificate chain. * <p> * The certificate is downloaded lazily by the other methods. So usually there is no * need to invoke this method, unless the download is to be enforced. If the * certificate has been downloaded already, nothing will happen. * * @throws AcmeException * if the certificate could not be downloaded */ public void download() throws AcmeException { if (certChain == null) { LOG.debug("download"); try (Connection conn = getSession().connect()) { conn.sendCertificateRequest(getLocation(), getLogin()); alternates = new ArrayList<>(conn.getLinks("alternate")); certChain = new ArrayList<>(conn.readCertificates()); } } }