public class PKCS11Information
extends java.lang.Object
Using this class the following information can be retrieved:
| Constructor and Description |
|---|
PKCS11Information(PKCS11LibraryConnection pkcs11LibraryConnection)
Creates a
PKCS11Information object for a specific connection
to a PKCS11 library. |
| Modifier and Type | Method and Description |
|---|---|
Info |
getInfo()
Returns an
Info object. |
MechanismInfo |
getMechanismInfo(long slotID,
long mechanismType)
Returns information about a specific mechanism supported by the token
located at a specific slot ID.
|
MechanismList |
getMechanismList(long slotID)
Returns a list of all the mechanisms (cryptographic operations) supported
by the token located at a specific slot ID.
|
SessionInfo |
getSessionInfo(long sessionHandle)
Returns information about a session.
|
SlotInfo |
getSlotInfo(long slotID)
Returns information about a slot located at a specific slot ID.
|
SlotList |
getSlotList(boolean tokenPresent)
Returns the slot list found by a PKCS #11 library.
|
TokenInfo |
getTokenInfo(long slotID)
Returns information about a token located at a specific slot ID.
|
public PKCS11Information(PKCS11LibraryConnection pkcs11LibraryConnection) throws UserFatalException
PKCS11Information object for a specific connection
to a PKCS11 library.
The connection to the PKCS11 library must be open.
pkcs11LibraryConnection - the connection to the PKCS11 libraryUserFatalException - if the connection to the PKCS11 library is closedpublic Info getInfo() throws UserFatalException
Info object.
The Info object encapsulates information about the
PKCS11 library its version, for example.
UserFatalException - if there was a problem retrieving the informationpublic SlotList getSlotList(boolean tokenPresent) throws UserFatalException
Using the slot list, a token's slot ID can be found.
tokenPresent - if set to true, only the IDs of slots that contain a token
will be returned; otherwise all slot IDs found will be returnedUserFatalException - if there was a problem retrieving the slot listpublic SlotInfo getSlotInfo(long slotID) throws UserFatalException
slotID - the slotID of the slotUserFatalException - if there was a problem retrieving the slot informationpublic TokenInfo getTokenInfo(long slotID) throws UserFatalException
slotID - the slotID of the tokenUserFatalException - if there was a problem retrieving the token informationpublic SessionInfo getSessionInfo(long sessionHandle) throws UserFatalException
sessionHandle - the session's handleUserFatalException - if there was a problem retrieving the session informationpublic MechanismList getMechanismList(long slotID) throws UserFatalException
slotID - the slotID of the tokenUserFatalException - if there was a problem retrieving the mechanism informationpublic MechanismInfo getMechanismInfo(long slotID, long mechanismType) throws UserFatalException
slotID - the slotID of the tokenmechanismType - the mechanismUserFatalException - if there was a problem retrieving the mechanism information