Skip to content

Commit

Permalink
Merge pull request #477 from slovensko-digital/fix-handle-null-tsp
Browse files Browse the repository at this point in the history
handle null tsp source in user settings
  • Loading branch information
celuchmarek authored Jul 1, 2024
2 parents 288de83 + ef90d0a commit a88d439
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/digital/slovensko/autogram/core/UserSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ public String getTsaServer() {
}

public void setTsaServer(String value) {
// set default TSA if older problematic default is set
if (List.of("http://tsa.izenpe.com", "http://kstamp.keynectis.com/KSign/").contains(value))
value = "http://tsa.belgium.be/connect,http://ts.quovadisglobal.com/eu,http://tsa.sep.bg";

tsaServer = value;
if (value == null) {
tspSource = null;
return;
}

// set default TSA if older problematic default is set
if (List.of("http://tsa.izenpe.com", "http://kstamp.keynectis.com/KSign/").contains(value))
value = "http://tsa.belgium.be/connect,http://ts.quovadisglobal.com/eu,http://tsa.sep.bg";

tsaServer = value;
tspSource = new CompositeTSPSource();
var timestampDataLoader = new TimestampDataLoader();
var tspSources = new HashMap<String, TSPSource>();
Expand Down

0 comments on commit a88d439

Please sign in to comment.