I have a cetificate chain in .pem format from Letsencrypt, called fullchain.pem
It has 2 certificates in the chain:
keytool -printcert -v -file fullchain.pem |grep "Certificate fingerprints" |wc -l
2
When I convert it to .der using
openssl x509 -in fullchain.pem -out cert.der -outform DER
it only exports the last one
keytool -printcert -v -file cert.der |grep "Certificate fingerprints" |wc -l
1
is this a bug in openssl? Am I missing a param?
openssl x509
processes only the first cert in the input file and ignores any additional ones. You need to split 'fullchain' up and process each cert separately. See serverfault.com/questions/391396/how-to-split-a-pem-file and serverfault.com/questions/590870/…