Disable SSL certificate check in retrofit library
<p>I am using retrofit in android to connect with server.</p>

<pre><code>public class ApiClient {
    public static final String BASE_URL = "https://example.com/";
    private static Retrofit retrofit = null;

    public static Retrofit getClient() {
        if (retrofit==null) {
            retrofit = new Retrofit.Builder()
                    .baseUrl(BASE_URL)
                    .addConverterFactory(GsonConverterFactory.create())
                    .build();
        }
        return retrofit;
    }
}
</code></pre>

<p>This is my dev. server and I want to disable certificate check. How can I implement in this code?</p>

<blockquote>
  <p>ERROR: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.</p>
</blockquote>