/** * Create and configure SSL protocol socket factory using trust manager and hostname verifier. * * @param trustManager trust manager * @param hostnameVerifier hostname verifier * @return socket factory for SSL protocol * @throws GeneralSecurityException on security error */ public static EwsSSLProtocolSocketFactory build( TrustManager trustManager, HostnameVerifier hostnameVerifier ) throws GeneralSecurityException { SSLContext sslContext = createSslContext(trustManager); return new EwsSSLProtocolSocketFactory(sslContext, hostnameVerifier); }
/** * Create and configure SSL protocol socket factory using trust manager and hostname verifier. * * @param trustManager trust manager * @param hostnameVerifier hostname verifier * @return socket factory for SSL protocol * @throws GeneralSecurityException on security error */ public static EwsSSLProtocolSocketFactory build( TrustManager trustManager, HostnameVerifier hostnameVerifier ) throws GeneralSecurityException { SSLContext sslContext = createSslContext(trustManager); return new EwsSSLProtocolSocketFactory(sslContext, hostnameVerifier); }