Skip to content

Commit

Permalink
Merge pull request #118 from doyensec:fixed_issue_106
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 664842400
Change-Id: Idd8cec64fac4e8825032a938ca37ea8881f3f766
  • Loading branch information
copybara-github committed Aug 19, 2024
2 parents 315dfe1 + e325994 commit 267bafd
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public abstract static class Builder<T extends HttpClient> {

public abstract Builder<T> setFollowRedirects(boolean followRedirects);

public abstract Builder<T> setTrustAllCertificates(boolean trustAllCertificates);

public abstract Builder<T> setLogId(String logId);

public abstract Builder<T> setConnectTimeout(Duration connectionTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public final class HttpClientCliOptions implements CliOption {

@Parameter(
names = "--http-client-trust-all-certificates",
arity = 1,
description = "Whether the HTTP client should trust all certificates on HTTPS traffic.")
public Boolean trustAllCertificates;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ boolean shouldTrustAllCertificates(
if (httpClientConfigProperties.trustAllCertificates != null) {
return httpClientConfigProperties.trustAllCertificates;
}
return false;
return true;
}

@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,6 @@ public OkHttpHttpClientBuilder setFollowRedirects(boolean followRedirects) {
return this;
}

@Override
public OkHttpHttpClientBuilder setTrustAllCertificates(boolean trustAllCertificates) {
this.trustAllCertificates = trustAllCertificates;
return this;
}

@Override
public OkHttpHttpClientBuilder setLogId(String logId) {
this.logId = logId;
Expand Down

0 comments on commit 267bafd

Please sign in to comment.