Instead of using keytool in cmd or openssl, I want to convert a jks file to a p12 file in Java.
My code so far is this:
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
char[] password = "lol".toCharArray();
ks.load(null, password);
FileOutputStream fos = new FileOutputStream("C:\\Users\\Antonio\\Desktop\\jkstest\\test.jks");
ks.store(fos, password);
fos.close();
Thats how I create a jks file. But I did not find any information about how to convert it to anything. Who does know a solution? Thanks for every answer!