I cannot find any real world examples of how to specify a path to my existing certificate in Keytool. Only documentation that states -file "path to file". How do I enter the file path? When I run this command:
keytool -importcert -trustcacerts -keystore keystore.p12 -storetype pkcs12 -alias myAlias -file C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf\SSL\my_ssl_certificate.cer
I get the error:
Illegal option: Files\Apache
Can someone please explain and provide an example of correct file path syntax? Thanks!
CodePudding user response:
First make sure you’re in your jdk bin dir.
Then try again, but with the path in quotes:
keytool -importcert -trustcacerts -keystore keystore.p12 -storetype pkcs12 -alias myAlias -file “C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf\SSL\my_ssl_certificate.cer”