I want to create with java apis a keystore "PCKS12" from an existing crt file. is it possible? if yes how to make that?
EDIT
1/ openssl req -newkey rsa:2048 -nodes -keyout keyFile.key -x509 -days 3650 -out certFile.crt
2/ openssl pkcs12 -export -in certFile.crt -inkey keyFile.key -out tmp.p12 -name alias
3/ keytool -importkeystore -srckeystore tmp.p12 -srcstoretype PKCS12 -srcstorepass password -destkeystore keyStoreFile.jks -deststoretype JKS -deststorepass password -destkeypass password -alias alias
How to make step 2 and 3 programatically ?