This is related to another question, How to verify a signature of one entity by another using OpenSSL CLI?
I used openssl s_client -showcerts -connect www.google.com:443
to collect three certificates from google. Call them g0
, g1
, g2
, where:
g0
is a leaf cert signed by Google's intermediate CAg1
holds the intermediate CA public key and is signed by GeoTrust CAg2
holds the GeoTrust public key and is signed by EquiFax CA
My goal is to demonstrate that this is a valid signature chain, step-by-step, using the OpenSSL CLI. The intuitive try is this:
$ openssl verify -CAfile g1 g0
But it turns out that OpenSSL is using certs from its trusted store (see How to verify a signature of one entity by another using OpenSSL CLI?). So instead I kill the trusted store as @dave_thompson_085 suggested in a comment to the above-referenced question. But this doesn't seem to work:
$ openssl verify -CApath /dev/null -CAfile g1 g0
g1.crt: C = US, O = Google Inc, CN = Google Internet Authority G2
error 2 at 1 depth lookup:unable to get issuer certificate
So how do I correctly issue this verify
command in such a way that I can specifically check whether g1
has signed g0
?
$ openssl version
OpenSSL 1.0.1f 6 Jan 2014