Home | History | Annotate | Download | only in okhttp

Lines Matching refs:pin

46  * The easiest way to pin a host is turn on pinning with a broken configuration
52 * <p>For example, to pin {@code https://publicobject.com}, start with a broken
95 * Pinning is per-hostname and/or per-wildcard pattern. To pin both
126 * {@link CertificatePinner} can not be used to pin self-signed certificate
162 // If we couldn't find a matching pin, format a nice exception.
168 message.append("\n ").append(pin(x509Certificate))
172 for (ByteString pin : pins) {
173 message.append("\n sha1/").append(pin.base64());
222 public static String pin(Certificate certificate) {
241 * @param pins SHA-1 hashes. Each pin is a SHA-1 hash of a
254 for (String pin : pins) {
255 if (!pin.startsWith("sha1/")) {
256 throw new IllegalArgumentException("pins must start with 'sha1/': " + pin);
258 ByteString decodedPin = ByteString.decodeBase64(pin.substring("sha1/".length()));
260 throw new IllegalArgumentException("pins must be base64: " + pin);