public class DefaultTrustListManager extends Object implements TrustListManager, AutoCloseable
| Constructor and Description |
|---|
DefaultTrustListManager(File baseDir) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIssuerCertificate(X509Certificate certificate)
Add
certificate to the Issuer Certificates list. |
void |
addRejectedCertificate(X509Certificate certificate)
Add
certificate to the Rejected Certificates list. |
void |
addTrustedCertificate(X509Certificate certificate)
Add
certificate to the Trusted Certificates list. |
void |
close()
Stop the certificate store watcher and free all resources.
|
File |
getBaseDir() |
com.google.common.collect.ImmutableList<X509Certificate> |
getIssuerCertificates()
Get the list of Issuer Certificates.
|
File |
getIssuerCertsDir() |
File |
getIssuerCrlDir() |
com.google.common.collect.ImmutableList<X509CRL> |
getIssuerCrls()
Get the list of Issuer CRLs.
|
File |
getIssuerDir() |
com.google.common.collect.ImmutableList<X509Certificate> |
getRejectedCertificates()
Get the list of Rejected Certificates.
|
File |
getRejectedDir() |
com.google.common.collect.ImmutableList<X509Certificate> |
getTrustedCertificates()
Get the list of Trusted Certificates.
|
File |
getTrustedCertsDir() |
File |
getTrustedCrlDir() |
com.google.common.collect.ImmutableList<X509CRL> |
getTrustedCrls()
Get the list of Trusted CRLs.
|
File |
getTrustedDir() |
boolean |
removeIssuerCertificate(ByteString thumbprint)
Remove the certificate identified by
thumbprint from the Issuer Certificates list. |
boolean |
removeRejectedCertificate(ByteString thumbprint)
Remove the certificate identified by
thumbprint from the Rejected Certificates list. |
boolean |
removeTrustedCertificate(ByteString thumbprint)
Remove the certificate identified by
thumbprint from the Trusted Certificates list. |
void |
setIssuerCertificates(List<X509Certificate> issuerCertificates)
Set a new list of Issuer Certificates.
|
void |
setIssuerCrls(List<X509CRL> issuerCrls)
Set a new list of Issuer CRLs.
|
void |
setTrustedCertificates(List<X509Certificate> trustedCertificates)
Set a new list of Trusted Certificates.
|
void |
setTrustedCrls(List<X509CRL> trustedCrls)
Set a new list of Trusted CRLs.
|
public DefaultTrustListManager(File baseDir) throws IOException
IOExceptionpublic void close()
throws IOException
After calling closing CertificateValidator.validateCertificateChain(List) will fail for all inputs.
close in interface AutoCloseableIOExceptionpublic com.google.common.collect.ImmutableList<X509CRL> getIssuerCrls()
TrustListManagergetIssuerCrls in interface TrustListManagerX509CRLs.public com.google.common.collect.ImmutableList<X509CRL> getTrustedCrls()
TrustListManagergetTrustedCrls in interface TrustListManagerX509CRLs.public com.google.common.collect.ImmutableList<X509Certificate> getIssuerCertificates()
TrustListManagergetIssuerCertificates in interface TrustListManagerX509Certificates.public com.google.common.collect.ImmutableList<X509Certificate> getTrustedCertificates()
TrustListManagergetTrustedCertificates in interface TrustListManagerX509Certificates.public com.google.common.collect.ImmutableList<X509Certificate> getRejectedCertificates()
TrustListManagergetRejectedCertificates in interface TrustListManagerX509Certificates.public void setIssuerCrls(List<X509CRL> issuerCrls)
TrustListManagersetIssuerCrls in interface TrustListManagerissuerCrls - a new list of issuer X509CRLs.public void setTrustedCrls(List<X509CRL> trustedCrls)
TrustListManagersetTrustedCrls in interface TrustListManagertrustedCrls - a new list of trusted X509CRLs.public void setIssuerCertificates(List<X509Certificate> issuerCertificates)
TrustListManagersetIssuerCertificates in interface TrustListManagerissuerCertificates - a new list of issuer X509Certificates.public void setTrustedCertificates(List<X509Certificate> trustedCertificates)
TrustListManagersetTrustedCertificates in interface TrustListManagertrustedCertificates - a new list of trusted X509Certificates.public void addIssuerCertificate(X509Certificate certificate)
TrustListManagercertificate to the Issuer Certificates list.addIssuerCertificate in interface TrustListManagercertificate - the X509Certificate to add to the Issuer Certificates list.public void addTrustedCertificate(X509Certificate certificate)
TrustListManagercertificate to the Trusted Certificates list.addTrustedCertificate in interface TrustListManagercertificate - the X509Certificate to add to the Trusted Certificates list.public void addRejectedCertificate(X509Certificate certificate)
TrustListManagercertificate to the Rejected Certificates list.addRejectedCertificate in interface TrustListManagercertificate - the X509Certificate to add to the Rejected Certificates list.public boolean removeIssuerCertificate(ByteString thumbprint)
TrustListManagerthumbprint from the Issuer Certificates list.removeIssuerCertificate in interface TrustListManagerthumbprint - the certificate thumbprint.true if a certificate with a matching thumbprint was found.public boolean removeTrustedCertificate(ByteString thumbprint)
TrustListManagerthumbprint from the Trusted Certificates list.removeTrustedCertificate in interface TrustListManagerthumbprint - the certificate thumbprint.true if a certificate with a matching thumbprint was found.public boolean removeRejectedCertificate(ByteString thumbprint)
TrustListManagerthumbprint from the Rejected Certificates list.removeRejectedCertificate in interface TrustListManagerthumbprint - the certificate thumbprint.true if a certificate with a matching thumbprint was found.public File getBaseDir()
public File getIssuerDir()
public File getIssuerCertsDir()
public File getIssuerCrlDir()
public File getTrustedDir()
public File getTrustedCertsDir()
public File getTrustedCrlDir()
public File getRejectedDir()
Copyright © 2025. All rights reserved.