I'm trying to import certs generated outside of Vault into vault.
CA -> Intermediate1 -> Intermediate2 -> Final Certs
I'd like to just import Intermediate1 and down, but can't figure out how to create a bundle that has the whole cert chain. In Vault 6.2 they added Chained Intermediates, but I can't find much doc how to do it.
This is what I'm attempting.
cat certca/root.PublicCert.pem > tmp.pem
cat certca/intermediate.PublicCert.pem >> tmp.pem
openssl rsa -in certca/private/intermediate.key.pem -passin file:certca/private/intermediate.pw >> tmp.pem vault write "$mountpoint/config/ca" pem_bundle="@tmp.pem"
Vault says: * verification of parsed bundle failed: Public key of certificate does not match private key
If I remove the root.PublicCert.pem from the bundle, vault will accept it, but then it would never have a way to return a full chain to the user. I've tried them in different order.
Anybody have any Hints?
Thanks,
Steve Dillon