Search in sources :

Example 1 with DefaultHostnameVerifier

use of javax.net.ssl.DefaultHostnameVerifier in project robovm by robovm.

the class HttpsHandler method newOkHttpClient.

@Override
protected OkHttpClient newOkHttpClient(Proxy proxy) {
    OkHttpClient client = super.newOkHttpClient(proxy);
    client.setTransports(ENABLED_TRANSPORTS);
    HostnameVerifier verifier = HttpsURLConnection.getDefaultHostnameVerifier();
    // default verifier.
    if (!(verifier instanceof DefaultHostnameVerifier)) {
        client.setHostnameVerifier(verifier);
    }
    return client;
}
Also used : DefaultHostnameVerifier(javax.net.ssl.DefaultHostnameVerifier) DefaultHostnameVerifier(javax.net.ssl.DefaultHostnameVerifier) HostnameVerifier(javax.net.ssl.HostnameVerifier)

Aggregations

DefaultHostnameVerifier (javax.net.ssl.DefaultHostnameVerifier)1 HostnameVerifier (javax.net.ssl.HostnameVerifier)1