@@ -27,7 +27,9 @@ public void performTest()
2727 new GeneralNames (new GeneralName (new X500Name ("cn=test" ))));
2828 ReasonFlags reasonFlags = new ReasonFlags (ReasonFlags .cACompromise );
2929
30- checkPoint (6 , name , true , true , reasonFlags , true , true );
30+ checkOnlyException (name , true , true , reasonFlags , true , true );
31+ checkOnlyException (name , true , true , reasonFlags , true , false );
32+ checkOnlyException (name , true , false , reasonFlags , true , true );
3133
3234 checkPoint (2 , name , false , false , reasonFlags , false , false );
3335
@@ -45,6 +47,26 @@ public void performTest()
4547 }
4648 }
4749
50+ private void checkOnlyException (
51+ DistributionPointName distributionPoint ,
52+ boolean onlyContainsUserCerts ,
53+ boolean onlyContainsCACerts ,
54+ ReasonFlags onlySomeReasons ,
55+ boolean indirectCRL ,
56+ boolean onlyContainsAttributeCerts )
57+ throws IOException
58+ {
59+ try
60+ {
61+ new IssuingDistributionPoint (distributionPoint , onlyContainsUserCerts , onlyContainsCACerts , onlySomeReasons , indirectCRL , onlyContainsAttributeCerts );
62+ fail ("no exception" );
63+ }
64+ catch (IllegalArgumentException e )
65+ {
66+ isEquals ("only one of onlyContainsCACerts, onlyContainsUserCerts, or onlyContainsAttributeCerts can be true" , e .getMessage ());
67+ }
68+ }
69+
4870 private void checkPoint (
4971 int size ,
5072 DistributionPointName distributionPoint ,
0 commit comments