final class sun.security.ssl.RSAClientKeyExchange extends sun.security.ssl.HandshakeMessage
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.ssl.RSAClientKeyExchange
super_class: sun.security.ssl.HandshakeMessage
{
private sun.security.ssl.ProtocolVersion protocolVersion;
descriptor: Lsun/security/ssl/ProtocolVersion;
flags: (0x0002) ACC_PRIVATE
javax.crypto.SecretKey preMaster;
descriptor: Ljavax/crypto/SecretKey;
flags: (0x0000)
private byte[] encrypted;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
void <init>(sun.security.ssl.ProtocolVersion, sun.security.ssl.ProtocolVersion, java.security.SecureRandom, java.security.PublicKey);
descriptor: (Lsun/security/ssl/ProtocolVersion;Lsun/security/ssl/ProtocolVersion;Ljava/security/SecureRandom;Ljava/security/PublicKey;)V
flags: (0x0000)
Code:
stack=5, locals=8, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial sun.security.ssl.HandshakeMessage.<init>:()V
1: aload 4
invokeinterface java.security.PublicKey.getAlgorithm:()Ljava/lang/String;
ldc "RSA"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 3
2: new javax.net.ssl.SSLKeyException
dup
ldc "Public key not of type RSA"
invokespecial javax.net.ssl.SSLKeyException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: sun.security.ssl.RSAClientKeyExchange sun.security.ssl.ProtocolVersion sun.security.ssl.ProtocolVersion java.security.SecureRandom java.security.PublicKey
StackMap stack:
aload 0
aload 1
putfield sun.security.ssl.RSAClientKeyExchange.protocolVersion:Lsun/security/ssl/ProtocolVersion;
4: aload 1
getfield sun.security.ssl.ProtocolVersion.v:I
getstatic sun.security.ssl.ProtocolVersion.TLS12:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
if_icmplt 6
5: ldc "SunTls12RsaPremasterSecret"
goto 7
StackMap locals:
StackMap stack:
6: ldc "SunTlsRsaPremasterSecret"
7: StackMap locals:
StackMap stack: java.lang.String
astore 5
start local 5 8: aload 5
invokestatic sun.security.ssl.JsseJce.getKeyGenerator:(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;
astore 6
start local 6 9: aload 6
new sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec
dup
10: aload 2
getfield sun.security.ssl.ProtocolVersion.v:I
aload 1
getfield sun.security.ssl.ProtocolVersion.v:I
invokespecial sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec.<init>:(II)V
aload 3
11: invokevirtual javax.crypto.KeyGenerator.init:(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
12: aload 0
aload 6
invokevirtual javax.crypto.KeyGenerator.generateKey:()Ljavax/crypto/SecretKey;
putfield sun.security.ssl.RSAClientKeyExchange.preMaster:Ljavax/crypto/SecretKey;
13: ldc "RSA/ECB/PKCS1Padding"
invokestatic sun.security.ssl.JsseJce.getCipher:(Ljava/lang/String;)Ljavax/crypto/Cipher;
astore 7
start local 7 14: aload 7
iconst_3
aload 4
aload 3
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/SecureRandom;)V
15: aload 0
aload 7
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.preMaster:Ljavax/crypto/SecretKey;
invokevirtual javax.crypto.Cipher.wrap:(Ljava/security/Key;)[B
putfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
end local 7 end local 6 end local 5 16: goto 23
StackMap locals:
StackMap stack: java.security.GeneralSecurityException
17: astore 5
start local 5 18: new javax.net.ssl.SSLKeyException
dup
19: ldc "RSA premaster secret error"
20: invokespecial javax.net.ssl.SSLKeyException.<init>:(Ljava/lang/String;)V
21: aload 5
invokevirtual javax.net.ssl.SSLKeyException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
22: checkcast javax.net.ssl.SSLKeyException
athrow
end local 5 23: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lsun/security/ssl/RSAClientKeyExchange;
0 24 1 protocolVersion Lsun/security/ssl/ProtocolVersion;
0 24 2 maxVersion Lsun/security/ssl/ProtocolVersion;
0 24 3 generator Ljava/security/SecureRandom;
0 24 4 publicKey Ljava/security/PublicKey;
8 16 5 s Ljava/lang/String;
9 16 6 kg Ljavax/crypto/KeyGenerator;
14 16 7 cipher Ljavax/crypto/Cipher;
18 23 5 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
4 16 17 Class java.security.GeneralSecurityException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
protocolVersion
maxVersion
generator
publicKey
void <init>(sun.security.ssl.ProtocolVersion, sun.security.ssl.ProtocolVersion, java.security.SecureRandom, sun.security.ssl.HandshakeInStream, int, java.security.PrivateKey);
descriptor: (Lsun/security/ssl/ProtocolVersion;Lsun/security/ssl/ProtocolVersion;Ljava/security/SecureRandom;Lsun/security/ssl/HandshakeInStream;ILjava/security/PrivateKey;)V
flags: (0x0000)
Code:
stack=7, locals=11, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
invokespecial sun.security.ssl.HandshakeMessage.<init>:()V
1: aload 6
invokeinterface java.security.PrivateKey.getAlgorithm:()Ljava/lang/String;
ldc "RSA"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 3
2: new javax.net.ssl.SSLKeyException
dup
ldc "Private key not of type RSA"
invokespecial javax.net.ssl.SSLKeyException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: sun.security.ssl.RSAClientKeyExchange sun.security.ssl.ProtocolVersion sun.security.ssl.ProtocolVersion java.security.SecureRandom sun.security.ssl.HandshakeInStream int java.security.PrivateKey
StackMap stack:
aload 1
getfield sun.security.ssl.ProtocolVersion.v:I
getstatic sun.security.ssl.ProtocolVersion.TLS10:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
if_icmplt 6
4: aload 0
aload 4
invokevirtual sun.security.ssl.HandshakeInStream.getBytes16:()[B
putfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
5: goto 11
6: StackMap locals:
StackMap stack:
aload 0
iload 5
newarray 8
putfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
7: aload 4
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
invokevirtual sun.security.ssl.HandshakeInStream.read:([B)I
iload 5
if_icmpeq 11
8: new javax.net.ssl.SSLProtocolException
dup
9: ldc "SSL: read PreMasterSecret: short read"
10: invokespecial javax.net.ssl.SSLProtocolException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
aconst_null
astore 7
start local 7 12: ldc "RSA/ECB/PKCS1Padding"
invokestatic sun.security.ssl.JsseJce.getCipher:(Ljava/lang/String;)Ljavax/crypto/Cipher;
astore 8
start local 8 13: aload 8
invokevirtual javax.crypto.Cipher.getProvider:()Ljava/security/Provider;
invokevirtual java.security.Provider.getName:()Ljava/lang/String;
14: invokestatic sun.security.util.KeyUtil.isOracleJCEProvider:(Ljava/lang/String;)Z
15: ifeq 17
16: iconst_0
goto 18
StackMap locals: byte[] javax.crypto.Cipher
StackMap stack:
17: iconst_1
StackMap locals:
StackMap stack: int
18: istore 9
start local 9 19: iload 9
ifeq 34
20: aload 8
iconst_2
aload 6
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;)V
21: iconst_0
istore 10
start local 10 22: aload 8
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
invokevirtual javax.crypto.Cipher.doFinal:([B)[B
astore 7
23: goto 26
StackMap locals: sun.security.ssl.RSAClientKeyExchange sun.security.ssl.ProtocolVersion sun.security.ssl.ProtocolVersion java.security.SecureRandom sun.security.ssl.HandshakeInStream int java.security.PrivateKey byte[] javax.crypto.Cipher int int
StackMap stack: javax.crypto.BadPaddingException
24: pop
25: iconst_1
istore 10
26: StackMap locals:
StackMap stack:
aload 2
getfield sun.security.ssl.ProtocolVersion.v:I
aload 1
getfield sun.security.ssl.ProtocolVersion.v:I
27: aload 3
aload 7
iload 10
28: invokestatic sun.security.util.KeyUtil.checkTlsPreMasterSecretKey:(IILjava/security/SecureRandom;[BZ)[B
astore 7
29: aload 0
30: aload 2
getfield sun.security.ssl.ProtocolVersion.v:I
aload 1
getfield sun.security.ssl.ProtocolVersion.v:I
31: aload 7
aload 3
32: invokestatic sun.security.ssl.RSAClientKeyExchange.generatePreMasterSecret:(II[BLjava/security/SecureRandom;)Ljavax/crypto/SecretKey;
putfield sun.security.ssl.RSAClientKeyExchange.preMaster:Ljavax/crypto/SecretKey;
end local 10 33: goto 53
34: StackMap locals:
StackMap stack:
aload 8
iconst_4
aload 6
35: new sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec
dup
36: aload 2
getfield sun.security.ssl.ProtocolVersion.v:I
aload 1
getfield sun.security.ssl.ProtocolVersion.v:I
37: invokespecial sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec.<init>:(II)V
38: aload 3
39: invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
40: aload 0
aload 8
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
41: ldc "TlsRsaPremasterSecret"
iconst_3
42: invokevirtual javax.crypto.Cipher.unwrap:([BLjava/lang/String;I)Ljava/security/Key;
checkcast javax.crypto.SecretKey
putfield sun.security.ssl.RSAClientKeyExchange.preMaster:Ljavax/crypto/SecretKey;
end local 9 end local 8 43: goto 53
StackMap locals: sun.security.ssl.RSAClientKeyExchange sun.security.ssl.ProtocolVersion sun.security.ssl.ProtocolVersion java.security.SecureRandom sun.security.ssl.HandshakeInStream int java.security.PrivateKey byte[]
StackMap stack: java.security.InvalidKeyException
44: pop
45: new javax.net.ssl.SSLProtocolException
dup
46: ldc "Unable to process PreMasterSecret, may be too big"
47: invokespecial javax.net.ssl.SSLProtocolException.<init>:(Ljava/lang/String;)V
athrow
48: StackMap locals:
StackMap stack: java.lang.Exception
astore 8
start local 8 49: getstatic sun.security.ssl.RSAClientKeyExchange.debug:Lsun/security/ssl/Debug;
ifnull 52
ldc "handshake"
invokestatic sun.security.ssl.Debug.isOn:(Ljava/lang/String;)Z
ifeq 52
50: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "RSA premaster secret decryption error:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
51: aload 8
getstatic java.lang.System.out:Ljava/io/PrintStream;
invokevirtual java.lang.Exception.printStackTrace:(Ljava/io/PrintStream;)V
52: StackMap locals: java.lang.Exception
StackMap stack:
new java.lang.RuntimeException
dup
ldc "Could not generate dummy secret"
aload 8
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 8 53: StackMap locals:
StackMap stack:
return
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 54 0 this Lsun/security/ssl/RSAClientKeyExchange;
0 54 1 currentVersion Lsun/security/ssl/ProtocolVersion;
0 54 2 maxVersion Lsun/security/ssl/ProtocolVersion;
0 54 3 generator Ljava/security/SecureRandom;
0 54 4 input Lsun/security/ssl/HandshakeInStream;
0 54 5 messageSize I
0 54 6 privateKey Ljava/security/PrivateKey;
12 54 7 encoded [B
13 43 8 cipher Ljavax/crypto/Cipher;
19 43 9 needFailover Z
22 33 10 failed Z
49 53 8 e Ljava/lang/Exception;
Exception table:
from to target type
22 23 24 Class javax.crypto.BadPaddingException
12 43 44 Class java.security.InvalidKeyException
12 43 48 Class java.lang.Exception
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
currentVersion
maxVersion
generator
input
messageSize
privateKey
private static javax.crypto.SecretKey generatePreMasterSecret(int, int, byte[], java.security.SecureRandom);
descriptor: (II[BLjava/security/SecureRandom;)Ljavax/crypto/SecretKey;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: getstatic sun.security.ssl.RSAClientKeyExchange.debug:Lsun/security/ssl/Debug;
ifnull 2
ldc "handshake"
invokestatic sun.security.ssl.Debug.isOn:(Ljava/lang/String;)Z
ifeq 2
1: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Generating a premaster secret"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
2: StackMap locals:
StackMap stack:
iload 0
getstatic sun.security.ssl.ProtocolVersion.TLS12:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
if_icmplt 4
3: ldc "SunTls12RsaPremasterSecret"
goto 5
StackMap locals:
StackMap stack:
4: ldc "SunTlsRsaPremasterSecret"
5: StackMap locals:
StackMap stack: java.lang.String
astore 4
start local 4 6: aload 4
invokestatic sun.security.ssl.JsseJce.getKeyGenerator:(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;
astore 5
start local 5 7: aload 5
new sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec
dup
8: iload 0
iload 1
aload 2
invokespecial sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec.<init>:(II[B)V
9: aload 3
10: invokevirtual javax.crypto.KeyGenerator.init:(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
11: aload 5
invokevirtual javax.crypto.KeyGenerator.generateKey:()Ljavax/crypto/SecretKey;
12: areturn
end local 5 end local 4 13: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 4
start local 4 14: getstatic sun.security.ssl.RSAClientKeyExchange.debug:Lsun/security/ssl/Debug;
ifnull 17
ldc "handshake"
invokestatic sun.security.ssl.Debug.isOn:(Ljava/lang/String;)Z
ifeq 17
15: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "RSA premaster secret generation error:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
16: aload 4
getstatic java.lang.System.out:Ljava/io/PrintStream;
invokevirtual java.security.GeneralSecurityException.printStackTrace:(Ljava/io/PrintStream;)V
17: StackMap locals: java.security.GeneralSecurityException
StackMap stack:
new java.lang.RuntimeException
dup
ldc "Could not generate premaster secret"
aload 4
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 clientVersion I
0 18 1 serverVersion I
0 18 2 encodedSecret [B
0 18 3 generator Ljava/security/SecureRandom;
6 13 4 s Ljava/lang/String;
7 13 5 kg Ljavax/crypto/KeyGenerator;
14 18 4 iae Ljava/security/GeneralSecurityException;
Exception table:
from to target type
2 12 13 Class java.security.InvalidAlgorithmParameterException
2 12 13 Class java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
clientVersion
serverVersion
encodedSecret
generator
int messageType();
descriptor: ()I
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: bipush 16
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/ssl/RSAClientKeyExchange;
int messageLength();
descriptor: ()I
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.security.ssl.RSAClientKeyExchange.protocolVersion:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
getstatic sun.security.ssl.ProtocolVersion.TLS10:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
if_icmplt 2
1: aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
arraylength
iconst_2
iadd
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
arraylength
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/security/ssl/RSAClientKeyExchange;
void send(sun.security.ssl.HandshakeOutStream);
descriptor: (Lsun/security/ssl/HandshakeOutStream;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.ssl.RSAClientKeyExchange.protocolVersion:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
getstatic sun.security.ssl.ProtocolVersion.TLS10:Lsun/security/ssl/ProtocolVersion;
getfield sun.security.ssl.ProtocolVersion.v:I
if_icmplt 3
1: aload 1
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
invokevirtual sun.security.ssl.HandshakeOutStream.putBytes16:([B)V
2: goto 4
3: StackMap locals:
StackMap stack:
aload 1
aload 0
getfield sun.security.ssl.RSAClientKeyExchange.encrypted:[B
invokevirtual sun.security.ssl.HandshakeOutStream.write:([B)V
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lsun/security/ssl/RSAClientKeyExchange;
0 5 1 s Lsun/security/ssl/HandshakeOutStream;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
s
void print(java.io.PrintStream);
descriptor: (Ljava/io/PrintStream;)V
flags: (0x0000)
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 1
new java.lang.StringBuilder
dup
ldc "*** ClientKeyExchange, RSA PreMasterSecret, "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
1: aload 0
getfield sun.security.ssl.RSAClientKeyExchange.protocolVersion:Lsun/security/ssl/ProtocolVersion;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
2: invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/ssl/RSAClientKeyExchange;
0 4 1 s Ljava/io/PrintStream;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
s
}
SourceFile: "RSAClientKeyExchange.java"