- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for certificatePinner (0.14 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/CertificatePinner.kt
* * ```java * String hostname = "publicobject.com"; * CertificatePinner certificatePinner = new CertificatePinner.Builder() * .add(hostname, "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") * .build(); * OkHttpClient client = OkHttpClient.Builder() * .certificatePinner(certificatePinner) * .build(); * * Request request = new Request.Builder()
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 14.1K bytes - Viewed (1) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
import mockwebserver3.MockResponse 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
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 24.3K bytes - Viewed (2) -
okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerTest.kt
certificatePinner.check("example.com", listOf(certA1.certificate)) certificatePinner.check("www.example.com", listOf(certA1.certificate)) } @Test fun absentHostnameMatches() { val certificatePinner = CertificatePinner.Builder().build() certificatePinner.check("example.com", listOf(certA1.certificate)) } @Test fun successfulCheckForWildcardHostname() { val certificatePinner =
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Address.kt
@JvmName("-deprecated_certificatePinner") @Deprecated( message = "moved to val", replaceWith = ReplaceWith(expression = "certificatePinner"), level = DeprecationLevel.ERROR, ) fun certificatePinner(): CertificatePinner? = certificatePinner override fun equals(other: Any?): Boolean = other is Address && url == other.url && equalsNonHost(other)Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt
* Pinning certificates avoids the need to trust certificate authorities. */ fun certificatePinner(certificatePinner: CertificatePinner) = apply { if (certificatePinner != this.certificatePinner) { this.routeDatabase = null } this.certificatePinner = certificatePinner } /**Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Oct 07 21:55:03 UTC 2025 - 51.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
) = TODO() } } @Test fun certificatePinner() { val heldCertificate: HeldCertificate = HeldCertificate.Builder().build() val certificate: X509Certificate = heldCertificate.certificate val certificatePinner: CertificatePinner = CertificatePinner.Builder().build() val certificates: List<Certificate> = listOf() certificatePinner.check("", listOf(certificate))
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt
/** Can still coalesce when pinning is used if pins match. */ @Test fun coalescesWhenCertificatePinsMatch() { val pinner = CertificatePinner .Builder() .add("san.com", pin(certificate.certificate)) .build() client = client.newBuilder().certificatePinner(pinner).build() server.enqueue(MockResponse()) server.enqueue(MockResponse()) assert200Http2Response(execute(url), server.hostName)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Jun 19 11:44:16 UTC 2025 - 19.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt
val proxy: Proxy? = address.proxy() val sslSocketFactory: SSLSocketFactory? = address.sslSocketFactory() val hostnameVerifier: HostnameVerifier? = address.hostnameVerifier() val certificatePinner: CertificatePinner? = address.certificatePinner() } @Test @Disabled fun cache() { val cache = Cache(File("/cache/"), Integer.MAX_VALUE.toLong()) val directory: File = cache.directory() } @Test @Disabled
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerKotlinTest.kt
@Test fun successfulCheckSha1Pin() { val certificatePinner = CertificatePinner .Builder() .add("example.com", "sha1/" + certA1.certificate.sha1Hash().base64()) .build() certificatePinner.check("example.com", listOf(certA1.certificate)) } @Test fun successfulFindMatchingPins() { val certificatePinner = CertificatePinner .Builder()
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 8.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java
* limitations under the License. */ package okhttp3.recipes; import java.io.IOException; import java.security.cert.Certificate; import java.util.Collections; import java.util.Set; import okhttp3.CertificatePinner; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public final class CheckHandshake { /** Rejects otherwise-trusted certificates. */Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 2.1K bytes - Viewed (0)