我正在java 1.4环境中进行Web服务调用。最近,Web服务服务器的证书已更改为SSL 2.
当我从我的应用程序进行Service调用时,将证书更改为SSL 2后,我得到了Exception。
org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: Certificate signature validation failed
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
Caused by: java.security.NoSuchAlgorithmException: 1.2.840.113549.1.1.11
Signature not available
at java.security.Security.getEngineClassName(Unknown Source)
at java.security.Security.getEngineClassName(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
at java.security.Signature.getInstance(Unknown Source)
at sun.security.x509.X509CertImpl.verify(Unknown Source)
at sun.security.x509.X509CertImpl.verify(Unknown Source)
... 61 more"
证书使用的算法是“SHA256WITHRSA”,这个OID在JRE1.4中不可用。
添加BouncyCastle Provider可以解决此问题?如果那么如何安装/使用它?
请建议。