I want to cross-sign a third-party root ca (third-party-ca) with my own root ca (r1). (Background: restricting usage)
To do this, I use
openssl x509-in third-party-ca.crt -CA /etc/pki/r1/ca.crt -CAkey /etc/pki/r1/private/ca.key -out third-party-ca-cross-signed.crt -set_serial 1000
This works, but keeps the Authority Key Identifier of the third-party-ca, which would need to be changed to the Subject Key Identifier of r1. (For a in-the-wild example, see letsencrypt ISRG X1 cross-signed by DST Root CA X3)
I'm able to add another Authority Key Identifier by creating an akiext and using -extfile akiext. However, this results in two Authority Key Identifier's.
How can I replace the existing Authority Key Identifier?