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