Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for peerCertificates (0.22 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Handshake.kt

      )
      fun cipherSuite(): CipherSuite = cipherSuite
    
      @JvmName("-deprecated_peerCertificates")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "peerCertificates"),
        level = DeprecationLevel.ERROR,
      )
      fun peerCertificates(): List<Certificate> = peerCertificates
    
      /** Returns the remote peer's principle, or null if that peer is anonymous. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  4. okhttp/src/test/java/okhttp3/HandshakeTest.kt

            cipherSuite = CipherSuite.TLS_AES_128_GCM_SHA256,
            peerCertificates = listOf(serverCertificate.certificate, serverIntermediate.certificate),
            localCertificates = listOf(),
          )
    
        assertThat(handshake.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        assertThat(handshake.cipherSuite).isEqualTo(CipherSuite.TLS_AES_128_GCM_SHA256)
        assertThat(handshake.peerCertificates).containsExactly(
          serverCertificate.certificate,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

          assertTrue(response.code() == 200 || response.code() == 404);
          assertEquals(Protocol.HTTP_2, response.protocol());
    
          for (Certificate c: response.handshake().peerCertificates()) {
            X509Certificate x = (X509Certificate) c;
            System.out.println(x.getSubjectDN());
          }
        }
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

            "sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig=");
    
        @Override public Response intercept(Chain chain) throws IOException {
          for (Certificate certificate : chain.connection().handshake().peerCertificates()) {
            String pin = CertificatePinner.pin(certificate);
            if (denylist.contains(pin)) {
              throw new IOException("Denylisted peer certificate: " + pin);
            }
          }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  7. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSession.kt

      override fun getValueNames(): Array<String> {
        return delegate!!.valueNames
      }
    
      @Throws(SSLPeerUnverifiedException::class)
      override fun getPeerCertificates(): Array<Certificate>? {
        return delegate!!.peerCertificates
      }
    
      override fun getLocalCertificates(): Array<Certificate>? {
        return delegate!!.localCertificates
      }
    
      @Throws(SSLPeerUnverifiedException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  9. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 18:36:18 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  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
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 24 00:16:30 GMT 2022
    - 10.5K bytes
    - Viewed (0)
Back to top