Class DefaultSSLContextFactoryService
- java.lang.Object
-
- de.hybris.platform.kymaintegrationservices.services.impl.DefaultSSLContextFactoryService
-
- All Implemented Interfaces:
SSLContextFactoryService
public class DefaultSSLContextFactoryService extends java.lang.Object implements SSLContextFactoryService
Default implementation ofSSLContextFactoryService.
-
-
Constructor Summary
Constructors Constructor Description DefaultSSLContextFactoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.net.ssl.KeyManager[]createKeyManagerFactory(byte[] certBytes, byte[] keyBytes)Creates the array of key managers.java.security.SecureRandomcreateSecureRandom()Creates aSecureRandomjavax.net.ssl.SSLContextcreateSSLContext(byte[] certBytes, byte[] keyBytes)Creates the ssl contextjavax.net.ssl.TrustManager[]createTrustManagerFactory()Creates the array of Trust managers.
-
-
-
Method Detail
-
createSSLContext
public javax.net.ssl.SSLContext createSSLContext(byte[] certBytes, byte[] keyBytes) throws SSLContextFactoryCreationExceptionDescription 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 javax.net.ssl.KeyManager[] createKeyManagerFactory(byte[] certBytes, byte[] keyBytes) throws SSLContextFactoryCreationExceptionDescription 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
public javax.net.ssl.TrustManager[] createTrustManagerFactory() throws SSLContextFactoryCreationExceptionDescription 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
public java.security.SecureRandom createSecureRandom()
Description copied from interface:SSLContextFactoryServiceCreates aSecureRandom- Specified by:
createSecureRandomin interfaceSSLContextFactoryService- Returns:
- newly created
SecureRandom
-
-