public class com.sun.org.apache.xml.internal.security.utils.JavaUtils
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.sun.org.apache.xml.internal.security.utils.JavaUtils
super_class: java.lang.Object
{
private static java.util.logging.Logger log;
descriptor: Ljava/util/logging/Logger;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static final java.security.SecurityPermission REGISTER_PERMISSION;
descriptor: Ljava/security/SecurityPermission;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: ldc Lcom/sun/org/apache/xml/internal/security/utils/JavaUtils;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokestatic java.util.logging.Logger.getLogger:(Ljava/lang/String;)Ljava/util/logging/Logger;
1: putstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.log:Ljava/util/logging/Logger;
2: new java.security.SecurityPermission
dup
3: ldc "com.sun.org.apache.xml.internal.security.register"
4: invokespecial java.security.SecurityPermission.<init>:(Ljava/lang/String;)V
5: putstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.REGISTER_PERMISSION:Ljava/security/SecurityPermission;
6: return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/org/apache/xml/internal/security/utils/JavaUtils;
public static byte[] getBytesFromFile(java.lang.String);
descriptor: (Ljava/lang/String;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: aconst_null
astore 2
start local 2 2: aconst_null
astore 3
start local 3 3: new java.io.FileInputStream
dup
aload 0
invokespecial java.io.FileInputStream.<init>:(Ljava/lang/String;)V
astore 2
4: new com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
dup
invokespecial com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.<init>:()V
astore 3
5: sipush 1024
newarray 8
astore 4
start local 4 6: goto 8
start local 5 7: StackMap locals: java.lang.String byte[] java.io.FileInputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream byte[] int
StackMap stack:
aload 3
aload 4
iconst_0
iload 5
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.write:([BII)V
end local 5 8: StackMap locals:
StackMap stack:
aload 2
aload 4
invokevirtual java.io.FileInputStream.read:([B)I
dup
istore 5
start local 5 9: ifgt 7
10: aload 3
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.toByteArray:()[B
astore 1
end local 5 end local 4 11: goto 18
StackMap locals: java.lang.String byte[] java.io.FileInputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
StackMap stack: java.lang.Throwable
12: astore 6
13: aload 3
ifnull 15
14: aload 3
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
15: StackMap locals: java.lang.String byte[] java.io.FileInputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream top top java.lang.Throwable
StackMap stack:
aload 2
ifnull 17
16: aload 2
invokevirtual java.io.FileInputStream.close:()V
17: StackMap locals:
StackMap stack:
aload 6
athrow
18: StackMap locals: java.lang.String byte[] java.io.FileInputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
StackMap stack:
aload 3
ifnull 20
19: aload 3
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
20: StackMap locals:
StackMap stack:
aload 2
ifnull 22
21: aload 2
invokevirtual java.io.FileInputStream.close:()V
22: StackMap locals:
StackMap stack:
aload 1
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 fileName Ljava/lang/String;
1 23 1 refBytes [B
2 23 2 fisRef Ljava/io/FileInputStream;
3 23 3 baos Lcom/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream;
6 11 4 buf [B
7 8 5 len I
9 11 5 len I
Exception table:
from to target type
3 12 12 any
Exceptions:
throws java.io.FileNotFoundException, java.io.IOException
MethodParameters:
Name Flags
fileName
public static void writeBytesToFilename(java.lang.String, byte[]);
descriptor: (Ljava/lang/String;[B)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 0
ifnull 7
aload 1
ifnull 7
2: new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 3
start local 3 3: new java.io.FileOutputStream
dup
aload 3
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
astore 2
4: aload 2
aload 1
invokevirtual java.io.FileOutputStream.write:([B)V
5: aload 2
invokevirtual java.io.FileOutputStream.close:()V
end local 3 6: goto 17
7: StackMap locals: java.io.FileOutputStream
StackMap stack:
getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.log:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 17
8: getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.log:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "writeBytesToFilename got null byte[] pointed"
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;)V
9: goto 17
StackMap locals:
StackMap stack: java.io.IOException
10: pop
11: aload 2
ifnull 17
12: aload 2
invokevirtual java.io.FileOutputStream.close:()V
13: goto 17
StackMap locals:
StackMap stack: java.io.IOException
14: astore 3
start local 3 15: getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.log:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 17
16: getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.log:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
aload 3
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 3 17: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 filename Ljava/lang/String;
0 18 1 bytes [B
1 18 2 fos Ljava/io/FileOutputStream;
3 6 3 f Ljava/io/File;
15 17 3 ioe Ljava/io/IOException;
Exception table:
from to target type
1 9 10 Class java.io.IOException
12 13 14 Class java.io.IOException
MethodParameters:
Name Flags
filename
bytes
public static byte[] getBytesFromStream(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: aconst_null
astore 2
start local 2 2: new com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
dup
invokespecial com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.<init>:()V
astore 1
3: sipush 4096
newarray 8
astore 3
start local 3 4: goto 6
start local 4 5: StackMap locals: java.io.InputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream byte[] byte[] int
StackMap stack:
aload 1
aload 3
iconst_0
iload 4
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.write:([BII)V
end local 4 6: StackMap locals:
StackMap stack:
aload 0
aload 3
invokevirtual java.io.InputStream.read:([B)I
dup
istore 4
start local 4 7: ifgt 5
8: aload 1
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.toByteArray:()[B
astore 2
end local 4 end local 3 9: goto 13
StackMap locals: java.io.InputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream byte[]
StackMap stack: java.lang.Throwable
10: astore 5
11: aload 1
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
12: aload 5
athrow
13: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
14: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 inputStream Ljava/io/InputStream;
1 15 1 baos Lcom/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream;
2 15 2 retBytes [B
4 9 3 buf [B
5 6 4 len I
7 9 4 len I
Exception table:
from to target type
2 10 10 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
inputStream
public static byte[] convertDsaASN1toXMLDSIG(byte[], int);
descriptor: ([BI)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 0
iconst_0
baload
bipush 48
if_icmpne 2
aload 0
iconst_1
baload
aload 0
arraylength
iconst_2
isub
if_icmpne 2
1: aload 0
iconst_2
baload
iconst_2
if_icmpeq 3
2: StackMap locals:
StackMap stack:
new java.io.IOException
dup
ldc "Invalid ASN.1 format of DSA signature"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
iconst_3
baload
istore 2
start local 2 4: iload 2
istore 3
start local 3 5: goto 7
StackMap locals: int int
StackMap stack:
6: iinc 3 -1
StackMap locals:
StackMap stack:
7: iload 3
ifle 8
aload 0
iconst_4
iload 2
iadd
iload 3
isub
baload
ifeq 6
8: StackMap locals:
StackMap stack:
aload 0
iconst_5
iload 2
iadd
baload
istore 4
start local 4 9: iload 4
istore 5
start local 5 10: goto 12
StackMap locals: int int
StackMap stack:
11: iinc 5 -1
StackMap locals:
StackMap stack:
12: iload 5
ifle 13
aload 0
bipush 6
iload 2
iadd
iload 4
iadd
iload 5
isub
baload
ifeq 11
13: StackMap locals:
StackMap stack:
iload 3
iload 1
if_icmpgt 14
aload 0
iconst_4
iload 2
iadd
baload
iconst_2
if_icmpne 14
iload 5
iload 1
if_icmple 15
14: StackMap locals:
StackMap stack:
new java.io.IOException
dup
ldc "Invalid ASN.1 format of DSA signature"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
iload 1
iconst_2
imul
newarray 8
astore 6
start local 6 16: aload 0
iconst_4
iload 2
iadd
iload 3
isub
aload 6
17: iload 1
iload 3
isub
iload 3
18: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
19: aload 0
bipush 6
iload 2
iadd
iload 4
iadd
iload 5
isub
20: aload 6
iload 1
iconst_2
imul
iload 5
isub
iload 5
21: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
22: aload 6
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 asn1Bytes [B
0 23 1 size I
4 23 2 rLength B
5 23 3 i I
9 23 4 sLength B
10 23 5 j I
16 23 6 xmldsigBytes [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
asn1Bytes
size
public static byte[] convertDsaXMLDSIGtoASN1(byte[], int);
descriptor: ([BI)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=8, args_size=2
start local 0 start local 1 0: iload 1
iconst_2
imul
istore 2
start local 2 1: aload 0
arraylength
iload 2
if_icmpeq 3
2: new java.io.IOException
dup
ldc "Invalid XMLDSIG format of DSA signature"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: int
StackMap stack:
iload 1
istore 3
start local 3 4: goto 6
StackMap locals: int
StackMap stack:
5: iinc 3 -1
StackMap locals:
StackMap stack:
6: iload 3
ifle 7
aload 0
iload 1
iload 3
isub
baload
ifeq 5
7: StackMap locals:
StackMap stack:
iload 3
istore 4
start local 4 8: aload 0
iload 1
iload 3
isub
baload
ifge 10
9: iinc 4 1
10: StackMap locals: int
StackMap stack:
iload 1
istore 5
start local 5 11: goto 13
StackMap locals: int
StackMap stack:
12: iinc 5 -1
StackMap locals:
StackMap stack:
13: iload 5
ifle 14
aload 0
iload 2
iload 5
isub
baload
ifeq 12
14: StackMap locals:
StackMap stack:
iload 5
istore 6
start local 6 15: aload 0
iload 2
iload 5
isub
baload
ifge 17
16: iinc 6 1
17: StackMap locals: int
StackMap stack:
bipush 6
iload 4
iadd
iload 6
iadd
newarray 8
astore 7
start local 7 18: aload 7
iconst_0
bipush 48
bastore
19: aload 7
iconst_1
iconst_4
iload 4
iadd
iload 6
iadd
i2b
bastore
20: aload 7
iconst_2
iconst_2
bastore
21: aload 7
iconst_3
iload 4
i2b
bastore
22: aload 0
iload 1
iload 3
isub
aload 7
iconst_4
iload 4
iadd
iload 3
isub
iload 3
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
23: aload 7
iconst_4
iload 4
iadd
iconst_2
bastore
24: aload 7
iconst_5
iload 4
iadd
iload 6
i2b
bastore
25: aload 0
iload 2
iload 5
isub
aload 7
26: bipush 6
iload 4
iadd
iload 6
iadd
iload 5
isub
iload 5
27: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
28: aload 7
areturn
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 xmldsigBytes [B
0 29 1 size I
1 29 2 totalSize I
4 29 3 i I
8 29 4 j I
11 29 5 k I
15 29 6 l I
18 29 7 asn1Bytes [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
xmldsigBytes
size
public static void checkRegisterPermission();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=0
0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 0
start local 0 1: aload 0
ifnull 3
2: aload 0
getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.REGISTER_PERMISSION:Ljava/security/SecurityPermission;
invokevirtual java.lang.SecurityManager.checkPermission:(Ljava/security/Permission;)V
3: StackMap locals: java.lang.SecurityManager
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 4 0 sm Ljava/lang/SecurityManager;
}
SourceFile: "JavaUtils.java"