Skip to main content
added 475 characters in body
Source Link
Med Besbes
  • 2k
  • 6
  • 25
  • 37

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 ?

I want to create with java apis a keystore "PCKS12" from an existing crt file. is it possible? if yes how to make that?

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 ?

Source Link
Med Besbes
  • 2k
  • 6
  • 25
  • 37

create p12 and keyStore from crt file

I want to create with java apis a keystore "PCKS12" from an existing crt file. is it possible? if yes how to make that?