Unable to find valid certification path, jboss 5.1.0

☆樱花仙子☆ 提交于 2019-12-10 11:46:25

问题


When I am trying to invoke a SOAP webservice (.wsdl) that needs basic authentication over HTTPS from my local environment, I got the SSLHandShakeException.

First I have downloaded the certificate Cert.cer from the Chrome browser and followed the below steps.

1) keytool -genkey -dname "CN=localhost:8080, OU=Group Name, O=Company Name,L=City Name, S=State, C=IN" -alias "key_alias" -keyalg RSA -keypass changeit -keystore server.keystore 

2) copy server.keystore C:\Work\jboss-5.1.0.GA\server\default\conf

3) keytool -export -alias "key_alias" -file Cert.cer -keystore C:\Work\jboss-5.1.0.GA\server\default\conf\server.keystore

4) copy Cert.cer C:\Work\jboss-5.1.0.GA\server\default\conf

5) keytool -printcert -v -file C:\Work\jboss-5.1.0.GA\server\default\conf\Cert.cer

6) keytool -import -alias "key_alias" -file Cert.cer -keystore "C:\Program Files (x86)\Java\jdk1.6.0_03\jre\lib\security\cacerts"

In C:\Work\jboss-5.1.0.GA\server\default\deploy\jbossweb.sar\server.xml

<!-- SSL/TLS Connector configuration using the admin devl guide keystore-->
  <Connector name="https" protocol="HTTP/1.1" SSLEnabled="true" 
       port="8443" address="${jboss.bind.address}" keyAlias="key_alias"
       scheme="https" secure="true" clientAuth="false" 
       keystoreFile="C:\Work\jboss-5.1.0.GA\server\default\conf\server.keystore"
       keystorePass="changeit" sslProtocol = "TLS" />

After followed these steps, still I am facing the same exception as 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

2013-12-04 12:31:14,841 ERROR [STDERR] (http-127.0.0.1-8443-6) AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: 
faultString: 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
faultActor: 
faultNode: 
faultDetail: 
{http://xml.apache.org/axis/}stackTrace: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

what was the wrong in that? Could anyone helps me to find that??

来源:https://stackoverflow.com/questions/20369726/unable-to-find-valid-certification-path-jboss-5-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!