public class TrustStore extends CertificateStore
configuration, PROVIDER, store
Constructor and Description |
---|
TrustStore(CertificateStoreConfiguration configuration,
boolean createIfAbsent) |
Modifier and Type | Method and Description |
---|---|
X509Certificate |
getEndEntityCertificate(Certificate[] chain)
Decide whether or not to trust the given supplied certificate chain, returning the
End Entity Certificate in this case where it can, and null otherwise.
|
void |
installCertificate(String alias,
String pemRepresentation)
Imports one certificate as a trust anchor into this store.
|
boolean |
isTrusted(Certificate[] chain)
Decide whether or not to trust the given supplied certificate chain.
|
delete, getAllCertificates, getConfiguration, getStore, persist, reload
public TrustStore(CertificateStoreConfiguration configuration, boolean createIfAbsent) throws CertificateStoreConfigException
CertificateStoreConfigException
public void installCertificate(String alias, String pemRepresentation) throws CertificateStoreConfigException
alias
- the name (key) under which the certificate is to be stored in the store (cannot be null or empty).pemRepresentation
- The PEM representation of the certificate to add (cannot be null or empty).CertificateStoreConfigException
public boolean isTrusted(Certificate[] chain)
chain
- an array of X509Certificate where the first one is the endEntityCertificate.public X509Certificate getEndEntityCertificate(Certificate[] chain)
chain
- an array of X509Certificate where the first one is the endEntityCertificate.Copyright © 2003-2008 Jive Software.