Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for Localhost (0.14 sec)

  1. okhttp/src/test/java/okhttp3/OpenJSSETest.kt

      private fun enableTls() {
        // Generate a self-signed cert for the server to serve and the client to trust.
        // can't use TlsUtil.localhost with a non OpenJSSE trust manager
        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

    import okhttp3.OkHttpClientTestRule
    import okhttp3.Request
    import okhttp3.testing.PlatformRule
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.HeldCertificate
    import okhttp3.tls.internal.TlsUtil.localhost
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    class MockResponseSniTest {
      @RegisterExtension
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (1)
  3. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

      fun takeFrame(): InFrame = inFrames.take()
    
      fun play() {
        check(serverSocket == null)
        serverSocket = ServerSocket()
        serverSocket!!.reuseAddress = false
        serverSocket!!.bind(InetSocketAddress("localhost", 0), 1)
        port = serverSocket!!.localPort
        executor.execute {
          try {
            readAndWriteFrames()
          } catch (e: IOException) {
            ******@****.***uietly()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  4. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      @Test fun `choice IP address`() {
        val bytes = "8704c0a80201".decodeHex()
        val localhost = InetAddress.getByName("192.168.2.1").address.toByteString()
        assertThat(CertificateAdapters.generalName.fromDer(bytes))
          .isEqualTo(generalNameIpAddress to localhost)
        assertThat(CertificateAdapters.generalName.toDer(generalNameIpAddress to localhost))
          .isEqualTo(bytes)
      }
    
      @Test fun `choice dns`() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  5. okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt

            .dns(AsyncDns.toDns(AndroidAsyncDns.IPv4, AndroidAsyncDns.IPv6))
            .sslSocketFactory(localhost.sslSocketFactory(), localhost.trustManager)
            .build()
    
        serverRule.server.useHttps(localhost.sslSocketFactory())
      }
    
      @Test
      @Ignore("java.net.UnknownHostException: No results for localhost, in CI.")
      fun testRequest() {
        serverRule.server.enqueue(MockResponse())
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/RequestTest.kt

      fun uninitializedURI() {
        val request = Request.Builder().url("http://localhost/api").build()
        assertThat(request.url.toUri()).isEqualTo(URI("http://localhost/api"))
        assertThat(request.url).isEqualTo("http://localhost/api".toHttpUrl())
      }
    
      @Test
      fun newBuilderUrlResetsUrl() {
        val requestWithoutCache = Request.Builder().url("http://localhost/api").build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

        assertThat("https://栃木.jp".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://xn--4pvxs.jp".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://localhost".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://127.0.0.1".toHttpUrl().topPrivateDomain()).isNull()
    
        // https://github.com/square/okhttp/issues/6109
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/UtilTest.kt

    import okio.buffer
    import okio.source
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.assertThrows
    
    class UtilTest {
      @Test
      fun socketIsHealthy() {
        val localhost = InetAddress.getLoopbackAddress()
        val serverSocket = ServerSocket(0, 1, localhost)
    
        val socket = Socket()
        socket.connect(serverSocket.localSocketAddress)
        val socketSource = socket.source().buffer()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/connection/RetryConnectionTest.kt

    import okhttp3.TestValueFactory
    import okhttp3.TlsVersion
    import okhttp3.tls.internal.TlsUtil.localhost
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    class RetryConnectionTest {
      private val factory = TestValueFactory()
      private val handshakeCertificates = localhost()
      private val retryableException = SSLHandshakeException("Simulated handshake exception")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

        // x509_extensions=x509_extensions
        // [distinguished_name]
        // [req_extensions]
        // [x509_extensions]
        // subjectAltName=DNS:localhost.localdomain,DNS:localhost,IP:127.0.0.1
        //
        // $ openssl req -x509 -nodes -days 36500 -subj '/CN=localhost' -config ./cert.cnf \
        //     -newkey rsa:512 -out cert.pem
        val certificate =
          certificate(
            """
            -----BEGIN CERTIFICATE-----
    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)
Back to top