Package tigase.io
Interface CertificateContainerIfc
- All Known Implementing Classes:
CertificateContainer
public interface CertificateContainerIfc
Interface implemented by classes responsible for keeping SSL certificates in memory
Created by andrzej on 29.02.2016.
Created by andrzej on 29.02.2016.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCertificates(Map<String, String> params) Deprecated.voidaddCertificates(CertificateContainerIfc.CertificateEntity certificateEntity) createCertificate(String domain) MethodcreateCertificateallows to generate self-signed certificate for passed domain name.sgetCertificateEntry(String hostname) Method to retrieve default alias of certificate to use when domain isnullgetKeyManagers(String domain) Method returns array ofKeyManagerwith certificate for domain ornullif there is no certificate for domainvoidMethod used to pass parameters to initialize instance of class
-
Field Details
-
CERTIFICATE_CONTAINER_CLASS_KEY
- See Also:
-
CERTIFICATE_CONTAINER_CLASS_VAL
-
-
Method Details
-
addCertificates
Deprecated.MethodaddCertificatesallows to add more certificates at run time after the container has bee already initialized. This is to avoid server restart if there are certificates updates or new certificates for new virtual domain. The method should add new certificates or replace existing one if there is already a certificate for a domain.- Parameters:
params- aMapvalue with configuration parameters.- Throws:
CertificateParsingException
-
addCertificates
void addCertificates(CertificateContainerIfc.CertificateEntity certificateEntity) throws CertificateParsingException - Throws:
CertificateParsingException
-
createCertificate
KeyManager[] createCertificate(String domain) throws NoSuchAlgorithmException, CertificateException, SignatureException, NoSuchProviderException, InvalidKeyException, IOException, UnrecoverableKeyException, KeyStoreException MethodcreateCertificateallows to generate self-signed certificate for passed domain name.s- Parameters:
domain- domain for which certificate should be generated- Returns:
- an array of
KeyManagercontaining generated certificate - Throws:
NoSuchAlgorithmExceptionCertificateExceptionSignatureExceptionNoSuchProviderExceptionInvalidKeyExceptionIOExceptionUnrecoverableKeyExceptionKeyStoreException
-
getDefCertAlias
String getDefCertAlias()Method to retrieve default alias of certificate to use when domain isnull- Returns:
- default alias
-
getCertificateEntry
-
getKeyManagers
Method returns array ofKeyManagerwith certificate for domain ornullif there is no certificate for domain -
getTrustManagers
TrustManager[] getTrustManagers() -
getTrustStore
KeyStore getTrustStore() -
init
Method used to pass parameters to initialize instance of class
-