aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/test/at/gv/egovernment
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-08-24 15:27:08 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-08-24 15:27:08 +0000
commit1d2e61b06a442298854b0b7ba9ec392e6c75925b (patch)
treec2c20a65e74e75fc5c56f2867860ca5baa3b912e /spss.server/src/test/at/gv/egovernment
parent887a946e7590ab1c45bae55475c5570d3d2127aa (diff)
downloadmoa-id-spss-1d2e61b06a442298854b0b7ba9ec392e6c75925b.tar.gz
moa-id-spss-1d2e61b06a442298854b0b7ba9ec392e6c75925b.tar.bz2
moa-id-spss-1d2e61b06a442298854b0b7ba9ec392e6c75925b.zip
Fehlerhafte Abfrage des CRLDP-Sets behoben (Set hat keine Rangfolge)
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@466 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/test/at/gv/egovernment')
-rw-r--r--spss.server/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java47
1 files changed, 27 insertions, 20 deletions
diff --git a/spss.server/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java b/spss.server/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
index c2c0c56e0..474a387ad 100644
--- a/spss.server/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
+++ b/spss.server/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
@@ -235,26 +235,33 @@ public class ConfigurationProviderTest1 extends TestCase
Set dps = provider_.getDistributionPoints(cert);
assertEquals(2, dps.size());
- CRLDistributionPoint dp1 = (CRLDistributionPoint) dps.toArray()[0];
- assertEquals("http://crl.myca.org", dp1.getUri());
- int reasonCodes =
- iaik.asn1.structures.DistributionPoint.unused |
- iaik.asn1.structures.DistributionPoint.keyCompromise |
- iaik.asn1.structures.DistributionPoint.cACompromise |
- iaik.asn1.structures.DistributionPoint.affiliationChanged |
- iaik.asn1.structures.DistributionPoint.superseded |
- iaik.asn1.structures.DistributionPoint.cessationOfOperation |
- iaik.asn1.structures.DistributionPoint.certificateHold |
- iaik.asn1.structures.DistributionPoint.privilegeWithdrawn |
- iaik.asn1.structures.DistributionPoint.aACompromise;
- assertEquals(reasonCodes, dp1.getReasonCodes());
-
- CRLDistributionPoint dp2 = (CRLDistributionPoint) dps.toArray()[1];
- assertEquals("http://crl.myotherca.org", dp2.getUri());
- reasonCodes =
- iaik.asn1.structures.DistributionPoint.aACompromise |
- iaik.asn1.structures.DistributionPoint.affiliationChanged;
- assertEquals(reasonCodes, dp2.getReasonCodes());
+ Iterator dpIt = dps.iterator();
+ while (dpIt.hasNext())
+ {
+ CRLDistributionPoint currentDP = (CRLDistributionPoint)dpIt.next();
+ if ("http://crl.myca.org".equals(currentDP.getUri()))
+ {
+ int reasonCodes =
+ iaik.asn1.structures.DistributionPoint.unused |
+ iaik.asn1.structures.DistributionPoint.keyCompromise |
+ iaik.asn1.structures.DistributionPoint.cACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged |
+ iaik.asn1.structures.DistributionPoint.superseded |
+ iaik.asn1.structures.DistributionPoint.cessationOfOperation |
+ iaik.asn1.structures.DistributionPoint.certificateHold |
+ iaik.asn1.structures.DistributionPoint.privilegeWithdrawn |
+ iaik.asn1.structures.DistributionPoint.aACompromise;
+ assertEquals(reasonCodes, currentDP.getReasonCodes());
+ }
+ else if ("http://crl.myotherca.org".equals(currentDP.getUri()))
+ {
+ int reasonCodes =
+ iaik.asn1.structures.DistributionPoint.aACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged;
+ assertEquals(reasonCodes, currentDP.getReasonCodes());
+ }
+ else fail("Invalid CRL DP URI found: " + currentDP.getUri());
+ }
parser = new RFC2253NameParser("CN=DP2_Issuer");
name = parser.parse();