Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 53 for handshakeCertificates (0.25 sec)

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

        }
      }
    
      private fun enableTls() {
        client =
          client
            .newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 5.9K bytes
    - Viewed (1)
  2. okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt

            .build()
        val serverCertificates =
          HandshakeCertificates
            .Builder()
            .heldCertificate(heldCertificate)
            .build()
        server.useHttps(serverCertificates.sslSocketFactory())
        server.enqueue(MockResponse())
    
        val clientCertificates =
          HandshakeCertificates
            .Builder()
            .addPlatformTrustedCertificates()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

    import okhttp3.mockwebserver.MockResponse
    import okhttp3.mockwebserver.MockWebServer
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.internal.TlsUtil
    
    class DevServer {
      val handshakeCertificates = TlsUtil.localhost()
    
      val server =
        MockWebServer().apply {
          useHttps(handshakeCertificates.sslSocketFactory(), false)
    
          enqueue(
            MockResponse()
              .setResponseCode(HTTP_MOVED_TEMP)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  4. android-test/src/androidTest/java/okhttp/android/test/SingleAndroidTest.kt

    /**
     * This single Junit 4 test is our Android test suite on API 21-25.
     */
    class SingleAndroidTest {
      private val handshakeCertificates = localhost()
    
      private var client: OkHttpClient =
        OkHttpClient
          .Builder()
          .sslSocketFactory(
            handshakeCertificates.sslSocketFactory(),
            handshakeCertificates.trustManager,
          ).connectionPool(ConnectionPool(0, 1, TimeUnit.SECONDS))
          .build()
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Nov 21 12:33:41 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

        if (https) {
          server.useHttps(handshakeCertificates.sslSocketFactory())
          server2.useHttps(handshakeCertificates.sslSocketFactory())
          server2.protocolNegotiationEnabled = false
          client =
            client
              .newBuilder()
              .sslSocketFactory(
                handshakeCertificates.sslSocketFactory(),
                handshakeCertificates.trustManager,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

      }
    
      @Test @Disabled
      fun handshakeCertificates() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
        val keyManager: X509KeyManager = handshakeCertificates.keyManager()
        val trustManager: X509TrustManager = handshakeCertificates.trustManager()
      }
    
      @Test @Disabled
      fun handshakeCertificatesBuilder() {
        var builder: HandshakeCertificates.Builder = HandshakeCertificates.Builder()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

    import javax.net.ssl.X509TrustManager
    import okhttp3.internal.platform.Platform
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.HeldCertificate
    import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
    
    object TlsUtil {
      val password = "password".toCharArray()
    
      private val localhost: HandshakeCertificates by lazy {
        // Generate a self-signed cert for the server to serve and the client to trust.
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (1)
  8. okhttp/src/jvmTest/kotlin/okhttp3/CallHandshakeTest.kt

            .newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).hostnameVerifier(RecordingHostnameVerifier())
            .build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
    
        defaultEnabledCipherSuites =
          handshakeCertificates.sslSocketFactory().defaultCipherSuites.toList()
        defaultSupportedCipherSuites =
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Sep 16 07:21:43 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CacheCorruptionTest.kt

              ),
            body = "ABC.2",
          ),
        )
        client =
          client
            .newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).hostnameVerifier(nullHostnameVerifier)
            .build()
        val request = Request(server.url("/"))
        val response1: Response = client.newCall(request).execute()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/SocketChannelTest.kt

      val hostname = "local.host"
      private val handshakeCertificates =
        run {
          // Generate a self-signed cert for the server to serve and the client to trust.
          val heldCertificate =
            HeldCertificate
              .Builder()
              .commonName(hostname)
              .addSubjectAlternativeName(hostname)
              .build()
          HandshakeCertificates
            .Builder()
            .heldCertificate(heldCertificate)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 7.9K bytes
    - Viewed (0)
Back to top