As an aside, I don't think -purpose has value when checking certs known to be from Let's Encrypt. The openssl docs say
The supplied or "leaf" certificate must have extensions compatible with the supplied purpose and all other certificates must also be valid CA certificates.
We already know LE certs are fine for ssl servers. I'd be more worried of that option showing an error that doesn't exist due purely to an aged or faulty openssl.
and here is another bundle I have created manually on Windows machine, simply copy to file and save and so on, and then combined leaf >> inter >> root into a single file
First, an actual CA root should not be in a chain sent by a server. At best clients will ignore it and it just takes longer to send a longer chain. Maybe some clients will even reject it as invalid chain - I am not sure. That is not how this trust system works.
You could try removing the last cert from fullchain.pem and use that for your server.
It looks like your server is not tolerating the default "long chain" from Let's Encrypt. It contains your leaf and then two intermediates that can link to different roots. The second intermediate, which is the 3rd file in fullchain.pem, is a cross-signed cert issued by DST Root CA X3. It expired last Sept but is kept in place for compatibility with older Android devices. Numerous website servers send this long chain including this website.
It looks like your server is not allowing you to use that. It will limit what clients will trust your website. Whether that is a problem is for you to decide.
First though, make a new file with just the first 2 certs from fullchain.pem and ensure that works in your server. Then we can talk about the implications.
By the way, again, what is the server you are using?
Thanks for the explanation about that part with the two intermediates part, hence, it doesn't work until I make the manual tweak to get a complete fullchain with no expired certs.
Can you point me to the config docs for that server? I looked but cannot find them.
That set of certs you created includes the root trust anchor. If your clients actually trust it without confirming in their own CA trust store then you may have been able to use a self-signed cert. Sending the anchor is unnecessary and defeats the purpose of client verifications of trust.
With certbot 1.12 you should be able to use the --preferred-chain 'ISRG Root X1' option so you get the short chain returned in fullchain.pem. Then, apparently, you need to add the ISRG Root X1 root trust anchor to satisfy your server. That is probably easier to create than shortening the long chain and adding the root trust anchor.
I found the below docs. Let's Encrypt is a public CA (not your private one). Based on these docs you should not be adding the ISRG root trust anchor. However, you may need to use the short chain.
You should probably ask illumio why the verification fails without the trust anchor. You can see their docs match what I have been describing about the client doing the final step and matching to their own CA store.
Yeah, probably do. But, they are saying they need to add the ISRG root trust anchor to that to satisfy the server's "verification". This is the last hangup and one I just posted about.
Edit: This is the chain they said they need to make this work. I think they should remove the last one but it apparently did not work.
Everything is working now as expected. The product is just designed to be used with purchased certificates and it has to have a valid chain trust in order to get the product working.
I think it would be better as the person complained on the main announcement post with Let's Encrypt to have both bundles full chain included or simply remove the expired one, there shouldn't be any expired cert in there, even if it's for older android devices. Just thinking.
Anyways, thanks LOADS everything @MikeMcQ@jvanasco and @rg305 for the help here. It was a good long test we did here today
They do. As I described, the default is the "long chain". You can use the --preferred-chain option of certbot to select the "short chain". It is not practical to return both for each request - you would still need to choose one or the other.
Besides, your biggest problem (now) is that addition of the root trust anchor. That is highly unusual. And, is contrary to the server's own docs so appears to be a bug in their verification routine.
The first part must be a misconception/misunderstanding - there is no difference between a paid cert and a free cert [when both come from a valid globally trusted CA].
The second part is a strange requirement when given that it is expected to be included in the bundle provided by the issuing CA [extremely BAD practice].
The expired certificate is the default option, but not required. The ACME API provides both certificates, it is a deficiency in the client or user if the alternate option is not utilized or offered.
The expired certificate technique is the only way for a large number of devices to utilize the internet.
The expired certificate technique works because:
The Android devices to not care about the expiration date
Nearly every modern client (browsers, openssl & variants, programming libraries, applications) ignores the presented chain and calculates their own path to trusted roots.
The issue that you experienced is due in part to using an old and unsupported version of OpenSSL. 1.02 was released in 2015 and stopped receiving updates in 2019 as part of their LTS (long term support) strategy. Aside from missing the updates and security fixes in the 1.1.0 and 1.1.1 releases, 1.02k is relatively old for that release cycle - which culminated in 1.02u.
CentOS 7 was released in 2014 and only received updates through 2020, when the project was terminated by RedHat. There are some maintenance updates promised through 2024 - but continuing to use the platform is simply not prudent.
This might not be a contradiction. You linked to their active v21.5 docs, but we have no idea what version is running. The 21.5 release looks to be relatively new, but the OS is 8 years old and 2 years out of it's full support window (AFAIK, it's only getting security updates now). I assume the machine is running a much earlier version.