 
Obtain SSL certificates from the letsencrypt.org ACME server. Suitable
@ -163,9 +165,35 @@ Change the server in your config file to get a fully valid certificate.
dns. The certificate can be used (and checked with getssl) on alternate
ports.
## Wildcard certificates
`getssl` supports creating wildcard certificates, i.e. _*.example.com_ which allows a single certificate to be used for any domain under *example.com*, e.g. *www.example.com*, *mail.example.com*. These must be validated using the dns-01 method.
Create the wildcard certificate (need to use quotes to prevent globbing):
```sh
getssl "*.example.domain"
```
You can renew the certificate using `getssl -a` to renew all configured certificates.
You can also specify additional domains in the `SANS` line, e.g. `SANS="www.test.example.com"`.
This cannot contain any of the domains which would be covered by the wildcard certificate.
## Automating updates
I use the following cron
I use the following **cron** job
```cron
23 5 * * * /root/scripts/getssl -u -a -q
@ -353,6 +381,34 @@ key (different of course, don't use the same key for both). prime256v1
secp521r1 (NIST P-521) is included in the code, but not currently
supported by Let's Encrypt).
## Preferred Chain
If a CA offers multiple chains then it is possible to select which chain
is used by using the `PREFERRED_CHAIN` variable in `getssl.cfg` or specifying
`--preferred-chain` in the call to `getssl`
This uses wildcard matching so requesting "X1" returns the first certificate
returned by the CA which contains the text "X1", Note you may need to escape
any characters which special characters, e.g.
` PREFERRED_CHAIN="\(STAGING\) Doctored Durian Root CA X3"`
* Staging options are: "(STAGING) Doctored Durian Root CA X3" and "(STAGING) Pretend Pear X1"
* Production options are: "ISRG Root X1" and "ISRG Root X2"
## Full chain
Some servers, including those that use Java keystores, will not accept a server certificate if it cannot valid the full chain of signers.
Specifically, Nutanix Prism (Element and Central) will not accept the `fullchain.crt` until the root CA's certificate has been appended to it manually.
If your application requires the full chain, i.e. including the
root certificate of the CA, then this can be included in the `fullchain.crt` file by
adding the following line to `getssl.cfg`
```sh
FULL_CHAIN_INCLUDE_ROOT="true"
```
## Issues / problems / help
If you have any issues, please log them at <https://github.com/srvrco/getssl/issues>