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

Load TSA server from env variable TSA_SERVER #6

Merged
merged 1 commit into from
Jun 20, 2024
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
6 changes: 4 additions & 2 deletions src/main/java/digital/slovensko/avm/core/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class App {

private static final Options options = new Options().
addOption("h", "help", false, "Print this command line help.").
addOption(null, "tsa-server", true, "Url of TimeStamp Authority server that should be used for timestamping in signature level BASELINE_T. If provided, BASELINE_T signatures are made.").
addOption(null, "tsa-server", true, "Url of TimeStamp Authority servers that should be used for timestamping in signature level BASELINE_T. Multiple values must be separated by comma. Overrides TSA_SERVER environment variable.").
addOption("p", "port", true, "Port to listen on.");

public static void start(String[] args) {
Expand All @@ -31,7 +31,9 @@ public static void start(String[] args) {
}

var port = Integer.parseInt(cmd.getOptionValue("port", "7200"));
var tsaServers = cmd.getOptionValue("tsa-server", "http://tsa.belgium.be/connect,http://tsa.izenpe.com,http://ts.quovadisglobal.com/eu,http://tsa.sep.bg,http://kstamp.keynectis.com/KSign,https://timestamp.sectigo.com/qualified");
var tsaServers = cmd.getOptionValue("tsa-server", System.getenv("TSA_SERVER"));
if (tsaServers == null)
tsaServers = "http://tsa.belgium.be/connect,http://ts.quovadisglobal.com/eu,http://tsa.sep.bg";

var timestampDataLoader = new TimestampDataLoader();
var tspSource = new CompositeTSPSource();
Expand Down