【问题标题】:Java TLS 1.2 with client authentication error openjdk 1.8Java TLS 1.2 与客户端身份验证错误 openjdk 1.8
【发布时间】:2021-08-09 14:03:09
【问题描述】:

当我尝试使用客户端身份验证调用 restTemplate 时,我在 ssl 握手期间收到以下错误。 我的 linux 平台上的 java -version OpenJDK 运行时环境(build 1.8.0_282-b08)

谁能帮我解决这个问题,或者至少找到正确的方法来看待这个问题?

at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:696)
        at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:662)
        at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:613)
        at cz.trask.ecom.acs2.threedsecure.inte.tm.client.ThreadSecurityLevelCsasConnector.doExchange(ThreadSecurityLevelCsasConnector.java:101)
        ... 316 common frames omitted
Caused by: javax.net.ssl.SSLException: No supported CertificateVerify signature algorithm for RSA  key
        at sun.security.ssl.Alert.createSSLException(Alert.java:133)
        at sun.security.ssl.Alert.createSSLException(Alert.java:117)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:311)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:258)
        at sun.security.ssl.CertificateVerify$T12CertificateVerifyMessage.<init>(CertificateVerify.java:597)
        at sun.security.ssl.CertificateVerify$T12CertificateVerifyProducer.produce(CertificateVerify.java:760)

【问题讨论】:

    标签: java ssl java-8 tls1.2 resttemplate


    【解决方案1】:

    看来我的 Key 实现类需要实现 Length 接口。因此 TLS 握手能够确定密钥 sun.security.util.Length。奇怪的是jdk补丁发生了这样的变化。

    【讨论】:

      猜你喜欢
      • 2016-07-09
      • 1970-01-01
      • 2015-03-01
      • 1970-01-01
      • 2022-10-13
      • 2014-11-06
      • 1970-01-01
      • 2014-01-29
      • 2014-08-24
      相关资源
      最近更新 更多