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?