Modifier and Type | Method and Description |
---|---|
Certificate |
getCertificate(String alias)
Returns the certificate associated with the given alias.
|
Certificate[] |
getCertificateChain(String alias)
Returns the certificate chain associated with the given alias.
|
Key |
getKey(String alias)
Returns the key associated with the given alias.
|
KeyManager |
getKeyManager()
Get a KeyManager implementation instance using the service.
|
KeyManager |
getKeyManager(String alias)
Get a KeyManager implementation instance using the service.
|
KeyManager[] |
getKeyManagers()
Get all KeyManager implementation instances using the service.
|
KeyManager[] |
getKeyManagers(String alias)
Get all KeyManager implementation instances using the service.
|
KeyPair |
getKeyPair(String alias)
Returns the key pair associated with the given alias.
|
TrustManager |
getTrustManager()
Get a trust manager implementation instance using the service for the
default trust store.
|
TrustManager[] |
getTrustManagers()
Get all trust manager implementation instances using the service for the
default trust store.
|
KeyManager getKeyManager() throws KeystoreException
KeystoreException
- - if the KeyManagerFactory service reference is not foundKeyManager getKeyManager(String alias) throws KeystoreException
alias
- The alias name for the key.KeystoreException
- - if the KeyManagerFactory service reference is not foundKeyManager[] getKeyManagers() throws KeystoreException
KeystoreException
- - if the KeyManagerFactory service reference is not foundKeyManager[] getKeyManagers(String alias) throws KeystoreException
alias
- The alias name of the key.KeystoreException
- - if the KeyManagerFactory service reference is not foundTrustManager getTrustManager() throws KeystoreException
KeystoreException
- - if the KeyManagerFactory service reference is not foundTrustManager[] getTrustManagers() throws KeystoreException
KeystoreException
- - if the KeyManagerFactory service reference is not foundKey getKey(String alias) throws KeystoreException
alias
- the alias nameIllegalStateException
- if the algorithm for recovering the key cannot be found,
if the key cannot be recovered.KeystoreException
- - if the KeyManagerFactory service reference is not foundKeyPair getKeyPair(String alias) throws KeystoreException
alias
- the alias nameIllegalStateException
- if the algorithm for recovering the key cannot be found,
if the key cannot be recovered, if the correspondent
keystore has not been initialized (loaded).KeystoreException
- - if the KeyManagerFactory service reference is not foundCertificate getCertificate(String alias) throws KeystoreException
If the given alias name identifies an entry created by a call to
setCertificateEntry
, or created by a call to
setEntry
with a TrustedCertificateEntry
, then
the trusted certificate contained in that entry is returned.
If the given alias name identifies an entry created by a call to
setKeyEntry
, or created by a call to setEntry
with a PrivateKeyEntry
, then the first element of the
certificate chain in that entry is returned.
alias
- the alias nameIllegalStateException
- if the correspondent keystore has not been initialized
(loaded)KeystoreException
- - if the KeyManagerFactory service reference is not foundCertificate[] getCertificateChain(String alias) throws KeystoreException
setKeyEntry
, or by a call to setEntry
with a
PrivateKeyEntry
.alias
- the alias nameIllegalStateException
- if the keystore has not been initialized (loaded).KeystoreException
- - if the KeyManagerFactory service reference is not foundCopyright © 2020 SAP. All rights reserved.