|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.security.keystore.FileKeystoreInstance
public class FileKeystoreInstance
Implementation of KeystoreInstance that accesses a keystore file on the local filesystem, identified by the file's name (the last component of the name only, not the full path).
| Field Summary | |
|---|---|
static GBeanInfo |
GBEAN_INFO
|
| Constructor Summary | |
|---|---|
FileKeystoreInstance(ServerInfo serverInfo,
URI keystorePath,
String keystoreName,
String keystorePassword,
String keystoreType,
String keyPasswords,
Kernel kernel,
AbstractName abstractName)
|
|
| Method Summary | |
|---|---|
void |
changeKeyPassword(String alias,
char[] storePassword,
char[] keyPassword,
char[] newKeyPassword)
Changes the password for a private key entry in the keystore. |
void |
changeKeystorePassword(char[] storePassword,
char[] newPassword)
Changes the keystore password. |
void |
deleteEntry(String alias,
char[] storePassword)
|
void |
doFail()
|
void |
doStart()
|
void |
doStop()
|
String |
generateCSR(String alias,
char[] storePassword)
|
void |
generateKeyPair(String alias,
char[] storePassword,
char[] keyPassword,
String keyAlgorithm,
int keySize,
String signatureAlgorithm,
int validity,
String commonName,
String orgUnit,
String organization,
String locality,
String state,
String country)
|
Certificate |
getCertificate(String alias)
Gets a particular certificate from the keystore. |
Certificate |
getCertificate(String alias,
char[] storePassword)
Gets a particular certificate from the keystore. |
String |
getCertificateAlias(Certificate cert,
char[] storePassword)
|
Certificate[] |
getCertificateChain(String alias,
char[] storePassword)
|
static GBeanInfo |
getGBeanInfo()
|
KeyManager[] |
getKeyManager(String algorithm,
String alias,
char[] storePassword)
|
String |
getKeystoreName()
|
String |
getKeystoreType()
|
PrivateKey |
getPrivateKey(String alias,
char[] storePassword,
char[] keyPassword)
Gets the private key with the specified alias. |
TrustManager[] |
getTrustManager(String algorithm,
char[] storePassword)
|
String[] |
getUnlockedKeys(char[] storePassword)
|
void |
importPKCS7Certificate(String alias,
String certbuf,
char[] storePassword)
|
void |
importTrustCertificate(Certificate cert,
String alias,
char[] storePassword)
|
boolean |
isKeyLocked(String alias)
Checks whether the specified private key is locked, which is to say, available for other components to use to generate socket factories. |
boolean |
isKeystoreLocked()
|
boolean |
isTrustStore(char[] storePassword)
|
String[] |
listPrivateKeys(char[] storePassword)
|
String[] |
listTrustCertificates(char[] storePassword)
|
void |
lockKeystore(char[] password)
|
void |
lockPrivateKey(String alias,
char[] storePassword)
|
void |
setKeyPasswords(String passwords)
|
void |
setKeystorePassword(String password)
|
void |
unlockKeystore(char[] password)
|
void |
unlockPrivateKey(String alias,
char[] storePassword,
char[] password)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final GBeanInfo GBEAN_INFO
| Constructor Detail |
|---|
public FileKeystoreInstance(ServerInfo serverInfo,
URI keystorePath,
String keystoreName,
String keystorePassword,
String keystoreType,
String keyPasswords,
Kernel kernel,
AbstractName abstractName)
| Method Detail |
|---|
public void doStart()
throws Exception
doStart in interface GBeanLifecycleException
public void doStop()
throws Exception
doStop in interface GBeanLifecycleExceptionpublic void doFail()
doFail in interface GBeanLifecyclepublic static GBeanInfo getGBeanInfo()
public String getKeystoreName()
getKeystoreName in interface KeystoreInstancepublic String getKeystoreType()
getKeystoreType in interface KeystoreInstance
public void unlockKeystore(char[] password)
throws KeystoreException
unlockKeystore in interface KeystoreInstanceKeystoreExceptionpublic void setKeystorePassword(String password)
public void lockKeystore(char[] password)
throws KeystoreException
lockKeystore in interface KeystoreInstanceKeystoreExceptionpublic boolean isKeystoreLocked()
isKeystoreLocked in interface KeystoreInstance
public String[] listPrivateKeys(char[] storePassword)
throws KeystoreException
listPrivateKeys in interface KeystoreInstanceKeystoreException
public void unlockPrivateKey(String alias,
char[] storePassword,
char[] password)
throws KeystoreException
unlockPrivateKey in interface KeystoreInstanceKeystoreException
public String[] getUnlockedKeys(char[] storePassword)
throws KeystoreException
getUnlockedKeys in interface KeystoreInstanceKeystoreException
public boolean isTrustStore(char[] storePassword)
throws KeystoreException
isTrustStore in interface KeystoreInstanceKeystoreException
public void lockPrivateKey(String alias,
char[] storePassword)
throws KeystoreException
lockPrivateKey in interface KeystoreInstanceKeystoreExceptionpublic void setKeyPasswords(String passwords)
public boolean isKeyLocked(String alias)
isKeyLocked in interface KeystoreInstance
public String[] listTrustCertificates(char[] storePassword)
throws KeystoreException
listTrustCertificates in interface KeystoreInstanceKeystoreException
public void importTrustCertificate(Certificate cert,
String alias,
char[] storePassword)
throws KeystoreException
importTrustCertificate in interface KeystoreInstanceKeystoreException
public void generateKeyPair(String alias,
char[] storePassword,
char[] keyPassword,
String keyAlgorithm,
int keySize,
String signatureAlgorithm,
int validity,
String commonName,
String orgUnit,
String organization,
String locality,
String state,
String country)
throws KeystoreException
generateKeyPair in interface KeystoreInstanceKeystoreException
public String generateCSR(String alias,
char[] storePassword)
throws KeystoreException
generateCSR in interface KeystoreInstanceKeystoreException
public void importPKCS7Certificate(String alias,
String certbuf,
char[] storePassword)
throws KeystoreException
importPKCS7Certificate in interface KeystoreInstanceKeystoreException
public void deleteEntry(String alias,
char[] storePassword)
throws KeystoreException
deleteEntry in interface KeystoreInstanceKeystoreException
public KeyManager[] getKeyManager(String algorithm,
String alias,
char[] storePassword)
throws KeystoreException
getKeyManager in interface KeystoreInstanceKeystoreException
public TrustManager[] getTrustManager(String algorithm,
char[] storePassword)
throws KeystoreException
getTrustManager in interface KeystoreInstanceKeystoreException
public PrivateKey getPrivateKey(String alias,
char[] storePassword,
char[] keyPassword)
throws KeyNotFoundException,
KeystoreException,
KeystoreIsLocked
getPrivateKey in interface KeystoreInstancealias - The alias of the private key to be retrievedstorePassword - The password used to access the keystorekeyPassword - The password to use to protect the new key
KeyNotFoundException
KeystoreException
KeystoreIsLocked
public Certificate getCertificate(String alias,
char[] storePassword)
throws KeystoreIsLocked,
KeyNotFoundException,
KeystoreException
getCertificate in interface KeystoreInstancealias - The certificate to look at
KeyNotFoundException
KeyStoreException
KeystoreIsLocked
KeystoreException
public String getCertificateAlias(Certificate cert,
char[] storePassword)
throws KeystoreException
getCertificateAlias in interface KeystoreInstanceKeystoreException
public Certificate[] getCertificateChain(String alias,
char[] storePassword)
throws KeystoreException
getCertificateChain in interface KeystoreInstanceKeystoreExceptionpublic Certificate getCertificate(String alias)
getCertificate in interface KeystoreInstancealias - The certificate to look at
public void changeKeystorePassword(char[] storePassword,
char[] newPassword)
throws KeystoreException
changeKeystorePassword in interface KeystoreInstancestorePassword - Current password for the keystorenewPassword - New password for the keystore
KeystoreException
public void changeKeyPassword(String alias,
char[] storePassword,
char[] keyPassword,
char[] newKeyPassword)
throws KeystoreException
changeKeyPassword in interface KeystoreInstancestorePassword - Password for the keystorekeyPassword - Current password for the private keynewKeyPassword - New password for the private key
KeystoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||