Enhydra-Oyster 2.1-7 API

org.enhydra.oyster.test
Class KeyStoreGenerator

java.lang.Object
  extended byorg.enhydra.oyster.test.KeyStoreGenerator

public class KeyStoreGenerator
extends java.lang.Object

Class is mainly used to fill keystore with keyes and certificates from pfx files used in some of test examples which read KeyStores.


Constructor Summary
KeyStoreGenerator()
          Constructor with dynamic loading of necessery provider classes.
 
Method Summary
 void fillKeyStore(java.lang.String path0, java.lang.String password0)
          Fills and store previously initialised KeyStore with data from pfx file or pfx files.
 void fillSingleKeyStore(java.io.File pfxFile0, char[] password0)
          Reads, imports and stores the single pfx file in previously initialised KeyStore.
 void initKeyStore(java.lang.String path0, java.lang.String password0)
          Initialisation of file for KeyStore which should be used for pfx dataimport.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreGenerator

public KeyStoreGenerator()
Constructor with dynamic loading of necessery provider classes.

Method Detail

initKeyStore

public void initKeyStore(java.lang.String path0,
                         java.lang.String password0)
                  throws SMIMEException
Initialisation of file for KeyStore which should be used for pfx dataimport. If specified file does not exist it will be created.

Parameters:
path0 - path to the KeyStore file store
password0 - password for the created store
Throws:
SMIMEException - thrown i case of initialisation error.

fillKeyStore

public void fillKeyStore(java.lang.String path0,
                         java.lang.String password0)
                  throws SMIMEException
Fills and store previously initialised KeyStore with data from pfx file or pfx files.

Parameters:
path0 - path to the single pfx file or to the direcory with group of pfx files. In second case all pfx files will be imported. Note that in that case all pfx files must have same access password.
password0 - password for the specified pfx file or group of files
Throws:
SMIMEException - thrown in case of error during the import.

fillSingleKeyStore

public void fillSingleKeyStore(java.io.File pfxFile0,
                               char[] password0)
                        throws java.lang.Exception
Reads, imports and stores the single pfx file in previously initialised KeyStore.

Parameters:
pfxFile0 - path to the pfx file
password0 - password for the specified pfx file
Throws:
SMIMEException - thrown in case of error during the import.
java.lang.Exception

main

public static void main(java.lang.String[] args)

Enhydra-Oyster 2.1-7 API