aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-07-23 13:06:40 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-07-23 13:06:40 +0200
commitbb8b42c45c9d59138e068cd630c744adb0a76d0a (patch)
tree3ad54200f6e1667b7c77b3d2fbe622dc9fe052d6
parentd480e4c2f897f7fdfdb73b193b3e21417baf4ead (diff)
downloadmoa-id-spss-bb8b42c45c9d59138e068cd630c744adb0a76d0a.tar.gz
moa-id-spss-bb8b42c45c9d59138e068cd630c744adb0a76d0a.tar.bz2
moa-id-spss-bb8b42c45c9d59138e068cd630c744adb0a76d0a.zip
Add qualified timestamp identifier to TSL implementation.
This code is actually not active.
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/tsl/connector/TSLConnector.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/tsl/connector/TSLConnector.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/tsl/connector/TSLConnector.java
index 3a004a81d..4699c6109 100644
--- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/tsl/connector/TSLConnector.java
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/tsl/connector/TSLConnector.java
@@ -42,6 +42,8 @@ import java.nio.channels.FileChannel;
import java.security.Security;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
@@ -61,10 +63,19 @@ import at.gv.egovernment.moa.spss.tsl.utils.TSLImportFromFileContext;
public class TSLConnector implements TSLConnectorInterface {
static final String _QCSSCDURI = "http://uri.etsi.org/TrstSvc/eSigDir-1999-93-EC-TrustedList/SvcInfoExt/QCWithSSCD";
- static final String _STYPETEMPLATE = "CA/QC";
+ static final String _STYPETEMPLATE_CAQC = "CA/QC";
+ static final String _STYPETEMPLATE_TSAQTST = "TSA/QTST";
private static final String DEFAULT_HASHCACHE_DIR = "./hashcache/";
+ static final List<String> STYPETEMPLATES = Collections.unmodifiableList(new ArrayList<String>(){
+ private static final long serialVersionUID = 1L;
+ {
+ add(_STYPETEMPLATE_CAQC);
+ add(_STYPETEMPLATE_TSAQTST);
+ }
+ });
+
static Logger log = Logger.getLogger(TSLConnector.class);
@@ -612,13 +623,13 @@ public class TSLConnector implements TSLConnectorInterface {
readConnection, false, false);
log.debug("### Connected ###");
-
+ //TODO: maybe add "TSA/QTST for qualified timestamps
try {
TSLCertsExporter certsExporter;
certsExporter = tslEngine.createCertsExporter(
readConnection,
countries,
- new String[]{_STYPETEMPLATE},
+ new String[]{_STYPETEMPLATE_CAQC},
serviceLevelStatus
);
@@ -690,8 +701,8 @@ public class TSLConnector implements TSLConnectorInterface {
log.info("Cert: " + resultmap.getKey().getSubjectDN() + " sType=" + sType);
-
- if (sType.equals(_STYPETEMPLATE))
+ //TODO: maybe add "TSA/QTST for qualified timestamps
+ if (sType.equals(_STYPETEMPLATE_CAQC))
return true;
else
return false;