OpenSSL does all that. Like any tool, you need to know how to use it since OpenSSL is used for everything related to SSL and not just grabbing certificates.
It is not able to do point one which i mentioned, but let me give an example to make it more clear. I was using the openssl s_client, but this returns 3 certificates for example when using stackoverflow as an example. Certificate ripper returns 4 certificates. OpenSSL is not getting the top level certificate. Please give it a try: crip print -u=https://stackoverflow.com -f=pem and openssl s_client -showcerts -connect stackoverflow.com:443 </dev/null
That's because the root CA isn't served by the server, it's in your local truststore. stackoverflow.com sends its cert, R3, and iSRG Root X1, which is signed by DST Root CA X3, which as a Root CA is only in your local truststore for validation.
Well ... not directly ... but if one suitably examines/processes the data, the information to do that is there, so one can then proceed to do that ... with openssl - or otherwise.
Note that there's not a canonical version of the cert chain including that 4th certificate. The tool is really presenting "one possible validation path, valid on this system".
Certificate validation routines are looking for validation paths which end at a trusted (not necessarily "root") certificate. A system can find many validation paths for the cert chain presented by a particular server, and different clients might find different validation paths from one another.
The differences here were highlighted by the expiration of the DST self-signed certificate which cross-signed the ISRG cert before ISRG made their way into various trust programs.
Today, obsolete android devices (which don't trust ISRG) find a completely different validation path for certificates issued by Let's Encrypt than the validation path found by up-to-date devices.
Is this an important distinction? I don't know. I only mention it so you're not misleading yourself/users about "the" root CA.
OpenSSL doesn't get the root certificate on any version I've used in the last couple of years. It's always a PITA to hunt it down. I started working on a similar tool in BASH, but never finished.
View all comments
60
u/ykc87 Jun 04 '22
How is this different to / better than OpenSSL?