java.lang.Object | |
↳ | java.security.KeyStoreSpi |
KeyStoreSpi
is the Service Provider Interface (SPI) definition for
KeyStore
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Returns an
Enumeration
over all alias names stored in this
KeyStoreSpi
.
|
||||||||||
|
Indicates whether the given alias is present in this
KeyStoreSpi
.
|
||||||||||
|
Deletes the entry identified with the given alias from this
KeyStoreSpi
.
|
||||||||||
|
Indicates whether the entry for the given alias is assignable to the
provided
Class
.
|
||||||||||
|
Returns the trusted certificate for the entry with the given alias.
|
||||||||||
|
Returns the alias associated with the first entry whose certificate
matches the specified certificate.
|
||||||||||
|
Returns the certificate chain for the entry with the given alias.
|
||||||||||
|
Returns the creation date of the entry with the given alias.
|
||||||||||
|
Returns the
Entry
with the given alias, using the specified
ProtectionParameter
.
|
||||||||||
|
Returns the key with the given alias, using the password to recover the
key from the store.
|
||||||||||
|
Indicates whether the specified alias is associated with a
KeyStore.TrustedCertificateEntry
.
|
||||||||||
|
Indicates whether the specified alias is associated with either a
KeyStore.PrivateKeyEntry
or a
KeyStore.SecretKeyEntry
.
|
||||||||||
|
Loads this
KeyStoreSpi
using the specified
LoadStoreParameter
.
|
||||||||||
|
Loads this
KeyStoreSpi
from the given
InputStream
.
|
||||||||||
|
Associates the given alias with a certificate.
|
||||||||||
|
Stores the given
Entry
in this
KeyStoreSpi
and associates
the entry with the given
alias
.
|
||||||||||
|
Associates the given alias with the key, password and certificate chain.
|
||||||||||
|
Associates the given alias with a key and a certificate chain.
|
||||||||||
|
Returns the number of entries stored in this
KeyStoreSpi
.
|
||||||||||
|
Stores this
KeyStoreSpi
using the specified
LoadStoreParameter
.
|
||||||||||
|
Writes this
KeyStoreSpi
to the specified
OutputStream
.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns an
Enumeration
over all alias names stored in this
KeyStoreSpi
.
Enumeration
over all alias names stored in this
KeyStoreSpi
.
Indicates whether the given alias is present in this
KeyStoreSpi
.
alias | the alias of an entry. |
---|
true
if the alias exists,
false
otherwise.
Deletes the entry identified with the given alias from this
KeyStoreSpi
.
alias | the alias for the entry. |
---|
KeyStoreException | if the entry can not be deleted. |
---|
Indicates whether the entry for the given alias is assignable to the
provided
Class
.
alias | the alias for the entry. |
---|---|
entryClass | the type of the entry. |
true
if the
Entry
for the alias is assignable to
the specified
entryClass
.
Returns the trusted certificate for the entry with the given alias.
alias | the alias for the entry. |
---|
null
if the specified alias is not bound to an entry.
Returns the alias associated with the first entry whose certificate matches the specified certificate.
cert | the certificate to find the associated entry's alias for. |
---|
null
if no entry with the specified
certificate can be found.
Returns the certificate chain for the entry with the given alias.
alias | the alias for the entry |
---|
null
if the specified alias is not bound to an entry.
Returns the creation date of the entry with the given alias.
alias | the alias for the entry. |
---|
null
if the specified alias is not
bound to an entry.
Returns the
Entry
with the given alias, using the specified
ProtectionParameter
.
alias | the alias of the requested entry. |
---|---|
protParam |
the
ProtectionParameter
, used to protect the requested
entry, maybe
null
.
|
Entry
with the given alias, using the specified
ProtectionParameter
.
NoSuchAlgorithmException | if the required algorithm is not available. |
---|---|
UnrecoverableEntryException | if the entry can not be recovered. |
KeyStoreException | if this operation fails |
Returns the key with the given alias, using the password to recover the key from the store.
alias | the alias for the entry. |
---|---|
password | the password used to recover the key. |
null
if the
specified alias is not bound to an entry.
NoSuchAlgorithmException | if the algorithm for recovering the key is not available. |
---|---|
UnrecoverableKeyException | if the key can not be recovered. |
Indicates whether the specified alias is associated with a
KeyStore.TrustedCertificateEntry
.
alias | the alias of an entry. |
---|
true
if the given alias is associated with a certificate
entry.
Indicates whether the specified alias is associated with either a
KeyStore.PrivateKeyEntry
or a
KeyStore.SecretKeyEntry
.
alias | the alias of an entry. |
---|
true
if the given alias is associated with a key entry.
Loads this
KeyStoreSpi
using the specified
LoadStoreParameter
.
param |
the
LoadStoreParameter
that specifies how to load this
KeyStoreSpi
, maybe
null
.
|
---|
IOException | if a problem occurred while reading from the stream. |
---|---|
NoSuchAlgorithmException | if the required algorithm is not available. |
CertificateException |
if the an exception occurred while loading the certificates
of this code
KeyStoreSpi
.
|
IllegalArgumentException |
if the given
KeyStore.LoadStoreParameter
is not
recognized.
|
Loads this
KeyStoreSpi
from the given
InputStream
.
Utilizes the given password to verify the stored data.
stream |
the
InputStream
to load this
KeyStoreSpi
's
data from.
|
---|---|
password |
the password to verify the stored data, maybe
null
.
|
IOException | if a problem occurred while reading from the stream. |
---|---|
NoSuchAlgorithmException | if the required algorithm is not available. |
CertificateException |
if the an exception occurred while loading the certificates
of this code
KeyStoreSpi
.
|
Associates the given alias with a certificate.
If the specified alias already exists, it will be reassigned.
alias | the alias for the certificate. |
---|---|
cert | the certificate. |
KeyStoreException | if an existing alias is not associated to an entry containing a trusted certificate, or this method fails for any other reason. |
---|
Stores the given
Entry
in this
KeyStoreSpi
and associates
the entry with the given
alias
. The entry is protected by the
specified
ProtectionParameter
.
If the specified alias already exists, it will be reassigned.
alias | the alias for the entry. |
---|---|
entry | the entry to store. |
protParam |
the
ProtectionParameter
to protect the entry.
|
KeyStoreException | if this operation fails. |
---|
Associates the given alias with the key, password and certificate chain.
If the specified alias already exists, it will be reassigned.
alias | the alias for the key. |
---|---|
key | the key. |
password | the password. |
chain | the certificate chain. |
KeyStoreException | if the specified key can not be protected, or if this operation fails for another reason. |
---|---|
IllegalArgumentException |
if
key
is a
PrivateKey
and
chain
does
not contain any certificates.
|
Associates the given alias with a key and a certificate chain.
If the specified alias already exists, it will be reassigned.
alias | the alias for the key. |
---|---|
key | the key in an encoded format. |
chain | the certificate chain. |
KeyStoreException | if this operation fails. |
---|---|
IllegalArgumentException |
if
key
is a
PrivateKey
and
chain
does.
|
Returns the number of entries stored in this
KeyStoreSpi
.
KeyStoreSpi
.
Stores this
KeyStoreSpi
using the specified
LoadStoreParameter
.
param |
the
LoadStoreParameter
that specifies how to store
this
KeyStoreSpi
, maybe
null
.
|
---|
IOException | if a problem occurred while writing to the stream. |
---|---|
NoSuchAlgorithmException | if the required algorithm is not available. |
CertificateException |
if the an exception occurred while storing the certificates
of this code
KeyStoreSpi
.
|
IllegalArgumentException |
if the given
KeyStore.LoadStoreParameter
is not
recognized.
|
Writes this
KeyStoreSpi
to the specified
OutputStream
.
The data written to the
OutputStream
is protected by the
specified password.
stream |
the
OutputStream
to write the store's data to.
|
---|---|
password | the password to protect the data. |
IOException | if a problem occurred while writing to the stream. |
---|---|
NoSuchAlgorithmException | if the required algorithm is not available. |
CertificateException |
if the an exception occurred while storing the certificates
of this code
KeyStoreSpi
.
|