public class CommonCertificateSource extends Object implements CertificateSource
| Constructor and Description |
|---|
CommonCertificateSource()
The default constructor to generate a certificates source with an independent certificates pool.
|
CommonCertificateSource(CertificatePool certPool)
The default constructor with mandatory certificates pool.
|
| Modifier and Type | Method and Description |
|---|---|
CertificateToken |
addCertificate(CertificateToken token)
This method adds an external certificate to the encapsulated pool and to the
source.
|
List<CertificateToken> |
get(X500Principal x500Principal)
This method returns the
List of CertificateToken(s) corresponding to the given subject
distinguished name. |
CertificatePool |
getCertificatePool()
This method return the
CertificatePool encapsulated by the source. |
List<CertificateToken> |
getCertificates()
Retrieves the unmodifiable list of all certificate tokens from this source.
|
CertificateSourceType |
getCertificateSourceType()
This method returns the certificate source type associated to the
implementation class.
|
int |
getNumberOfCertificates()
This method returns the number of stored certificates in this source
|
boolean |
removeCertificate(CertificateToken certificate)
This method is used internally to remove a certificate from the
CertificatePool. |
public CommonCertificateSource()
public CommonCertificateSource(CertificatePool certPool)
certPool - the certificate pool to usepublic CertificateSourceType getCertificateSourceType()
CertificateSourcegetCertificateSourceType in interface CertificateSourcepublic CertificatePool getCertificatePool()
CertificateSourceCertificatePool encapsulated by the source.getCertificatePool in interface CertificateSourcepublic CertificateToken addCertificate(CertificateToken token)
addCertificate in interface CertificateSourcetoken - the certificate to addpublic List<CertificateToken> getCertificates()
getCertificates in interface CertificateSourcepublic List<CertificateToken> get(X500Principal x500Principal)
List of CertificateToken(s) corresponding to the given subject
distinguished name.
The content of the encapsulated certificates pool can be different from the content of the source.get in interface CertificateSourcex500Principal - subject distinguished names of the certificate to findpublic boolean removeCertificate(CertificateToken certificate)
CertificatePool.certificate - the certificate to be removedpublic int getNumberOfCertificates()
Copyright © 2019. All rights reserved.