Class SslClientAuth

  • All Implemented Interfaces:

    
    public class SslClientAuth
    
                        

    This class is meant to be used with the okhttp3.OkHttpClient. It creates an SSLSocketFactory and TrustManager with client certificate handling. Example usage:

    
     // Creating an OKHttpClient that handles certificate challenges with certificates from the system.
     SslClientAuth sslClientAuth = SslClientAuth.system();
     OkHttpClient client = new OkHttpClient.Builder()
        .sslSocketFactory(sslClientAuth.getSslSocketFactory(), sslClientAuth.getTrustManager())
        .build();