- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for prin (0.17 sec)
-
samples/tlssurvey/src/main/kotlin/okhttp3/survey/CipherSuiteSurvey.kt
*/ class CipherSuiteSurvey( val clients: List<Client>, val ianaSuites: IanaSuites, val orderBy: List<SuiteId>, ) { fun printGoogleSheet() { print("name") for (client in clients) { print("\t") print(client.nameAndVersion) } println() val sortedSuites = ianaSuites.suites.sortedBy { ianaSuite -> val index = orderBy.indexOfFirst { it.matches(ianaSuite) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Apr 02 01:44:15 GMT 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/test/java/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))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/main/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"
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 14.2K bytes - Viewed (1) -
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(); }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 08 21:30:01 GMT 2019 - 1.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt
val cert = peerCertificates[0] as X509Certificate throw SSLPeerUnverifiedException( """ |Hostname ${address.url.host} not verified: | certificate: ${CertificatePinner.pin(cert)} | DN: ${cert.subjectDN.name} | subjectAltNames: ${OkHostnameVerifier.allSubjectAltNames(cert)} """.trimMargin(), ) } else {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 18.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
val request1 = Request.Builder().url(server.url("/")).build() val response1 = client.newCall(request1).execute() val certificatePinnerBuilder = CertificatePinner.Builder() for (certificate in response1.handshake!!.peerCertificates) { certificatePinnerBuilder.add( server.hostName, pin(certificate), ) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
@Test fun testCertificatePinningSuccess() { enableTls() val certificatePinner = CertificatePinner.Builder() .add( server.hostName, CertificatePinner.pin(handshakeCertificates.trustManager.acceptedIssuers[0]), ) .build() client = client.newBuilder().certificatePinner(certificatePinner).build() server.enqueue(MockResponse(body = "abc"))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 27K bytes - Viewed (1) -
.github/CONTRIBUTING.md
`checkstyle-result.xml` file. Some general advice - Don’t change public API lightly, avoid if possible, and include your reasoning in the PR if essential. It causes pain for developers who use OkHttp and sometimes runtime errors. - Favour a working external library if appropriate. There are many examples of OkHttp libraries that can sit on top or hook in via existing APIs.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 17 04:16:26 GMT 2019 - 1.4K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt
private fun runBatch( dnsProviders: List<DnsOverHttps>, names: List<String>, ) { var time = System.currentTimeMillis() for (dns in dnsProviders) { println("Testing ${dns.url}") for (host in names) { print("$host: ") System.out.flush() try { val results = dns.lookup(host) println(results) } catch (uhe: UnknownHostException) { var e: Throwable? = uhe while (e != null) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/HttpUrl.kt
import okhttp3.internal.url.percentDecode /** * A uniform resource locator (URL) with a scheme of either `http` or `https`. Use this class to * compose and decompose Internet addresses. For example, this code will compose and print a URL for * Google search: * * ```java * HttpUrl url = new HttpUrl.Builder() * .scheme("https") * .host("www.google.com") * .addPathSegment("search") * .addQueryParameter("q", "polar bears")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 63.5K bytes - Viewed (1)