public class TokenKeyStore
extends java.security.KeyStore
java.security.KeyStore.Builder, java.security.KeyStore.CallbackHandlerProtection, java.security.KeyStore.Entry, java.security.KeyStore.LoadStoreParameter, java.security.KeyStore.PasswordProtection, java.security.KeyStore.PrivateKeyEntry, java.security.KeyStore.ProtectionParameter, java.security.KeyStore.SecretKeyEntry, java.security.KeyStore.TrustedCertificateEntry
Modifier and Type | Field and Description |
---|---|
protected TokenKeyStoreSpi |
iaikPKCS11KeyStoreSPI_
The reference to the TokenKeyStoreSpi, if the underlying SPI class is of this type.
|
static java.lang.String |
KEYSTORE_TYPE
The JCA standard type name of this key store.
|
Constructor and Description |
---|
TokenKeyStore(TokenKeyStoreSpi cardKeyStore,
IAIKPkcs11 keystoreProvider,
java.lang.String keystoreType)
Construct a new KeyStore that forwards all calls to the cardKeyStore object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getReadProtectedKeyOnDemand()
This property causes this object to search for objects using only a not explicitely logged-in
session.
|
TokenManager |
getTokenManager()
Return the token that is associated wtih this keystore.
|
protected void |
initialize()
This method just calls load(null, null) to ensure that the KeyStore super-class recognizes this
key store as initialized.
|
void |
logout()
This method logs out the session of this key sotre.
|
void |
setReadProtectedKeyOnDemand(boolean onDemand)
Setting this property causes this object to search for objects using only a not explicitely
logged-in session.
|
void |
updateKeystore()
This method updates the key and certificate tables even if token did not change.
|
aliases, containsAlias, deleteEntry, entryInstanceOf, getCertificate, getCertificateAlias, getCertificateChain, getCreationDate, getDefaultType, getEntry, getInstance, getInstance, getInstance, getKey, getProvider, getType, isCertificateEntry, isKeyEntry, load, load, setCertificateEntry, setEntry, setKeyEntry, setKeyEntry, size, store, store
public static final java.lang.String KEYSTORE_TYPE
protected TokenKeyStoreSpi iaikPKCS11KeyStoreSPI_
public TokenKeyStore(TokenKeyStoreSpi cardKeyStore, IAIKPkcs11 keystoreProvider, java.lang.String keystoreType)
cardKeyStore
- The object that holds the actual implementation for this key store.keystoreProvider
- The (JCE) provider of this key store.keystoreType
- The type name this key store will be known by JCA.protected void initialize()
IAIKPkcs11Exception
- If the load(null, null) call fails.public TokenManager getTokenManager()
public boolean getReadProtectedKeyOnDemand()
public void setReadProtectedKeyOnDemand(boolean onDemand)
onDemand
- True, if the key store shall not explicitely log-in the session for search keys and
certificates. It will log-in only, if the aplication tries to access such a key.public void updateKeystore() throws IAIKPkcs11Exception
IAIKPkcs11Exception
- If the update fails.public void logout()
TokenManager
to logout using any session. Attention! This causes all
sessions of this token to be logged out. Any currently active operations on this token like
signing may be interupted. This method is provided to provide means to force a logout after
certain operations; e.g. after a qualified signature creation.IAIK JavaSecurity Website https://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. Version 1.9.4