@@ -67,6 +67,7 @@ public static void createOpenSSL(final Ruby runtime) {
67
67
68
68
final String warn = SafePropertyAccessor .getProperty ("jruby.openssl.warn" );
69
69
if ( warn != null ) OpenSSL .warn = Boolean .parseBoolean (warn );
70
+ else OpenSSL .warn = runtime .warningsEnabled ();
70
71
71
72
// Config.createConfig(runtime, _OpenSSL);
72
73
ExtConfig .create (runtime , _OpenSSL );
@@ -177,7 +178,7 @@ public static IRubyObject check_func(final IRubyObject self, final IRubyObject[]
177
178
@ JRubyMethod (name = "fips_mode=" , meta = true )
178
179
public static IRubyObject set_fips_mode (ThreadContext context , IRubyObject self , IRubyObject value ) {
179
180
if ( value .isTrue () ) {
180
- warn (context , "WARNING: FIPS mode not supported on JRuby-OpenSSL" );
181
+ warn (context , "FIPS mode not supported on JRuby-OpenSSL" );
181
182
}
182
183
return value ;
183
184
}
@@ -235,7 +236,7 @@ public static void debug(final Ruby runtime, final CharSequence msg, final Throw
235
236
}
236
237
237
238
static void warn (final ThreadContext context , final CharSequence msg ) {
238
- warn (context , RubyString .newString (context .runtime , msg ));
239
+ if ( warn ) warn (context , RubyString .newString (context .runtime , msg ));
239
240
}
240
241
241
242
static void warn (final ThreadContext context , final RubyString msg ) {
0 commit comments