public final class sun.security.pkcs11.P11TlsMasterSecretGenerator extends javax.crypto.KeyGeneratorSpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: sun.security.pkcs11.P11TlsMasterSecretGenerator
super_class: javax.crypto.KeyGeneratorSpi
{
private static final java.lang.String MSG;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "TlsMasterSecretGenerator must be initialized using a TlsMasterSecretParameterSpec"
private final sun.security.pkcs11.Token token;
descriptor: Lsun/security/pkcs11/Token;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String algorithm;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private long mechanism;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private sun.security.internal.spec.TlsMasterSecretParameterSpec spec;
descriptor: Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
flags: (0x0002) ACC_PRIVATE
private sun.security.pkcs11.P11Key p11Key;
descriptor: Lsun/security/pkcs11/P11Key;
flags: (0x0002) ACC_PRIVATE
int version;
descriptor: I
flags: (0x0000)
void <init>(sun.security.pkcs11.Token, java.lang.String, long);
descriptor: (Lsun/security/pkcs11/Token;Ljava/lang/String;J)V
flags: (0x0000)
Code:
stack=3, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial javax.crypto.KeyGeneratorSpi.<init>:()V
1: aload 0
aload 1
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
2: aload 0
aload 2
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.algorithm:Ljava/lang/String;
3: aload 0
lload 3
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.mechanism:J
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lsun/security/pkcs11/P11TlsMasterSecretGenerator;
0 5 1 token Lsun/security/pkcs11/Token;
0 5 2 algorithm Ljava/lang/String;
0 5 3 mechanism J
Exceptions:
throws sun.security.pkcs11.wrapper.PKCS11Exception
MethodParameters:
Name Flags
token
algorithm
mechanism
protected void engineInit(java.security.SecureRandom);
descriptor: (Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: new java.security.InvalidParameterException
dup
ldc "TlsMasterSecretGenerator must be initialized using a TlsMasterSecretParameterSpec"
invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/pkcs11/P11TlsMasterSecretGenerator;
0 1 1 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
random
protected void engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom);
descriptor: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof sun.security.internal.spec.TlsMasterSecretParameterSpec
ifne 2
1: new java.security.InvalidAlgorithmParameterException
dup
ldc "TlsMasterSecretGenerator must be initialized using a TlsMasterSecretParameterSpec"
invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
aload 1
checkcast sun.security.internal.spec.TlsMasterSecretParameterSpec
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
3: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
invokevirtual sun.security.internal.spec.TlsMasterSecretParameterSpec.getPremasterSecret:()Ljavax/crypto/SecretKey;
astore 3
start local 3 4: aload 0
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
aload 3
aconst_null
invokestatic sun.security.pkcs11.P11SecretKeyFactory.convertKey:(Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;)Lsun/security/pkcs11/P11Key;
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.p11Key:Lsun/security/pkcs11/P11Key;
5: goto 8
StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator java.security.spec.AlgorithmParameterSpec java.security.SecureRandom javax.crypto.SecretKey
StackMap stack: java.security.InvalidKeyException
6: astore 4
start local 4 7: new java.security.InvalidAlgorithmParameterException
dup
ldc "init() failed"
aload 4
invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 8: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
invokevirtual sun.security.internal.spec.TlsMasterSecretParameterSpec.getMajorVersion:()I
bipush 8
ishl
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
invokevirtual sun.security.internal.spec.TlsMasterSecretParameterSpec.getMinorVersion:()I
ior
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
9: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 768
if_icmpge 11
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 771
if_icmple 11
10: new java.security.InvalidAlgorithmParameterException
dup
ldc "Only SSL 3.0, TLS 1.0, TLS 1.1, and TLS 1.2 are supported"
invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lsun/security/pkcs11/P11TlsMasterSecretGenerator;
0 12 1 params Ljava/security/spec/AlgorithmParameterSpec;
0 12 2 random Ljava/security/SecureRandom;
4 12 3 key Ljavax/crypto/SecretKey;
7 8 4 e Ljava/security/InvalidKeyException;
Exception table:
from to target type
4 5 6 Class java.security.InvalidKeyException
Exceptions:
throws java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
params
random
protected void engineInit(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new java.security.InvalidParameterException
dup
ldc "TlsMasterSecretGenerator must be initialized using a TlsMasterSecretParameterSpec"
invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/pkcs11/P11TlsMasterSecretGenerator;
0 1 1 keysize I
0 1 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
keysize
random
protected javax.crypto.SecretKey engineGenerateKey();
descriptor: ()Ljavax/crypto/SecretKey;
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=16, args_size=1
start local 0 0: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
ifnonnull 4
1: new java.lang.IllegalStateException
dup
2: ldc "TlsMasterSecretGenerator must be initialized"
3: invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.p11Key:Lsun/security/pkcs11/P11Key;
invokevirtual sun.security.pkcs11.P11Key.getAlgorithm:()Ljava/lang/String;
ldc "TlsRsaPremasterSecret"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
5: istore 1
start local 1 6: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 768
if_icmpne 12
7: aload 0
iload 1
ifeq 9
8: ldc 881
goto 10
StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator int
StackMap stack: sun.security.pkcs11.P11TlsMasterSecretGenerator
9: ldc 883
10: StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator int
StackMap stack: sun.security.pkcs11.P11TlsMasterSecretGenerator long
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.mechanism:J
11: goto 23
StackMap locals:
StackMap stack:
12: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 769
if_icmpeq 13
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 770
if_icmpne 18
13: StackMap locals:
StackMap stack:
aload 0
iload 1
ifeq 15
14: ldc 885
goto 16
StackMap locals:
StackMap stack: sun.security.pkcs11.P11TlsMasterSecretGenerator
15: ldc 887
16: StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator int
StackMap stack: sun.security.pkcs11.P11TlsMasterSecretGenerator long
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.mechanism:J
17: goto 23
StackMap locals:
StackMap stack:
18: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 771
if_icmpne 23
19: aload 0
iload 1
ifeq 21
20: ldc 992
goto 22
StackMap locals:
StackMap stack: sun.security.pkcs11.P11TlsMasterSecretGenerator
21: ldc 994
22: StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator int
StackMap stack: sun.security.pkcs11.P11TlsMasterSecretGenerator long
putfield sun.security.pkcs11.P11TlsMasterSecretGenerator.mechanism:J
23: StackMap locals:
StackMap stack:
iload 1
ifeq 26
24: new sun.security.pkcs11.wrapper.CK_VERSION
dup
iconst_0
iconst_0
invokespecial sun.security.pkcs11.wrapper.CK_VERSION.<init>:(II)V
astore 2
start local 2 25: goto 27
end local 2 26: StackMap locals:
StackMap stack:
aconst_null
astore 2
start local 2 27: StackMap locals: sun.security.pkcs11.wrapper.CK_VERSION
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
invokevirtual sun.security.internal.spec.TlsMasterSecretParameterSpec.getClientRandom:()[B
astore 3
start local 3 28: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
invokevirtual sun.security.internal.spec.TlsMasterSecretParameterSpec.getServerRandom:()[B
astore 4
start local 4 29: new sun.security.pkcs11.wrapper.CK_SSL3_RANDOM_DATA
dup
aload 3
aload 4
invokespecial sun.security.pkcs11.wrapper.CK_SSL3_RANDOM_DATA.<init>:([B[B)V
30: astore 5
start local 5 31: aconst_null
astore 6
start local 6 32: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 771
if_icmpge 37
33: new sun.security.pkcs11.wrapper.CK_SSL3_MASTER_KEY_DERIVE_PARAMS
dup
aload 5
aload 2
invokespecial sun.security.pkcs11.wrapper.CK_SSL3_MASTER_KEY_DERIVE_PARAMS.<init>:(Lsun/security/pkcs11/wrapper/CK_SSL3_RANDOM_DATA;Lsun/security/pkcs11/wrapper/CK_VERSION;)V
34: astore 7
start local 7 35: new sun.security.pkcs11.wrapper.CK_MECHANISM
dup
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.mechanism:J
aload 7
invokespecial sun.security.pkcs11.wrapper.CK_MECHANISM.<init>:(JLsun/security/pkcs11/wrapper/CK_SSL3_MASTER_KEY_DERIVE_PARAMS;)V
astore 6
end local 7 36: goto 43
StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator int sun.security.pkcs11.wrapper.CK_VERSION byte[] byte[] sun.security.pkcs11.wrapper.CK_SSL3_RANDOM_DATA sun.security.pkcs11.wrapper.CK_MECHANISM
StackMap stack:
37: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.version:I
sipush 771
if_icmpne 43
38: new sun.security.pkcs11.wrapper.CK_TLS12_MASTER_KEY_DERIVE_PARAMS
dup
aload 5
aload 2
39: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.spec:Lsun/security/internal/spec/TlsMasterSecretParameterSpec;
invokevirtual sun.security.internal.spec.TlsMasterSecretParameterSpec.getPRFHashAlg:()Ljava/lang/String;
invokestatic sun.security.pkcs11.wrapper.Functions.getHashMechId:(Ljava/lang/String;)J
40: invokespecial sun.security.pkcs11.wrapper.CK_TLS12_MASTER_KEY_DERIVE_PARAMS.<init>:(Lsun/security/pkcs11/wrapper/CK_SSL3_RANDOM_DATA;Lsun/security/pkcs11/wrapper/CK_VERSION;J)V
41: astore 7
start local 7 42: new sun.security.pkcs11.wrapper.CK_MECHANISM
dup
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.mechanism:J
aload 7
invokespecial sun.security.pkcs11.wrapper.CK_MECHANISM.<init>:(JLsun/security/pkcs11/wrapper/CK_TLS12_MASTER_KEY_DERIVE_PARAMS;)V
astore 6
end local 7 43: StackMap locals:
StackMap stack:
aconst_null
astore 7
start local 7 44: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.getObjSession:()Lsun/security/pkcs11/Session;
astore 7
45: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
ldc "generate"
46: ldc 4
ldc 16
iconst_0
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
47: invokevirtual sun.security.pkcs11.Token.getAttributes:(Ljava/lang/String;JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
astore 8
start local 8 48: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 7
invokevirtual sun.security.pkcs11.Session.id:()J
49: aload 6
aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.p11Key:Lsun/security/pkcs11/P11Key;
getfield sun.security.pkcs11.P11Key.keyID:J
aload 8
50: invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_DeriveKey:(JLsun/security/pkcs11/wrapper/CK_MECHANISM;J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)J
lstore 9
start local 9 51: aload 2
ifnonnull 55
52: iconst_m1
istore 11
start local 11 53: iconst_m1
istore 12
start local 12 54: goto 57
end local 12 end local 11 55: StackMap locals: sun.security.pkcs11.Session sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] long
StackMap stack:
aload 2
getfield sun.security.pkcs11.wrapper.CK_VERSION.major:B
istore 11
start local 11 56: aload 2
getfield sun.security.pkcs11.wrapper.CK_VERSION.minor:B
istore 12
start local 12 57: StackMap locals: int int
StackMap stack:
aload 7
lload 9
58: ldc "TlsMasterSecret"
sipush 384
aload 8
iload 11
iload 12
59: invokestatic sun.security.pkcs11.P11Key.masterSecretKey:(Lsun/security/pkcs11/Session;JLjava/lang/String;I[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;II)Ljavax/crypto/SecretKey;
astore 13
start local 13 60: aload 13
astore 15
61: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
aload 7
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
62: aload 15
areturn
end local 13 end local 12 end local 11 end local 9 end local 8 63: StackMap locals: sun.security.pkcs11.P11TlsMasterSecretGenerator int sun.security.pkcs11.wrapper.CK_VERSION byte[] byte[] sun.security.pkcs11.wrapper.CK_SSL3_RANDOM_DATA sun.security.pkcs11.wrapper.CK_MECHANISM sun.security.pkcs11.Session
StackMap stack: java.lang.Exception
astore 8
start local 8 64: new java.security.ProviderException
dup
ldc "Could not generate key"
aload 8
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 8 65: StackMap locals:
StackMap stack: java.lang.Throwable
astore 14
66: aload 0
getfield sun.security.pkcs11.P11TlsMasterSecretGenerator.token:Lsun/security/pkcs11/Token;
aload 7
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
67: aload 14
athrow
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 68 0 this Lsun/security/pkcs11/P11TlsMasterSecretGenerator;
6 68 1 isTlsRsaPremasterSecret Z
25 26 2 ckVersion Lsun/security/pkcs11/wrapper/CK_VERSION;
27 68 2 ckVersion Lsun/security/pkcs11/wrapper/CK_VERSION;
28 68 3 clientRandom [B
29 68 4 serverRandom [B
31 68 5 random Lsun/security/pkcs11/wrapper/CK_SSL3_RANDOM_DATA;
32 68 6 ckMechanism Lsun/security/pkcs11/wrapper/CK_MECHANISM;
35 36 7 params Lsun/security/pkcs11/wrapper/CK_SSL3_MASTER_KEY_DERIVE_PARAMS;
42 43 7 params Lsun/security/pkcs11/wrapper/CK_TLS12_MASTER_KEY_DERIVE_PARAMS;
44 68 7 session Lsun/security/pkcs11/Session;
48 63 8 attributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
51 63 9 keyID J
53 55 11 major I
56 63 11 major I
54 55 12 minor I
57 63 12 minor I
60 63 13 key Ljavax/crypto/SecretKey;
64 65 8 e Ljava/lang/Exception;
Exception table:
from to target type
44 61 63 Class java.lang.Exception
44 61 65 any
63 65 65 any
}
SourceFile: "P11TlsMasterSecretGenerator.java"