- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for pin (0.27 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerTest.kt
Assertions.assertTrue(pin.matchesCertificate(certA1.certificate)) Assertions.assertFalse(pin.matchesCertificate(certB1.certificate)) } @Test fun testMatchesSha1() { val pin = CertificatePinner.Pin("example.com", certC1Sha1Pin) Assertions.assertTrue(pin.matchesCertificate(certC1.certificate)) Assertions.assertFalse(pin.matchesCertificate(certB1.certificate))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java
for (Certificate certificate : chain.connection().handshake().peerCertificates()) { String pin = CertificatePinner.pin(certificate); if (denylist.contains(pin)) { throw new IOException("Denylisted peer certificate: " + pin); } } return chain.proceed(chain.request()); } }; private final OkHttpClient client = new OkHttpClient.Builder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
import mockwebserver3.MockWebServer import mockwebserver3.SocketEffect.ShutdownConnection import mockwebserver3.junit5.StartStop import okhttp3.CertificatePinner import okhttp3.CertificatePinner.Companion.pin import okhttp3.OkHttpClientTestRule import okhttp3.RecordingHostnameVerifier import okhttp3.Request import okhttp3.internal.platform.Platform.Companion.get import okhttp3.testing.PlatformRule
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 24.3K bytes - Viewed (1) -
okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerKotlinTest.kt
assertFalse(pin.matchesHostname("www.example.com")) } @Test fun testMatchesSha256() { val pin = Pin("example.com", certA1Sha256Pin) assertTrue(pin.matchesCertificate(certA1.certificate)) assertFalse(pin.matchesCertificate(certB1.certificate)) } @Test fun testMatchesSha1() { val pin = Pin("example.com", certC1Sha1Pin) assertTrue(pin.matchesCertificate(certC1.certificate))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 8.2K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/CertificatePinner.kt
when { pin.startsWith("sha1/") -> { this.hashAlgorithm = "sha1" this.hash = pin.substring("sha1/".length).decodeBase64() ?: throw IllegalArgumentException("Invalid pin hash: $pin") } pin.startsWith("sha256/") -> { this.hashAlgorithm = "sha256"
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 14.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt
import javax.net.ssl.X509TrustManager import kotlin.test.assertFailsWith import mockwebserver3.MockResponse import mockwebserver3.MockWebServer import mockwebserver3.junit5.StartStop import okhttp3.CertificatePinner.Companion.pin import okhttp3.testing.PlatformRule import okhttp3.tls.HandshakeCertificates import okhttp3.tls.HeldCertificate import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jun 19 11:44:16 UTC 2025 - 19.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt
if (!response.isSuccessful) throw IOException("Unexpected code $response") for (certificate in response.handshake!!.peerCertificates) { println(CertificatePinner.pin(certificate)) } } } } fun main() { CertificatePinning().run()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java
if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); for (Certificate certificate : response.handshake().peerCertificates()) { System.out.println(CertificatePinner.pin(certificate)); } } } public static void main(String... args) throws Exception { new CertificatePinning().run(); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Dec 08 21:30:01 UTC 2019 - 1.7K bytes - Viewed (0) -
docs/features/https.md
if (!response.isSuccessful) throw IOException("Unexpected code $response") for (certificate in response.handshake!!.peerCertificates) { println(CertificatePinner.pin(certificate)) } } } ``` === ":material-language-java: Java" ```java private final OkHttpClient client = new OkHttpClient.Builder() .certificatePinner(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Dec 24 00:16:30 UTC 2022 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java
if (delegate == null) { return; } /* * If we're about to complete the TimeoutFuture, we want to release our reference to it. * Otherwise, we'll pin it (and its result) in memory until the timeout task is GCed. (The * need to clear our reference to the TimeoutFuture is the reason we use a *static* nested * class with a manual reference back to the "containing" class.)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 8K bytes - Viewed (0)