Temporarily restore SslFactory.sslContext() helper
Temporarily restore the SslFactory.sslContext() function, which some connectors use. This function is not a public API and it will be removed eventually. For now, we will mark it as deprecated.
@@ -26,6 +26,7 @@ import org.apache.kafka.common.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLException;
@@ -168,6 +169,11 @@ public class SslFactory implements Reconfigurable {
return sslEngineBuilder.createSslEngine(mode, peerHost, peerPort, endpointIdentification);
}
+ @Deprecated
+ public SSLContext sslContext() {
+ return sslEngineBuilder.sslContext();
+ }
+
public SslEngineBuilder sslEngineBuilder() {
return sslEngineBuilder;
}
