Java如何处理Spring Ws中的证书? [英] How does Java handle Certificates in Spring Ws?
问题描述
我需要使用Spring Ws使用Web服务。我正在使用WEB服务模板。
我需要知道,只需在java密钥库和信任中指定证书,证书的发送和接收是否会自动发生?如果正确配置密钥库和信任,或者我是否必须编写一些代码,那么服务器证书的验证是否会在Spring Ws中自动发生?如果不是,我是否在Spring WS中发送和接收证书?
I need to consume a web Service using Spring Ws . I am using WEB service Template. I need to know that by only specifying the certificates in java keystore and trustore will the sending and receiving of certificates happen automatically? Also will the verification of server certificates happen automatically in Spring Ws if the keystore and trustore is configured properly or do I have to write some code?if not Ho do I send and receive certificates in Spring WS?
推荐答案
一旦你有选择您想要使用的安全拦截器。假设您拥有所有证书,您可以按照以下链接为每个安全拦截器设置一个或两个ssl。这个链接不是最新的,但应该让你开始。
Once you have selected the security interceptor you like to use. Assuming you have all the certificates handy, you can follow below links to set up the one or two way ssl for each of the security interceptor. This links are not most up to date but should get you started.
XwsSecurityInterceptor
Wss4jSecurityInteceptor
这篇关于Java如何处理Spring Ws中的证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!