public final class com.sun.org.apache.xml.internal.security.utils.JavaUtils
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.sun.org.apache.xml.internal.security.utils.JavaUtils
super_class: java.lang.Object
{
private static final com.sun.org.slf4j.internal.Logger LOG;
descriptor: Lcom/sun/org/slf4j/internal/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
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;
invokestatic com.sun.org.slf4j.internal.LoggerFactory.getLogger:(Ljava/lang/Class;)Lcom/sun/org/slf4j/internal/Logger;
1: putstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.LOG:Lcom/sun/org/slf4j/internal/Logger;
2: new java.security.SecurityPermission
dup
ldc "com.sun.org.apache.xml.internal.security.register"
invokespecial java.security.SecurityPermission.<init>:(Ljava/lang/String;)V
3: putstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.REGISTER_PERMISSION:Ljava/security/SecurityPermission;
4: 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=8, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: aconst_null
astore 2
aconst_null
astore 3
2: aload 0
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.newInputStream:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
astore 4
start local 4 3: new com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
dup
invokespecial com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.<init>:()V
astore 5
start local 5 4: sipush 1024
newarray 8
astore 6
start local 6 5: goto 7
start local 7 6: StackMap locals: java.lang.String byte[] java.lang.Throwable java.lang.Throwable java.io.InputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream byte[] int
StackMap stack:
aload 5
aload 6
iconst_0
iload 7
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.write:([BII)V
end local 7 7: StackMap locals:
StackMap stack:
aload 4
aload 6
invokevirtual java.io.InputStream.read:([B)I
dup
istore 7
start local 7 8: ifgt 6
9: aload 5
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.toByteArray:()[B
astore 1
end local 7 end local 6 10: aload 5
ifnull 13
aload 5
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
goto 13
StackMap locals: java.lang.String byte[] java.lang.Throwable java.lang.Throwable java.io.InputStream com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
StackMap stack: java.lang.Throwable
11: astore 2
aload 5
ifnull 12
aload 5
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
end local 5 StackMap locals:
StackMap stack:
12: aload 2
athrow
StackMap locals:
StackMap stack:
13: aload 4
ifnull 21
aload 4
invokevirtual java.io.InputStream.close:()V
goto 21
StackMap locals:
StackMap stack: java.lang.Throwable
14: astore 3
aload 2
ifnonnull 15
aload 3
astore 2
goto 16
StackMap locals:
StackMap stack:
15: aload 2
aload 3
if_acmpeq 16
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
16: aload 4
ifnull 17
aload 4
invokevirtual java.io.InputStream.close:()V
end local 4 StackMap locals:
StackMap stack:
17: aload 2
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
18: astore 3
aload 2
ifnonnull 19
aload 3
astore 2
goto 20
StackMap locals:
StackMap stack:
19: aload 2
aload 3
if_acmpeq 20
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
20: aload 2
athrow
21: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 fileName Ljava/lang/String;
1 22 1 refBytes [B
3 17 4 inputStream Ljava/io/InputStream;
4 12 5 baos Lcom/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream;
5 10 6 buf [B
6 7 7 len I
8 10 7 len I
Exception table:
from to target type
4 10 11 any
3 13 14 any
2 18 18 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=3, locals=5, args_size=2
start local 0 start local 1 0: aload 0
ifnull 13
aload 1
ifnull 13
1: aconst_null
astore 2
aconst_null
astore 3
2: aload 0
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.newOutputStream:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
astore 4
start local 4 3: aload 4
aload 1
invokevirtual java.io.OutputStream.write:([B)V
4: aload 4
ifnull 14
aload 4
invokevirtual java.io.OutputStream.close:()V
goto 14
StackMap locals: java.lang.String byte[] java.lang.Throwable java.lang.Throwable java.io.OutputStream
StackMap stack: java.lang.Throwable
5: astore 2
aload 4
ifnull 6
aload 4
invokevirtual java.io.OutputStream.close:()V
end local 4 StackMap locals:
StackMap stack:
6: aload 2
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 3
aload 2
ifnonnull 8
aload 3
astore 2
goto 9
StackMap locals:
StackMap stack:
8: aload 2
aload 3
if_acmpeq 9
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
9: aload 2
athrow
StackMap locals: java.lang.String byte[]
StackMap stack: java.io.IOException
10: astore 2
start local 2 11: getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.LOG:Lcom/sun/org/slf4j/internal/Logger;
aload 2
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
aload 2
invokevirtual com.sun.org.slf4j.internal.Logger.debug:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 12: goto 14
13: StackMap locals:
StackMap stack:
getstatic com.sun.org.apache.xml.internal.security.utils.JavaUtils.LOG:Lcom/sun/org/slf4j/internal/Logger;
ldc "writeBytesToFilename got null byte[] pointed"
invokevirtual com.sun.org.slf4j.internal.Logger.debug:(Ljava/lang/String;)V
14: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 filename Ljava/lang/String;
0 15 1 bytes [B
3 6 4 outputStream Ljava/io/OutputStream;
11 12 2 ex Ljava/io/IOException;
Exception table:
from to target type
3 4 5 any
2 7 7 any
1 10 10 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
aconst_null
astore 2
1: 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
start local 3 2: sipush 4096
newarray 8
astore 4
start local 4 3: goto 5
start local 5 4: StackMap locals: java.io.InputStream java.lang.Throwable java.lang.Throwable 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 5: StackMap locals:
StackMap stack:
aload 0
aload 4
invokevirtual java.io.InputStream.read:([B)I
dup
istore 5
start local 5 6: ifgt 4
7: aload 3
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.toByteArray:()[B
8: aload 3
ifnull 9
aload 3
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
9: StackMap locals: java.io.InputStream java.lang.Throwable java.lang.Throwable com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream byte[] int
StackMap stack: byte[]
areturn
end local 5 end local 4 StackMap locals: java.io.InputStream java.lang.Throwable java.lang.Throwable com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream
StackMap stack: java.lang.Throwable
10: astore 1
11: aload 3
ifnull 12
aload 3
invokevirtual com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream.close:()V
end local 3 StackMap locals:
StackMap stack:
12: aload 1
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
13: astore 2
aload 1
ifnonnull 14
aload 2
astore 1
goto 15
StackMap locals:
StackMap stack:
14: aload 1
aload 2
if_acmpeq 15
aload 1
aload 2
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
15: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 inputStream Ljava/io/InputStream;
2 12 3 baos Lcom/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream;
3 10 4 buf [B
4 5 5 len I
6 10 5 len I
Exception table:
from to target type
2 8 10 any
1 9 13 any
10 13 13 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"