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