我試圖在NetBeans IDE上的項目上啓用SSL並使用Glassfish應用服務器。在Glassfish應用服務器中導入SSL證書
對於SSL;我遵循以下程序。
- 生成的密鑰庫>
keytool -genkey -alias client_keystore -keyalg RSA -keystore client_keystore.jks -keysize 2048
- 生成CSR>
keytool -certreq -alias client_keystore -file yourcsrname.csr -keystore client_keystore.jks
- 提交CSR給另一方。
- 收到派對的三份.pem證書。我將.pem轉換爲.crt爲
openssl x509 -outform der -in your-cert.pem -out your-cert.crt
- 將證書導入到我的密鑰存儲庫,如下所示;
keytool -import -trustcacerts -alias intermediate -file GoDaddy_Intermediate.crt -keystore client_keystore.jks
keytool -import -trustcacerts -alias root -file GoDaddy_Root.crt -keystore client_keystore.jks
keytool -import -trustcacerts -alias BizSwitch -file BizSwitch.crt -keystore client_keystore.jks
- 導入密鑰庫到默認的glassfish密鑰庫>
keytool -importkeystore -srckeystore ~/Downloads/ipay/client_keystore.jks -destkeystore keystore.jks
- 重新啓動的GlassFish服務器。
我不確定這是否全部,但我得到了sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
異常。
重新啓動時,從glassfish日誌中我也沒有看到加載的證書。
我錯過了什麼嗎?
是的,密鑰庫位於/ configs目錄中。 ....我無法解決它爲什麼沒有。 – user6721269