public class PKCS11LibraryConnection
extends java.lang.Object
Once connected to the library, the PKCS11Information class can
be used to obtain information about the library, and the
JNIPKCS11 class can be used to perform operations on the token.
PKCS11Information,
JNIPKCS11| Constructor and Description |
|---|
PKCS11LibraryConnection(java.lang.String pkcs11LibraryPath)
Creates a
PKCS11LibraryConnection object and opens a
connection to the specified PKCS11 library. |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection()
Closes the connection to the PKCS11 library.
|
JNIPKCS11 |
getJNIPKCS11()
This method returns the
JNIPKCS11 object. |
java.lang.String |
getPKCS11LibraryPath()
Returns the name of the PKCS11 library file being used.
|
boolean |
isConnectionOpen()
Indicates whether or not the connection to the token's PKCS11 library is
open.
|
public PKCS11LibraryConnection(java.lang.String pkcs11LibraryPath)
throws UserFatalException
PKCS11LibraryConnection object and opens a
connection to the specified PKCS11 library.
The PKCS11 library is used to establish the connection, and must indicate the appropriate library file for the smart card being used.
pkcs11LibraryPath - the name of the PKCS11 library fileUserFatalException - if the connection to the PKCS11
token library could not be establishedpublic void closeConnection()
throws UserFatalException
UserFatalException - if there was a problem closing
the connection to the PKCS11 librarypublic boolean isConnectionOpen()
true if the connection to
the library is open, false otherwisepublic java.lang.String getPKCS11LibraryPath()
public JNIPKCS11 getJNIPKCS11() throws UserFatalException
JNIPKCS11 object.
The method provides access to the native interface of the PKCS11 library.
UserFatalException - if the connection to the PKCS11
library is closed