Understand shell script

31 Views Asked by At
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?

1

There are 1 best solutions below

0
Marcelo Guedes On

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.