title: Retrofit2 and certificate pinning
body: <p>In my android app I want to use certificate pinning when communicating with the server.
  I saw this code that uses the <code>keystore</code> that is stored in the <code>raw</code> folder.</p>
  
  <pre><code>OkClient client = new RetrofitClientBuilder()
  .pinCertificates(getResources(), R.raw.keystore, STORE_PASS)
  .build()
  </code></pre>
  
  <p>I'm using <code>retrofit2</code> and <code>OkHTTP3</code> and just saw this example:</p>
  
  <pre><code> OkHttpClient client = new OkHttpClient.Builder()
      .certificatePinner(new CertificatePinner.Builder()
              .add("publicobject.com", "sha1/DmxUShsZuNiqPQsX2Oi9uv2sCnw=")
              .add("publicobject.com", "sha1/SXxoaOSEzPC6BgGmxAt/EAcsajw=")
              .add("publicobject.com", "sha1/blhOM3W9V/bVQhsWAcLYwPU6n24=")
              .add("publicobject.com", "sha1/T5x9IXmcrQ7YuQxXnxoCmeeQ84c=")
              .build())
      .build();
  
  Retrofit retrofit = new Retrofit.Builder()
      .baseUrl("http://api.nuuneoi.com/base/")
      .addConverterFactory(GsonConverterFactory.create())
      .client(client)
      .build();
  </code></pre>
  
  <p>Does this later approach achieves the same result has the first one?</p>