I want to cross-sign a third-party certificate (third-party-client.crt
) with my own root ca (r1
).
To do this, I use
openssl x509 -in third-party-client.crt -CA /etc/pki/r1/ca.crt -CAkey /etc/pki/r1/private/ca.key -out third-party-client-cross-signed.crt -set_serial 1000
When I don't have the CA that issued the third party certificate in my local CA store, I get the following error:
Getting CA Private Key
/CN=Third Party Client Cert
error with certificate - error 20 at depth 0
unable to get local issuer certificate
/CN=Third Party Client Cert
error with certificate - error 21 at depth 0
unable to verify the first certificate
error with certificate to be certified - should be self signed
After adding the certificate that issued the third party cert to the CA store, I still get the following error:
Getting CA Private Key
error with certificate to be certified - should be self signed
How can I cross-sign a non-self-signed third-party certificate? (Ideally, without first importing the issuer ca into the CA store)
-out
file)OpenSSL 3.0.5 5 Jul 2022
on ubuntu, but ran into the exact same errors mentioned in my OP. Are you sure that the third party certificate you are signing is indeed not self-signed?