Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for peerCertificates (0.21 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

      }
    
      private fun certificateSupportHost(
        url: HttpUrl,
        handshake: Handshake,
      ): Boolean {
        val peerCertificates = handshake.peerCertificates
    
        return peerCertificates.isNotEmpty() &&
          OkHostnameVerifier.verify(url.host, peerCertificates[0] as X509Certificate)
      }
    
      @Throws(SocketException::class)
      internal fun newCodec(
        client: OkHttpClient,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

        val peerCertificates = cleanedPeerCertificatesFn()
    
        for (peerCertificate in peerCertificates) {
          // Lazily compute the hashes for each certificate.
          var sha1: ByteString? = null
          var sha256: ByteString? = null
    
          for (pin in pins) {
            when (pin.hashAlgorithm) {
              "sha256" -> {
                if (sha256 == null) sha256 = peerCertificate.sha256Hash()
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

          if (!address.hostnameVerifier!!.verify(address.url.host, sslSocketSession)) {
            val peerCertificates = unverifiedHandshake.peerCertificates
            if (peerCertificates.isNotEmpty()) {
              val cert = peerCertificates[0] as X509Certificate
              throw SSLPeerUnverifiedException(
                """
                |Hostname ${address.url.host} not verified:
    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)
  4. cmd/sts-handlers.go

    	// whether they client has sent exactly one (non-CA) leaf certificate.
    	peerCertificates := make([]*x509.Certificate, 0, len(r.TLS.PeerCertificates))
    	for _, cert := range r.TLS.PeerCertificates {
    		if cert.IsCA {
    			continue
    		}
    		peerCertificates = append(peerCertificates, cert)
    	}
    	r.TLS.PeerCertificates = peerCertificates
    
    	// Now, we have to check that the client has provided exactly one leaf
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  5. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 24 00:16:30 GMT 2022
    - 10.5K bytes
    - Viewed (0)
  6. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(handshake.localPrincipal).isNotNull()
        assertThat(handshake.localCertificates.size).isEqualTo(1)
        assertThat(handshake.peerPrincipal).isNull()
        assertThat(handshake.peerCertificates.size).isEqualTo(0)
      }
    
      @Test
      fun httpsWithClientAuth() {
        platform.assumeNotBouncyCastle()
        platform.assumeNotConscrypt()
    
        val clientCa =
          HeldCertificate.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  7. okhttp/src/main/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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/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")
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 40.3K bytes
    - Viewed (0)
  10. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(handshake.localPrincipal).isNotNull()
        assertThat(handshake.localCertificates.size).isEqualTo(1)
        assertThat(handshake.peerPrincipal).isNull()
        assertThat(handshake.peerCertificates.size).isEqualTo(0)
      }
    
      @Test
      fun httpsWithClientAuth() {
        platform.assumeNotBouncyCastle()
        platform.assumeNotConscrypt()
        val clientCa =
          HeldCertificate.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
Back to top