Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve code review comments from PR 25148 #25205

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public HttpURLConnection createConnection(TLSClientParameters tlsClientParameter
if (HTTPS_URL_PROTOCOL_ID.equals(url.getProtocol())) {

if (tlsClientParameters == null) {
LOG.fine("tlsClientParameters is NULL, get new"); // Liberty Change
LOG.fine("tlsClientParameters is NULL, create new"); // Liberty Change
tlsClientParameters = new TLSClientParameters();
}

Expand Down Expand Up @@ -157,7 +157,6 @@ protected synchronized void decorateWithTLS(TLSClientParameters tlsClientParamet
LOG.fine("No trustManagers set on tlsClientParameters, so use Liberty's DefaultSSLSocketFactory");
socketFactory = HttpsURLConnection.getDefaultSSLSocketFactory();
}
// Liberty Change End
}
if (ctx != null) { // do we have SSL context?
LOG.fine("Create new socketFactory from SSLContext and set Ciphersuites");
Expand All @@ -174,8 +173,9 @@ protected synchronized void decorateWithTLS(TLSClientParameters tlsClientParamet
}

if (socketFactory != null) {
LOG.fine("SSL socketFactory: " + socketFactory.getClass().getCanonicalName()); // Liberty Change
LOG.fine("SSL socketFactory: " + socketFactory.getClass().getCanonicalName());
}
// Liberty Change End
//recalc the hashcode since some of the above MAY have changed the tlsClientParameters
lastTlsHash = tlsClientParameters.hashCode();
} else {
Expand All @@ -187,9 +187,8 @@ protected synchronized void decorateWithTLS(TLSClientParameters tlsClientParamet
.getHostnameVerifier(tlsClientParameters);

// Liberty Change Start
if (verifier != null) {
LOG.fine("Hostname verifier obtained from SSLUtils.getHostnameVerifier: " + verifier.getClass().getCanonicalName());
}
LOG.fine("Hostname verifier obtained from SSLUtils.getHostnameVerifier: " +
(verifier == null ? "null" : verifier.getClass().getCanonicalName()));

if (tlsClientParameters != null) {
LOG.fine("isDisableCNCheck value in tlsClientParameters: " + tlsClientParameters.isDisableCNCheck());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public Object run() {
}
});
performHostNameVerification = b.booleanValue();
LOG.fine("TS012061109: Property com.ibm.ssl.performURLHostNameVerification is set to: " + performHostNameVerification);
LOG.fine("Property com.ibm.ssl.performURLHostNameVerification is set to: " + performHostNameVerification);
}
// Liberty Change End

Expand All @@ -74,7 +74,7 @@ public static HostnameVerifier getHostnameVerifier(TLSClientParameters tlsClient
LOG.fine("isDisableCNCheck is true, setting verifier to AllowAllHostnameVerifier."); // Liberty Change
verifier = new AllowAllHostnameVerifier();
} else if (!performHostNameVerification) { // Liberty Change Start
LOG.fine("TS012061109: performHostNameVerification is false, setting verifier to AllowAllHostnameVerifier.");
LOG.fine("performHostNameVerification is false, setting verifier to AllowAllHostnameVerifier.");
verifier = new AllowAllHostnameVerifier(); // Liberty Change End
} else {
LOG.fine("Getting new DefaultHostnameVerifier from PublicSuffixMatcherLoader."); // Liberty Change
Expand Down