Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 35 for peerCertificates (0.06 seconds)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt

              }
              throw IOException("Unexpected code $response")
            }
            println(response.body.string())
    
            for (peerCertificate in response.handshake?.peerCertificates.orEmpty()) {
              println((peerCertificate as X509Certificate).subjectDN)
            }
          }
      }
    }
    
    fun main() {
      CustomTrust().run()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 8.8K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        val tlsVersion: TlsVersion = handshake.tlsVersion()
        val cipherSuite: CipherSuite = handshake.cipherSuite()
        val peerCertificates: List<Certificate> = handshake.peerCertificates()
        val peerPrincipal: Principal? = handshake.peerPrincipal()
        val localCertificates: List<Certificate> = handshake.localCertificates()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 13.3K bytes
    - Click Count (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/HostnameVerifierTest.kt

            -----END CERTIFICATE-----
            """.trimIndent(),
          )
        val peerCertificate = session.peerCertificates[0] as X509Certificate
    
        if (isAndroid || platform.isConscrypt()) {
          assertThat(certificateSANs(peerCertificate)).containsExactly("bar.com")
        } else {
          assertThat(certificateSANs(peerCertificate)).containsExactly("bar.com", "������.co.jp")
        }
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 40.4K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

         * 3
         * Content-Type: image/png
         * Content-Length: 100
         * Cache-Control: max-age=600
         *
         * AES_256_WITH_MD5
         * 2
         * base64-encoded peerCertificate[0]
         * base64-encoded peerCertificate[1]
         * -1
         * TLSv1.2
         * ```
         *
         * The file is newline separated. The first two lines are the URL and the request method. Next
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Oct 03 17:41:45 GMT 2025
    - 26.8K bytes
    - Click Count (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt

            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          for (certificate in response.handshake!!.peerCertificates) {
            println(CertificatePinner.pin(certificate))
          }
        }
      }
    }
    
    fun main() {
      CertificatePinning().run()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  6. samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java

        try (Response response = client.newCall(request).execute()) {
          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();
      }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sun Dec 08 21:30:01 GMT 2019
    - 1.7K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt

          assertThat(handshake.tlsVersion).isNotNull()
          assertThat(handshake.cipherSuite).isNotNull()
          assertThat(handshake.peerPrincipal).isNotNull()
          assertThat(handshake.peerCertificates.size).isEqualTo(1)
          assertThat(handshake.localPrincipal).isNull()
          assertThat(handshake.localCertificates.size).isEqualTo(0)
        }
    
      /**
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 5.3K bytes
    - Click Count (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSession.kt

      }
    
      override fun getValueNames(): Array<String> = delegate!!.valueNames
    
      @Throws(SSLPeerUnverifiedException::class)
      override fun getPeerCertificates(): Array<Certificate>? = delegate!!.peerCertificates
    
      override fun getLocalCertificates(): Array<Certificate>? = delegate!!.localCertificates
    
      @Throws(SSLPeerUnverifiedException::class)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

        val response = client.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
          assertEquals(
            "CN=localhost",
            (response.handshake!!.peerCertificates.single() as X509Certificate).subjectDN.name,
          )
        }
      }
    
      private fun enableTls() {
        client =
          client
            .newBuilder()
            .sslSocketFactory(
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Jun 20 11:46:46 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  10. docs/features/https.md

                .build()
    
            client.newCall(request).execute().use { response ->
              if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
              for (certificate in response.handshake!!.peerCertificates) {
                println(CertificatePinner.pin(certificate))
              }
            }
          }
        ```
    === ":material-language-java: Java"
        ```java
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Dec 24 00:16:30 GMT 2022
    - 10.5K bytes
    - Click Count (0)
Back to Top