public abstract class PKCS11Demo extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected iaik.pkcs.pkcs11.provider.IAIKPkcs11 |
iaikPkcs11Provider_
The PKCS#11 JCE provider.
|
protected iaik.security.provider.IAIK |
iaikSoftwareProvider_
The IAIK JCE software provider.
|
protected java.lang.String |
moduleName_
Module name (native PKCS#11 module of the cryptographic hardware.
|
protected java.security.KeyStore |
tokenKeyStore_
The key store that represents the token (smart card) contents.
|
protected char[] |
userPin_
The user pin for the token key store.
|
Modifier | Constructor and Description |
---|---|
protected |
PKCS11Demo()
Creates a PKCS11Demo object that has to be explicitly
initialized with a module name. |
|
PKCS11Demo(java.lang.String moduleName,
char[] userPin)
Creates a PKCS11Demo object for the given module name.
|
Modifier and Type | Method and Description |
---|---|
void |
getKeyStore()
This method gets the key store of the PKCS#11 provider and stores
a reference at
pkcs11ClientKeystore_ . |
void |
init(java.lang.String moduleName,
char[] userPin)
Inits this PKCS11Demo object for the given module name.
|
protected java.lang.String moduleName_
protected char[] userPin_
protected iaik.pkcs.pkcs11.provider.IAIKPkcs11 iaikPkcs11Provider_
protected iaik.security.provider.IAIK iaikSoftwareProvider_
protected java.security.KeyStore tokenKeyStore_
protected PKCS11Demo()
initialized
with a module name.public PKCS11Demo(java.lang.String moduleName, char[] userPin)
moduleName
- the name of the moduleuserPin
- the user-pin (password) for the TokenKeyStore
(may be null
to pop-up a dialog asking for the pin)public void init(java.lang.String moduleName, char[] userPin)
moduleName
- the name of the moduleuserPin
- the user-pin (password) for the TokenKeyStore
(may be null
to pou-up a dialog asking for the pin)public void getKeyStore() throws java.security.GeneralSecurityException, java.io.IOException
pkcs11ClientKeystore_
.java.security.GeneralSecurityException
- If anything with the provider fails.java.io.IOException
- If loading the key store fails.