Migrating a certificate keystore to another JVM

情到浓时终转凉″ 提交于 2019-12-08 04:41:40

问题


I am working on a installer which needs a JRE and creates certificates as well. I am working on the next version of installer which bundles a new JRE. I need to move all the certificates that are imported in cacerts keystore of the old JRE to a new JRE. Will the existing certificates in cacerts be valid if I copy the "cacerts" file under old jre/lib/security/ directory to the new JRE, I will be installing.

I looked at question: "Is it possible to import all contents of cacerts into a jssecacerts file?" to import certificates into my keystore. Does this mean I need to backup the existing jre/lib/security/cacerts and import it to new JRE if the keystore migration by copying cacerts will not work?


回答1:


You don't want to do this. You don't want to disturb the certificates that are already in the new trustStore, and you don't want to copy anything from the original contents of the old trustStore that isn't in the default contents of the new trustStore. You want to import all the certificates that you have added to the old default trustStore to the new default trustStore. So keep track of them, in a separate place, and just repeat the original import process on the new trustStore.



来源:https://stackoverflow.com/questions/12346042/migrating-a-certificate-keystore-to-another-jvm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!