I'm getting the following complaint: "self signed certificate in certificate chain" for just one newly added domain for an LE certificate that continues to work fine for three other (related) domains.
I attempted to add 'covid.hoyo.zeetix.com' to the domains associated with the existing certificate. These are 'hoyo.zeetix.com', 'tms.hoyo.zeetix.com', and 'covid.tms.hoyo.zeetix.com'. The three existing domains continue to work fine with the existing certificate.
I used the "certbot certonly ..." command (see below) to add the single new domain. It apparently succeeded, because I see the following response to "certbot certificates" after the change:
# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: hoyo.zeetix.com
Serial Number: 3de392b7ebb82961e7afe0dafc11482aebd
Key Type: ECDSA
Domains: hoyo.zeetix.com covid.hoyo.zeetix.com covid.tms.hoyo.zeetix.com tms.hoyo.zeetix.com
Expiry Date: 2023-09-26 22:56:48+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/hoyo.zeetix.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/hoyo.zeetix.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
When I attempt to use access the new domain, I get the aforementioned complaint. Here is the result of a failing curl command (from an ssh client on the same server):
$ curl -vk https://covid.hoyo.zeetix.com/
* Trying 172.30.2.59...
* TCP_NODELAY set
* Connected to covid.hoyo.zeetix.com (172.30.2.59) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, [no content] (0):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; O=Unspecified; CN=ip-172-30-0-50.ec2.internal; emailAddress=root@ip-172-30-0-50.ec2.internal
* start date: Oct 27 23:32:12 2021 GMT
* expire date: Nov 2 01:12:12 2022 GMT
* issuer: C=US; O=Unspecified; OU=ca-9073428881288245187; CN=ip-172-30-0-50.ec2.internal; emailAddress=root@ip-172-30-0-50.ec2.internal
* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* TLSv1.3 (OUT), TLS app data, [no content] (0):
...
I've elided the result after the server failure.
When I compare this a successful response, I see that the following unexpected response:
* Server certificate:
* subject: C=US; O=Unspecified; CN=ip-172-30-0-50.ec2.internal; emailAddress=root@ip-172-30-0-50.ec2.internal
On the same command using one of the old domains, this same entry is:
* Server certificate:
* subject: CN=hoyo.zeetix.com
It appears to me that the 'certbot certonly' command somehow confused itself about the server certificate for the new domain (and JUST the new domain).
This is all well above my very limited expertise in such matters. I invite the help of this community in resolving this annoying issue.
Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: hoyo.zeetix.com
I ran this command: (as root) certbot certonly --cert-name hoyo.zeetix.com -d hoyo.zeetix.com,covid.hoyo.zeetix.com,tms.hoyo.zeetix.com,covid.tms.hoyo.zeetix.com
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Apache Web Server plugin (apache)
2: Runs an HTTP server locally which serves the necessary validation files under
the /.well-known/acme-challenge/ request path. Suitable if there is no HTTP
server already running. HTTP challenge only (wildcards not supported).
(standalone)
3: Saves the necessary validation files to a .well-known/acme-challenge/
directory within the nominated webroot path. A seperate HTTP server must be
running and serving files from the webroot path. HTTP challenge only (wildcards
not supported). (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-3] then [enter] (press 'c' to cancel):
** Invalid input **
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You are updating certificate hoyo.zeetix.com to include new domain(s):
+ covid.hoyo.zeetix.com
You are also removing previously included domain(s):
(None)
Did you intend to make this change?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(U)pdate certificate/(C)ancel: U
Renewing an existing certificate for hoyo.zeetix.com and 3 more domains
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/hoyo.zeetix.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/hoyo.zeetix.com/privkey.pem
This certificate expires on 2023-09-26.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
My web server is (include version): Apache/2.4.37 (rocky)
The operating system my web server runs on is (include version): "8.7 (Green Obsidian)
My hosting provider, if applicable, is: AWS EC2
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 2.6.0