public class TokenInfo
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected boolean |
clockOnToken_
True, if the token has a clock.
|
protected boolean |
dualCryptoOperations_
True, if the token supports dual crypto operations.
|
static long |
EFFECTIVELY_INFINITE
This is the value which can be used for ulMaxSessionCount and ulMaxRwSessionCount to express an
infinite number.
|
protected Version |
firmwareVersion_
The version of the firmware of this token.
|
protected long |
freePrivateMemory_
The amount of free memory for private objects on this token.
|
protected long |
freePublicMemory_
The amount of free memory for public objects on this token.
|
protected Version |
hardwareVersion_
The version of the hardware of this token.
|
protected java.lang.String |
label_
The label of this token.
|
protected boolean |
loginRequired_
True, if the token requires the user to login to perform certain operations.
|
protected java.lang.String |
manufacturerID_
The identifier of the manufacturer of this token.
|
protected long |
maxPinLen_
The maximum PIN length that this token allows.
|
protected long |
maxRwSessionCount_
Maximum number of concurrent (open) read-write sessions.
|
protected long |
maxSessionCount_
The maximum number of concurrent (open) sessions.
|
protected long |
minPinLen_
The minimum PIN length that this token allows.
|
protected java.lang.String |
model_
The model of this token.
|
protected boolean |
protectedAuthenticationPath_
True, if there are different means to authenticate the user than passing the user-PIN to a
login operation.
|
protected boolean |
restoreKeyNotNeeded_
True, if a successful save of a sessions cryptographic operations state always contains all
keys needed to restore the state of the session.
|
protected boolean |
rng_
True, if the token has a random numebr generator.
|
protected long |
rwSessionCount_
The current number of open read-write sessions.
|
protected boolean |
secondaryAuthentication_
True, if the token supports secondary authentication for private key objects.
|
protected java.lang.String |
serialNumber_
The serial number of this token.
|
protected long |
sessionCount_
The current number of open sessions.
|
protected boolean |
soPinCountLow_
True, if the security officer-PIN has been entered incorrectly at least once since the last
successful authentication.
|
protected boolean |
soPinFinalTry_
True, if the security officer has just one try left to supply the correct PIN before the
security officer-PIN gets locked.
|
protected boolean |
soPinLocked_
True, if the security officer-PIN is locked.
|
protected boolean |
soPinToBeChanged_
True, if the security officer-PIN value is the default value set by token initialization or
manufacturing.
|
protected java.util.Date |
time_
The current time on the token.
|
protected boolean |
tokenInitialized_
True, if the token is already initialized.
|
protected long |
totalPrivateMemory_
The total amount of memory for private objects on this token.
|
protected long |
totalPublicMemory_
The total amount of memory for public objects on this token.
|
static long |
UNAVAILABLE_INFORMATION
This is the value which can be used for ulMaxSessionCount, ulSessionCount, ulMaxRwSessionCount,
ulRwSessionCount, ulTotalPublicMemory, ulFreePublicMemory, ulTotalPrivateMemory, and
ulFreePrivateMemory to signal that the information is unavailable.
|
protected boolean |
userPinCountLow_
True, if the user-PIN has been entered incorrectly at least once since the last successful
authentication.
|
protected boolean |
userPinFinalTry_
True, if the user has just one try left to supply the correct PIN before the user-PIN gets
locked.
|
protected boolean |
userPinInitialized_
True, if the user-PIN is already initialized.
|
protected boolean |
userPinLocked_
True, if the user-PIN is locked.
|
protected boolean |
userPinToBeChanged_
True, if the user PIN value is the default value set by token initialization or manufacturing.
|
protected boolean |
writeProtected_
True, if the token is write protected.
|
Modifier | Constructor and Description |
---|---|
protected |
TokenInfo(CK_TOKEN_INFO ckTokenInfo)
Constructor taking CK_TOKEN_INFO as given returned by PKCS11.C_GetTokenInfo.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create a (deep) clone of this object.
|
boolean |
equals(java.lang.Object otherObject)
Compares all member variables of this object with the other object.
|
Version |
getFirmwareVersion()
Get the version of the token's firmware.
|
long |
getFreePrivateMemory()
Get the amount of free memory for private objects.
|
long |
getFreePublicMemory()
Get the amount of free memory for public objects.
|
Version |
getHardwareVersion()
Get the version of the token's hardware.
|
java.lang.String |
getLabel()
Get the label of this token.
|
java.lang.String |
getManufacturerID()
Get the manufacturer identifier.
|
long |
getMaxPinLen()
Get the maximum length for the PIN.
|
long |
getMaxRwSessionCount()
Get the maximum allowed number of (open) concurrent read-write sessions.
|
long |
getMaxSessionCount()
Get the maximum allowed number of (open) concurrent sessions.
|
long |
getMinPinLen()
Get the minimum length for the PIN.
|
java.lang.String |
getModel()
Get the model of this token.
|
long |
getRwSessionCount()
Get the current number of open read-write sessions.
|
java.lang.String |
getSerialNumber()
Get the serial number of this token.
|
long |
getSessionCount()
Get the current number of open sessions.
|
java.util.Date |
getTime()
Get the current time of the token's clock.
|
long |
getTotalPrivateMemory()
Get the total amount of memory for private objects.
|
long |
getTotalPublicMemory()
Get the total amount of memory for public objects.
|
int |
hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a
hashtable.
|
boolean |
isClockOnToken()
Check, if the token has an own clock.
|
boolean |
isDualCryptoOperations()
Check, if the token supports dual crypto operations.
|
boolean |
isLoginRequired()
Check, if the token requires the user to log in before certain operations can be performed.
|
boolean |
isProtectedAuthenticationPath()
Check, if the token has an protected authentication path.
|
boolean |
isRestoreKeyNotNeeded()
Check, if a successful save of a sessions cryptographic operations state always contains all
keys needed to restore the state of the session.
|
boolean |
isRNG()
Check, if the token has a random number generator.
|
boolean |
isSecondaryAuthentication()
Check, if the token supports secondary authentication for private key objects.
|
boolean |
isSoPinCountLow()
Check, if the security officer-PIN has been entered incorrectly at least once since the last
successful authentication.
|
boolean |
isSoPinFinalTry()
Check, if the security officer has just one try left to supply the correct PIN before the
security officer-PIN gets locked.
|
boolean |
isSoPinLocked()
Check, if the security officer-PIN is locked.
|
boolean |
isSoPinToBeChanged()
Check, if the security officer PIN value is the default value set by token initialization or
manufacturing.
|
boolean |
isTokenInitialized()
Check, if the token is already initialized.
|
boolean |
isUserPinCountLow()
Check, if the user-PIN has been entered incorrectly at least once since the last successful
authentication.
|
boolean |
isUserPinFinalTry()
Check, if the user has just one try left to supply the correct PIN before the user-PIN gets
locked.
|
boolean |
isUserPinInitialized()
Check, if the user-PIN is already initialized.
|
boolean |
isUserPinLocked()
Check, if the user-PIN is locked.
|
boolean |
isUserPinToBeChanged()
Check, if the user PIN value is the default value set by token initialization or manufacturing.
|
boolean |
isWriteProtected()
Check, if the token is write protected.
|
java.lang.String |
toString()
Returns the string representation of this object.
|
public static final long EFFECTIVELY_INFINITE
public static final long UNAVAILABLE_INFORMATION
protected java.lang.String label_
protected java.lang.String manufacturerID_
protected java.lang.String model_
protected java.lang.String serialNumber_
protected long maxSessionCount_
protected long sessionCount_
protected long maxRwSessionCount_
protected long rwSessionCount_
protected long maxPinLen_
protected long minPinLen_
protected long totalPublicMemory_
protected long freePublicMemory_
protected long totalPrivateMemory_
protected long freePrivateMemory_
protected Version hardwareVersion_
protected Version firmwareVersion_
protected java.util.Date time_
protected boolean rng_
protected boolean writeProtected_
protected boolean loginRequired_
protected boolean userPinInitialized_
protected boolean restoreKeyNotNeeded_
protected boolean clockOnToken_
protected boolean protectedAuthenticationPath_
protected boolean dualCryptoOperations_
protected boolean tokenInitialized_
protected boolean secondaryAuthentication_
protected boolean userPinCountLow_
protected boolean userPinFinalTry_
protected boolean userPinLocked_
protected boolean userPinToBeChanged_
protected boolean soPinCountLow_
protected boolean soPinFinalTry_
protected boolean soPinLocked_
protected boolean soPinToBeChanged_
protected TokenInfo(CK_TOKEN_INFO ckTokenInfo)
ckTokenInfo
- The CK_TOKEN_INFO object as returned by PKCS11.C_GetTokenInfo.public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getLabel()
public java.lang.String getManufacturerID()
public java.lang.String getModel()
public java.lang.String getSerialNumber()
public long getMaxSessionCount()
public long getSessionCount()
public long getMaxRwSessionCount()
public long getRwSessionCount()
public long getMaxPinLen()
public long getMinPinLen()
public long getTotalPublicMemory()
public long getFreePublicMemory()
public long getTotalPrivateMemory()
public long getFreePrivateMemory()
public Version getHardwareVersion()
public Version getFirmwareVersion()
public java.util.Date getTime()
isClockOnToken()
public boolean isRNG()
public boolean isWriteProtected()
public boolean isLoginRequired()
public boolean isUserPinInitialized()
public boolean isRestoreKeyNotNeeded()
public boolean isClockOnToken()
public boolean isProtectedAuthenticationPath()
public boolean isDualCryptoOperations()
public boolean isTokenInitialized()
public boolean isSecondaryAuthentication()
public boolean isUserPinCountLow()
public boolean isUserPinFinalTry()
public boolean isUserPinLocked()
public boolean isUserPinToBeChanged()
public boolean isSoPinCountLow()
public boolean isSoPinFinalTry()
public boolean isSoPinLocked()
public boolean isSoPinToBeChanged()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
otherObject
- The other TokenInfo object.public int hashCode()
hashCode
in class java.lang.Object
IAIK JavaSecurity Website http://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.6.9