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

Fix for issue #106 as discussed #118

Merged
merged 1 commit into from
Aug 19, 2024
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 @@ -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
Loading