Top Description Inners Fields Constructors Methods
sun.security.pkcs11

pack-priv final Class Token

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.util.*, java.util.concurrent.ConcurrentHashMap, java.io.*, java.lang.ref.*, java.security.*, javax.security.auth.login.LoginException, sun.security.jca.JCAUtil, sun.security.pkcs11.wrapper.*

PKCS#11 token.
Author
Andreas Sterbenz
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final long
private static final Object
pack-priv final Config
private volatile P11KeyFactory
private volatile P11KeyFactory
private volatile P11KeyFactory
pack-priv final boolean
private static final CK_MECHANISM_INFO
private volatile P11KeyStore
private long
private long
private volatile boolean
private final Map<Long, CK_MECHANISM_INFO>
pack-priv final PKCS11
pack-priv final KeyCache
pack-priv final SunPKCS11
private final boolean
private volatile P11KeyFactory
pack-priv final KeyCache
private volatile P11SecureRandom
private static final List<Reference<Token>>
private static final long
pack-priv final SessionManager
private Boolean
private final TemplateManager
private byte[]
pack-priv final CK_TOKEN_INFO
private volatile boolean
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
Token(SunPKCS11 provider)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv void
pack-priv CK_ATTRIBUTE[]
getAttributes(String op, long type, long alg, CK_ATTRIBUTE[] attrs)

pack-priv P11KeyFactory
getKeyFactory(String algorithm)

pack-priv P11KeyStore
pack-priv CK_MECHANISM_INFO
getMechanismInfo(long mechanism)

pack-priv Session
pack-priv Session
pack-priv P11SecureRandom
private synchronized byte[]
pack-priv boolean
pack-priv boolean
pack-priv boolean
isPresent(long sessionID)

pack-priv boolean
pack-priv boolean
pack-priv Session
private void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
stream
)

Restores the state of this object from the stream.

pack-priv Session
pack-priv boolean
private Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHECK_INTERVALback to summary
private static final long CHECK_INTERVAL
CHECK_LOCKback to summary
private static final Object CHECK_LOCK
configback to summary
pack-priv final Config config
Annotations
@SuppressWarnings:serial
dhFactoryback to summary
private volatile P11KeyFactory dhFactory
Annotations
@SuppressWarnings:serial
dsaFactoryback to summary
private volatile P11KeyFactory dsaFactory
Annotations
@SuppressWarnings:serial
ecFactoryback to summary
private volatile P11KeyFactory ecFactory
Annotations
@SuppressWarnings:serial
explicitCancelback to summary
pack-priv final boolean explicitCancel
INVALID_MECHback to summary
private static final CK_MECHANISM_INFO INVALID_MECH
keyStoreback to summary
private volatile P11KeyStore keyStore
Annotations
@SuppressWarnings:serial
lastLoginCheckback to summary
private long lastLoginCheck
lastPresentCheckback to summary
private long lastPresentCheck
loggedInback to summary
private volatile boolean loggedIn
mechInfoMapback to summary
private final Map<Long, CK_MECHANISM_INFO> mechInfoMap
Annotations
@SuppressWarnings:serial
p11back to summary
pack-priv final PKCS11 p11
Annotations
@SuppressWarnings:serial
privateCacheback to summary
pack-priv final KeyCache privateCache
Annotations
@SuppressWarnings:serial
providerback to summary
pack-priv final SunPKCS11 provider
removableback to summary
private final boolean removable
rsaFactoryback to summary
private volatile P11KeyFactory rsaFactory
Annotations
@SuppressWarnings:serial
secretCacheback to summary
pack-priv final KeyCache secretCache
Annotations
@SuppressWarnings:serial
secureRandomback to summary
private volatile P11SecureRandom secureRandom
serializedTokensback to summary
private static final List<Reference<Token>> serializedTokens
serialVersionUIDback to summary
private static final long serialVersionUID
Annotations
@Serial
sessionManagerback to summary
pack-priv final SessionManager sessionManager
Annotations
@SuppressWarnings:serial
supportsRawSecretKeyImportback to summary
private Boolean supportsRawSecretKeyImport
templateManagerback to summary
private final TemplateManager templateManager
Annotations
@SuppressWarnings:serial
tokenIdback to summary
private byte[] tokenId
tokenInfoback to summary
pack-priv final CK_TOKEN_INFO tokenInfo
Annotations
@SuppressWarnings:serial
validback to summary
private volatile boolean valid
writeProtectedback to summary
private boolean writeProtected

Constructor Detail

Tokenback to summary
pack-priv Token(SunPKCS11 provider) throws PKCS11Exception

Method Detail

destroyback to summary
pack-priv void destroy()
ensureLoggedInback to summary
pack-priv void ensureLoggedIn(Session session) throws PKCS11Exception, LoginException
ensureValidback to summary
pack-priv void ensureValid()
getAttributesback to summary
pack-priv CK_ATTRIBUTE[] getAttributes(String op, long type, long alg, CK_ATTRIBUTE[] attrs) throws PKCS11Exception
getKeyFactoryback to summary
pack-priv P11KeyFactory getKeyFactory(String algorithm)
getKeyStoreback to summary
pack-priv P11KeyStore getKeyStore()
getMechanismInfoback to summary
pack-priv CK_MECHANISM_INFO getMechanismInfo(long mechanism) throws PKCS11Exception
getObjSessionback to summary
pack-priv Session getObjSession() throws PKCS11Exception
getOpSessionback to summary
pack-priv Session getOpSession() throws PKCS11Exception
getRandomback to summary
pack-priv P11SecureRandom getRandom()
getTokenIdback to summary
private synchronized byte[] getTokenId()
isLoggedInback to summary
pack-priv boolean isLoggedIn(Session session) throws PKCS11Exception
isLoggedInNowback to summary
pack-priv boolean isLoggedInNow(Session session) throws PKCS11Exception
isPresentback to summary
pack-priv boolean isPresent(long sessionID)
isValidback to summary
pack-priv boolean isValid()
isWriteProtectedback to summary
pack-priv boolean isWriteProtected()
killSessionback to summary
pack-priv Session killSession(Session session)
readObjectback to summary
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException

Restores the state of this object from the stream.

Deserialization of this object is not supported.

Parameters
stream:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded
releaseSessionback to summary
pack-priv Session releaseSession(Session session)
supportsRawSecretKeyImportback to summary
pack-priv boolean supportsRawSecretKeyImport()
writeReplaceback to summary
private Object writeReplace() throws ObjectStreamException
Annotations
@Serial
sun.security.pkcs11 back to summary

private Class Token.TokenRep

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
private static final long
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
TokenRep(Token token)

Method Summary

Modifier and TypeMethod and Description
private Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
Annotations
@Serial
tokenIdback to summary
private final byte[] tokenId

Constructor Detail

TokenRepback to summary
pack-priv TokenRep(Token token)

Method Detail

readResolveback to summary
private Object readResolve() throws ObjectStreamException
Annotations
@Serial