Java Spring WS 和 SSLHandshakeException

发布于 2025-01-11 19:53:43 字数 1436 浏览 0 评论 0原文

我正在尝试调用意大利网络服务,但遇到 SSLHandshakeException 异常。我知道这是一个安全信任问题,我应该有一个证书来允许我使用 SSL 进行通信。我想知道是否有人可以帮助我了解接下来的步骤以及如何生成有效的证书来与网络服务进行通信。安全不是我的海滩:)

意大利网络服务有一个 zip 文件夹,里面有一个供开发人员使用的工具,他们有两个证书,但我不知道应该用它们做什么。您可以在这里看到:https://sistemats1.sanita.finanze.it/portale/spese-sanitarie/documenti-e-specifiche-tecniche-strumenti-per-lo-sviluppo

Zip 文件链接:(https://sistemats1.sanita.finanze.it/portale/documents/20182/34450/kit730P_ver_20210301.zip/027086e7-385a-6071-ca86-f52077923a85

您可以在这里看到我的实验代码:<一个href="https://github.com/nbentoneves/ws-spring-sts/blob/main/src/main/java/com/github/STSClient.java" rel="nofollow noreferrer">https://github.com/src/main/java/com/github/STSClient.java" com/nbentoneves/ws-spring-sts/blob/main/src/main/java/com/github/STSClient.java,请随意克隆并尝试。

注意:在开发工具包中,他们有一个肥皂项目,我不需要任何东西就可以调用网络服务。

STS测试环境:https://invioSS730pTest.sanita.finanze.it/DocumentoSpesa730pWeb/DocumentoSpesa730pPort

谢谢,

祝您代码愉快:)

I'm trying to call an Italian webservice, but I'm getting an SSLHandshakeException exception. I know this is a security trust problem and I should have a certificate to allow me to communicate using SSL. I would like to know if someone can help me to understand what should be the next steps and how can I generate a valid certificate to communicate with the webservice. Security is not my beach :)

The Italian webservice has a zip folder with a tool for developers and they have there two certificates, but I don't know what I should do with them. YOu can see here: https://sistemats1.sanita.finanze.it/portale/spese-sanitarie/documenti-e-specifiche-tecniche-strumenti-per-lo-sviluppo

Link to the Zip file: (https://sistemats1.sanita.finanze.it/portale/documents/20182/34450/kit730P_ver_20210301.zip/027086e7-385a-6071-ca86-f52077923a85)

You can see my experimental code here: https://github.com/nbentoneves/ws-spring-sts/blob/main/src/main/java/com/github/STSClient.java, feel free to clone and try it.

Note: In the development kit they have a soap project and I was able to call the webservice without needing anything.

STS Test Environment: https://invioSS730pTest.sanita.finanze.it/DocumentoSpesa730pWeb/DocumentoSpesa730pPort

Thanks,

Have a nice code time :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷…雨湿花 2025-01-18 19:53:44

您需要创建一个信任管理器,它不像默认的那样验证证书链。

检查一下:
如何解决 javax.net.ssl.SSLHandshakeException 错误?)

You need to create a Trust Manager which does not validate certificate chains like the default ones.

Check this:
(How to solve javax.net.ssl.SSLHandshakeException Error?)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文