-1
openssl pkcs12 -export -in caseta.crt -inkey caseta.key -out caseta.p12 -name caseta

keytool -importkeystore -destkeystore lutron.keystore -srckeystore caseta.p12 -srcstoretype PKCS12 -srcstorepass secret -alias caseta

keytool -importcert -file caseta-bridge.crt -keystore lutron.keystore -alias caseta-bridge

I need help understanding this script that adds these files into keycert so that I can edit the script with the correct file names?

chepner
  • 497,756
  • 71
  • 530
  • 681
  • The first word in each line is the name of the program being executed (`openssl` and `keytool`). The rest of the lines are the parameters. For understanding what the programs do with the parameters, do i.e. a `man openssl`. – user1934428 Apr 12 '23 at 06:15

1 Answers1

0

1º) openssl pkcs12 -export -in caseta.crt -inkey caseta.key -out caseta.p12 -name caseta

This command will create the file caseta in format PKCS12(PFX), from the private key(caseta.key) and certificate(caseta.crt)

2º) keytool -importkeystore -destkeystore lutron.keystore -srckeystore caseta.p12 -srcstoretype PKCS12 -srcstorepass secret -alias caseta

It will import the file p12 caseta.p12 and store on lutron.keystore for Java to use.

3º) keytool -importcert -file caseta-bridge.crt -keystore lutron.keystore -alias caseta-bridge

It will import the certificate caseta-bridge.crt and store on lutron.keystore for Java to use.

Marcelo Guedes
  • 1,419
  • 11
  • 10