46
46
/**
47
47
* Utility for properly configuring the SSL Context based on client configuration settings.
48
48
*/
49
- class HttpsContextBuilder {
49
+ public class HttpsContextBuilder {
50
50
private static final Logger logger = LoggerFactory .getLogger (HttpsContextBuilder .class );
51
51
52
52
/**
@@ -89,7 +89,7 @@ public LayeredConnectionSocketFactory createSslSocketFactory() {
89
89
* Get HostnameVerifier instance based on client configuration.
90
90
* @return HostnameVerifier instance.
91
91
*/
92
- HostnameVerifier getHostnameVerifier () {
92
+ protected HostnameVerifier getHostnameVerifier () {
93
93
// If we're configured to ignore invalid certificates
94
94
if (configuration .getIgnoreInvalidSslCertificates ()) {
95
95
// Use the Noop verifier.
@@ -103,7 +103,7 @@ HostnameVerifier getHostnameVerifier() {
103
103
* Get properly configured SSLContext instance based on client configuration.
104
104
* @return SSLContext instance.
105
105
*/
106
- SSLContext getSslContext () {
106
+ protected SSLContext getSslContext () {
107
107
try {
108
108
// Create default SSLContext
109
109
final SSLContext sslcontext = SSLContexts .createDefault ();
@@ -121,7 +121,7 @@ SSLContext getSslContext() {
121
121
* Based on client configuration, construct KeyManager instances to use.
122
122
* @return Array of 0 or more KeyManagers.
123
123
*/
124
- KeyManager [] getKeyManagers () {
124
+ protected KeyManager [] getKeyManagers () {
125
125
// If not configured to use a KeyStore
126
126
if (configuration .getKeyStoreFile () == null ) {
127
127
// Return null array.
@@ -160,7 +160,7 @@ KeyManager[] getKeyManagers() {
160
160
* Based on Client Configuration, construct TrustManager instances to use.
161
161
* @return Array of 0 or more TrustManager instances.
162
162
*/
163
- TrustManager [] getTrustManagers () {
163
+ protected TrustManager [] getTrustManagers () {
164
164
try {
165
165
final TrustManagerFactory trustManagerFactory = TrustManagerFactory .getInstance (TrustManagerFactory .getDefaultAlgorithm ());
166
166
@@ -205,7 +205,7 @@ TrustManager[] getTrustManagers() {
205
205
* Get allowed SSL Protocols.
206
206
* @return allowed SslProtocols.
207
207
*/
208
- private String [] getSslProtocols () {
208
+ protected String [] getSslProtocols () {
209
209
return sslProtocols ;
210
210
}
211
211
}
0 commit comments