final class io.netty.handler.ssl.PemReader
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: io.netty.handler.ssl.PemReader
super_class: java.lang.Object
{
private static final io.netty.util.internal.logging.InternalLogger logger;
descriptor: Lio/netty/util/internal/logging/InternalLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern CERT_PATTERN;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern KEY_PATTERN;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Lio/netty/handler/ssl/PemReader;
invokestatic io.netty.util.internal.logging.InternalLoggerFactory.getInstance:(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;
putstatic io.netty.handler.ssl.PemReader.logger:Lio/netty/util/internal/logging/InternalLogger;
1: ldc "-+BEGIN\\s+.*CERTIFICATE[^-]*-+(?:\\s|\\r|\\n)+([a-z0-9+/=\\r\\n]+)-+END\\s+.*CERTIFICATE[^-]*-+"
2: iconst_2
3: invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;I)Ljava/util/regex/Pattern;
putstatic io.netty.handler.ssl.PemReader.CERT_PATTERN:Ljava/util/regex/Pattern;
4: ldc "-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+([a-z0-9+/=\\r\\n]+)-+END\\s+.*PRIVATE\\s+KEY[^-]*-+"
5: iconst_2
6: invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;I)Ljava/util/regex/Pattern;
putstatic io.netty.handler.ssl.PemReader.KEY_PATTERN:Ljava/util/regex/Pattern;
7: return
LocalVariableTable:
Start End Slot Name Signature
static io.netty.buffer.ByteBuf[] readCertificates(java.io.File);
descriptor: (Ljava/io/File;)[Lio/netty/buffer/ByteBuf;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: new java.io.FileInputStream
dup
aload 0
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
astore 1
start local 1 1: aload 1
invokestatic io.netty.handler.ssl.PemReader.readCertificates:(Ljava/io/InputStream;)[Lio/netty/buffer/ByteBuf;
astore 3
2: aload 1
invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
3: aload 3
areturn
4: StackMap locals: java.io.File java.io.InputStream
StackMap stack: java.lang.Throwable
astore 2
5: aload 1
invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
6: aload 2
athrow
end local 1 7: StackMap locals: java.io.File
StackMap stack: java.io.FileNotFoundException
pop
8: new java.security.cert.CertificateException
dup
new java.lang.StringBuilder
dup
ldc "could not find certificate file: "
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;
invokespecial java.security.cert.CertificateException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 file Ljava/io/File;
1 7 1 in Ljava/io/InputStream;
Exception table:
from to target type
1 2 4 any
0 3 7 Class java.io.FileNotFoundException
4 7 7 Class java.io.FileNotFoundException
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
file
static io.netty.buffer.ByteBuf[] readCertificates(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)[Lio/netty/buffer/ByteBuf;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: aload 0
invokestatic io.netty.handler.ssl.PemReader.readContent:(Ljava/io/InputStream;)Ljava/lang/String;
astore 1
start local 1 1: goto 4
end local 1 StackMap locals:
StackMap stack: java.io.IOException
2: astore 2
start local 2 3: new java.security.cert.CertificateException
dup
ldc "failed to read certificate input stream"
aload 2
invokespecial java.security.cert.CertificateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 start local 1 4: StackMap locals: java.lang.String
StackMap stack:
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 5: getstatic io.netty.handler.ssl.PemReader.CERT_PATTERN:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 3
start local 3 6: iconst_0
istore 4
start local 4 7: StackMap locals: java.util.List java.util.regex.Matcher int
StackMap stack:
aload 3
iload 4
invokevirtual java.util.regex.Matcher.find:(I)Z
ifne 9
8: goto 15
9: StackMap locals:
StackMap stack:
aload 3
iconst_1
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokestatic io.netty.buffer.Unpooled.copiedBuffer:(Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lio/netty/buffer/ByteBuf;
astore 5
start local 5 10: aload 5
invokestatic io.netty.handler.codec.base64.Base64.decode:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;
astore 6
start local 6 11: aload 5
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
12: aload 2
aload 6
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
13: aload 3
invokevirtual java.util.regex.Matcher.end:()I
istore 4
end local 6 end local 5 14: goto 7
15: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 17
16: new java.security.cert.CertificateException
dup
ldc "found no certificates in input stream"
invokespecial java.security.cert.CertificateException.<init>:(Ljava/lang/String;)V
athrow
17: StackMap locals:
StackMap stack:
aload 2
aload 2
invokeinterface java.util.List.size:()I
anewarray io.netty.buffer.ByteBuf
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast io.netty.buffer.ByteBuf[]
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 in Ljava/io/InputStream;
1 2 1 content Ljava/lang/String;
4 18 1 content Ljava/lang/String;
3 4 2 e Ljava/io/IOException;
5 18 2 certs Ljava/util/List<Lio/netty/buffer/ByteBuf;>;
6 18 3 m Ljava/util/regex/Matcher;
7 18 4 start I
10 14 5 base64 Lio/netty/buffer/ByteBuf;
11 14 6 der Lio/netty/buffer/ByteBuf;
Exception table:
from to target type
0 1 2 Class java.io.IOException
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
in
static io.netty.buffer.ByteBuf readPrivateKey(java.io.File);
descriptor: (Ljava/io/File;)Lio/netty/buffer/ByteBuf;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: new java.io.FileInputStream
dup
aload 0
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
astore 1
start local 1 1: aload 1
invokestatic io.netty.handler.ssl.PemReader.readPrivateKey:(Ljava/io/InputStream;)Lio/netty/buffer/ByteBuf;
astore 3
2: aload 1
invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
3: aload 3
areturn
4: StackMap locals: java.io.File java.io.InputStream
StackMap stack: java.lang.Throwable
astore 2
5: aload 1
invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
6: aload 2
athrow
end local 1 7: StackMap locals: java.io.File
StackMap stack: java.io.FileNotFoundException
pop
8: new java.security.KeyException
dup
new java.lang.StringBuilder
dup
ldc "could not find key file: "
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;
invokespecial java.security.KeyException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 file Ljava/io/File;
1 7 1 in Ljava/io/InputStream;
Exception table:
from to target type
1 2 4 any
0 3 7 Class java.io.FileNotFoundException
4 7 7 Class java.io.FileNotFoundException
Exceptions:
throws java.security.KeyException
MethodParameters:
Name Flags
file
static io.netty.buffer.ByteBuf readPrivateKey(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)Lio/netty/buffer/ByteBuf;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
invokestatic io.netty.handler.ssl.PemReader.readContent:(Ljava/io/InputStream;)Ljava/lang/String;
astore 1
start local 1 1: goto 4
end local 1 StackMap locals:
StackMap stack: java.io.IOException
2: astore 2
start local 2 3: new java.security.KeyException
dup
ldc "failed to read key input stream"
aload 2
invokespecial java.security.KeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 start local 1 4: StackMap locals: java.lang.String
StackMap stack:
getstatic io.netty.handler.ssl.PemReader.KEY_PATTERN:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 2
start local 2 5: aload 2
invokevirtual java.util.regex.Matcher.find:()Z
ifne 7
6: new java.security.KeyException
dup
ldc "could not find a PKCS #8 private key in input stream (see http://netty.io/wiki/sslcontextbuilder-and-private-key.html for more information)"
invokespecial java.security.KeyException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: java.util.regex.Matcher
StackMap stack:
aload 2
iconst_1
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokestatic io.netty.buffer.Unpooled.copiedBuffer:(Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lio/netty/buffer/ByteBuf;
astore 3
start local 3 8: aload 3
invokestatic io.netty.handler.codec.base64.Base64.decode:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;
astore 4
start local 4 9: aload 3
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
10: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 in Ljava/io/InputStream;
1 2 1 content Ljava/lang/String;
4 11 1 content Ljava/lang/String;
3 4 2 e Ljava/io/IOException;
5 11 2 m Ljava/util/regex/Matcher;
8 11 3 base64 Lio/netty/buffer/ByteBuf;
9 11 4 der Lio/netty/buffer/ByteBuf;
Exception table:
from to target type
0 1 2 Class java.io.IOException
Exceptions:
throws java.security.KeyException
MethodParameters:
Name Flags
in
private static java.lang.String readContent(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
astore 1
start local 1 1: sipush 8192
newarray 8
astore 2
start local 2 2: StackMap locals: java.io.ByteArrayOutputStream byte[]
StackMap stack:
aload 0
aload 2
invokevirtual java.io.InputStream.read:([B)I
istore 3
start local 3 3: iload 3
ifge 5
4: goto 7
5: StackMap locals: int
StackMap stack:
aload 1
aload 2
iconst_0
iload 3
invokevirtual java.io.ByteArrayOutputStream.write:([BII)V
end local 3 6: goto 2
7: StackMap locals:
StackMap stack:
aload 1
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
invokevirtual java.io.ByteArrayOutputStream.toString:(Ljava/lang/String;)Ljava/lang/String;
astore 5
8: aload 1
invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/OutputStream;)V
9: aload 5
areturn
end local 2 10: StackMap locals: java.io.InputStream java.io.ByteArrayOutputStream
StackMap stack: java.lang.Throwable
astore 4
11: aload 1
invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/OutputStream;)V
12: aload 4
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 in Ljava/io/InputStream;
1 13 1 out Ljava/io/ByteArrayOutputStream;
2 10 2 buf [B
3 6 3 ret I
Exception table:
from to target type
1 8 10 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
private static void safeClose(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.InputStream.close:()V
1: goto 4
StackMap locals:
StackMap stack: java.io.IOException
2: astore 1
start local 1 3: getstatic io.netty.handler.ssl.PemReader.logger:Lio/netty/util/internal/logging/InternalLogger;
ldc "Failed to close a stream."
aload 1
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 1 4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 in Ljava/io/InputStream;
3 4 1 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
in
private static void safeClose(java.io.OutputStream);
descriptor: (Ljava/io/OutputStream;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.OutputStream.close:()V
1: goto 4
StackMap locals:
StackMap stack: java.io.IOException
2: astore 1
start local 1 3: getstatic io.netty.handler.ssl.PemReader.logger:Lio/netty/util/internal/logging/InternalLogger;
ldc "Failed to close a stream."
aload 1
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 1 4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 out Ljava/io/OutputStream;
3 4 1 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
out
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
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/handler/ssl/PemReader;
}
SourceFile: "PemReader.java"