Skip to content

Commit 415bb2b

Browse files
authored
Merge pull request #84 from strokyl/allow_using_custom_ssl_factory
Allow lib user to change ssl factory
2 parents 3ea4089 + 96166fc commit 415bb2b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/org/sourcelab/kafka/connect/apiclient/rest/HttpsContextBuilder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/**
4747
* Utility for properly configuring the SSL Context based on client configuration settings.
4848
*/
49-
class HttpsContextBuilder {
49+
public class HttpsContextBuilder {
5050
private static final Logger logger = LoggerFactory.getLogger(HttpsContextBuilder.class);
5151

5252
/**
@@ -89,7 +89,7 @@ public LayeredConnectionSocketFactory createSslSocketFactory() {
8989
* Get HostnameVerifier instance based on client configuration.
9090
* @return HostnameVerifier instance.
9191
*/
92-
HostnameVerifier getHostnameVerifier() {
92+
protected HostnameVerifier getHostnameVerifier() {
9393
// If we're configured to ignore invalid certificates
9494
if (configuration.getIgnoreInvalidSslCertificates()) {
9595
// Use the Noop verifier.
@@ -103,7 +103,7 @@ HostnameVerifier getHostnameVerifier() {
103103
* Get properly configured SSLContext instance based on client configuration.
104104
* @return SSLContext instance.
105105
*/
106-
SSLContext getSslContext() {
106+
protected SSLContext getSslContext() {
107107
try {
108108
// Create default SSLContext
109109
final SSLContext sslcontext = SSLContexts.createDefault();
@@ -121,7 +121,7 @@ SSLContext getSslContext() {
121121
* Based on client configuration, construct KeyManager instances to use.
122122
* @return Array of 0 or more KeyManagers.
123123
*/
124-
KeyManager[] getKeyManagers() {
124+
protected KeyManager[] getKeyManagers() {
125125
// If not configured to use a KeyStore
126126
if (configuration.getKeyStoreFile() == null) {
127127
// Return null array.
@@ -160,7 +160,7 @@ KeyManager[] getKeyManagers() {
160160
* Based on Client Configuration, construct TrustManager instances to use.
161161
* @return Array of 0 or more TrustManager instances.
162162
*/
163-
TrustManager[] getTrustManagers() {
163+
protected TrustManager[] getTrustManagers() {
164164
try {
165165
final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
166166

@@ -205,7 +205,7 @@ TrustManager[] getTrustManagers() {
205205
* Get allowed SSL Protocols.
206206
* @return allowed SslProtocols.
207207
*/
208-
private String[] getSslProtocols() {
208+
protected String[] getSslProtocols() {
209209
return sslProtocols;
210210
}
211211
}

0 commit comments

Comments
 (0)