Package com.iizix.server.acme
Class LetsEncrypt
java.lang.Object
com.iizix.server.acme.LetsEncrypt
The iiziServer Let's Encrypt implementation for SSL certificates.
- Author:
- Christopher Mindus
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The reply code.static class
Class used to hold information of a certificate request.static enum
The type of ACME challenge.Method Summary
Modifier and TypeMethodDescriptionstatic File
createCertificateChallenge
(String root, String domain, LetsEncrypt.Type type, StringBuilder tos, String alias, String password, X509Certificate[] cert) Performs a HTTP or DNS challenge request on the running iiziServer or iiziGo instance.
Method Details
createCertificateChallenge
public static File createCertificateChallenge(String root, String domain, LetsEncrypt.Type type, StringBuilder tos, String alias, String password, X509Certificate[] cert) throws IOException, Exception Performs a HTTP or DNS challenge request on the running iiziServer or iiziGo instance.- Parameters:
root
- The web server root directory.domain
- The domain name.type
- The type of authentication: HTTP or DNS.tos
- Terms of service URI that has been accepted must be filled in (or empty for first try).alias
- Alias for key store/certificate private key, null for default.password
- Password to use, null for default.cert
- Array of 1 to return certificate created, null for none.- Returns:
- The PKCS#12 identity file created with the certificate chain alias "iizi" and password "changeit", or null if Terms-Of-Service must be accepted.
- Throws:
IOException
- For I/O errors.Exception
- For ACME problems, actually
but in order to avoid module dependency to the acme4j package,AcmeException
is specified here, but can safely be cast toException
AcmeException
if thrown.