File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/org/sourcelab/kafka/connect/apiclient/rest Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2121import org .apache .http .conn .ssl .NoopHostnameVerifier ;
2222import org .apache .http .conn .ssl .SSLConnectionSocketFactory ;
2323import org .apache .http .ssl .SSLContexts ;
24+ import org .slf4j .Logger ;
25+ import org .slf4j .LoggerFactory ;
2426import org .sourcelab .kafka .connect .apiclient .Configuration ;
2527
2628import javax .net .ssl .HostnameVerifier ;
4244 * Utility for properly configuring the SSL Context based on client configuration settings.
4345 */
4446class HttpsContextBuilder {
47+ private static final Logger logger = LoggerFactory .getLogger (HttpsContextBuilder .class );
48+
4549 /**
4650 * Accept TLS1.2, 1.1, and 1.0 protocols.
4751 */
@@ -134,6 +138,11 @@ private String[] getSslProtocols() {
134138 * @return SslSocketFactory instance.
135139 */
136140 LayeredConnectionSocketFactory createSslSocketFactory () {
141+ // Emit an warning letting everyone know we're using an insecure configuration.
142+ if (configuration .getIgnoreInvalidSslCertificates ()) {
143+ logger .warn ("Using insecure configuration, skipping server-side certificate validation checks." );
144+ }
145+
137146 return new SSLConnectionSocketFactory (
138147 getSslContext (),
139148 getSslProtocols (),
You can’t perform that action at this time.
0 commit comments