From 578ad0d6bc408edf9e6c875156054374f5fd8337 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 22 Mar 2021 18:40:26 +0100 Subject: change to EGIZ codestyle --- .../moa/spss/server/iaik/pki/PKIProfileImpl.java | 361 ++++++++++----------- .../pki/pathvalidation/ValidationProfileImpl.java | 47 +-- .../iaik/pki/revocation/RevocationProfileImpl.java | 33 +- .../store/truststore/TrustStoreProfileImpl.java | 93 +++--- 4 files changed, 268 insertions(+), 266 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java index 97eb6ef..0032dc6 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java @@ -23,15 +23,8 @@ 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 iaik.pki.store.truststore.TrustStoreTypes; - import java.util.Arrays; -import at.gv.egovernment.moa.sig.tsl.api.ITslService; import at.gv.egovernment.moa.sig.tsl.exception.TslPKIException; import at.gv.egovernment.moa.sig.tsl.pki.TslTrustStoreProfile; import at.gv.egovernment.moa.sig.tsl.pki.chaining.ChainingTrustStoreProfile; @@ -43,189 +36,195 @@ import at.gv.egovernment.moa.spss.server.iaik.pki.revocation.RevocationProfileIm import at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore.TrustStoreProfileImpl; import at.gv.egovernment.moa.spss.tsl.TSLServiceFactory; import at.gv.egovernment.moaspss.logging.Logger; +import iaik.pki.PKIProfile; +import iaik.pki.pathvalidation.ValidationProfile; +import iaik.pki.revocation.RevocationProfile; +import iaik.pki.store.truststore.TrustStoreProfile; /** * 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)); - setValidationProfile(new ValidationProfileImpl(config)); - - //generate TrustStoreProfile from TrustStore configuration - internalTrustProfileBuilder(trustProfileID); - - } - - - private void internalTrustProfileBuilder(String trustProfileId) throws MOAApplicationException { - TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId); - if (tp != null) { - //build directory based trust store as default - - - if (tp.isTSLEnabled()) { - TslTrustStoreProfile tslTrustStore; - try { - if (!TSLServiceFactory.isInitialized()) { - Logger.error("Can not build TrustProfile:" + trustProfileId - + " Reason: TrustProfile needs TSL support but TSL client NOT initialized."); - throw new TslPKIException("Trust Status-List service client is NOT initialized"); - - } - - //build TSL truststore if enabled - tslTrustStore = TSLServiceFactory.getTSLServiceClient(). - buildTrustStoreProfile( - tp.getCountries(), - tp.getAllowedTspStatus(), - tp.getAllowedTspServiceTypes(), - trustProfileId + "_TSL"); - - //build Directory based TrustStore - TrustStoreProfileImpl directoryTrustStore = new TrustStoreProfileImpl(trustProfileId + "_Directory", tp.getUri()); - - //generate a virtual truststore that concatenates the TSL TrustStore and the directory TrustStore - ChainingTrustStoreProfile chainedProfile = new ChainingTrustStoreProfile( - Arrays.asList(tslTrustStore, directoryTrustStore), - trustProfileId); - - //set this virtual truststore - setTrustStoreProfile(chainedProfile); - - } catch (TslPKIException e) { - Logger.error("Virtual TSL based TrustProfile generation FAILED.", e); - throw new MOAApplicationException("2900", new Object[] { trustProfileId }); - - } - - } else - setTrustStoreProfile(new TrustStoreProfileImpl(trustProfileId, tp.getUri())); - - } else { - throw new MOAApplicationException("2203", new Object[] { trustProfileId }); - - } - - } - - /** - * @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(); - } - - /** - * @see iaik.pki.PKIProfile#autoAddCertificates() - */ - @Override - public int autoAddCertificates() { - if(config.getAutoAddCertificates()) { - if (config.getAutoAddEECertificates()) - return PKIProfile.AUTO_ADD_ENABLE; - else - return PKIProfile.AUTO_ADD_EE_DISABLE; - - } else - return PKIProfile.AUTO_ADD_DISABLE; - - } - - @Override - public TrustStoreProfile getIndirectRevocationTrustStoreProfile() { - // TODO AFITZEK IMPLEMENT THIS METHOD - return null; - } + /** 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 final 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)); + setValidationProfile(new ValidationProfileImpl(config)); + + // generate TrustStoreProfile from TrustStore configuration + internalTrustProfileBuilder(trustProfileID); + + } + + private void internalTrustProfileBuilder(String trustProfileId) throws MOAApplicationException { + final TrustProfile tp = config.getTrustProfile(trustProfileId); + if (tp != null) { + // build directory based trust store as default + + if (tp.isTSLEnabled()) { + TslTrustStoreProfile tslTrustStore; + try { + if (!TSLServiceFactory.isInitialized()) { + Logger.error("Can not build TrustProfile:" + trustProfileId + + " Reason: TrustProfile needs TSL support but TSL client NOT initialized."); + throw new TslPKIException("Trust Status-List service client is NOT initialized"); + + } + + // build TSL truststore if enabled + tslTrustStore = TSLServiceFactory.getTSLServiceClient().buildTrustStoreProfile( + tp.getCountries(), + tp.getAllowedTspStatus(), + tp.getAllowedTspServiceTypes(), + trustProfileId + "_TSL"); + + // build Directory based TrustStore + final TrustStoreProfileImpl directoryTrustStore = new TrustStoreProfileImpl(trustProfileId + + "_Directory", tp.getUri()); + + // generate a virtual truststore that concatenates the TSL TrustStore and the + // directory TrustStore + final ChainingTrustStoreProfile chainedProfile = new ChainingTrustStoreProfile( + Arrays.asList(tslTrustStore, directoryTrustStore), + trustProfileId); + + // set this virtual truststore + setTrustStoreProfile(chainedProfile); + + } catch (final TslPKIException e) { + Logger.error("Virtual TSL based TrustProfile generation FAILED.", e); + throw new MOAApplicationException("2900", new Object[] { trustProfileId }); + + } + + } else { + setTrustStoreProfile(new TrustStoreProfileImpl(trustProfileId, tp.getUri())); + } + + } else { + throw new MOAApplicationException("2203", new Object[] { trustProfileId }); + + } + + } + + /** + * @see iaik.pki.PKIProfile#autoAddCertificates() + */ + /* + * public boolean autoAddCertificates() { return useAuthorityInfoAccess() ? true + * : config.getAutoAddCertificates(); } + */ + + /** + * @see iaik.pki.PKIProfile#getRevocationProfile() + */ + @Override + 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() + */ + @Override + 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() + */ + @Override + 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() + */ + @Override + public boolean useAuthorityInfoAccess() { + return config.getUseAuthorityInfoAccess(); + } + + /** + * @see iaik.pki.PKIProfile#autoAddCertificates() + */ + @Override + public int autoAddCertificates() { + if (config.getAutoAddCertificates()) { + if (config.getAutoAddEECertificates()) { + return PKIProfile.AUTO_ADD_ENABLE; + } else { + return PKIProfile.AUTO_ADD_EE_DISABLE; + } + + } else { + return PKIProfile.AUTO_ADD_DISABLE; + } + + } + + @Override + public TrustStoreProfile getIndirectRevocationTrustStoreProfile() { + // TODO AFITZEK IMPLEMENT THIS METHOD + return null; + } } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java index 7e62d60..76e1ed0 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java @@ -21,40 +21,39 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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; +import iaik.pki.pathvalidation.ValidationProfile; /** * An implementation of the ValidationProfile interface providing - * information about certificat path validation. - * + * 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; + /** + * The ConfigurationProvider to read the configuration data from. + */ + private final ConfigurationProvider config; + private final boolean initialAnyPolicyInhibit; + private final boolean initialExplicitPolicy; + private final boolean initialPolicyMappingInhibit; + private final Set initialPolicySet; + private final boolean nameConstraintsProcessing; + private final 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). + * + * @param config MOA configuration data for additional configuration information + * (currently unused). */ public ValidationProfileImpl(ConfigurationProvider config) { this.config = config; @@ -81,6 +80,7 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getInitialAnyPolicyInhibit() */ + @Override public boolean getInitialAnyPolicyInhibit() { return initialAnyPolicyInhibit; } @@ -88,6 +88,7 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getInitialExplicitPolicy() */ + @Override public boolean getInitialExplicitPolicy() { return initialExplicitPolicy; } @@ -95,6 +96,7 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicyMappingInhibit() */ + @Override public boolean getInitialPolicyMappingInhibit() { return initialPolicyMappingInhibit; } @@ -102,6 +104,7 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicySet() */ + @Override public Set getInitialPolicySet() { return initialPolicySet; } @@ -109,6 +112,7 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getPolicyProcessing() */ + @Override public boolean getPolicyProcessing() { return policyProcessing; } @@ -116,6 +120,7 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getNameConstraintsProcessing() */ + @Override public boolean getNameConstraintsProcessing() { return nameConstraintsProcessing; } @@ -123,8 +128,8 @@ public class ValidationProfileImpl implements ValidationProfile { /** * @see iaik.pki.pathvalidation.ValidationProfile#getRevocationChecking() */ - public boolean getRevocationChecking() - { + @Override + public boolean getRevocationChecking() { return config.getEnableRevocationChecking(); } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java index 14627b2..5215131 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java @@ -21,37 +21,37 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.server.iaik.pki.revocation; import java.security.cert.X509Certificate; +import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; 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; + { RevocationSourceTypes.CRL, RevocationSourceTypes.OCSP }; + /** + * The ConfigurationProvider to read the MOA configuration data + * from. + */ + private final 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) { @@ -63,14 +63,15 @@ public class RevocationProfileImpl implements RevocationProfile { /** * @see iaik.pki.revocation.RevocationProfile#getMaxRevocationAge(String) */ - public long getMaxRevocationAge(String distributionPointUri) - { + @Override + public long getMaxRevocationAge(String distributionPointUri) { return config.getMaxRevocationAge(); } /** * @see iaik.pki.revocation.RevocationProfile#getOCSPRequestHashAlgorithm() */ + @Override public String getOCSPRequestHashAlgorithm() { return oCSPRequestHashAlgorithm; } @@ -78,10 +79,12 @@ public class RevocationProfileImpl implements RevocationProfile { /** * @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; + @Override + public String[] getPreferredServiceOrder(X509Certificate cert) { + final String[] serviceOrder = config.getServiceOrder(); + if (serviceOrder == null || serviceOrder.length == 0) { + return DEFAULT_SERVICE_ORDER; + } return serviceOrder; } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java index c9f4f28..9ef3764 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java @@ -21,89 +21,82 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - 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.pki.store.observer.NotificationData; -import iaik.pki.store.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; +import iaik.pki.store.observer.NotificationData; +import iaik.pki.store.observer.Observer; +import iaik.pki.store.truststore.TrustStoreProfile; +import iaik.pki.store.truststore.TrustStoreTypes; /** * An implementation of the TrustStoreProfile interface, using data * from the MOA configuration. - * - * @see iaik.pki.store.truststore.TrustStoreProfile + * + * @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(); - + private final List observers = new ArrayList(); + /** - * The trust profile identifier. + * The trust profile identifier. */ private String id_; - + /** The type of the trust profile. */ private String type; - /** The URI of the trust profile.*/ + /** 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 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. + * TrustStoreProfile is based. + * @throws MOAApplicationException The trustProfileId could not be + * found in the MOA configuration. */ public TrustStoreProfileImpl(String trustProfileId, String trustProfileUri) - throws MOAApplicationException { - id_ = trustProfileId; - setURI(trustProfileUri); - setType(TrustStoreTypes.DIRECTORY); - + throws MOAApplicationException { + id_ = trustProfileId; + setURI(trustProfileUri); + setType(TrustStoreTypes.DIRECTORY); + } - + /** * Create a new TrustStoreProfileImpl. - * - * @param config The MOA configuration data, from which trust store - * configuration data is read. + * + * @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. + * TrustStoreProfile is based. + * @throws MOAApplicationException The trustProfileId could not be + * found in the MOA configuration. */ @Deprecated public TrustStoreProfileImpl( - ConfigurationProvider config, - String trustProfileId) - throws MOAApplicationException { + ConfigurationProvider config, + String trustProfileId) + throws MOAApplicationException { - TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId); - if (tp != null) - { + final TrustProfile tp = config.getTrustProfile(trustProfileId); + if (tp != null) { id_ = trustProfileId; setURI(tp.getUri()); setType(TrustStoreTypes.DIRECTORY); - } - else - { + } else { throw new MOAApplicationException("2203", new Object[] { trustProfileId }); } } @@ -111,14 +104,15 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { /** * @see iaik.pki.store.truststore.TrustStoreProfile#getType() */ + @Override public String getType() { return type; } /** * Sets the the trust store type. - * - * @param type The trust store type to set. + * + * @param type The trust store type to set. */ protected void setType(String type) { this.type = type; @@ -127,13 +121,14 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { /** * @see iaik.pki.store.truststore.TrustStoreProfile#getURI() */ + @Override public String getURI() { return URI; } /** * Sets the trust store URI. - * + * * @param URI The trust store URI to set. */ protected void setURI(String URI) { @@ -162,8 +157,8 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData) */ public void notify(NotificationData notificationData) { - for (Iterator iter = observers.iterator(); iter.hasNext();) { - Observer observer = (Observer) iter.next(); + for (final Object observer2 : observers) { + final Observer observer = (Observer) observer2; observer.notify(notificationData); } } @@ -171,8 +166,8 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { /** * @see iaik.pki.store.truststore.TrustStoreProfile#getId() */ - public String getId() - { + @Override + public String getId() { return id_; } -- cgit v1.2.3