Class KeyStoreAccessZone10FS
public class KeyStoreAccessZone10FS extends KeyStoreAccess
It has proven impossible to make this class work with the available implementation from of the JRE 1.6. The documentation claims that the JRE KeyStore can store a secret key but when you try it, the JRE itself throws and exception after writing out an error message that it will accept *only* private keys and certificates.
Currently, this class does not work and has not been tested. There would be many limitations if it worked: It was developed for a demonstration and contains password information that should not be present in production code. It also assumes the special directory structure of the demonstration. Also, note that it must be initialized with the name of the current application: that is,the alias of the current user in the keystore.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description KeyStoreAccessZone10FS(java.lang.String entityName)
-
Method Summary
Modifier and Type Method Description void
createKeyStore(javax.crypto.SecretKey key)
Create initial session keystore, initialize with provided single key under the alias name "test", and store keystore in the file system.java.security.KeyStore
getKeyStore(KeyStoreType kst)
Return the KeyStore for the entity that is running the current application.
-
Constructor Details
-
KeyStoreAccessZone10FS
public KeyStoreAccessZone10FS(java.lang.String entityName)
-
-
Method Details
-
getKeyStore
Return the KeyStore for the entity that is running the current application.- Specified by:
getKeyStore
in classKeyStoreAccess
- Parameters:
kst
- The type of the keystore desired- Returns:
- the KeyStore
- Throws:
java.lang.Exception
-
createKeyStore
public void createKeyStore(javax.crypto.SecretKey key) throws java.lang.ExceptionCreate initial session keystore, initialize with provided single key under the alias name "test", and store keystore in the file system.- Parameters:
key
- the key to be stored under name "test"- Throws:
java.lang.Exception
-