From 8c769bae2d6d71677ce71a299d618957029ab4ac Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> Date: Mon, 10 Apr 2006 08:46:26 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Build_ID-1_3_1'. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build_ID-1_3_1@704 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/spss/server/iaik/pki/PKIProfileImpl.java | 116 ------------------ .../pki/pathvalidation/ValidationProfileImpl.java | 107 ---------------- .../iaik/pki/revocation/RevocationProfileImpl.java | 64 ---------- .../store/truststore/TrustStoreProfileImpl.java | 135 --------------------- 4 files changed, 422 deletions(-) delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki') 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 deleted file mode 100644 index 76f03ae07..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -package at.gv.egovernment.moa.spss.server.iaik.pki; - -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.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; -import at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation.ValidationProfileImpl; -import at.gv.egovernment.moa.spss.server.iaik.pki.revocation.RevocationProfileImpl; -import at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore.TrustStoreProfileImpl; - -/** - * Implementation of the PKIProfile interface containing - * information needed for certificate path validation. It uses configuration - * data from the MOA configuration. - * - * @author Patrick Peck - * @version $Id$ - */ -public class PKIProfileImpl implements PKIProfile { - - /** Profile information for revocation checking. */ - private RevocationProfile revocationProfile; - /** Profile information about the trust profile to use. */ - private TrustStoreProfile trustStoreProfile; - /** Profile information about the certificate validation. */ - private ValidationProfile validationProfile; - /** The ConfigurationProvider to read the MOA configuration data - * from. */ - private ConfigurationProvider config; - - /** - * Create a new PKIProfileImpl. - * - * @param config The MOA configuration providing configuration data about - * certificate path validation. - * @param trustProfileID The trust profile ID denoting the location of the - * trust store. - * @throws MOAApplicationException An error occurred building the profile. - */ - public PKIProfileImpl(ConfigurationProvider config, String trustProfileID) - throws MOAApplicationException { - - this.config = config; - setRevocationProfile(new RevocationProfileImpl(config)); - setTrustStoreProfile(new TrustStoreProfileImpl(config, trustProfileID)); - setValidationProfile(new ValidationProfileImpl(config)); - } - - /** - * @see iaik.pki.PKIProfile#autoAddCertificates() - */ - public boolean autoAddCertificates() - { - return useAuthorityInfoAccess() ? true : config.getAutoAddCertificates(); - } - - /** - * @see iaik.pki.PKIProfile#getRevocationProfile() - */ - public RevocationProfile getRevocationProfile() { - return revocationProfile; - } - - /** - * Sets the RevocationProfile. - * - * @param revocationProfile The RevocationProfile used for - * revocation checking. - */ - protected void setRevocationProfile(RevocationProfile revocationProfile) { - this.revocationProfile = revocationProfile; - } - - /** - * @see iaik.pki.PKIProfile#getTrustStoreProfile() - */ - public TrustStoreProfile getTrustStoreProfile() { - return trustStoreProfile; - } - - /** - * Sets the TrustStoreProfile. - * - * @param trustStoreProfile The TrustStoreProfile. - */ - protected void setTrustStoreProfile(TrustStoreProfile trustStoreProfile) { - this.trustStoreProfile = trustStoreProfile; - } - - /** - * @see iaik.pki.PKIProfile#getValidationProfile() - */ - public ValidationProfile getValidationProfile() { - return validationProfile; - } - - /** - * Sets the ValidationProfile. - * - * @param validationProfile The ValidationProfile to set. - */ - protected void setValidationProfile(ValidationProfile validationProfile) { - this.validationProfile = validationProfile; - } - - /** - * @see iaik.pki.PKIProfile#useAuthorityInfoAccess() - */ - 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 deleted file mode 100644 index a4d7ea7fa..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -package at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation; - -import iaik.pki.pathvalidation.ValidationProfile; - -import java.util.Collections; -import java.util.Set; - -import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; - -/** - * An implementation of the ValidationProfile interface providing - * information about certificat path validation. - * - * @author Patrick Peck - * @version $Id$ - */ -public class ValidationProfileImpl implements ValidationProfile { - - /** The ConfigurationProvider to read the configuration data - * from. */ - private ConfigurationProvider config; - private boolean initialAnyPolicyInhibit; - private boolean initialExplicitPolicy; - private boolean initialPolicyMappingInhibit; - private Set initialPolicySet; - private boolean nameConstraintsProcessing; - private boolean policyProcessing; - - /** - * Create a new ValidationProfileImpl object. - * - * This objects's fields are preset to the following values: - * - * - * - * @param config MOA configuration data for additional configuration - * information (currently unused). - */ - public ValidationProfileImpl(ConfigurationProvider config) { - this.config = config; - initialAnyPolicyInhibit = true; - initialExplicitPolicy = true; - initialPolicyMappingInhibit = true; - initialPolicySet = Collections.EMPTY_SET; - policyProcessing = false; - nameConstraintsProcessing = false; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getInitialAnyPolicyInhibit() - */ - public boolean getInitialAnyPolicyInhibit() { - return initialAnyPolicyInhibit; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getInitialExplicitPolicy() - */ - public boolean getInitialExplicitPolicy() { - return initialExplicitPolicy; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicyMappingInhibit() - */ - public boolean getInitialPolicyMappingInhibit() { - return initialPolicyMappingInhibit; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicySet() - */ - public Set getInitialPolicySet() { - return initialPolicySet; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getPolicyProcessing() - */ - public boolean getPolicyProcessing() { - return policyProcessing; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getNameConstraintsProcessing() - */ - public boolean getNameConstraintsProcessing() { - return nameConstraintsProcessing; - } - - /** - * @see iaik.pki.pathvalidation.ValidationProfile#getRevocationChecking() - */ - 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 deleted file mode 100644 index c8809b0d8..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -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 RevocationProfile 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, RevocationSourceTypes.OCSP }; - /** The ConfigurationProvider to read the MOA configuration data - * from. */ - private ConfigurationProvider config; - /** The OCSP request hash algorithm. Currently only "SHA" is supported. */ - private static final String oCSPRequestHashAlgorithm = "SHA"; - - /** - * Create a new RevocationProfileImpl. - * - * @param config The MOA configuration data. - */ - public RevocationProfileImpl(ConfigurationProvider config) { - this.config = config; - // currently only "SHA" is supported -// this.oCSPRequestHashAlgorithm = ""; - } - - /** - * @see iaik.pki.revocation.RevocationProfile#getMaxRevocationAge(String) - */ - public long getMaxRevocationAge(String distributionPointUri) - { - return config.getMaxRevocationAge(); - } - - /** - * @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) - { - 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 deleted file mode 100644 index 37ded77e6..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -package at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import iaik.pki.store.truststore.TrustStoreProfile; -import iaik.pki.store.truststore.TrustStoreTypes; -import iaik.servertools.observer.NotificationData; -import iaik.servertools.observer.Observer; - -import at.gv.egovernment.moa.spss.MOAApplicationException; -import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; -import at.gv.egovernment.moa.spss.server.config.TrustProfile; - -/** - * An implementation of the TrustStoreProfile interface, using data - * from the MOA configuration. - * - * @see iaik.pki.store.truststore.TrustStoreProfile - * @author Patrick Peck - * @version $Id$ - */ -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.*/ - private String URI; - - /** - * Create a new TrustStoreProfileImpl. - * - * @param config The MOA configuration data, from which trust store - * configuration data is read. - * @param trustProfileId The trust profile id on which this - * TrustStoreProfile is based. - * @throws MOAApplicationException The trustProfileId could not - * be found in the MOA configuration. - */ - public TrustStoreProfileImpl( - ConfigurationProvider config, - String trustProfileId) - throws MOAApplicationException { - - TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId); - if (tp != null) - { - id_ = trustProfileId; - setURI(tp.getUri()); - setType(TrustStoreTypes.DIRECTORY); - } - else - { - throw new MOAApplicationException("2203", new Object[] { trustProfileId }); - } - } - - /** - * @see iaik.pki.store.truststore.TrustStoreProfile#getType() - */ - public String getType() { - return type; - } - - /** - * Sets the the trust store type. - * - * @param type The trust store type to set. - */ - protected void setType(String type) { - this.type = type; - } - - /** - * @see iaik.pki.store.truststore.TrustStoreProfile#getURI() - */ - public String getURI() { - return URI; - } - - /** - * Sets the trust store URI. - * - * @param URI The trust store URI to set. - */ - protected void setURI(String URI) { - this.URI = URI; - } - - // - // Methods of iaik.utils.observer.Observable interface - // - - /** - * @see iaik.utils.observer.Observable#addObserver(Observer) - */ - public void addObserver(Observer observer) { - observers.add(observer); - } - - /** - * @see iaik.utils.observer.Observable#removeObserver(Observer) - */ - public boolean removeObserver(Observer observer) { - return observers.remove(observer); - } - - /** - * @see iaik.utils.observer.Observable#notify(NotificationData) - */ - public void notify(NotificationData notificationData) { - for (Iterator iter = observers.iterator(); iter.hasNext();) { - Observer observer = (Observer) iter.next(); - observer.notify(notificationData); - } - } - - /** - * @see iaik.pki.store.truststore.TrustStoreProfile#getId() - */ - public String getId() - { - return id_; - } - -} -- cgit v1.2.3