public class KeyStoreTrustEngine extends TrustEngine
| Constructor and Description |
|---|
KeyStoreTrustEngine(String path,
String type,
char[] password,
String name)
Create a new KeyStoreTrustEngine that is backed by a KeyStore
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
doAddTrustAnchor(Certificate cert,
String alias)
Add a trust anchor point to this trust engine.
|
protected void |
doRemoveTrustAnchor(Certificate cert)
Remove a trust anchor point from the engine, based on the certificate itself.
|
protected void |
doRemoveTrustAnchor(String alias)
Remove a trust anchor point from the engine, based on the human readable "friendly name"
|
Certificate |
findTrustAnchor(Certificate[] certChain)
Returns the certificate trust anchor contained in the specified chain which
was used to establish the authenticity of the chain.
|
String[] |
getAliases()
Return the list of friendly name aliases for the TrustAnchors installed in the engine.
|
String |
getName()
Return a representation string of this trust engine
|
Certificate |
getTrustAnchor(String alias)
Return the certificate associated with the unique "friendly name" in the engine.
|
boolean |
isReadOnly()
Return a value indicate whether this trust engine is read-only.
|
addTrustAnchor, removeTrustAnchor, removeTrustAnchorpublic KeyStoreTrustEngine(String path, String type, char[] password, String name)
path - - path to the keystoretype - - the type of keystore at the path locationpassword - - the password required to unlock the keystorepublic Certificate findTrustAnchor(Certificate[] certChain) throws IOException
TrustEnginenull is returned.findTrustAnchor in class TrustEnginecertChain - - a complete or incomplete certificate chain, implementations *MAY* complete chainsIOException - if there is a problem connecting to the backing storeprotected String doAddTrustAnchor(Certificate cert, String alias) throws IOException, GeneralSecurityException
TrustEnginenull is used
as the alias then an alias will be generated based on the trust anchor certificate.doAddTrustAnchor in class TrustEnginecert - - the certificate to add as an anchor pointalias - - a unique and human-readable 'friendly name' which can be used to reference the certificate.
A null value may be used.IOException - if there is a problem connecting to the backing storeGeneralSecurityException - if there is a certificate problemprotected void doRemoveTrustAnchor(Certificate cert) throws IOException, GeneralSecurityException
TrustEnginedoRemoveTrustAnchor in class TrustEnginecert - - the certificate to be removedIOException - if there is a problem connecting to the backing storeGeneralSecurityException - if there is a certificate problemprotected void doRemoveTrustAnchor(String alias) throws IOException, GeneralSecurityException
TrustEnginedoRemoveTrustAnchor in class TrustEnginealias - - the name of the trust anchorIOException - if there is a problem connecting to the backing storeGeneralSecurityException - if there is a certificate problempublic Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException
TrustEnginegetTrustAnchor in class TrustEnginealias - - the friendly nameIOException - if there is a problem connecting to the backing storeGeneralSecurityException - if there is a certificate problempublic String[] getAliases() throws IOException, GeneralSecurityException
TrustEnginegetAliases in class TrustEngineIOException - if there is a problem connecting to the backing storeGeneralSecurityException - if there is a certificate problempublic boolean isReadOnly()
TrustEngineisReadOnly in class TrustEnginepublic String getName()
TrustEnginegetName in class TrustEngineCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.