aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2003-07-07 10:58:37 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2003-07-07 10:58:37 +0000
commitece7d18cf35374bf4e26d041799cda8f791c89f8 (patch)
tree33707cb77627b65a2a4e7327a2e93fb7751c1b76 /spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
parent273aed93c03b18a6c6bb1af745ae46a13ad3c7f2 (diff)
downloadmoa-id-spss-ece7d18cf35374bf4e26d041799cda8f791c89f8.tar.gz
moa-id-spss-ece7d18cf35374bf4e26d041799cda8f791c89f8.tar.bz2
moa-id-spss-ece7d18cf35374bf4e26d041799cda8f791c89f8.zip
Initial commit
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@2 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java65
1 files changed, 65 insertions, 0 deletions
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
new file mode 100644
index 000000000..186d24934
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
@@ -0,0 +1,65 @@
+package at.gv.egovernment.moa.spss.server.iaik.pki.revocation;
+
+import java.security.cert.X509Certificate;
+
+import iaik.pki.revocation.RevocationProfile;
+import iaik.pki.revocation.RevocationSourceTypes;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>RevocationProfile</code> interface providing
+ * information about revocation status checking, based on MOA configuration
+ * data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationProfileImpl implements RevocationProfile {
+ /** The default service order. */
+ private static final String[] DEFAULT_SERVICE_ORDER =
+ { RevocationSourceTypes.CRL };
+ /** The <code>ConfigurationProvider</code> to read the MOA configuration data
+ * from. */
+ private ConfigurationProvider config;
+ /** The OCSP request hash algorithm. */
+ private String oCSPRequestHashAlgorithm;
+
+ /**
+ * Create a new <code>RevocationProfileImpl</code>.
+ *
+ * @param config The MOA configuration data.
+ */
+ public RevocationProfileImpl(ConfigurationProvider config) {
+ this.config = config;
+ this.oCSPRequestHashAlgorithm = "";
+ }
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getOCSPRequestHashAlgorithm()
+ */
+ public String getOCSPRequestHashAlgorithm() {
+ return oCSPRequestHashAlgorithm;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getPreferredServiceOrder(java.security.cert.X509Certificate)
+ */
+ public String[] getPreferredServiceOrder(X509Certificate cert) {
+ return DEFAULT_SERVICE_ORDER;
+ }
+
+}