Class SslContextFactory


  • public class SslContextFactory
    extends Object
    Provides utility methods to create SSL contexts.

    The following snippet shows how to create a SSL context for a client:

     X509Certificate certificate = CertificatesHelper.getCertificate(CERTIFICATE_PATH);
     X509TrustManager trustManager = SslContextFactory.createTrustManager(certificate);
     SSLContext sslContext = SslContextFactory.createSslContext(SslProtocols.TLS, trustManager);