aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-08-05 12:13:37 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-08-05 12:13:37 +0000
commit664d28dce2c23cd324fae76c40ad07b023e27129 (patch)
treef485cf16a8622c92a754c7d3185ee342e4878f1e /spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki
parent4f170b89a4ec0581b6701892522f0a808b28290b (diff)
downloadmoa-id-spss-664d28dce2c23cd324fae76c40ad07b023e27129.tar.gz
moa-id-spss-664d28dce2c23cd324fae76c40ad07b023e27129.tar.bz2
moa-id-spss-664d28dce2c23cd324fae76c40ad07b023e27129.zip
Bug 271: Adpation auf neue Struktur des Konfigurationsfiles abgeschlossen. Noch ungetestet.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@414 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java23
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java16
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java20
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java26
4 files changed, 41 insertions, 44 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
index c204eface..76f03ae07 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
@@ -4,9 +4,6 @@ import iaik.pki.PKIProfile;
import iaik.pki.pathvalidation.ValidationProfile;
import iaik.pki.revocation.RevocationProfile;
import iaik.pki.store.truststore.TrustStoreProfile;
-
-import at.gv.egovernment.moa.util.BoolUtils;
-
import at.gv.egovernment.moa.spss.MOAApplicationException;
import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
import at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation.ValidationProfileImpl;
@@ -54,14 +51,9 @@ public class PKIProfileImpl implements PKIProfile {
/**
* @see iaik.pki.PKIProfile#autoAddCertificates()
*/
- public boolean autoAddCertificates() {
- String boolStr =
- config.getGenericConfiguration(
- ConfigurationProvider.AUTO_ADD_CERTIFICATES_PROPERTY,
- "true");
- boolean boolValue = BoolUtils.valueOf(boolStr);
-
- return useAuthorityInfoAccess() ? true : boolValue;
+ public boolean autoAddCertificates()
+ {
+ return useAuthorityInfoAccess() ? true : config.getAutoAddCertificates();
}
/**
@@ -116,12 +108,9 @@ public class PKIProfileImpl implements PKIProfile {
/**
* @see iaik.pki.PKIProfile#useAuthorityInfoAccess()
*/
- public boolean useAuthorityInfoAccess() {
- String boolStr =
- config.getGenericConfiguration(
- ConfigurationProvider.USE_AUTHORITY_INFO_ACCESS_PROPERTY,
- "true");
- return BoolUtils.valueOf(boolStr);
+ public boolean useAuthorityInfoAccess()
+ {
+ return config.getUseAuthorityInfoAccess();
}
}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
index a2e3d6766..a4d7ea7fa 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
@@ -2,13 +2,11 @@ package at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation;
import iaik.pki.pathvalidation.ValidationProfile;
-import at.gv.egovernment.moa.util.BoolUtils;
-
-import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
-
import java.util.Collections;
import java.util.Set;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
/**
* An implementation of the <code>ValidationProfile</code> interface providing
* information about certificat path validation.
@@ -101,13 +99,9 @@ public class ValidationProfileImpl implements ValidationProfile {
/**
* @see iaik.pki.pathvalidation.ValidationProfile#getRevocationChecking()
*/
- public boolean getRevocationChecking() {
- String checkingStr =
- config.getGenericConfiguration(
- ConfigurationProvider.REVOCATION_CHECKING_PROPERTY,
- "true");
-
- return BoolUtils.valueOf(checkingStr);
+ public boolean getRevocationChecking()
+ {
+ return config.getEnableRevocationChecking();
}
} \ No newline at end of file
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
index 186d24934..164ae8a75 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
@@ -18,7 +18,7 @@ import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
public class RevocationProfileImpl implements RevocationProfile {
/** The default service order. */
private static final String[] DEFAULT_SERVICE_ORDER =
- { RevocationSourceTypes.CRL };
+ { RevocationSourceTypes.OCSP, RevocationSourceTypes.CRL };
/** The <code>ConfigurationProvider</code> to read the MOA configuration data
* from. */
private ConfigurationProvider config;
@@ -38,14 +38,9 @@ public class RevocationProfileImpl implements RevocationProfile {
/**
* @see iaik.pki.revocation.RevocationProfile#getMaxRevocationAge(String)
*/
- public long getMaxRevocationAge(String distributionPointUri) {
- String maxRevocationAgeStr =
- config.getGenericConfiguration(
- ConfigurationProvider.MAX_REVOCATION_AGE_PROPERTY,
- "0");
- long revocationAge = Long.parseLong(maxRevocationAgeStr);
-
- return revocationAge;
+ public long getMaxRevocationAge(String distributionPointUri)
+ {
+ return config.getMaxRevocationAge();
}
/**
@@ -58,8 +53,11 @@ public class RevocationProfileImpl implements RevocationProfile {
/**
* @see iaik.pki.revocation.RevocationProfile#getPreferredServiceOrder(java.security.cert.X509Certificate)
*/
- public String[] getPreferredServiceOrder(X509Certificate cert) {
- return DEFAULT_SERVICE_ORDER;
+ public String[] getPreferredServiceOrder(X509Certificate cert)
+ {
+ String[] serviceOrder = config.getServiceOrder();
+ if (serviceOrder == null || serviceOrder.length == 0) return DEFAULT_SERVICE_ORDER;
+ return serviceOrder;
}
}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
index 8a1161b95..37ded77e6 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
@@ -25,6 +25,12 @@ public class TrustStoreProfileImpl implements TrustStoreProfile {
/** The observers of this profile. */
private List observers = new ArrayList();
+
+ /**
+ * The trust profile identifier.
+ */
+ private String id_;
+
/** The type of the trust profile. */
private String type;
/** The URI of the trust profile.*/
@@ -46,13 +52,15 @@ public class TrustStoreProfileImpl implements TrustStoreProfile {
throws MOAApplicationException {
TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId);
- if (tp != null) {
+ if (tp != null)
+ {
+ id_ = trustProfileId;
setURI(tp.getUri());
setType(TrustStoreTypes.DIRECTORY);
- } else {
- throw new MOAApplicationException(
- "2203",
- new Object[] { trustProfileId });
+ }
+ else
+ {
+ throw new MOAApplicationException("2203", new Object[] { trustProfileId });
}
}
@@ -116,4 +124,12 @@ public class TrustStoreProfileImpl implements TrustStoreProfile {
}
}
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getId()
+ */
+ public String getId()
+ {
+ return id_;
+ }
+
}