
[英]How is is possible that Java 11 validates a certificate whom intermediate certificate isn't avalaible in cacerts?
[英]Can't import certificate to cacerts
我有一個從我的CAS服務器重定向到的Web應用程序。 但是我有一個例外:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
所以我用谷歌搜索了一下,發現了很多關於它的話題。 我發現自己創建的證書必須位於javas cacerts
內部。 所以我想出了如何添加它:
keytool -import -alias tomcat -file tomcat.crt -keystore {path to cacerts}\cacerts
但是,我收到以下錯誤消息(德語/英語):
德語:
Keytool-Fehler: java.lang.Exception: Public Keys in Antwort und Keystore stimmen nicht überein
英文翻譯):
Keytool-Error: java.lang.Exception: Public Keys in the answer and keystore does not match
如何使公鑰匹配?
keytool -import -alias tomcat -file tomcat.crt -keystore {path to cacerts}\cacerts
您忽略了-trustcacerts
參數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.