Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for choice (0.21 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

    import okio.Buffer
    import okio.ByteString
    
    /**
     * Encode and decode a model object like a [Long] or [Certificate] as DER bytes.
     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
       * Returns a value from this adapter.
       *
       * This must always return a value, though it doesn't necessarily need to consume data from
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

     *
     * ### Trust Manager Extraction
     *
     * Supported on Android 2.3+ and OpenJDK 7+. There are no public APIs to recover the trust
     * manager that was used to create an [SSLSocketFactory].
     *
     * Not supported by choice on JDK9+ due to access checks.
     *
     * ### Android Cleartext Permit Detection
     *
     * Supported on Android 6.0+ via `NetworkSecurityPolicy`.
     */
    open class Platform {
      /** Prefix used on custom headers. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

                ?: throw ProtocolException("expected a value at $reader")
    
            val choice =
              choices.firstOrNull { it.matches(peekedHeader) }
                ?: throw ProtocolException(
                  "expected a matching choice but was $peekedHeader at $reader",
                )
    
            return choice to choice.fromDer(reader)
          }
    
          override fun toDer(
            writer: DerWriter,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

        attributeTypeAndValue.asSetOf().asSequenceOf()
    
      /**
       * ```
       * Name ::= CHOICE {
       *   -- only one possibility for now --
       *   rdnSequence  RDNSequence
       * }
       * ```
       */
      internal val name: DerAdapter<Pair<DerAdapter<*>, Any?>> =
        Adapters.choice(
          rdnSequence,
        )
    
      /**
       * ```
       * SubjectPublicKeyInfo ::= SEQUENCE  {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.6K bytes
    - Viewed (1)
  5. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

            derReader.readOctetString()
          }
        }.also { expected ->
          assertThat(expected).hasMessage("constructed octet strings not supported for DER")
        }
      }
    
      @Test fun `choice IP address`() {
        val bytes = "8704c0a80201".decodeHex()
        val localhost = InetAddress.getByName("192.168.2.1").address.toByteString()
        assertThat(CertificateAdapters.generalName.fromDer(bytes))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt

    import java.net.ProtocolException
    
    /**
     * Handles basic types that always use the same tag. This supports optional types and may set a type
     * hint for further adapters to process.
     *
     * Types like ANY and CHOICE that don't have a consistent tag cannot use this.
     */
    internal data class BasicDerAdapter<T>(
      private val name: String,
      /** The tag class this adapter expects, or -1 to match any tag class. */
      val tagClass: Int,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

    import java.io.InterruptedIOException
    import java.net.HttpURLConnection.HTTP_CLIENT_TIMEOUT
    import java.net.HttpURLConnection.HTTP_MOVED_PERM
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    import java.net.HttpURLConnection.HTTP_MULT_CHOICE
    import java.net.HttpURLConnection.HTTP_PROXY_AUTH
    import java.net.HttpURLConnection.HTTP_SEE_OTHER
    import java.net.HttpURLConnection.HTTP_UNAUTHORIZED
    import java.net.HttpURLConnection.HTTP_UNAVAILABLE
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  8. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

     */
    @file:Suppress("ktlint:standard:filename")
    
    package okhttp3.internal
    
    import java.net.HttpURLConnection.HTTP_MOVED_PERM
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    import java.net.HttpURLConnection.HTTP_MULT_CHOICE
    import java.net.HttpURLConnection.HTTP_SEE_OTHER
    import okhttp3.CacheControl
    import okhttp3.Headers
    import okhttp3.MediaType
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.Response
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

    import okhttp3.Route
    import okhttp3.internal.canParseAsIpAddress
    import okhttp3.internal.immutableListOf
    import okhttp3.internal.toImmutableList
    
    /**
     * Selects routes to connect to an origin server. Each connection requires a choice of proxy server,
     * IP address, and TLS mode. Connections may also be recycled.
     */
    class RouteSelector(
      private val address: Address,
      private val routeDatabase: RouteDatabase,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

    import java.net.HttpURLConnection.HTTP_GONE
    import java.net.HttpURLConnection.HTTP_MOVED_PERM
    import java.net.HttpURLConnection.HTTP_MOVED_TEMP
    import java.net.HttpURLConnection.HTTP_MULT_CHOICE
    import java.net.HttpURLConnection.HTTP_NOT_AUTHORITATIVE
    import java.net.HttpURLConnection.HTTP_NOT_FOUND
    import java.net.HttpURLConnection.HTTP_NOT_IMPLEMENTED
    import java.net.HttpURLConnection.HTTP_NO_CONTENT
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
Back to top