Created
August 19, 2021 06:31
-
-
Save Glamdring/2fb9d723ef8ea229c39742e94e477135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yourcomany.util.net; | |
import org.springframework.integration.ip.tcp.connection.DefaultTcpNioSSLConnectionSupport; | |
import org.springframework.integration.ip.tcp.connection.TcpSSLContextSupport; | |
import javax.net.ssl.SSLEngine; | |
/** | |
* NIO Connection support for optional TLS Mutual authentication | |
*/ | |
public class TLSMutualNioConnectionSupport extends DefaultTcpNioSSLConnectionSupport { | |
public TLSMutualNioConnectionSupport(TcpSSLContextSupport sslContextSupport) { | |
super(sslContextSupport); | |
} | |
public TLSMutualNioConnectionSupport(TcpSSLContextSupport sslContextSupport, boolean sslVerifyHost) { | |
super(sslContextSupport, sslVerifyHost); | |
} | |
@Override | |
protected void postProcessSSLEngine(SSLEngine sslEngine) { | |
sslEngine.setWantClientAuth(true); | |
super.postProcessSSLEngine(sslEngine); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment