Class DefaultSSLContextFactoryService
java.lang.Object
de.hybris.platform.kymaintegrationservices.services.impl.DefaultSSLContextFactoryService
- All Implemented Interfaces:
SSLContextFactoryService
Default implementation of
SSLContextFactoryService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateKeyManagerFactory(byte[] certBytes, byte[] keyBytes) Creates the array of key managers.Creates aSecureRandomcreateSSLContext(byte[] certBytes, byte[] keyBytes) Creates the ssl contextCreates the array of Trust managers.
-
Constructor Details
-
DefaultSSLContextFactoryService
public DefaultSSLContextFactoryService()
-
-
Method Details
-
createSSLContext
public SSLContext createSSLContext(byte[] certBytes, byte[] keyBytes) throws SSLContextFactoryCreationException Description copied from interface:SSLContextFactoryServiceCreates the ssl context- Specified by:
createSSLContextin interfaceSSLContextFactoryService- Parameters:
certBytes- byte array of the client certificate datakeyBytes- byte array of the private key- Returns:
- SSL context which is initialized with key managers and Trust managers
- Throws:
SSLContextFactoryCreationException- thrown when there is a problem in forming Key managers, Trust mangers or SSL context
-
createKeyManagerFactory
public KeyManager[] createKeyManagerFactory(byte[] certBytes, byte[] keyBytes) throws SSLContextFactoryCreationException Description copied from interface:SSLContextFactoryServiceCreates the array of key managers. Used keystore type is "JKS" and key manager factory algorithm is "SunX509"- Specified by:
createKeyManagerFactoryin interfaceSSLContextFactoryService- Parameters:
certBytes- byte array of the client certificate datakeyBytes- byte array of the private key- Returns:
- the array of KeyManagers
- Throws:
SSLContextFactoryCreationException- thrown when there is a problem in forming Key managers
-
createTrustManagerFactory
Description copied from interface:SSLContextFactoryServiceCreates the array of Trust managers. In order to check the revocation status of the certificate, either java.home or customised path to the cacerts must be set. In case both of them are present then the customised path is considered. If neither is set then the certificate revocation check is not performed.- Specified by:
createTrustManagerFactoryin interfaceSSLContextFactoryService- Returns:
- array of TrustManagers, returns an empty array in case either java.home or customised path to the truststore cacerts is not configured.
- Throws:
SSLContextFactoryCreationException- thrown when there is a problem in forming trust managers
-
createSecureRandom
Description copied from interface:SSLContextFactoryServiceCreates aSecureRandom- Specified by:
createSecureRandomin interfaceSSLContextFactoryService- Returns:
- newly created
SecureRandom
-