public class LetsEncrypt extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LetsEncrypt.Code
The reply code.
|
static class |
LetsEncrypt.Reply
Class used to hold information of a certificate request.
|
static class |
LetsEncrypt.Type
The type of ACME challenge, for now only "HTTP-01" is supported.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ALIAS
The alias for the certificate.
|
| Modifier and Type | Method and Description |
|---|---|
static File |
createCertificate_HTTPChallenge(Function<String,Void> logger,
String root,
String domain,
String alias,
String password,
X509Certificate[] cert)
Performs a HTTP challenge request on the running NetPhantom Server instance.
|
LetsEncrypt.Reply |
fetchCertificate(String domain)
Generates a certificate for the given domain.
|
org.shredzone.acme4j.challenge.Challenge |
httpChallenge(org.shredzone.acme4j.Authorization auth)
Prepares a HTTP challenge.
|
public static final String ALIAS
public LetsEncrypt.Reply fetchCertificate(String domain) throws IOException, org.shredzone.acme4j.exception.AcmeException
domain - Domain to get a common certificate for.IOException - For I/O errors.org.shredzone.acme4j.exception.AcmeException - For ACME errors.public org.shredzone.acme4j.challenge.Challenge httpChallenge(org.shredzone.acme4j.Authorization auth)
throws org.shredzone.acme4j.exception.AcmeException,
IOException
The verification of this challenge expects a file with a certain content to be reachable at a given path under the domain to be tested.
auth - Authorization to find the challenge in.Challenge to verify.org.shredzone.acme4j.exception.AcmeException - For ACME errors.IOException - For file writer errors.public static File createCertificate_HTTPChallenge(Function<String,Void> logger, String root, String domain, String alias, String password, X509Certificate[] cert) throws IOException, Exception
logger - The logger callback for current operation, null for none.root - The web server root directory.domain - The domain name.alias - Alias for key store/certificate private key, null for default "NetPhantom".password - Password to use, null for default "changeit".cert - Array of 1 to return certificate created, null for none.IOException - For I/O errors.Exception - For ACME problems, actually org.shredzone.acme4j.exception.AcmeException
but in order to avoid module dependency to the acme4j package, an Exception
is specified here.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.