Skip to content

Commit

Permalink
load tsa server from env variable TSA_SERVER
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Jun 20, 2024
1 parent 529c6b6 commit cf4918d
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit cf4918d

Please sign in to comment.