com.myjavaworld.jftp.ssl
Class KeyStoreManager

java.lang.Object
  extended by com.myjavaworld.jftp.ssl.KeyStoreManager

public class KeyStoreManager
extends Object

Author:
Sai Pullabhotla, psai [at] jMethods [dot] com To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Constructor Summary
KeyStoreManager()
           
 
Method Summary
static void addClientCertificate(Certificate[] chain)
          Adds the given certificate chain to the client certificates store.
static void addServerCertificate(Certificate[] chain)
          Adds the given certificate chain to the server certificates store.
static void deleteClientCertificate(String alias)
           
static void deleteServerCertificate(String alias)
           
static KeyStore getClientCertificateStore()
          Returns the key store that has all client certificates.
static KeyStore getServerCertificateStore()
          Returns the key store that has all trusted server certificates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreManager

public KeyStoreManager()
Method Detail

getServerCertificateStore

public static KeyStore getServerCertificateStore()
                                          throws KeyStoreException
Returns the key store that has all trusted server certificates.

Returns:
trusted server certificates store.
Throws:
KeyStoreException

getClientCertificateStore

public static KeyStore getClientCertificateStore()
                                          throws KeyStoreException
Returns the key store that has all client certificates.

Returns:
client certificates store.
Throws:
KeyStoreException

addServerCertificate

public static void addServerCertificate(Certificate[] chain)
                                 throws KeyStoreException
Adds the given certificate chain to the server certificates store.

Parameters:
chain - certificate chain
Throws:
KeyStoreException

addClientCertificate

public static void addClientCertificate(Certificate[] chain)
                                 throws KeyStoreException
Adds the given certificate chain to the client certificates store.

Parameters:
chain - certificate chain
Throws:
KeyStoreException

deleteServerCertificate

public static void deleteServerCertificate(String alias)
                                    throws KeyStoreException
Throws:
KeyStoreException

deleteClientCertificate

public static void deleteClientCertificate(String alias)
                                    throws KeyStoreException
Throws:
KeyStoreException


Copyright © 2000-2012 jMethods, Inc.. All Rights Reserved.