public final class io.netty.handler.ssl.util.SelfSignedCertificate
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: io.netty.handler.ssl.util.SelfSignedCertificate
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.Date DEFAULT_NOT_BEFORE;
descriptor: Ljava/util/Date;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.Date DEFAULT_NOT_AFTER;
descriptor: Ljava/util/Date;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.io.File certificate;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.io.File privateKey;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.security.cert.X509Certificate cert;
descriptor: Ljava/security/cert/X509Certificate;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.security.PrivateKey key;
descriptor: Ljava/security/PrivateKey;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=0, args_size=0
0: ldc Lio/netty/handler/ssl/util/SelfSignedCertificate;
invokestatic io.netty.util.internal.logging.InternalLoggerFactory.getInstance:(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;
putstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
1: new java.util.Date
dup
2: ldc "io.netty.selfSignedCertificate.defaultNotBefore"
invokestatic java.lang.System.currentTimeMillis:()J
ldc 31536000000
lsub
3: invokestatic io.netty.util.internal.SystemPropertyUtil.getLong:(Ljava/lang/String;J)J
invokespecial java.util.Date.<init>:(J)V
putstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_BEFORE:Ljava/util/Date;
4: new java.util.Date
dup
5: ldc "io.netty.selfSignedCertificate.defaultNotAfter"
ldc 253402300799000
6: invokestatic io.netty.util.internal.SystemPropertyUtil.getLong:(Ljava/lang/String;J)J
invokespecial java.util.Date.<init>:(J)V
putstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_AFTER:Ljava/util/Date;
7: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_BEFORE:Ljava/util/Date;
getstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_AFTER:Ljava/util/Date;
invokespecial io.netty.handler.ssl.util.SelfSignedCertificate.<init>:(Ljava/util/Date;Ljava/util/Date;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
Exceptions:
throws java.security.cert.CertificateException
public void <init>(java.util.Date, java.util.Date);
descriptor: (Ljava/util/Date;Ljava/util/Date;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
ldc "example.com"
aload 1
aload 2
invokespecial io.netty.handler.ssl.util.SelfSignedCertificate.<init>:(Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
0 2 1 notBefore Ljava/util/Date;
0 2 2 notAfter Ljava/util/Date;
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
notBefore
notAfter
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
getstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_BEFORE:Ljava/util/Date;
getstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_AFTER:Ljava/util/Date;
invokespecial io.netty.handler.ssl.util.SelfSignedCertificate.<init>:(Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
0 2 1 fqdn Ljava/lang/String;
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
fqdn
public void <init>(java.lang.String, java.util.Date, java.util.Date);
descriptor: (Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
invokestatic io.netty.handler.ssl.util.ThreadLocalInsecureRandom.current:()Ljava/security/SecureRandom;
sipush 1024
aload 2
aload 3
invokespecial io.netty.handler.ssl.util.SelfSignedCertificate.<init>:(Ljava/lang/String;Ljava/security/SecureRandom;ILjava/util/Date;Ljava/util/Date;)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
0 2 1 fqdn Ljava/lang/String;
0 2 2 notBefore Ljava/util/Date;
0 2 3 notAfter Ljava/util/Date;
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
fqdn
notBefore
notAfter
public void <init>(java.lang.String, java.security.SecureRandom, int);
descriptor: (Ljava/lang/String;Ljava/security/SecureRandom;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 2
iload 3
getstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_BEFORE:Ljava/util/Date;
getstatic io.netty.handler.ssl.util.SelfSignedCertificate.DEFAULT_NOT_AFTER:Ljava/util/Date;
invokespecial io.netty.handler.ssl.util.SelfSignedCertificate.<init>:(Ljava/lang/String;Ljava/security/SecureRandom;ILjava/util/Date;Ljava/util/Date;)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
0 2 1 fqdn Ljava/lang/String;
0 2 2 random Ljava/security/SecureRandom;
0 2 3 bits I
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
fqdn
random
bits
public void <init>(java.lang.String, java.security.SecureRandom, int, java.util.Date, java.util.Date);
descriptor: (Ljava/lang/String;Ljava/security/SecureRandom;ILjava/util/Date;Ljava/util/Date;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=12, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: ldc "RSA"
invokestatic java.security.KeyPairGenerator.getInstance:(Ljava/lang/String;)Ljava/security/KeyPairGenerator;
astore 7
start local 7 2: aload 7
iload 3
aload 2
invokevirtual java.security.KeyPairGenerator.initialize:(ILjava/security/SecureRandom;)V
3: aload 7
invokevirtual java.security.KeyPairGenerator.generateKeyPair:()Ljava/security/KeyPair;
astore 6
end local 7 start local 6 4: goto 7
end local 6 StackMap locals: io.netty.handler.ssl.util.SelfSignedCertificate java.lang.String java.security.SecureRandom int java.util.Date java.util.Date
StackMap stack: java.security.NoSuchAlgorithmException
5: astore 7
start local 7 6: new java.lang.Error
dup
aload 7
invokespecial java.lang.Error.<init>:(Ljava/lang/Throwable;)V
athrow
end local 7 start local 6 7: StackMap locals: java.security.KeyPair
StackMap stack:
aload 1
aload 6
aload 2
aload 4
aload 5
invokestatic io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator.generate:(Ljava/lang/String;Ljava/security/KeyPair;Ljava/security/SecureRandom;Ljava/util/Date;Ljava/util/Date;)[Ljava/lang/String;
astore 7
start local 7 8: goto 19
end local 7 StackMap locals:
StackMap stack: java.lang.Throwable
9: astore 8
start local 8 10: getstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
ldc "Failed to generate a self-signed X.509 certificate using sun.security.x509:"
aload 8
invokeinterface io.netty.util.internal.logging.InternalLogger.debug:(Ljava/lang/String;Ljava/lang/Throwable;)V
11: aload 1
aload 6
aload 2
aload 4
aload 5
invokestatic io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator.generate:(Ljava/lang/String;Ljava/security/KeyPair;Ljava/security/SecureRandom;Ljava/util/Date;Ljava/util/Date;)[Ljava/lang/String;
astore 7
start local 7 12: goto 19
end local 7 StackMap locals: io.netty.handler.ssl.util.SelfSignedCertificate java.lang.String java.security.SecureRandom int java.util.Date java.util.Date java.security.KeyPair top java.lang.Throwable
StackMap stack: java.lang.Throwable
13: astore 9
start local 9 14: getstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
ldc "Failed to generate a self-signed X.509 certificate using Bouncy Castle:"
aload 9
invokeinterface io.netty.util.internal.logging.InternalLogger.debug:(Ljava/lang/String;Ljava/lang/Throwable;)V
15: new java.security.cert.CertificateException
dup
16: ldc "No provider succeeded to generate a self-signed certificate. See debug log for the root cause."
17: aload 9
18: invokespecial java.security.cert.CertificateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 9 end local 8 start local 7 19: StackMap locals: io.netty.handler.ssl.util.SelfSignedCertificate java.lang.String java.security.SecureRandom int java.util.Date java.util.Date java.security.KeyPair java.lang.String[]
StackMap stack:
aload 0
new java.io.File
dup
aload 7
iconst_0
aaload
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
putfield io.netty.handler.ssl.util.SelfSignedCertificate.certificate:Ljava/io/File;
20: aload 0
new java.io.File
dup
aload 7
iconst_1
aaload
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
putfield io.netty.handler.ssl.util.SelfSignedCertificate.privateKey:Ljava/io/File;
21: aload 0
aload 6
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
putfield io.netty.handler.ssl.util.SelfSignedCertificate.key:Ljava/security/PrivateKey;
22: aconst_null
astore 8
start local 8 23: new java.io.FileInputStream
dup
aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.certificate:Ljava/io/File;
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
astore 8
24: aload 0
ldc "X509"
invokestatic java.security.cert.CertificateFactory.getInstance:(Ljava/lang/String;)Ljava/security/cert/CertificateFactory;
aload 8
invokevirtual java.security.cert.CertificateFactory.generateCertificate:(Ljava/io/InputStream;)Ljava/security/cert/Certificate;
checkcast java.security.cert.X509Certificate
putfield io.netty.handler.ssl.util.SelfSignedCertificate.cert:Ljava/security/cert/X509Certificate;
25: goto 35
StackMap locals: io.netty.handler.ssl.util.SelfSignedCertificate java.lang.String java.security.SecureRandom int java.util.Date java.util.Date java.security.KeyPair java.lang.String[] java.io.FileInputStream
StackMap stack: java.lang.Exception
26: astore 9
start local 9 27: new java.security.cert.CertificateEncodingException
dup
aload 9
invokespecial java.security.cert.CertificateEncodingException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 9 28: StackMap locals:
StackMap stack: java.lang.Throwable
astore 10
29: aload 8
ifnull 34
30: aload 8
invokevirtual java.io.FileInputStream.close:()V
31: goto 34
StackMap locals: io.netty.handler.ssl.util.SelfSignedCertificate java.lang.String java.security.SecureRandom int java.util.Date java.util.Date java.security.KeyPair java.lang.String[] java.io.FileInputStream top java.lang.Throwable
StackMap stack: java.io.IOException
32: astore 11
start local 11 33: getstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
new java.lang.StringBuilder
dup
ldc "Failed to close a file: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.certificate:Ljava/io/File;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 11
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 11 34: StackMap locals:
StackMap stack:
aload 10
athrow
35: StackMap locals: io.netty.handler.ssl.util.SelfSignedCertificate java.lang.String java.security.SecureRandom int java.util.Date java.util.Date java.security.KeyPair java.lang.String[] java.io.FileInputStream
StackMap stack:
aload 8
ifnull 40
36: aload 8
invokevirtual java.io.FileInputStream.close:()V
37: goto 40
StackMap locals:
StackMap stack: java.io.IOException
38: astore 11
start local 11 39: getstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
new java.lang.StringBuilder
dup
ldc "Failed to close a file: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.certificate:Ljava/io/File;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 11
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 11 40: StackMap locals:
StackMap stack:
return
end local 8 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 41 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
0 41 1 fqdn Ljava/lang/String;
0 41 2 random Ljava/security/SecureRandom;
0 41 3 bits I
0 41 4 notBefore Ljava/util/Date;
0 41 5 notAfter Ljava/util/Date;
4 5 6 keypair Ljava/security/KeyPair;
7 41 6 keypair Ljava/security/KeyPair;
2 4 7 keyGen Ljava/security/KeyPairGenerator;
6 7 7 e Ljava/security/NoSuchAlgorithmException;
8 9 7 paths [Ljava/lang/String;
12 13 7 paths [Ljava/lang/String;
19 41 7 paths [Ljava/lang/String;
10 19 8 t Ljava/lang/Throwable;
14 19 9 t2 Ljava/lang/Throwable;
23 41 8 certificateInput Ljava/io/FileInputStream;
27 28 9 e Ljava/lang/Exception;
33 34 11 e Ljava/io/IOException;
39 40 11 e Ljava/io/IOException;
Exception table:
from to target type
1 4 5 Class java.security.NoSuchAlgorithmException
7 8 9 Class java.lang.Throwable
11 12 13 Class java.lang.Throwable
23 25 26 Class java.lang.Exception
23 28 28 any
30 31 32 Class java.io.IOException
36 37 38 Class java.io.IOException
Exceptions:
throws java.security.cert.CertificateException
MethodParameters:
Name Flags
fqdn
random
bits
notBefore
notAfter
public java.io.File certificate();
descriptor: ()Ljava/io/File;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.certificate:Ljava/io/File;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
public java.io.File privateKey();
descriptor: ()Ljava/io/File;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.privateKey:Ljava/io/File;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
public java.security.cert.X509Certificate cert();
descriptor: ()Ljava/security/cert/X509Certificate;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.cert:Ljava/security/cert/X509Certificate;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
public java.security.PrivateKey key();
descriptor: ()Ljava/security/PrivateKey;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.key:Ljava/security/PrivateKey;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
public void delete();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.certificate:Ljava/io/File;
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
1: aload 0
getfield io.netty.handler.ssl.util.SelfSignedCertificate.privateKey:Ljava/io/File;
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/netty/handler/ssl/util/SelfSignedCertificate;
static java.lang.String[] newSelfSignedCertificate(java.lang.String, java.security.PrivateKey, java.security.cert.X509Certificate);
descriptor: (Ljava/lang/String;Ljava/security/PrivateKey;Ljava/security/cert/X509Certificate;)[Ljava/lang/String;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=12, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokeinterface java.security.PrivateKey.getEncoded:()[B
invokestatic io.netty.buffer.Unpooled.wrappedBuffer:([B)Lio/netty/buffer/ByteBuf;
astore 3
start local 3 1: aload 3
iconst_1
invokestatic io.netty.handler.codec.base64.Base64.encode:(Lio/netty/buffer/ByteBuf;Z)Lio/netty/buffer/ByteBuf;
astore 4
start local 4 2: new java.lang.StringBuilder
dup
ldc "-----BEGIN PRIVATE KEY-----\n"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
3: aload 4
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokevirtual io.netty.buffer.ByteBuf.toString:(Ljava/nio/charset/Charset;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
4: ldc "\n-----END PRIVATE KEY-----\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 5
start local 5 6: goto 10
end local 5 StackMap locals: java.lang.String java.security.PrivateKey java.security.cert.X509Certificate io.netty.buffer.ByteBuf io.netty.buffer.ByteBuf
StackMap stack: java.lang.Throwable
7: astore 6
8: aload 4
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
9: aload 6
athrow
start local 5 10: StackMap locals: java.lang.String
StackMap stack:
aload 4
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
11: goto 15
end local 5 end local 4 StackMap locals: java.lang.String java.security.PrivateKey java.security.cert.X509Certificate io.netty.buffer.ByteBuf
StackMap stack: java.lang.Throwable
12: astore 7
13: aload 3
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
14: aload 7
athrow
start local 4 start local 5 15: StackMap locals: io.netty.buffer.ByteBuf java.lang.String
StackMap stack:
aload 3
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
16: new java.lang.StringBuilder
dup
ldc "keyutil_"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
bipush 95
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
ldc ".key"
invokestatic java.io.File.createTempFile:(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;
astore 6
start local 6 17: aload 6
invokevirtual java.io.File.deleteOnExit:()V
18: new java.io.FileOutputStream
dup
aload 6
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
astore 7
start local 7 19: aload 7
aload 5
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.io.OutputStream.write:([B)V
20: aload 7
invokevirtual java.io.OutputStream.close:()V
21: aconst_null
astore 7
22: goto 28
StackMap locals: java.lang.String java.security.PrivateKey java.security.cert.X509Certificate io.netty.buffer.ByteBuf io.netty.buffer.ByteBuf java.lang.String java.io.File java.io.OutputStream
StackMap stack: java.lang.Throwable
23: astore 8
24: aload 7
ifnull 27
25: aload 6
aload 7
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeClose:(Ljava/io/File;Ljava/io/OutputStream;)V
26: aload 6
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
27: StackMap locals: java.lang.Throwable
StackMap stack:
aload 8
athrow
28: StackMap locals:
StackMap stack:
aload 7
ifnull 31
29: aload 6
aload 7
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeClose:(Ljava/io/File;Ljava/io/OutputStream;)V
30: aload 6
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
31: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.security.cert.X509Certificate.getEncoded:()[B
invokestatic io.netty.buffer.Unpooled.wrappedBuffer:([B)Lio/netty/buffer/ByteBuf;
astore 3
32: aload 3
iconst_1
invokestatic io.netty.handler.codec.base64.Base64.encode:(Lio/netty/buffer/ByteBuf;Z)Lio/netty/buffer/ByteBuf;
astore 4
33: new java.lang.StringBuilder
dup
ldc "-----BEGIN CERTIFICATE-----\n"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
34: aload 4
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokevirtual io.netty.buffer.ByteBuf.toString:(Ljava/nio/charset/Charset;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
35: ldc "\n-----END CERTIFICATE-----\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
36: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 8
start local 8 37: goto 41
end local 8 StackMap locals:
StackMap stack: java.lang.Throwable
38: astore 9
39: aload 4
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
40: aload 9
athrow
start local 8 41: StackMap locals: java.lang.String
StackMap stack:
aload 4
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
42: goto 46
end local 8 StackMap locals: java.lang.String java.security.PrivateKey java.security.cert.X509Certificate io.netty.buffer.ByteBuf io.netty.buffer.ByteBuf java.lang.String java.io.File java.io.OutputStream
StackMap stack: java.lang.Throwable
43: astore 10
44: aload 3
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
45: aload 10
athrow
start local 8 46: StackMap locals: java.lang.String
StackMap stack:
aload 3
invokevirtual io.netty.buffer.ByteBuf.release:()Z
pop
47: new java.lang.StringBuilder
dup
ldc "keyutil_"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
bipush 95
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
ldc ".crt"
invokestatic java.io.File.createTempFile:(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;
astore 9
start local 9 48: aload 9
invokevirtual java.io.File.deleteOnExit:()V
49: new java.io.FileOutputStream
dup
aload 9
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
astore 10
start local 10 50: aload 10
aload 8
getstatic io.netty.util.CharsetUtil.US_ASCII:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.io.OutputStream.write:([B)V
51: aload 10
invokevirtual java.io.OutputStream.close:()V
52: aconst_null
astore 10
53: goto 60
StackMap locals: java.lang.String java.security.PrivateKey java.security.cert.X509Certificate io.netty.buffer.ByteBuf io.netty.buffer.ByteBuf java.lang.String java.io.File java.io.OutputStream java.lang.String java.io.File java.io.OutputStream
StackMap stack: java.lang.Throwable
54: astore 11
55: aload 10
ifnull 59
56: aload 9
aload 10
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeClose:(Ljava/io/File;Ljava/io/OutputStream;)V
57: aload 9
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
58: aload 6
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
59: StackMap locals: java.lang.Throwable
StackMap stack:
aload 11
athrow
60: StackMap locals:
StackMap stack:
aload 10
ifnull 64
61: aload 9
aload 10
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeClose:(Ljava/io/File;Ljava/io/OutputStream;)V
62: aload 9
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
63: aload 6
invokestatic io.netty.handler.ssl.util.SelfSignedCertificate.safeDelete:(Ljava/io/File;)V
64: StackMap locals:
StackMap stack:
iconst_2
anewarray java.lang.String
dup
iconst_0
aload 9
invokevirtual java.io.File.getPath:()Ljava/lang/String;
aastore
dup
iconst_1
aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
aastore
areturn
end local 10 end local 9 end local 8 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 65 0 fqdn Ljava/lang/String;
0 65 1 key Ljava/security/PrivateKey;
0 65 2 cert Ljava/security/cert/X509Certificate;
1 65 3 wrappedBuf Lio/netty/buffer/ByteBuf;
2 12 4 encodedBuf Lio/netty/buffer/ByteBuf;
15 65 4 encodedBuf Lio/netty/buffer/ByteBuf;
6 7 5 keyText Ljava/lang/String;
10 12 5 keyText Ljava/lang/String;
15 65 5 keyText Ljava/lang/String;
17 65 6 keyFile Ljava/io/File;
19 65 7 keyOut Ljava/io/OutputStream;
37 38 8 certText Ljava/lang/String;
41 43 8 certText Ljava/lang/String;
46 65 8 certText Ljava/lang/String;
48 65 9 certFile Ljava/io/File;
50 65 10 certOut Ljava/io/OutputStream;
Exception table:
from to target type
2 7 7 any
1 12 12 any
19 23 23 any
33 38 38 any
32 43 43 any
50 54 54 any
Exceptions:
throws java.io.IOException, java.security.cert.CertificateEncodingException
MethodParameters:
Name Flags
fqdn
key
cert
private static void safeDelete(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.delete:()Z
ifne 2
1: getstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
new java.lang.StringBuilder
dup
ldc "Failed to delete a 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;
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 certFile Ljava/io/File;
MethodParameters:
Name Flags
certFile
private static void safeClose(java.io.File, java.io.OutputStream);
descriptor: (Ljava/io/File;Ljava/io/OutputStream;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.io.OutputStream.close:()V
1: goto 4
StackMap locals:
StackMap stack: java.io.IOException
2: astore 2
start local 2 3: getstatic io.netty.handler.ssl.util.SelfSignedCertificate.logger:Lio/netty/util/internal/logging/InternalLogger;
new java.lang.StringBuilder
dup
ldc "Failed to close a 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;
aload 2
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 keyFile Ljava/io/File;
0 5 1 keyOut Ljava/io/OutputStream;
3 4 2 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
keyFile
keyOut
}
SourceFile: "SelfSignedCertificate.java"