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

TS-40767 apply shouldValidateSsl option before attempting to contact … #591

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
@@ -1,6 +1,6 @@
package com.teamscale.jacoco.agent;

import com.teamscale.client.HttpUtils;

Check warning on line 3 in agent/src/main/java/com/teamscale/jacoco/agent/PreMain.java

View check run for this annotation

cqse.teamscale.io / teamscale-findings

agent/src/main/java/com/teamscale/jacoco/agent/PreMain.java#L3

Unused import: `com.teamscale.client.HttpUtils` https://cqse.teamscale.io/findings/details/teamscale-jacoco-agent?t=ts%2F40767_ignore_ssl_validation_before_contacting_teamscale%3AHEAD&id=3936FA180430B65C39237FC50C74BCFA
import com.teamscale.jacoco.agent.configuration.AgentOptionReceiveException;
import com.teamscale.jacoco.agent.options.AgentOptionParseException;
import com.teamscale.jacoco.agent.options.AgentOptions;
Expand Down Expand Up @@ -129,7 +129,6 @@
initializeLogging(agentOptions, delayedLogger);
Logger logger = LoggingUtils.getLogger(Agent.class);
delayedLogger.logTo(logger);
HttpUtils.setShouldValidateSsl(agentOptions.shouldValidateSsl());
return agentOptions;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.teamscale.jacoco.agent.options;

import com.google.common.annotations.VisibleForTesting;
import com.teamscale.client.HttpUtils;
import com.teamscale.client.ProxySystemProperties;
import com.teamscale.client.StringUtils;
import com.teamscale.client.TeamscaleProxySystemProperties;
Expand Down Expand Up @@ -107,6 +108,7 @@ public static AgentOptions parse(String optionsString, String environmentConfigI
// we have to put the proxy options into system properties before reading the configuration from Teamscale as we
// might need them to connect to Teamscale
putTeamscaleProxyOptionsIntoSystemProperties(options);
HttpUtils.setShouldValidateSsl(options.shouldValidateSsl());

handleConfigId(options);
handleConfigFile(options);
Expand Down
Loading