/** * Obtain a certificate chain using the given ACME account. * * @param account the ACME account information to use (must not be {@code null}) * @param staging whether or not the staging server URL should be used * @param domainNames the domain names to request the certificate for (must not be {@code null}) * @return the X509 certificate chain and private key * @throws AcmeException if an occur occurs while attempting to obtain the certificate */ public X509CertificateChainAndSigningKey obtainCertificateChain(AcmeAccount account, boolean staging, String... domainNames) throws AcmeException { return obtainCertificateChain(account, staging, null, -1, domainNames); }
/** * Obtain a certificate chain using the given ACME account. * * @param account the ACME account information to use (must not be {@code null}) * @param staging whether or not the staging server URL should be used * @param domainNames the domain names to request the certificate for (must not be {@code null}) * @return the X509 certificate chain and private key * @throws AcmeException if an occur occurs while attempting to obtain the certificate */ public X509CertificateChainAndSigningKey obtainCertificateChain(AcmeAccount account, boolean staging, String... domainNames) throws AcmeException { return obtainCertificateChain(account, staging, null, -1, domainNames); }
/** * Obtain a certificate chain using the given ACME account. * * @param account the ACME account information to use (must not be {@code null}) * @param staging whether or not the staging server URL should be used * @param domainNames the domain names to request the certificate for (must not be {@code null}) * @return the X509 certificate chain and private key * @throws AcmeException if an occur occurs while attempting to obtain the certificate */ public X509CertificateChainAndSigningKey obtainCertificateChain(AcmeAccount account, boolean staging, String... domainNames) throws AcmeException { return obtainCertificateChain(account, staging, null, -1, domainNames); }
/** * Obtain a certificate chain using the given ACME account. * * @param account the ACME account information to use (must not be {@code null}) * @param staging whether or not the staging server URL should be used * @param domainNames the domain names to request the certificate for (must not be {@code null}) * @return the X509 certificate chain and private key * @throws AcmeException if an occur occurs while attempting to obtain the certificate */ public X509CertificateChainAndSigningKey obtainCertificateChain(AcmeAccount account, boolean staging, String... domainNames) throws AcmeException { return obtainCertificateChain(account, staging, null, -1, domainNames); }
acmeClient.updateAccount(acmeAccount, staging, acmeAccount.isTermsOfServiceAgreed(), acmeAccount.getContactUrls()); X509CertificateChainAndSigningKey certificateChainAndSigningKey = acmeClient.obtainCertificateChain(acmeAccount, staging, algorithm, keySize, domainNames.toArray(new String[domainNames.size()])); keyStore.setKeyEntry(alias, certificateChainAndSigningKey.getSigningKey(), keyPassword, certificateChainAndSigningKey.getCertificateChain()); ((KeyStoreService) keyStoreService).save();