|
IAIK PKCS#11 Provider Micro Edition version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.pkcs.pkcs11.me.Module
This is the main class in this package. Through it, the application gets
access to token objects.
The application starts with something like
String moduleName = "aetpkss1.dll"; Module module = Module.getInstance(moduleName); Token[] tokens = module.getTokens();The string provided to the static
getInstance
method
contains the name of the PKCS#11 module of the underlying crypto hardware;
e.g. the PKCS#11 module for the smart card. In this example, it is the
module called aetpkss1.dll
, which is the PKCS#11 module
of AET Europe's SafeSign software which supports G&D cards and most
JavaCards.getTokens
returns a list of all available
crypto tokens. For example, if there is smart card in the card
reader—both compatible with the PKCS#11 module—the list will
contain one token. If there is no card present, the list will be empty
(but not null
).
This class is thread-safe.
Token
Method Summary | |
void |
close()
Closes this module. |
static Module |
getInstance(java.lang.String moduleName)
Creates an instance that accesses the specified PKCS#11 module. |
java.lang.String |
getManufacturer()
Get the manufacturer name of the underlying PKCS#11 module. |
Token[] |
getTokens()
Get the list of all available tokens. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Module getInstance(java.lang.String moduleName) throws java.io.IOException, PKCS11RuntimeException
aetpkss1.dll
.
CKF_OS_LOCKING_OK
flag set to true
.
No other flags are set. The reserved parameter is set to
null
.
moduleName
- The PKCS#11 module name.
java.io.IOException
- If connecting to the PKCS#11 module fails.
PKCS11RuntimeException
- If initializing the module fails.public void close() throws PKCS11RuntimeException
C_Finalize
function of the underlying PKCS#11 module.
After this call, the application must not use this module any longer.
PKCS11RuntimeException
- If finalizing the module fails.public java.lang.String getManufacturer() throws PKCS11RuntimeException
PKCS11RuntimeException
- If getting the module info fails.public Token[] getTokens() throws PKCS11RuntimeException
null
.
PKCS11RuntimeException
- If getting the token list fails.
|
IAIK PKCS#11 Provider Micro Edition version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |