File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
prov/src/test/java/org/bouncycastle/jcajce/provider/test Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11package org .bouncycastle .jcajce .provider .test ;
22
33import java .security .AlgorithmParameters ;
4+ import java .security .Provider ;
45import java .security .Security ;
56import java .security .spec .ECGenParameterSpec ;
67import java .security .spec .ECParameterSpec ;
@@ -138,11 +139,16 @@ public class ECAlgorithmParametersTest
138139 "X9.62 c2pnb368w1" ,
139140 "1.2.840.10045.3.0.19" };
140141
142+ public static void main (String [] args )
143+ {
144+ ECAlgorithmParametersTest test = new ECAlgorithmParametersTest ();
145+ test .testSupportAttributes ();
146+ }
147+
141148 public void testSupportAttributes ()
142149 {
143- Security .addProvider (new BouncyCastleProvider ());
144- String target = Security .getProviders ("AlgorithmParameters.EC" )[1 ].getService ("AlgorithmParameters" ,
145- "EC" ).getAttribute ("SupportedCurves" );
150+ Provider prov = new BouncyCastleProvider ();
151+ String target = prov .getService ("AlgorithmParameters" , "EC" ).getAttribute ("SupportedCurves" );
146152 for (int i = 0 ; i != entries .length ; i ++)
147153 {
148154 TestCase .assertTrue (entries [i ] + " should be in the list" , target .contains (entries [i ]));
You can’t perform that action at this time.
0 commit comments