Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for addInsecureHost (0.07 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt

        server.enqueue(MockResponse())
    
        val clientCertificates =
          HandshakeCertificates
            .Builder()
            .addPlatformTrustedCertificates()
            .addInsecureHost(server.hostName)
            .build()
    
        val client =
          clientTestRule
            .newClientBuilder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

              .setHeader("Location", "https://www.google.com/robots.txt"),
          )
        }
    
      val clientCertificates =
        HandshakeCertificates
          .Builder()
          .addPlatformTrustedCertificates()
          .addInsecureHost(server.hostName)
          .build()
    
      val client =
        OkHttpClient
          .Builder()
          .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
          .build()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        assumeTrue(Build.VERSION.SDK_INT >= 24)
    
        val clientCertificates =
          HandshakeCertificates
            .Builder()
            .apply {
              if (Build.VERSION.SDK_INT >= 24) {
                addInsecureHost(server.hostName)
              }
            }.build()
    
        client =
          client
            .newBuilder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

         * a mechanism to trust some hosts and not others.
         *
         * @param hostname the exact hostname from the URL for insecure connections.
         */
        fun addInsecureHost(hostname: String) =
          apply {
            insecureHosts += hostname
          }
    
        fun build(): HandshakeCertificates {
          val immutableInsecureHosts = insecureHosts.toImmutableList()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.4K bytes
    - Viewed (0)
Back to top