我试图在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