|
JCE Provider
|
JCE provider for Utimaco CryptoServer. More...
Inherits Provider.
Public Member Functions | |
| CryptoServerProvider () throws IOException, NumberFormatException, CryptoServerException | |
| Creates a provider for a CryptoServer. More... | |
| CryptoServerProvider (String device, int timeout) throws IOException, NumberFormatException, CryptoServerException | |
| Creates a provider for a CryptoServer. More... | |
| CryptoServerProvider (String[] devices, int timeout) throws IOException, NumberFormatException, CryptoServerException | |
| Creates a provider for a CryptoServer cluster. More... | |
| CryptoServerProvider (InputStream config) throws IOException, NumberFormatException, CryptoServerException | |
| Creates a provider for a CryptoServer. More... | |
| CryptoServerProvider (String fileName) throws IOException, NumberFormatException, CryptoServerException | |
| Creates a provider for a CryptoServer. More... | |
| Object | setProperty (String key, String value) |
| Sets a provider property. More... | |
| CryptoServerCXI | getCryptoServer () |
| Returns the CryptoServer object for this provider. | |
| void | loginPassword (String userName, byte[] password) throws IOException, CryptoServerException |
| Perform a login (Authentication) to the CryptoServer. More... | |
| void | loginPassword (String userName, String password) throws IOException, CryptoServerException |
| Perform a login (Authentication) to the CryptoServer. More... | |
| void | changePassword (String userName, String password) throws IOException, CryptoServerException, UnsupportedEncodingException |
| Changes the password of a user. More... | |
| void | loginSign (String userName, String keySpec, String pin) throws IOException, CryptoServerException |
| Perform a login (Authentication) to the CryptoServer. More... | |
| void | logoff () throws IOException, CryptoServerException |
| Terminates a secure messaging session (invalidates authentication). | |
| void | setDefaultUserName (String userName) throws IOException, CryptoServerException |
| Sets the default user name for login with the KeyStore.load() method. More... | |
| DumyCertificate | getDumyCertificate () |
| Create a dumy certificate. More... | |
| DumyCertificate | getDumyCertificate (PublicKey key) |
| Create a dumy certificate. More... | |
| DumyCertificate[] | getDumyCertificateChain () |
| Create a dumy certificate chain. More... | |
Static Public Attributes | |
| static final int | E_JCE = 0xB984 |
| static final int | E_JCE_MISSING_KEYSTOREPATH = 0xB9840002 |
Protected Member Functions | |
| void | finalize () |
| CryptoServerKey | setFipsUsage (CryptoServerKey key, FipsUsage usage, int mechPadding) throws IOException, CryptoServerException |
JCE provider for Utimaco CryptoServer.
| CryptoServerProvider | ( | ) | throws IOException, NumberFormatException, CryptoServerException |
Creates a provider for a CryptoServer.
The configuration file is read from one of the following locations:
| CryptoServerProvider | ( | String | device, |
| int | timeout | ||
| ) | throws IOException, NumberFormatException, CryptoServerException |
Creates a provider for a CryptoServer.
| device | Address of the CryptoServer. May contain the prefix "TCP:" followed by the IP address or port number and IP address (seperated by a '@'), or the prefix "PCI:" followed by the device name of a PCI device. Examples: "TCP:192.168.4.99", "TCP:288@192.168.4.201", "PCI:0", "PCI:/dev/cs2.0". |
| timeout | Timeout in milliseconds to establish the connection. |
| CryptoServerProvider | ( | String[] | devices, |
| int | timeout | ||
| ) | throws IOException, NumberFormatException, CryptoServerException |
Creates a provider for a CryptoServer cluster.
| devices | Array of the CryptoServer device addresses. Each address may contain the prefix "TCP:" followed by the IP address or port number and IP address (seperated by a '@'), or the prefix "PCI:" followed by the device name of a PCI device. Examples: "TCP:192.168.4.99", "TCP:288@192.168.4.201", "PCI:0", "PCI:/dev/cs2.0". |
| timeout | Timeout in milliseconds to establich the connection to a CryptoServer. |
| CryptoServerProvider | ( | InputStream | config | ) | throws IOException, NumberFormatException, CryptoServerException |
Creates a provider for a CryptoServer.
This method reads the configuration of the provider from an InputStream that should contain a property list, that can processed by the Properties.load() method.
Valid configuration items (keys) are
CryptoServerProvider(String,int) | config | Configuration is read from this InputStream (property list). |
| CryptoServerProvider | ( | String | fileName | ) | throws IOException, NumberFormatException, CryptoServerException |
Creates a provider for a CryptoServer.
This method reads the configuration of the provider from a file that should contain a property list, that can processed by the Properties.load() method. For a description of the config file, see CryptoServerProvider(InputStream).
| fileName | Pathname of the file containing the configuration. |
| void changePassword | ( | String | userName, |
| String | password | ||
| ) | throws IOException, CryptoServerException, UnsupportedEncodingException |
Changes the password of a user.
Note: The user must be logged in using a loginPassword method.
| userName | Name of the user the password should be changed for. |
| password | New password of the user. Should contain ISO8859-15 characters only. |
| DumyCertificate getDumyCertificate | ( | ) |
Create a dumy certificate.
This method creates a dumy certificate that can be used for KeyStore operations, if the private key does not have certificates.
| DumyCertificate getDumyCertificate | ( | PublicKey | key | ) |
Create a dumy certificate.
This method creates a dumy certificate that can be used for KeyStore operations, if the private key does not have certificates.
| key | CryptoServerPublic key to be stored in DumyCertificate. |
| DumyCertificate[] getDumyCertificateChain | ( | ) |
Create a dumy certificate chain.
This method creates a dumy certificate chain that can be used for the KeyStore.setKeyEntry() method, if the private key does not have certificates.
| void loginPassword | ( | String | userName, |
| byte[] | password | ||
| ) | throws IOException, CryptoServerException |
Perform a login (Authentication) to the CryptoServer.
Authentication is necessary, before the CryptoServer can be used.
This method authenticates using a HMAC password mechanism.
| userName | Name of the user registered in the CryptoServer. The user must be configured with HMAC password mechanism. |
| password | Password of the user. May contain binary data. |
| void loginPassword | ( | String | userName, |
| String | password | ||
| ) | throws IOException, CryptoServerException |
Perform a login (Authentication) to the CryptoServer.
This method authenticates using a HMAC password mechanism. Authentication is necessary, before the CryptoServer can be used.
| userName | Name of the user registered in the CryptoServer. The user must be configured with HMAC password mechanism. |
| password | Password of the user. Should contain ISO8859-15 characters only.. |
| void loginSign | ( | String | userName, |
| String | keySpec, | ||
| String | pin | ||
| ) | throws IOException, CryptoServerException |
Perform a login (Authentication) to the CryptoServer.
Authentication is necessary, before the CryptoServer can be used.
This method authenticates using a (RSA) signature mechanism.
| userName | Name of the user registered in the CryptoServer. The user must be configured with RSA signature mechanism. |
| keySpec | Name of the file that contains the private key of the user. |
| pin | Password, if the key file is encrypted, or null. |
| void setDefaultUserName | ( | String | userName | ) | throws IOException, CryptoServerException |
Sets the default user name for login with the KeyStore.load() method.
| userName | Name of the user registered in the CryptoServer. The user must be configured with HMAC password mechanism. |
| Object setProperty | ( | String | key, |
| String | value | ||
| ) |
Sets a provider property.
| key | the property to be set. The following properties are currently handled by the CryptoServer Provider:
|
| value | the property value to be set |