public abstract class org.jruby.util.SecurityHelper
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: org.jruby.util.SecurityHelper
super_class: java.lang.Object
{
private static final org.jruby.util.log.Logger LOG;
descriptor: Lorg/jruby/util/log/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static boolean attempted;
descriptor: Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static final boolean JAVA9;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=1, args_size=0
0: ldc Lorg/jruby/util/SecurityHelper;
invokestatic org.jruby.util.log.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/jruby/util/log/Logger;
putstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
1: iconst_0
putstatic org.jruby.util.SecurityHelper.attempted:Z
2: ldc "java.lang.Runtime.Version"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
pop
3: iconst_1
istore 0
start local 0 4: goto 7
end local 0 5: StackMap locals:
StackMap stack: java.lang.Exception
pop
6: iconst_0
istore 0
start local 0 7: StackMap locals: int
StackMap stack:
iload 0
putstatic org.jruby.util.SecurityHelper.JAVA9:Z
end local 0 8: return
LocalVariableTable:
Start End Slot Name Signature
4 5 0 versionClassFound Z
7 8 0 versionClassFound Z
Exception table:
from to target type
2 4 5 Class java.lang.Exception
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/SecurityHelper;
public static void checkCryptoRestrictions(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: getstatic org.jruby.util.SecurityHelper.attempted:Z
ifne 6
1: iconst_1
putstatic org.jruby.util.SecurityHelper.attempted:Z
2: getstatic org.jruby.util.SecurityHelper.JAVA9:Z
ifeq 5
3: invokestatic org.jruby.util.SecurityHelper.setNonRestrictedJava9:()Z
pop
4: goto 6
5: StackMap locals:
StackMap stack:
invokestatic org.jruby.util.SecurityHelper.setNonRestrictedJava8:()Z
pop
6: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 runtime Lorg/jruby/Ruby;
MethodParameters:
Name Flags
runtime final
private static boolean setNonRestrictedJava9();
descriptor: ()Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: ldc "crypto.policy"
invokestatic java.security.Security.getProperty:(Ljava/lang/String;)Ljava/lang/String;
ifnonnull 2
1: ldc "crypto.policy"
ldc "unlimited"
invokestatic java.security.Security.setProperty:(Ljava/lang/String;Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
iconst_1
ireturn
3: StackMap locals:
StackMap stack: java.lang.Exception
astore 0
start local 0 4: getstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
invokeinterface org.jruby.util.log.Logger.isDebugEnabled:()Z
ifeq 5
getstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
ldc "unable un-restrict jce security: "
aload 0
invokeinterface org.jruby.util.log.Logger.debug:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 0 5: StackMap locals:
StackMap stack:
iconst_0
ireturn
LocalVariableTable:
Start End Slot Name Signature
4 5 0 e Ljava/lang/Exception;
Exception table:
from to target type
0 2 3 Class java.lang.Exception
private static boolean setNonRestrictedJava8();
descriptor: ()Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=0
0: ldc "javax.crypto.JceSecurity"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
astore 0
start local 0 1: aload 0
ldc "isRestricted"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 1
start local 1 2: aload 1
invokevirtual java.lang.reflect.Field.getModifiers:()I
invokestatic java.lang.reflect.Modifier.isFinal:(I)Z
ifeq 6
3: ldc Ljava/lang/reflect/Field;
ldc "modifiers"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 2
start local 2 4: aload 2
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
5: aload 2
aload 1
aload 1
invokevirtual java.lang.reflect.Field.getModifiers:()I
bipush -17
iand
invokevirtual java.lang.reflect.Field.setInt:(Ljava/lang/Object;I)V
end local 2 6: StackMap locals: java.lang.Class java.lang.reflect.Field
StackMap stack:
aload 1
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
7: aload 1
aconst_null
iconst_0
invokevirtual java.lang.reflect.Field.setBoolean:(Ljava/lang/Object;Z)V
8: aload 1
iconst_0
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
9: iconst_1
ireturn
end local 1 end local 0 10: StackMap locals:
StackMap stack: java.lang.ClassNotFoundException
astore 0
start local 0 11: getstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
invokeinterface org.jruby.util.log.Logger.isDebugEnabled:()Z
ifeq 15
getstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
new java.lang.StringBuilder
dup
ldc "unable un-restrict jce security: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
iconst_0
anewarray java.lang.Object
invokeinterface org.jruby.util.log.Logger.debug:(Ljava/lang/String;[Ljava/lang/Object;)V
end local 0 12: goto 15
13: StackMap locals:
StackMap stack: java.lang.Exception
astore 0
start local 0 14: getstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
invokeinterface org.jruby.util.log.Logger.isDebugEnabled:()Z
ifeq 15
getstatic org.jruby.util.SecurityHelper.LOG:Lorg/jruby/util/log/Logger;
ldc "unable un-restrict jce security: "
aload 0
invokeinterface org.jruby.util.log.Logger.debug:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 0 15: StackMap locals:
StackMap stack:
iconst_0
ireturn
LocalVariableTable:
Start End Slot Name Signature
1 10 0 jceSecurity Ljava/lang/Class;
2 10 1 isRestricted Ljava/lang/reflect/Field;
4 6 2 modifiers Ljava/lang/reflect/Field;
11 12 0 e Ljava/lang/ClassNotFoundException;
14 15 0 e Ljava/lang/Exception;
Exception table:
from to target type
0 9 10 Class java.lang.ClassNotFoundException
0 9 13 Class java.lang.Exception
}
SourceFile: "SecurityHelper.java"