Merge 2 .jks truststore files

后端 未结 1 555
南笙
南笙 2021-02-05 06:32

I am using a Tomcat that is SSL enabled, using truststores for client authentication.

I have two .jks trustore files.

The first, I use it for the PROD environmen

相关标签:
1条回答
  • 2021-02-05 07:20

    You can use the -importkeystore option of keytool to import an entry from one keystore/truststore to another:

    keytool -importkeystore -srckeystore test.jks -destkeystore common.jks -srcalias myRootCA -destalias myRootCA_TEST -srcstorepass **** -deststorepass ****
    keytool -importkeystore -srckeystore prod.jks -destkeystore common.jks -srcalias myRootCA -destalias myRootCA_PROD -srcstorepass **** -deststorepass ****
    

    The common.jks will then contain both CA to validate the client certificates. However, the application may also need to be reconfigured.

    0 讨论(0)
提交回复
热议问题