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

RUN-989: Fix #453 RD_INSECURE_SSL causes npe #454

Merged
merged 1 commit into from
Jun 15, 2022
Merged
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
5 changes: 3 additions & 2 deletions rd-cli-tool/src/main/java/org/rundeck/client/tool/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.rundeck.client.tool.extension.RdCommandExtension;
import org.rundeck.client.tool.extension.RdTool;
import org.rundeck.client.tool.format.*;
import org.rundeck.client.tool.output.SystemOutput;
import org.rundeck.client.tool.util.ExtensionLoaderUtil;
import org.rundeck.client.tool.util.Resources;
import org.rundeck.client.util.*;
Expand Down Expand Up @@ -348,17 +349,17 @@ public static void setup(final Rd rd, RdBuilder builder) {

boolean insecureSsl = rd.getBool(ENV_INSECURE_SSL, false);
boolean insecureSslNoWarn = rd.getBool(ENV_INSECURE_SSL_NO_WARN, false);
rd.setOutput(builder.finalOutput());
if (insecureSsl && !insecureSslNoWarn) {
rd.getOutput().warning(
"# WARNING: RD_INSECURE_SSL=true, no hostname or certificate trust verification will be performed");
}
rd.setOutput(builder.finalOutput());
}

static class Rd extends ConfigBase implements RdApp, RdClientConfig, Closeable {
private final Resources resources = new Resources();
Client<RundeckApi> client;
private CommandOutput output;
private CommandOutput output = new SystemOutput();

public Rd(final ConfigValues src) {
super(src);
Expand Down