RestTemplate证书问题

时间:2018-01-05 03:15:07

标签: ssl spring-boot https resttemplate

我在RestTemplate请求标头中传递证书。我得到403禁止错误。在打电话给Web服务之前,如何在结束时显示证书信息?我使用下面的代码在请求标头中传递证书。

What is the right way to send a client certificate with every request made by the resttemplate in spring?

1 个答案:

答案 0 :(得分:0)

不确定403因为我是证书和新手的新手这些东西,但是对于你的其他问题(我知道这已经很晚了,但可能会帮助那些遇到这个页面的人):

用于检查的Java Keytool命令:

keytool附带JDK

如果需要检查证书或Java密钥库中的信息,请使用这些命令。

检查独立证书:

  

keytool -printcert -v -file mydomain.crt

检查Java密钥库中的证书:

  

keytool -list -v -keystore keystore.jks

使用别名检查特定的密钥库条目:

  

keytool -list -v -keystore keystore.jks -alias mydomain

首先,我建议您在休息客户端验证您是否能够通过导入cert&amp ;;来访问其余端点。关键文件:

https://www.getpostman.com/docs/v6/postman/sending_api_requests/certificates

有用的链接:

https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html

相关问题