public abstract class TrustEngine
extends java.lang.Object
TrustEngine is used to establish the authenticity of a
Certificate chain.
Clients may implement this interface.
| Constructor and Description |
|---|
TrustEngine() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addTrustAnchor(java.security.cert.Certificate anchor,
java.lang.String alias)
Add a trust anchor point to this trust engine.
|
protected abstract java.lang.String |
doAddTrustAnchor(java.security.cert.Certificate anchor,
java.lang.String alias)
Add a trust anchor point to this trust engine.
|
protected abstract void |
doRemoveTrustAnchor(java.security.cert.Certificate anchor)
Remove a trust anchor point from the engine, based on the certificate itself.
|
protected abstract void |
doRemoveTrustAnchor(java.lang.String alias)
Remove a trust anchor point from the engine, based on the human readable "friendly name"
|
abstract java.security.cert.Certificate |
findTrustAnchor(java.security.cert.Certificate[] chain)
Returns the certificate trust anchor contained in the specified chain which
was used to establish the authenticity of the chain.
|
abstract java.lang.String[] |
getAliases()
Return the list of friendly name aliases for the TrustAnchors installed in the engine.
|
abstract java.lang.String |
getName()
Return a representation string of this trust engine
|
abstract java.security.cert.Certificate |
getTrustAnchor(java.lang.String alias)
Return the certificate associated with the unique "friendly name" in the engine.
|
abstract boolean |
isReadOnly()
Return a value indicate whether this trust engine is read-only.
|
void |
removeTrustAnchor(java.security.cert.Certificate anchor)
Remove a trust anchor point from the engine, based on the certificate itself.
|
void |
removeTrustAnchor(java.lang.String alias)
Remove a trust anchor point from the engine, based on the human readable "friendly name"
|
public abstract java.security.cert.Certificate findTrustAnchor(java.security.cert.Certificate[] chain)
throws java.io.IOException
null is returned.chain - - a complete or incomplete certificate chain, implementations *MAY* complete chainsjava.io.IOException - if there is a problem connecting to the backing storepublic java.lang.String addTrustAnchor(java.security.cert.Certificate anchor,
java.lang.String alias)
throws java.io.IOException,
java.security.GeneralSecurityException
null is used
as the alias then an alias will be generated based on the trust anchor certificate.anchor - - 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.java.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problemjava.lang.IllegalArgumentException - if the alias or anchor already exist in this trust engineprotected abstract java.lang.String doAddTrustAnchor(java.security.cert.Certificate anchor,
java.lang.String alias)
throws java.io.IOException,
java.security.GeneralSecurityException
null is used
as the alias then an alias will be generated based on the trust anchor certificate.anchor - - 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.java.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problemjava.lang.IllegalArgumentException - if the alias or anchor already exist in this trust enginepublic final void removeTrustAnchor(java.security.cert.Certificate anchor)
throws java.io.IOException,
java.security.GeneralSecurityException
anchor - - the certificate to be removedjava.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problemprotected abstract void doRemoveTrustAnchor(java.security.cert.Certificate anchor)
throws java.io.IOException,
java.security.GeneralSecurityException
anchor - - the certificate to be removedjava.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problempublic void removeTrustAnchor(java.lang.String alias)
throws java.io.IOException,
java.security.GeneralSecurityException
alias - - the name of the trust anchorjava.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problemprotected abstract void doRemoveTrustAnchor(java.lang.String alias)
throws java.io.IOException,
java.security.GeneralSecurityException
alias - - the name of the trust anchorjava.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problempublic abstract java.security.cert.Certificate getTrustAnchor(java.lang.String alias)
throws java.io.IOException,
java.security.GeneralSecurityException
alias - - the friendly namejava.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problempublic abstract java.lang.String[] getAliases()
throws java.io.IOException,
java.security.GeneralSecurityException
java.io.IOException - if there is a problem connecting to the backing storejava.security.GeneralSecurityException - if there is a certificate problempublic abstract boolean isReadOnly()
public abstract java.lang.String getName()
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.