[英]How to import and trust a webserver certificate in java using keytool in a single command?
[英]How do I specific a file path to an existing SSL certificate using Java Keytool via Windows Command Prompt?
我找不到任何關於如何在 Keytool 中指定現有證書路徑的真實示例。 只有說明文件“文件路徑”的文檔。 如何輸入文件路徑? 當我運行此命令時:
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
我收到錯誤:
非法選項:Files\Apache
有人可以解釋並提供正確文件路徑語法的示例嗎? 謝謝!
首先確保你在你的 jdk bin 目錄中。
然后再試一次,但路徑用引號引起來:
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”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.