nu.zoom.swing.desktop.plugin.portunis.impl
Class KeyStoreHandlerImpl

java.lang.Object
  extended by nu.zoom.swing.desktop.plugin.portunis.impl.KeyStoreHandlerImpl
All Implemented Interfaces:
KeyStoreHandler

public class KeyStoreHandlerImpl
extends Object
implements KeyStoreHandler

Version:
$Revision: 1.2 $
Author:
$Author: johan $
See Also:
KeyStoreHandler

Nested Class Summary
static class KeyStoreHandlerImpl.KeyStoreWrapperImpl
           
 
Constructor Summary
KeyStoreHandlerImpl()
           
 
Method Summary
 KeyStore createKeyStore(String dn)
          Create an empty keystore - NOT IMPLEMENTED YET
 KeyStoreWrapper[] getLoadedKeyStores()
          Get all active loaded key stores.
 KeyStoreWrapper loadKeyStore(File filename, KeyStoreType type, char[] password)
           
 void saveKeyStore(KeyStoreWrapper wrapper, char[] password)
          Write a keystore to disk.
 void saveKeyStoreAs(KeyStoreWrapper wrapper, File newFileName, char[] password)
          Write a keystore to disk, using another name for the file than the file used to load the keystore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreHandlerImpl

public KeyStoreHandlerImpl()
Method Detail

createKeyStore

public KeyStore createKeyStore(String dn)
Description copied from interface: KeyStoreHandler
Create an empty keystore - NOT IMPLEMENTED YET

Specified by:
createKeyStore in interface KeyStoreHandler
Parameters:
dn - The name of the keystore.
Returns:
A newly created keystore.

loadKeyStore

public KeyStoreWrapper loadKeyStore(File filename,
                                    KeyStoreType type,
                                    char[] password)
                             throws KeyStoreException,
                                    NoSuchAlgorithmException,
                                    CertificateException,
                                    FileNotFoundException,
                                    IOException
Specified by:
loadKeyStore in interface KeyStoreHandler
Throws:
KeyStoreException
NoSuchAlgorithmException
CertificateException
FileNotFoundException
IOException

getLoadedKeyStores

public KeyStoreWrapper[] getLoadedKeyStores()
Description copied from interface: KeyStoreHandler
Get all active loaded key stores.

Specified by:
getLoadedKeyStores in interface KeyStoreHandler
Returns:
The current known keystores

saveKeyStore

public void saveKeyStore(KeyStoreWrapper wrapper,
                         char[] password)
                  throws KeyStoreException,
                         NoSuchAlgorithmException,
                         CertificateException,
                         IOException
Description copied from interface: KeyStoreHandler
Write a keystore to disk.

Specified by:
saveKeyStore in interface KeyStoreHandler
Parameters:
wrapper - The keystore to save.
password - The integrity check password.
Throws:
KeyStoreException
NoSuchAlgorithmException
CertificateException
IOException

saveKeyStoreAs

public void saveKeyStoreAs(KeyStoreWrapper wrapper,
                           File newFileName,
                           char[] password)
                    throws KeyStoreException,
                           NoSuchAlgorithmException,
                           CertificateException,
                           IOException
Description copied from interface: KeyStoreHandler
Write a keystore to disk, using another name for the file than the file used to load the keystore.

Specified by:
saveKeyStoreAs in interface KeyStoreHandler
Parameters:
wrapper - The keystore to write to disk.
newFileName - The filename to use.
Throws:
KeyStoreException
NoSuchAlgorithmException
CertificateException
IOException


Copyright © 2011. All Rights Reserved.