Skip to content

Commit 8367148

Browse files
authored
Merge pull request #206 from splunk/DVPL-11907
Update HttpService.java
2 parents 2968934 + 7de566c commit 8367148

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

splunk/src/main/java/com/splunk/HttpService.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,12 @@ public static SSLSocketFactory getSSLSocketFactory() {
558558
return HttpService.sslSocketFactory;
559559
}
560560

561-
public static void setValidateCertificates(boolean validateCertificates) {
562-
HttpService.validateCertificates = validateCertificates;
561+
public static void setValidateCertificates(boolean validateCertificate) {
562+
// update the SSL_SOCKET_FACTORY if validateCertificates flag is changed
563+
if (validateCertificates != validateCertificate) {
564+
validateCertificates = validateCertificate;
565+
sslSocketFactory = createSSLFactory();
566+
}
563567
}
564568

565569
public static SSLSocketFactory createSSLFactory() {

0 commit comments

Comments
 (0)