abstract class sun.security.pkcs11.P11KeyFactory extends java.security.KeyFactorySpi
minor version: 0
major version: 59
flags: flags: (0x0420) ACC_SUPER, ACC_ABSTRACT
this_class: sun.security.pkcs11.P11KeyFactory
super_class: java.security.KeyFactorySpi
{
final sun.security.pkcs11.Token token;
descriptor: Lsun/security/pkcs11/Token;
flags: (0x0010) ACC_FINAL
final java.lang.String algorithm;
descriptor: Ljava/lang/String;
flags: (0x0010) ACC_FINAL
void <init>(sun.security.pkcs11.Token, java.lang.String);
descriptor: (Lsun/security/pkcs11/Token;Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.security.KeyFactorySpi.<init>:()V
1: aload 0
aload 1
putfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
2: aload 0
aload 2
putfield sun.security.pkcs11.P11KeyFactory.algorithm:Ljava/lang/String;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/pkcs11/P11KeyFactory;
0 4 1 token Lsun/security/pkcs11/Token;
0 4 2 algorithm Ljava/lang/String;
MethodParameters:
Name Flags
token
algorithm
static sun.security.pkcs11.P11Key convertKey(sun.security.pkcs11.Token, java.security.Key, java.lang.String);
descriptor: (Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;)Lsun/security/pkcs11/P11Key;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokevirtual sun.security.pkcs11.Token.getKeyFactory:(Ljava/lang/String;)Lsun/security/pkcs11/P11KeyFactory;
aload 1
invokevirtual sun.security.pkcs11.P11KeyFactory.engineTranslateKey:(Ljava/security/Key;)Ljava/security/Key;
checkcast sun.security.pkcs11.P11Key
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 token Lsun/security/pkcs11/Token;
0 1 1 key Ljava/security/Key;
0 1 2 algorithm Ljava/lang/String;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
token
key
algorithm
protected final <T extends java.security.spec.KeySpec> T engineGetKeySpec(java.security.Key, java.lang.Class<T>);
descriptor: (Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
Code:
stack=5, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.ensureValid:()V
1: aload 1
ifnull 2
aload 2
ifnonnull 5
2: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
3: ldc "key and keySpec must not be null"
4: invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
ldc Ljava/security/spec/PKCS8EncodedKeySpec;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifne 7
6: ldc Ljava/security/spec/X509EncodedKeySpec;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 11
7: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.security.pkcs11.P11KeyFactory.implGetSoftwareFactory:()Ljava/security/KeyFactory;
aload 1
aload 2
invokevirtual java.security.KeyFactory.getKeySpec:(Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;
8: areturn
9: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 3
start local 3 10: new java.security.spec.InvalidKeySpecException
dup
ldc "Could not encode key"
aload 3
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 11: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual sun.security.pkcs11.P11KeyFactory.engineTranslateKey:(Ljava/security/Key;)Ljava/security/Key;
checkcast sun.security.pkcs11.P11Key
astore 3
start local 3 12: goto 15
end local 3 StackMap locals:
StackMap stack: java.security.InvalidKeyException
13: astore 4
start local 4 14: new java.security.spec.InvalidKeySpecException
dup
ldc "Could not convert key"
aload 4
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 start local 3 15: StackMap locals: sun.security.pkcs11.P11Key
StackMap stack:
iconst_1
anewarray sun.security.pkcs11.Session
astore 4
start local 4 16: aload 3
invokevirtual sun.security.pkcs11.P11Key.isPublic:()Z
ifeq 20
17: aload 0
aload 3
aload 2
aload 4
invokevirtual sun.security.pkcs11.P11KeyFactory.implGetPublicKeySpec:(Lsun/security/pkcs11/P11Key;Ljava/lang/Class;[Lsun/security/pkcs11/Session;)Ljava/security/spec/KeySpec;
astore 7
18: aload 4
iconst_0
aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
aload 4
iconst_0
aaload
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
aastore
19: aload 7
areturn
20: StackMap locals: sun.security.pkcs11.Session[]
StackMap stack:
aload 0
aload 3
aload 2
aload 4
invokevirtual sun.security.pkcs11.P11KeyFactory.implGetPrivateKeySpec:(Lsun/security/pkcs11/P11Key;Ljava/lang/Class;[Lsun/security/pkcs11/Session;)Ljava/security/spec/KeySpec;
astore 7
21: aload 4
iconst_0
aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
aload 4
iconst_0
aaload
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
aastore
22: aload 7
areturn
23: StackMap locals:
StackMap stack: sun.security.pkcs11.wrapper.PKCS11Exception
astore 5
start local 5 24: new java.security.spec.InvalidKeySpecException
dup
ldc "Could not generate KeySpec"
aload 5
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 25: StackMap locals:
StackMap stack: java.lang.Throwable
astore 6
26: aload 4
iconst_0
aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
aload 4
iconst_0
aaload
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
aastore
27: aload 6
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lsun/security/pkcs11/P11KeyFactory;
0 28 1 key Ljava/security/Key;
0 28 2 keySpec Ljava/lang/Class<TT;>;
10 11 3 e Ljava/security/GeneralSecurityException;
12 13 3 p11Key Lsun/security/pkcs11/P11Key;
15 28 3 p11Key Lsun/security/pkcs11/P11Key;
14 15 4 e Ljava/security/InvalidKeyException;
16 28 4 session [Lsun/security/pkcs11/Session;
24 25 5 e Lsun/security/pkcs11/wrapper/PKCS11Exception;
Exception table:
from to target type
7 8 9 Class java.security.GeneralSecurityException
11 12 13 Class java.security.InvalidKeyException
16 18 23 Class sun.security.pkcs11.wrapper.PKCS11Exception
20 21 23 Class sun.security.pkcs11.wrapper.PKCS11Exception
16 18 25 any
20 21 25 any
23 25 25 any
Exceptions:
throws java.security.spec.InvalidKeySpecException
Signature: <T::Ljava/security/spec/KeySpec;>(Ljava/security/Key;Ljava/lang/Class<TT;>;)TT;
MethodParameters:
Name Flags
key
keySpec
protected final java.security.Key engineTranslateKey(java.security.Key);
descriptor: (Ljava/security/Key;)Ljava/security/Key;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.ensureValid:()V
1: aload 1
ifnonnull 3
2: new java.security.InvalidKeyException
dup
ldc "Key must not be null"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.security.Key.getAlgorithm:()Ljava/lang/String;
aload 0
getfield sun.security.pkcs11.P11KeyFactory.algorithm:Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 7
4: new java.security.InvalidKeyException
dup
5: new java.lang.StringBuilder
dup
ldc "Key algorithm must be "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield sun.security.pkcs11.P11KeyFactory.algorithm:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 1
instanceof sun.security.pkcs11.P11Key
ifeq 11
8: aload 1
checkcast sun.security.pkcs11.P11Key
astore 2
start local 2 9: aload 2
getfield sun.security.pkcs11.P11Key.token:Lsun/security/pkcs11/Token;
aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
if_acmpne 11
10: aload 1
areturn
end local 2 11: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.privateCache:Lsun/security/pkcs11/KeyCache;
aload 1
invokevirtual sun.security.pkcs11.KeyCache.get:(Ljava/security/Key;)Lsun/security/pkcs11/P11Key;
astore 2
start local 2 12: aload 2
ifnull 14
13: aload 2
areturn
14: StackMap locals: sun.security.pkcs11.P11Key
StackMap stack:
aload 1
instanceof java.security.PublicKey
ifeq 18
15: aload 0
aload 1
checkcast java.security.PublicKey
invokevirtual sun.security.pkcs11.P11KeyFactory.implTranslatePublicKey:(Ljava/security/PublicKey;)Ljava/security/PublicKey;
astore 3
start local 3 16: aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.privateCache:Lsun/security/pkcs11/KeyCache;
aload 1
aload 3
checkcast sun.security.pkcs11.P11Key
invokevirtual sun.security.pkcs11.KeyCache.put:(Ljava/security/Key;Lsun/security/pkcs11/P11Key;)V
17: aload 3
areturn
end local 3 18: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.PrivateKey
ifeq 22
19: aload 0
aload 1
checkcast java.security.PrivateKey
invokevirtual sun.security.pkcs11.P11KeyFactory.implTranslatePrivateKey:(Ljava/security/PrivateKey;)Ljava/security/PrivateKey;
astore 3
start local 3 20: aload 0
getfield sun.security.pkcs11.P11KeyFactory.token:Lsun/security/pkcs11/Token;
getfield sun.security.pkcs11.Token.privateCache:Lsun/security/pkcs11/KeyCache;
aload 1
aload 3
checkcast sun.security.pkcs11.P11Key
invokevirtual sun.security.pkcs11.KeyCache.put:(Ljava/security/Key;Lsun/security/pkcs11/P11Key;)V
21: aload 3
areturn
end local 3 22: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
23: ldc "Key must be instance of PublicKey or PrivateKey"
24: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lsun/security/pkcs11/P11KeyFactory;
0 25 1 key Ljava/security/Key;
9 11 2 p11Key Lsun/security/pkcs11/P11Key;
12 25 2 p11Key Lsun/security/pkcs11/P11Key;
16 18 3 publicKey Ljava/security/PublicKey;
20 22 3 privateKey Ljava/security/PrivateKey;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
abstract <T extends java.security.spec.KeySpec> T implGetPublicKeySpec(sun.security.pkcs11.P11Key, java.lang.Class<T>, sun.security.pkcs11.Session[]);
descriptor: (Lsun/security/pkcs11/P11Key;Ljava/lang/Class;[Lsun/security/pkcs11/Session;)Ljava/security/spec/KeySpec;
flags: (0x0400) ACC_ABSTRACT
Exceptions:
throws sun.security.pkcs11.wrapper.PKCS11Exception, java.security.spec.InvalidKeySpecException
Signature: <T::Ljava/security/spec/KeySpec;>(Lsun/security/pkcs11/P11Key;Ljava/lang/Class<TT;>;[Lsun/security/pkcs11/Session;)TT;
MethodParameters:
Name Flags
key
keySpec
session
abstract <T extends java.security.spec.KeySpec> T implGetPrivateKeySpec(sun.security.pkcs11.P11Key, java.lang.Class<T>, sun.security.pkcs11.Session[]);
descriptor: (Lsun/security/pkcs11/P11Key;Ljava/lang/Class;[Lsun/security/pkcs11/Session;)Ljava/security/spec/KeySpec;
flags: (0x0400) ACC_ABSTRACT
Exceptions:
throws sun.security.pkcs11.wrapper.PKCS11Exception, java.security.spec.InvalidKeySpecException
Signature: <T::Ljava/security/spec/KeySpec;>(Lsun/security/pkcs11/P11Key;Ljava/lang/Class<TT;>;[Lsun/security/pkcs11/Session;)TT;
MethodParameters:
Name Flags
key
keySpec
session
abstract java.security.PublicKey implTranslatePublicKey(java.security.PublicKey);
descriptor: (Ljava/security/PublicKey;)Ljava/security/PublicKey;
flags: (0x0400) ACC_ABSTRACT
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
abstract java.security.PrivateKey implTranslatePrivateKey(java.security.PrivateKey);
descriptor: (Ljava/security/PrivateKey;)Ljava/security/PrivateKey;
flags: (0x0400) ACC_ABSTRACT
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
abstract java.security.KeyFactory implGetSoftwareFactory();
descriptor: ()Ljava/security/KeyFactory;
flags: (0x0400) ACC_ABSTRACT
Exceptions:
throws java.security.GeneralSecurityException
}
SourceFile: "P11KeyFactory.java"