0

As part of our project, we are pushing in the SSL certificates onto the rich clients which try to establish the connection with SSL based web servers through a windows batch script.

This script contains batch statements of the following sort:

%JRE_HOME%\bin\keytool.exe -importcert -alias tcaacc -file tc-acc.pdu.com.cer -keystore %JRE_HOME%\lib\security\cacerts -storepass changeit < say_yes_to_trust.txt >nul 2>nul

As you can see, the password is left exposed here. Is there a way to hide/mask this password from the script?. Please share your opinion.

We work with Windows.

Thanks, Pavan.

1

I suggest storing the password in a secure file. Then the script would read the file into a variable, and pass the password via a variable.

This will keep your password out of the script itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.