@@ -205,11 +205,11 @@ private static String[] registeredCipherModes(final String alg) { // e.g. "AES"
205
205
final Provider provider = providers [i ];
206
206
final String name = provider .getName () == null ? "" : provider .getName ();
207
207
// skip those that are known to provide no Cipher engines :
208
- if ( name .indexOf ("JGSS" ) >= 0 ) continue ; // SunJGSS
209
- if ( name .indexOf ("SASL" ) >= 0 ) continue ; // SunSASL
210
- if ( name .indexOf ("XMLD" ) >= 0 ) continue ; // XMLDSig
211
- if ( name .indexOf ("PCSC" ) >= 0 ) continue ; // SunPCSC
212
- if ( name .indexOf ("JSSE" ) >= 0 ) continue ; // SunJSSE
208
+ if ( name .contains ("JGSS" ) ) continue ; // SunJGSS
209
+ if ( name .contains ("SASL" ) ) continue ; // SunSASL
210
+ if ( name .contains ("XMLD" ) ) continue ; // XMLDSig
211
+ if ( name .contains ("PCSC" ) ) continue ; // SunPCSC
212
+ if ( name .contains ("JSSE" ) ) continue ; // SunJSSE
213
213
214
214
final Provider .Service service = provider .getService ("Cipher" , alg );
215
215
if ( service != null ) {
@@ -243,8 +243,9 @@ public static final class Algorithm {
243
243
}
244
244
245
245
private static final Set <String > KNOWN_BLOCK_MODES ;
246
+ // NOTE: CFB1 does not work as (OpenSSL) expects with BC (@see GH-35)
246
247
private static final String [] OPENSSL_BLOCK_MODES = {
247
- "CBC" , "CFB" , "CFB1" , "CFB8" , "ECB" , "OFB" // that Java supports
248
+ "CBC" , "CFB" , /* "CFB1", */ "CFB8" , "ECB" , "OFB" // that Java supports
248
249
};
249
250
250
251
static {
@@ -1145,6 +1146,7 @@ public IRubyObject do_final(final ThreadContext context) {
1145
1146
}
1146
1147
}
1147
1148
catch (GeneralSecurityException e ) { // cipher.doFinal
1149
+ debugStackTrace (runtime , e );
1148
1150
throw newCipherError (runtime , e );
1149
1151
}
1150
1152
catch (RuntimeException e ) {
0 commit comments