public class KeyStoreCertificateSource extends CommonCertificateSource
| Constructor and Description |
|---|
KeyStoreCertificateSource(File ksFile,
String ksType,
String ksPassword)
Constructor for KeyStoreCertificateSource without
CertificatePool. |
KeyStoreCertificateSource(File ksFile,
String ksType,
String ksPassword,
CertificatePool certPool)
Constructor for KeyStoreCertificateSource with
CertificatePool. |
KeyStoreCertificateSource(InputStream ksStream,
String ksType,
String ksPassword)
The default constructor for KeyStoreCertificateSource without
CertificatePool. |
KeyStoreCertificateSource(InputStream ksStream,
String ksType,
String ksPassword,
CertificatePool certPool)
The default constructor for KeyStoreCertificateSource.
|
KeyStoreCertificateSource(String ksType,
String ksPassword)
Constructor for KeyStoreCertificateSource without
CertificatePool. |
KeyStoreCertificateSource(String ksType,
String ksPassword,
CertificatePool certPool)
Constructor for KeyStoreCertificateSource with
CertificatePool. |
KeyStoreCertificateSource(String ksFilePath,
String ksType,
String ksPassword)
Constructor for KeyStoreCertificateSource without
CertificatePool. |
KeyStoreCertificateSource(String ksFilePath,
String ksType,
String ksPassword,
CertificatePool certPool)
Constructor for KeyStoreCertificateSource with
CertificatePool. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllCertificatesToKeyStore(List<CertificateToken> certificates)
This method allows to add a list of certificates to the keystore
|
void |
addCertificateToKeyStore(CertificateToken certificateToken)
This method allows to add a certificate in the keystore.
|
void |
clearAllCertificates()
This method allows to remove all certificates from the keystore
|
void |
deleteCertificateFromKeyStore(String alias)
This method allows to remove a certificate from the keystore
|
CertificateToken |
getCertificate(String alias)
This method allows to retrieve a certificate by its alias
|
List<CertificateToken> |
getCertificates()
This method returns all certificates from the keystore
|
void |
store(OutputStream os)
This method allows to store the keystore in the OutputStream
|
addCertificate, get, getCertificatePool, getCertificateSourceType, getNumberOfCertificates, removeCertificatepublic KeyStoreCertificateSource(String ksType, String ksPassword, CertificatePool certPool)
CertificatePool.
This constructor allows to create a new empty keystore.ksType - the keystore typeksPassword - the keystore passwordcertPool - the certificate poolpublic KeyStoreCertificateSource(String ksFilePath, String ksType, String ksPassword, CertificatePool certPool) throws IOException
CertificatePool.ksFilePath - the keystore filepathksType - the keystore typeksPassword - the keystore passwordcertPool - the certificate poolIOException - if the file not existspublic KeyStoreCertificateSource(File ksFile, String ksType, String ksPassword, CertificatePool certPool) throws IOException
CertificatePool.ksFile - the keystore fileksType - the keystore typeksPassword - the keystore passwordcertPool - the certificate poolIOException - if the file not existspublic KeyStoreCertificateSource(InputStream ksStream, String ksType, String ksPassword, CertificatePool certPool)
ksStream - the inputstream with the keystore (can be null to create a new keystore)ksType - the keystore typeksPassword - the keystore passwordcertPool - the certificate poolpublic KeyStoreCertificateSource(String ksType, String ksPassword)
CertificatePool.
This constructor allows to create a new empty keystore.ksType - the keystore typeksPassword - the keystore passwordpublic KeyStoreCertificateSource(String ksFilePath, String ksType, String ksPassword) throws IOException
CertificatePool.ksFilePath - the keystore filepathksType - the keystore typeksPassword - the keystore passwordIOException - if the file not existspublic KeyStoreCertificateSource(File ksFile, String ksType, String ksPassword) throws IOException
CertificatePool.ksFile - the keystore fileksType - the keystore typeksPassword - the keystore passwordIOException - if the file not existspublic KeyStoreCertificateSource(InputStream ksStream, String ksType, String ksPassword)
CertificatePool.ksStream - the inputstream with the keystore (can be null to create a new keystore)ksType - the keystore typeksPassword - the keystore passwordpublic CertificateToken getCertificate(String alias)
alias - the certificate alias in the keystorepublic List<CertificateToken> getCertificates()
getCertificates in interface CertificateSourcegetCertificates in class CommonCertificateSourcepublic void addAllCertificatesToKeyStore(List<CertificateToken> certificates)
certificates - the list of certificatespublic void addCertificateToKeyStore(CertificateToken certificateToken)
certificateToken - the certificate to be added in the keystorepublic void deleteCertificateFromKeyStore(String alias)
alias - the certificate aliaspublic void clearAllCertificates()
public void store(OutputStream os)
os - the OutpuStream where to store the keystoreCopyright © 2019. All rights reserved.