Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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