【发布时间】:2015-04-20 02:50:43
【问题描述】:
我有一个关于 SSLHandshakeException talking to a https Web service using Spring WebServiceTemplate
博罗达克回答
“无需将密钥导入密钥库。”
如果我们不提供密钥库,那么 Httpclient 将使用什么来发送 SSL 握手的客户端证书?
我需要调用业务伙伴的 Web 服务 -
a) 使用公钥证书 X 使用 SSL 进行身份验证
b) 使用公钥证书对 SOAP 消息进行加密和签名 Y
我想我需要将证书 Y 指定为以下内容:
<bean class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="securementActions" value="Signature"/>
<property name="securementSignatureKeyIdentifier" value="DirectReference"/>
<property name="securementUsername" value="mycert"/>
<property name="securementPassword" value="certpass"/>
<property name="securementSignatureCrypto">
<bean class="org.springframework.ws.soap.security.wss4j.support.CryptoFactoryBean">
<property name="keyStorePassword" value="123456"/>
<property name="keyStoreLocation" value="classpath:/keystore.jks"/>
</bean>
</property>
</bean>
我不确定如何/在何处为 SSL 握手指定证书 X。我认为它是 HttpClient,但我没有在 borodark 发布的 XML 中看到它。
请帮忙!
【问题讨论】:
标签: ssl spring-ws webservicetemplate