3535import java .security .NoSuchAlgorithmException ;
3636import java .security .Provider ;
3737import java .security .SecureRandom ;
38+ import java .util .ArrayList ;
3839import java .util .Arrays ;
40+ import java .util .List ;
3941import javax .crypto .SecretKeyFactory ;
4042import javax .crypto .SecretKey ;
4143import javax .crypto .spec .SecretKeySpec ;
@@ -104,6 +106,7 @@ public void main(Provider p) throws Exception {
104106 SecretKey bf_128Key = new SecretKeySpec (rawBytes , 0 , 16 , "Blowfish" );
105107 SecretKey cc20Key = new SecretKeySpec (rawBytes , 0 , 32 , "ChaCha20" );
106108
109+ List <String > skippedList = new ArrayList <>();
107110 try {
108111 // fixed key length
109112 test ("AES" , aes_128Key , p , TestResult .PASS );
@@ -122,7 +125,11 @@ public void main(Provider p) throws Exception {
122125 test ("Blowfish" , cc20Key , p , TestResult .FAIL );
123126 test ("Blowfish" , bf_128Key , p , TestResult .PASS );
124127 } catch (SkippedException skippedException ){
125- throw new SkippedException ("One or more tests skipped" );
128+ skippedList .add (skippedException .getMessage ());
129+ }
130+
131+ if (!skippedList .isEmpty ()) {
132+ throw new SkippedException ("One or more tests skipped " + skippedList );
126133 }
127134 }
128135}
0 commit comments