问题描述
项目部署在环境:Websphere7.0OS:IBMAIX其中需要在JAVA类中使用证书,通过AXIS2.0技术访问其他系统提供的webservice方法涉及到两个证书一个JKS类型一个cer类型程序中加载证书代码如下System.setProperty("javax.net.ssl.keyStore",WebConfig.getProperty("LMFFT_JKS"));System.setProperty("javax.net.ssl.keyStorePassword",WebConfig.getProperty("LMFFT_PASSWORD"));System.setProperty("javax.net.ssl.trustStore",WebConfig.getProperty("LMFFT_CER"));System.setProperty("javax.net.ssl.trustStorePassword",WebConfig.getProperty("LMFFT_PASSWORD"));并通过WEBSPHERE的默认的JAVA运行环境的KEYtool工具导入CER证书可还是报了如下错误:org.apache.axis2.AxisFault:javax.net.ssl.SSLHandshakeException:com.ibm.jsse2.util.g:PKIXpathbuildingfailed:java.security.cert.CertPathBuilderException:PKIXCertPathBuilderImplcouldnotbuildavalidCertPath.;internalcauseis:java.security.cert.CertPathValidatorException:ThecertificateissuedbyO=CitigroupQACA1,C=USisnottrusted;internalcauseis:java.security.cert.CertPathValidatorException:Certificatechainingerror赐教大家还有在服务器TOMCAT下可以调用webservice接口
解决方案
本帖最后由 bhzhlff 于 2012-10-10 00:06:25 编辑
解决方案二:
现在发现系统中有两处验证1处是LDAP验证System.setProperty("javax.net.ssl.trustStore",“导入JDK之后生产的验证证书”);2另外一处是axis2.0使用HTTPS调用webserviceSystem.setProperty("javax.net.ssl.keyStore",“对方提供的JKS文件”);System.setProperty("javax.net.ssl.keyStorePassword",“对方提供的密码”);如果先启动1LDAP验证那么1会验证成功,那么验证2的时候报org.apache.axis2.AxisFault:javax.net.ssl.SSLHandshakeException:com.ibm.jsse2.util.g:PKIXpathbuildingfailed:java.security.cert.CertPathBuilderException:PKIXCertPathBuilderImplcouldnotbuildavalidCertPath.;internalcauseis:java.security.cert.CertPathValidatorException:ThecertificateissuedbyO=CitigroupQACA1,C=USisnottrusted;internalcauseis:java.security.cert.CertPathValidatorException:Certificatechainingerror如果先启动2验证2验证也会成功,那么验证1的时候报org.apache.axis2.AxisFault:javax.net.ssl.SSLHandshakeException:com.ibm.jsse2.util.g:PKIXpathbuildingfailed:java.security.cert.CertPathBuilderException:PKIXCertPathBuilderImplcouldnotbuildavalidCertPath.;internalcauseis:java.security.cert.CertPathValidatorException:ThecertificateissuedbyO=CitigroupQACA1,C=USisnottrusted;internalcauseis:java.security.cert.CertPathValidatorException:Certificatechainingerror请赐教大家