0

I have been using Spring Integration to communicate with server over SSL. When I used Spring Boot version as 2.0.5.RELEASE and Spring Integration version as 5.0.8.RELEASE there is no problem. Communication works very well.

But if I use Spring Boot version as 2.2.13.RELEASE and Spring Integration version 5.2.11.RELEASE, I got this error:

Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[?:1.8.0_221]
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946) ~[?:1.8.0_221]
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316) ~[?:1.8.0_221]
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310) ~[?:1.8.0_221]
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639) ~[?:1.8.0_221]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223) ~[?:1.8.0_221]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037) ~[?:1.8.0_221]
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:965) ~[?:1.8.0_221]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064) ~[?:1.8.0_221]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367) ~[?:1.8.0_221]
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:931) ~[?:1.8.0_221]
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) ~[?:1.8.0_221]
    at org.springframework.integration.ip.tcp.serializer.ByteArrayLengthHeaderSerializer.read(ByteArrayLengthHeaderSerializer.java:191) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at org.springframework.integration.ip.tcp.serializer.ByteArrayLengthHeaderSerializer.readHeader(ByteArrayLengthHeaderSerializer.java:255) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at com.paycore.acquirer.innovectives.integration.tcp.serializer.InnovectivesByteArraySerializer.readHeader(InnovectivesByteArraySerializer.java:32) ~[classes/:?]
    at org.springframework.integration.ip.tcp.serializer.ByteArrayLengthHeaderSerializer.deserialize(ByteArrayLengthHeaderSerializer.java:138) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at com.paycore.acquirer.innovectives.integration.tcp.serializer.InnovectivesByteArraySerializer.deserialize(InnovectivesByteArraySerializer.java:54) ~[classes/:?]
    at com.paycore.acquirer.innovectives.integration.tcp.serializer.InnovectivesByteArraySerializer.deserialize(InnovectivesByteArraySerializer.java:17) ~[classes/:?]
    at org.springframework.integration.ip.tcp.connection.TcpNetConnection.getPayload(TcpNetConnection.java:137) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at org.springframework.integration.ip.tcp.connection.TcpMessageMapper.toMessage(TcpMessageMapper.java:176) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at org.springframework.integration.ip.tcp.connection.TcpMessageMapper.toMessage(TcpMessageMapper.java:63) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at org.springframework.integration.mapping.InboundMessageMapper.toMessage(InboundMessageMapper.java:41) ~[spring-integration-core-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at org.springframework.integration.ip.tcp.connection.TcpNetConnection.run(TcpNetConnection.java:196) ~[spring-integration-ip-5.2.11.RELEASE.jar:5.2.11.RELEASE]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_221]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_221]
    ... 1 more
İlkay Gunel
  • 515
  • 1
  • 5
  • 15
  • The error message refers to the certificate of the server, which is missing subject alternative names. You need to fix this server side certificate. – Steffen Ullrich Sep 20 '21 at 07:41

0 Answers0