Pins a public key to the HTTP client. @param provider certificate provider @param subjPubKeyInfoHash public key hash
(String provider, String subjPubKeyInfoHash)
| 273 | * @param subjPubKeyInfoHash public key hash |
| 274 | */ |
| 275 | public void pinCertificate(String provider, String subjPubKeyInfoHash) { |
| 276 | CertificatePinner cp = |
| 277 | new CertificatePinner.Builder().add(provider, subjPubKeyInfoHash).build(); |
| 278 | this.httpClient.setCertificatePinner(cp); |
| 279 | } |
| 280 | |
| 281 | /** |
| 282 | * Sets the default connect timeout for new connections. A value of 0 means no timeout. |