Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for KSession (0.17 sec)

  1. android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt

            .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
                for (name in cert.subjectAlternativeNames) {
                  if (name[0] as Int == 2) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

              ) as SSLSocket
            sslSocket.use {
              sslSocket.useClientMode = false
              sslSocket.wantClientAuth = true
              sslSocket.startHandshake()
              return@submit sslSocket.session.handshake()
            }
          }
        }
      }
    
      private fun doClientHandshake(
        client: HandshakeCertificates,
        serverAddress: InetSocketAddress,
      ): Future<Handshake> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

      private const val ALT_DNS_NAME = 2
      private const val ALT_IPA_NAME = 7
    
      override fun verify(
        host: String,
        session: SSLSession,
      ): Boolean {
        return if (!host.isAscii()) {
          false
        } else {
          try {
            verify(host, session.peerCertificates[0] as X509Certificate)
          } catch (_: SSLException) {
            false
          }
        }
      }
    
      fun verify(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/CookieJar.kt

     *
     * As policy, implementations of this interface are responsible for selecting which cookies to
     * accept and which to reject. A reasonable policy is to reject all cookies, though that may
     * interfere with session-based authentication schemes that require cookies.
     *
     * As persistence, implementations of this interface must also provide storage of cookies. Simple
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/RecordedRequest.kt

       * cleartext and may be monitored or blocked by a proxy or other middlebox.
       */
      val handshakeServerNames: List<String>
    
      init {
        if (socket is SSLSocket) {
          try {
            this.handshake = socket.session.handshake()
            this.handshakeServerNames = Platform.get().getHandshakeServerNames(socket)
          } catch (e: IOException) {
            throw IllegalArgumentException(e)
          }
        } else {
          this.handshake = null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3.8K bytes
    - Viewed (1)
  6. samples/slack/src/main/java/okhttp3/slack/SlackClient.java

          initOauthSession(session);
          System.out.printf("session granted: %s\n", session);
        });
    
        System.out.printf("open this URL in a browser: %s\n", authorizeUrl);
      }
    
      /** Set the OAuth session for this client. */
      public synchronized void initOauthSession(OAuthSession session) {
        this.session = session;
        this.notifyAll();
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<Protocol>,
      ) {
        // No TLS extensions if the socket class is custom.
        if (matchesSocket(sslSocket)) {
          try {
            // Enable session tickets.
            setUseSessionTickets.invoke(sslSocket, true)
    
            // Assume platform support on 24+
            if (hostname != null && Build.VERSION.SDK_INT <= 23) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  8. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

          return new MockResponse()
              .setResponseCode(404)
              .setBody("unexpected request");
        }
    
        try {
          OAuthSession session = slackApi.exchangeCode(code, redirectUrl());
          listener.sessionGranted(session);
        } catch (IOException e) {
          return new MockResponse()
              .setResponseCode(400)
              .setBody("code exchange failed: " + e.getMessage());
        }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingHostnameVerifier.kt

    import javax.net.ssl.SSLSession
    
    class RecordingHostnameVerifier : HostnameVerifier {
      @JvmField
      val calls: MutableList<String> = mutableListOf()
    
      @Synchronized override fun verify(
        hostname: String,
        session: SSLSession,
      ): Boolean {
        calls.add("verify $hostname")
        return true
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 980 bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/android/ConscryptSocketAdapter.kt

        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<Protocol>,
      ) {
        // No TLS extensions if the socket class is custom.
        if (matchesSocket(sslSocket)) {
          // Enable session tickets.
          Conscrypt.setUseSessionTickets(sslSocket, true)
    
          // Enable ALPN.
          val names = Platform.alpnProtocolNames(protocols)
          Conscrypt.setApplicationProtocols(sslSocket, names.toTypedArray())
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
Back to top