public class PEMKeyStore extends KeyStoreSpi
| Modifier and Type | Field and Description |
|---|---|
static String |
CERTIFICATE_FILENAME |
static String |
DEFAULT_DIRECTORY_KEY |
static String |
DIRECTORY_LIST_KEY |
static String |
KEY_FILENAME |
static String |
PROXY_FILENAME |
| Constructor and Description |
|---|
PEMKeyStore() |
| Modifier and Type | Method and Description |
|---|---|
Enumeration<String> |
engineAliases()
Get an enumertion of all of the aliases in this keystore.
|
boolean |
engineContainsAlias(String s)
Does the specified alias exist in this keystore?
|
void |
engineDeleteEntry(String s)
Delete a security object from this keystore.
|
Certificate |
engineGetCertificate(String s)
Get the certificate referenced by the supplied alias.
|
String |
engineGetCertificateAlias(Certificate certificate)
Get the alias associated with the supplied certificate.
|
Certificate[] |
engineGetCertificateChain(String s)
Get the certificateChain for the key referenced by the alias.
|
Date |
engineGetCreationDate(String s)
Get the creation date for the object referenced by the alias.
|
Key |
engineGetKey(String s,
char[] chars)
Get the key referenced by the specified alias.
|
boolean |
engineIsCertificateEntry(String s)
Does the supplied alias refer to a certificate in this keystore?
|
boolean |
engineIsKeyEntry(String s)
Does the supplied alias refer to a key in this key store.
|
void |
engineLoad(InputStream inputStream,
char[] chars)
Load the keystore from the supplied input stream.
|
void |
engineLoad(KeyStore.LoadStoreParameter loadStoreParameter)
Load the keystore based on parameters in the LoadStoreParameter.
|
void |
engineSetCertificateEntry(String alias,
Certificate certificate)
Add a certificate to the keystore.
|
void |
engineSetKeyEntry(String s,
byte[] bytes,
Certificate[] certificates)
currently unsupported.
|
void |
engineSetKeyEntry(String s,
Key key,
char[] chars,
Certificate[] certificates)
Add a new private key to the keystore.
|
int |
engineSize()
Get the number of security objects stored in this keystore.
|
void |
engineStore(OutputStream outputStream,
char[] chars)
Persist the security material in this keystore.
|
void |
setCACertStore(ResourceSecurityWrapperStore<ResourceTrustAnchor,TrustAnchor> caCertStore) |
void |
setProxyDelegate(ResourceSecurityWrapperStore<ResourceProxyCredential,X509Credential> proxyDelegate) |
engineEntryInstanceOf, engineGetEntry, engineSetEntry, engineStorepublic static final String DEFAULT_DIRECTORY_KEY
public static final String DIRECTORY_LIST_KEY
public static final String CERTIFICATE_FILENAME
public static final String KEY_FILENAME
public static final String PROXY_FILENAME
public void setCACertStore(ResourceSecurityWrapperStore<ResourceTrustAnchor,TrustAnchor> caCertStore)
public void setProxyDelegate(ResourceSecurityWrapperStore<ResourceProxyCredential,X509Credential> proxyDelegate)
public Key engineGetKey(String s, char[] chars) throws NoSuchAlgorithmException, UnrecoverableKeyException
engineGetKey in class KeyStoreSpis - The key's alias.chars - The key's password.NoSuchAlgorithmException - If the key is encoded with an invalid algorithm.UnrecoverableKeyException - If the key can not be retrieved.public boolean engineIsKeyEntry(String s)
engineIsKeyEntry in class KeyStoreSpis - The alias.public void engineStore(OutputStream outputStream, char[] chars) throws IOException, NoSuchAlgorithmException, CertificateException
engineStore in class KeyStoreSpioutputStream - This parameter is ignored.chars - This parameter is ignored.IOExceptionNoSuchAlgorithmExceptionCertificateExceptionpublic Date engineGetCreationDate(String s)
engineGetCreationDate in class KeyStoreSpis - The alias of the security object.public String engineGetCertificateAlias(Certificate certificate)
engineGetCertificateAlias in class KeyStoreSpicertificate - The certificate to querypublic Certificate[] engineGetCertificateChain(String s)
engineGetCertificateChain in class KeyStoreSpis - The key alias.public Certificate engineGetCertificate(String s)
engineGetCertificate in class KeyStoreSpis - The alias.public void engineLoad(KeyStore.LoadStoreParameter loadStoreParameter) throws IOException, NoSuchAlgorithmException, CertificateException
engineLoad in class KeyStoreSpiloadStoreParameter - The parameters to load.IOExceptionNoSuchAlgorithmExceptionCertificateExceptionpublic void engineLoad(InputStream inputStream, char[] chars) throws IOException, NoSuchAlgorithmException, CertificateException
engineLoad in class KeyStoreSpiinputStream - An input stream to the properties file.chars - The password is not used.IOExceptionNoSuchAlgorithmExceptionCertificateExceptionpublic void engineDeleteEntry(String s) throws KeyStoreException
engineDeleteEntry in class KeyStoreSpis - The alias of the object to delete.KeyStoreExceptionpublic Enumeration<String> engineAliases()
engineAliases in class KeyStoreSpipublic void engineSetKeyEntry(String s, Key key, char[] chars, Certificate[] certificates) throws KeyStoreException
engineSetKeyEntry in class KeyStoreSpis - The alias for the object.key - The private key.chars - The password.certificates - The key's certificate chain.KeyStoreExceptionpublic void engineSetKeyEntry(String s, byte[] bytes, Certificate[] certificates) throws KeyStoreException
engineSetKeyEntry in class KeyStoreSpis - The key's aliasbytes - The encoded private key.certificates - The key's certificate chain.KeyStoreExceptionpublic boolean engineContainsAlias(String s)
engineContainsAlias in class KeyStoreSpis - The alias.public int engineSize()
engineSize in class KeyStoreSpipublic boolean engineIsCertificateEntry(String s)
engineIsCertificateEntry in class KeyStoreSpis - The alias.public void engineSetCertificateEntry(String alias, Certificate certificate) throws KeyStoreException
engineSetCertificateEntry in class KeyStoreSpialias - The certificate alias.certificate - The certificate to store.KeyStoreExceptionCopyright © 2013. All Rights Reserved.