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: .line 46
            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: .line 49
            ldc "-+BEGIN\\s+.*CERTIFICATE[^-]*-+(?:\\s|\\r|\\n)+([a-z0-9+/=\\r\\n]+)-+END\\s+.*CERTIFICATE[^-]*-+"
         2: .line 52
            iconst_2
         3: .line 48
            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: .line 54
            ldc "-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+([a-z0-9+/=\\r\\n]+)-+END\\s+.*PRIVATE\\s+KEY[^-]*-+"
         5: .line 57
            iconst_2
         6: .line 53
            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: .line 57
            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 // java.io.File file
         0: .line 61
            new java.io.FileInputStream
            dup
            aload 0 /* file */
            invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
            astore 1 /* in */
        start local 1 // java.io.InputStream in
         1: .line 64
            aload 1 /* in */
            invokestatic io.netty.handler.ssl.PemReader.readCertificates:(Ljava/io/InputStream;)[Lio/netty/buffer/ByteBuf;
            astore 3
         2: .line 66
            aload 1 /* in */
            invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
         3: .line 64
            aload 3
            areturn
         4: .line 65
      StackMap locals: java.io.File java.io.InputStream
      StackMap stack: java.lang.Throwable
            astore 2
         5: .line 66
            aload 1 /* in */
            invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
         6: .line 67
            aload 2
            athrow
        end local 1 // java.io.InputStream in
         7: .line 68
      StackMap locals: java.io.File
      StackMap stack: java.io.FileNotFoundException
            pop
         8: .line 69
            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 /* file */
            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 // java.io.File file
      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 // java.io.InputStream in
         0: .line 76
            aload 0 /* in */
            invokestatic io.netty.handler.ssl.PemReader.readContent:(Ljava/io/InputStream;)Ljava/lang/String;
            astore 1 /* content */
        start local 1 // java.lang.String content
         1: .line 77
            goto 4
        end local 1 // java.lang.String content
      StackMap locals:
      StackMap stack: java.io.IOException
         2: astore 2 /* e */
        start local 2 // java.io.IOException e
         3: .line 78
            new java.security.cert.CertificateException
            dup
            ldc "failed to read certificate input stream"
            aload 2 /* e */
            invokespecial java.security.cert.CertificateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
            athrow
        end local 2 // java.io.IOException e
        start local 1 // java.lang.String content
         4: .line 81
      StackMap locals: java.lang.String
      StackMap stack:
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 2 /* certs */
        start local 2 // java.util.List certs
         5: .line 82
            getstatic io.netty.handler.ssl.PemReader.CERT_PATTERN:Ljava/util/regex/Pattern;
            aload 1 /* content */
            invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
            astore 3 /* m */
        start local 3 // java.util.regex.Matcher m
         6: .line 83
            iconst_0
            istore 4 /* start */
        start local 4 // int start
         7: .line 85
      StackMap locals: java.util.List java.util.regex.Matcher int
      StackMap stack:
            aload 3 /* m */
            iload 4 /* start */
            invokevirtual java.util.regex.Matcher.find:(I)Z
            ifne 9
         8: .line 86
            goto 15
         9: .line 89
      StackMap locals:
      StackMap stack:
            aload 3 /* m */
            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 /* base64 */
        start local 5 // io.netty.buffer.ByteBuf base64
        10: .line 90
            aload 5 /* base64 */
            invokestatic io.netty.handler.codec.base64.Base64.decode:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;
            astore 6 /* der */
        start local 6 // io.netty.buffer.ByteBuf der
        11: .line 91
            aload 5 /* base64 */
            invokevirtual io.netty.buffer.ByteBuf.release:()Z
            pop
        12: .line 92
            aload 2 /* certs */
            aload 6 /* der */
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        13: .line 94
            aload 3 /* m */
            invokevirtual java.util.regex.Matcher.end:()I
            istore 4 /* start */
        end local 6 // io.netty.buffer.ByteBuf der
        end local 5 // io.netty.buffer.ByteBuf base64
        14: .line 84
            goto 7
        15: .line 97
      StackMap locals:
      StackMap stack:
            aload 2 /* certs */
            invokeinterface java.util.List.isEmpty:()Z
            ifeq 17
        16: .line 98
            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: .line 101
      StackMap locals:
      StackMap stack:
            aload 2 /* certs */
            aload 2 /* certs */
            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 // int start
        end local 3 // java.util.regex.Matcher m
        end local 2 // java.util.List certs
        end local 1 // java.lang.String content
        end local 0 // java.io.InputStream in
      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 // java.io.File file
         0: .line 106
            new java.io.FileInputStream
            dup
            aload 0 /* file */
            invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
            astore 1 /* in */
        start local 1 // java.io.InputStream in
         1: .line 109
            aload 1 /* in */
            invokestatic io.netty.handler.ssl.PemReader.readPrivateKey:(Ljava/io/InputStream;)Lio/netty/buffer/ByteBuf;
            astore 3
         2: .line 111
            aload 1 /* in */
            invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
         3: .line 109
            aload 3
            areturn
         4: .line 110
      StackMap locals: java.io.File java.io.InputStream
      StackMap stack: java.lang.Throwable
            astore 2
         5: .line 111
            aload 1 /* in */
            invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/InputStream;)V
         6: .line 112
            aload 2
            athrow
        end local 1 // java.io.InputStream in
         7: .line 113
      StackMap locals: java.io.File
      StackMap stack: java.io.FileNotFoundException
            pop
         8: .line 114
            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 /* file */
            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 // java.io.File file
      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 // java.io.InputStream in
         0: .line 121
            aload 0 /* in */
            invokestatic io.netty.handler.ssl.PemReader.readContent:(Ljava/io/InputStream;)Ljava/lang/String;
            astore 1 /* content */
        start local 1 // java.lang.String content
         1: .line 122
            goto 4
        end local 1 // java.lang.String content
      StackMap locals:
      StackMap stack: java.io.IOException
         2: astore 2 /* e */
        start local 2 // java.io.IOException e
         3: .line 123
            new java.security.KeyException
            dup
            ldc "failed to read key input stream"
            aload 2 /* e */
            invokespecial java.security.KeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
            athrow
        end local 2 // java.io.IOException e
        start local 1 // java.lang.String content
         4: .line 126
      StackMap locals: java.lang.String
      StackMap stack:
            getstatic io.netty.handler.ssl.PemReader.KEY_PATTERN:Ljava/util/regex/Pattern;
            aload 1 /* content */
            invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
            astore 2 /* m */
        start local 2 // java.util.regex.Matcher m
         5: .line 127
            aload 2 /* m */
            invokevirtual java.util.regex.Matcher.find:()Z
            ifne 7
         6: .line 128
            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: .line 132
      StackMap locals: java.util.regex.Matcher
      StackMap stack:
            aload 2 /* m */
            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 /* base64 */
        start local 3 // io.netty.buffer.ByteBuf base64
         8: .line 133
            aload 3 /* base64 */
            invokestatic io.netty.handler.codec.base64.Base64.decode:(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;
            astore 4 /* der */
        start local 4 // io.netty.buffer.ByteBuf der
         9: .line 134
            aload 3 /* base64 */
            invokevirtual io.netty.buffer.ByteBuf.release:()Z
            pop
        10: .line 135
            aload 4 /* der */
            areturn
        end local 4 // io.netty.buffer.ByteBuf der
        end local 3 // io.netty.buffer.ByteBuf base64
        end local 2 // java.util.regex.Matcher m
        end local 1 // java.lang.String content
        end local 0 // java.io.InputStream in
      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 // java.io.InputStream in
         0: .line 139
            new java.io.ByteArrayOutputStream
            dup
            invokespecial java.io.ByteArrayOutputStream.<init>:()V
            astore 1 /* out */
        start local 1 // java.io.ByteArrayOutputStream out
         1: .line 141
            sipush 8192
            newarray 8
            astore 2 /* buf */
        start local 2 // byte[] buf
         2: .line 143
      StackMap locals: java.io.ByteArrayOutputStream byte[]
      StackMap stack:
            aload 0 /* in */
            aload 2 /* buf */
            invokevirtual java.io.InputStream.read:([B)I
            istore 3 /* ret */
        start local 3 // int ret
         3: .line 144
            iload 3 /* ret */
            ifge 5
         4: .line 145
            goto 7
         5: .line 147
      StackMap locals: int
      StackMap stack:
            aload 1 /* out */
            aload 2 /* buf */
            iconst_0
            iload 3 /* ret */
            invokevirtual java.io.ByteArrayOutputStream.write:([BII)V
        end local 3 // int ret
         6: .line 142
            goto 2
         7: .line 149
      StackMap locals:
      StackMap stack:
            aload 1 /* out */
            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: .line 151
            aload 1 /* out */
            invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/OutputStream;)V
         9: .line 149
            aload 5
            areturn
        end local 2 // byte[] buf
        10: .line 150
      StackMap locals: java.io.InputStream java.io.ByteArrayOutputStream
      StackMap stack: java.lang.Throwable
            astore 4
        11: .line 151
            aload 1 /* out */
            invokestatic io.netty.handler.ssl.PemReader.safeClose:(Ljava/io/OutputStream;)V
        12: .line 152
            aload 4
            athrow
        end local 1 // java.io.ByteArrayOutputStream out
        end local 0 // java.io.InputStream in
      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 // java.io.InputStream in
         0: .line 157
            aload 0 /* in */
            invokevirtual java.io.InputStream.close:()V
         1: .line 158
            goto 4
      StackMap locals:
      StackMap stack: java.io.IOException
         2: astore 1 /* e */
        start local 1 // java.io.IOException e
         3: .line 159
            getstatic io.netty.handler.ssl.PemReader.logger:Lio/netty/util/internal/logging/InternalLogger;
            ldc "Failed to close a stream."
            aload 1 /* e */
            invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
        end local 1 // java.io.IOException e
         4: .line 161
      StackMap locals:
      StackMap stack:
            return
        end local 0 // java.io.InputStream in
      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 // java.io.OutputStream out
         0: .line 165
            aload 0 /* out */
            invokevirtual java.io.OutputStream.close:()V
         1: .line 166
            goto 4
      StackMap locals:
      StackMap stack: java.io.IOException
         2: astore 1 /* e */
        start local 1 // java.io.IOException e
         3: .line 167
            getstatic io.netty.handler.ssl.PemReader.logger:Lio/netty/util/internal/logging/InternalLogger;
            ldc "Failed to close a stream."
            aload 1 /* e */
            invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
        end local 1 // java.io.IOException e
         4: .line 169
      StackMap locals:
      StackMap stack:
            return
        end local 0 // java.io.OutputStream out
      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 // io.netty.handler.ssl.PemReader this
         0: .line 171
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // io.netty.handler.ssl.PemReader this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lio/netty/handler/ssl/PemReader;
}
SourceFile: "PemReader.java"