org.apache.geronimo.console.core.keystore
Class KeyStoreGBean

java.lang.Object
  extended by org.apache.geronimo.console.core.keystore.KeyStoreGBean
All Implemented Interfaces:
GBeanLifecycle

public class KeyStoreGBean
extends Object
implements GBeanLifecycle


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
KeyStoreGBean()
           
 
Method Summary
 void deleteEntry(String alias)
           
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 X509Certificate generateCert(PublicKey publicKey, PrivateKey privateKey, String sigalg, int validity, String cn, String ou, String o, String l, String st, String c)
           
 String generateCSR(String alias)
           
 String generateCSR(X509Certificate cert, PrivateKey signingKey)
           
 void generateKeyPair(String alias, String keyalg, Integer keysize, String sigalg, Integer validity, String cn, String ou, String o, String l, String st, String c)
           
 Certificate[] getCertificateChain(String alias)
           
static GBeanInfo getGBeanInfo()
           
 KeyEntryInfo getKeyEntryInfo(String alias)
           
 String getKeyPassword()
           
 List getKeyStoreEntries()
           
 String getKeyStoreLocation()
           
 String getKeyStorePassword()
           
 String getKeyStoreProvider()
           
 int getKeyStoreSize()
           
 String getKeyStoreType()
           
 ServerInfo getServerInfo()
           
 void importPKCS7Certificate(String alias, InputStream is)
           
 void importPKCS7Certificate(String alias, String certbuf)
           
 void importTrustedX509Certificate(String alias, String certfile)
           
 void saveKeyStore()
           
 void setKeyPassword(String keyPassword)
           
 void setKeyStoreLocation(String keyStoreLocation)
           
 void setKeyStorePassword(String keyStorePassword)
           
 void setKeyStoreProvider(String keyStoreProvider)
           
 void setKeyStoreType(String keyStoreType)
           
 void setServerInfo(ServerInfo serverInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

KeyStoreGBean

public KeyStoreGBean()
Method Detail

doStart

public void doStart()
             throws WaitingException,
                    Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state
WaitingException

doStop

public void doStop()
            throws WaitingException,
                   Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state
WaitingException

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

setKeyStoreType

public void setKeyStoreType(String keyStoreType)

getKeyStoreType

public String getKeyStoreType()

setKeyStoreProvider

public void setKeyStoreProvider(String keyStoreProvider)

getKeyStoreProvider

public String getKeyStoreProvider()

setKeyStoreLocation

public void setKeyStoreLocation(String keyStoreLocation)

getServerInfo

public ServerInfo getServerInfo()

setServerInfo

public void setServerInfo(ServerInfo serverInfo)

getKeyStoreLocation

public String getKeyStoreLocation()

setKeyStorePassword

public void setKeyStorePassword(String keyStorePassword)

getKeyStorePassword

public String getKeyStorePassword()

setKeyPassword

public void setKeyPassword(String keyPassword)

getKeyPassword

public String getKeyPassword()

getKeyStoreSize

public int getKeyStoreSize()
                    throws KeyStoreException
Throws:
KeyStoreException

getKeyEntryInfo

public KeyEntryInfo getKeyEntryInfo(String alias)
                             throws KeyStoreException
Throws:
KeyStoreException

getKeyStoreEntries

public List getKeyStoreEntries()
                        throws KeyStoreException
Throws:
KeyStoreException

getCertificateChain

public Certificate[] getCertificateChain(String alias)
                                  throws KeyStoreException
Throws:
KeyStoreException

generateCSR

public String generateCSR(String alias)
                   throws Exception
Throws:
Exception

generateCSR

public String generateCSR(X509Certificate cert,
                          PrivateKey signingKey)
                   throws Exception
Throws:
Exception

generateKeyPair

public void generateKeyPair(String alias,
                            String keyalg,
                            Integer keysize,
                            String sigalg,
                            Integer validity,
                            String cn,
                            String ou,
                            String o,
                            String l,
                            String st,
                            String c)
                     throws NoSuchAlgorithmException,
                            KeyStoreException,
                            SignatureException,
                            InvalidKeyException,
                            CertificateException,
                            IOException
Throws:
NoSuchAlgorithmException
KeyStoreException
SignatureException
InvalidKeyException
CertificateException
IOException

saveKeyStore

public void saveKeyStore()
                  throws IOException,
                         KeyStoreException,
                         CertificateException,
                         NoSuchAlgorithmException
Throws:
IOException
KeyStoreException
CertificateException
NoSuchAlgorithmException

generateCert

public X509Certificate generateCert(PublicKey publicKey,
                                    PrivateKey privateKey,
                                    String sigalg,
                                    int validity,
                                    String cn,
                                    String ou,
                                    String o,
                                    String l,
                                    String st,
                                    String c)
                             throws SignatureException,
                                    InvalidKeyException
Throws:
SignatureException
InvalidKeyException

importTrustedX509Certificate

public void importTrustedX509Certificate(String alias,
                                         String certfile)
                                  throws FileNotFoundException,
                                         CertificateException,
                                         KeyStoreException,
                                         IOException,
                                         NoSuchAlgorithmException,
                                         NoSuchProviderException
Throws:
FileNotFoundException
CertificateException
KeyStoreException
IOException
NoSuchAlgorithmException
NoSuchProviderException

importPKCS7Certificate

public void importPKCS7Certificate(String alias,
                                   String certbuf)
                            throws CertificateException,
                                   NoSuchProviderException,
                                   KeyStoreException,
                                   NoSuchAlgorithmException,
                                   UnrecoverableKeyException,
                                   IOException
Throws:
CertificateException
NoSuchProviderException
KeyStoreException
NoSuchAlgorithmException
UnrecoverableKeyException
IOException

importPKCS7Certificate

public void importPKCS7Certificate(String alias,
                                   InputStream is)
                            throws CertificateException,
                                   NoSuchProviderException,
                                   KeyStoreException,
                                   NoSuchAlgorithmException,
                                   UnrecoverableKeyException,
                                   IOException
Throws:
CertificateException
NoSuchProviderException
KeyStoreException
NoSuchAlgorithmException
UnrecoverableKeyException
IOException

deleteEntry

public void deleteEntry(String alias)
                 throws KeyStoreException,
                        CertificateException,
                        NoSuchAlgorithmException,
                        IOException
Throws:
KeyStoreException
CertificateException
NoSuchAlgorithmException
IOException

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.