Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 39 for hostnameVerifier (0.19 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingHostnameVerifier.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import javax.net.ssl.HostnameVerifier
    import javax.net.ssl.SSLSession
    
    class RecordingHostnameVerifier : HostnameVerifier {
      @JvmField
      val calls: MutableList<String> = mutableListOf()
    
      @Synchronized override fun verify(
        hostname: String,
        session: SSLSession,
      ): Boolean {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 980 bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        if (tls) {
          val socketFactory = handshakeCertificates.sslSocketFactory()
          val hostnameVerifier = RecordingHostnameVerifier()
          server.useHttps(socketFactory)
          client =
            client.newBuilder()
              .sslSocketFactory(socketFactory, handshakeCertificates.trustManager)
              .hostnameVerifier(hostnameVerifier)
              .build()
        }
        val responseOne =
          MockResponse.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

        )
        val hostnameVerifier = RecordingHostnameVerifier()
        client =
          client.newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .proxy(server.toProxyAddress())
            .hostnameVerifier(hostnameVerifier)
            .build()
        val request =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

       * verification is a black box.
       */
      @Test
      fun skipsWhenHostnameVerifierUsed() {
        val verifier = HostnameVerifier { name: String?, session: SSLSession? -> true }
        client = client.newBuilder().hostnameVerifier(verifier).build()
        server.enqueue(MockResponse())
        server.enqueue(MockResponse())
        assert200Http2Response(execute(url), server.hostName)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

    package okhttp3.tls
    
    import java.security.KeyStoreException
    import java.security.SecureRandom
    import java.security.cert.X509Certificate
    import java.util.Collections
    import javax.net.ssl.HostnameVerifier
    import javax.net.ssl.KeyManager
    import javax.net.ssl.SSLContext
    import javax.net.ssl.SSLSocketFactory
    import javax.net.ssl.TrustManager
    import javax.net.ssl.X509KeyManager
    import javax.net.ssl.X509TrustManager
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val proxySelector: ProxySelector = address.proxySelector
        val sslSocketFactory: SSLSocketFactory? = address.sslSocketFactory
        val hostnameVerifier: HostnameVerifier? = address.hostnameVerifier
        val certificatePinner: CertificatePinner? = address.certificatePinner
      }
    
      @Test
      fun authenticator() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/CacheTest.kt

    import java.text.SimpleDateFormat
    import java.util.Date
    import java.util.Locale
    import java.util.TimeZone
    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicReference
    import javax.net.ssl.HostnameVerifier
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.RecordedRequest
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  8. docs/features/connections.md

     * They specify that the call may be plaintext (`http`) or encrypted (`https`), but not which cryptographic algorithms should be used. Nor do they specify how to verify the peer's certificates (the [HostnameVerifier](https://developer.android.com/reference/javax/net/ssl/HostnameVerifier.html)) or which certificates can be trusted (the [SSLSocketFactory](https://developer.android.com/reference/org/apache/http/conn/ssl/SSLSocketFactory.html)).
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Feb 21 03:33:59 UTC 2022
    - 5.4K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        response1.body.close()
    
        // This client shares a connection pool but has a different SSL socket factory.
        val anotherClient =
          client.newBuilder()
            .hostnameVerifier(RecordingHostnameVerifier())
            .build()
        val response2 = anotherClient.newCall(request).execute()
        response2.body.close()
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  10. android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt

            }
    
            return sslSocket
          }
        }
    
        client =
          client.newBuilder()
            .sslSocketFactory(CustomSSLSocketFactory(client.sslSocketFactory), client.x509TrustManager!!)
            .hostnameVerifier { hostname, session ->
              val s = "hostname: $hostname peerHost:${session.peerHost}"
              Log.d("SniOverrideTest", s)
              try {
                val cert = session.peerCertificates[0] as X509Certificate
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top