Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for UNCHECKED_CAST (0.07 sec)

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

            String::class.java,
          )
        } catch (_: NoSuchMethodException) {
          null
        }
    
      /** Android method to clean and sort certificates, called via reflection. */
      @Suppress("unused", "UNCHECKED_CAST")
      fun checkServerTrusted(
        chain: Array<out X509Certificate>,
        authType: String,
        host: String,
      ): List<Certificate> {
        if (host in insecureHosts) return listOf()
        try {
          val method =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/StandardAndroidSocketAdapter.kt

          )
        return x509TrustManager ?: readFieldOrNull(
          context,
          X509TrustManager::class.java,
          "trustManager",
        )
      }
    
      companion object {
        @Suppress("UNCHECKED_CAST")
        fun buildIfSupported(packageName: String = "com.android.org.conscrypt"): SocketAdapter? =
          try {
            val sslSocketClass = Class.forName("$packageName.OpenSSLSocketImpl") as Class<in SSLSocket>
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  3. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/AndroidCertificateChainCleaner.kt

     */
    internal class AndroidCertificateChainCleaner(
      private val trustManager: X509TrustManager,
      private val x509TrustManagerExtensions: X509TrustManagerExtensions,
    ) : CertificateChainCleaner() {
      @Suppress("UNCHECKED_CAST")
      @Throws(SSLPeerUnverifiedException::class)
      @SuppressSignatureCheck
      override fun clean(
        chain: List<Certificate>,
        hostname: String,
      ): List<Certificate> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/FakeSSLSession.kt

      override fun getLocalPrincipal(): Principal = throw UnsupportedOperationException()
    
      override fun getPacketBufferSize(): Int = throw UnsupportedOperationException()
    
      @Suppress("UNCHECKED_CAST")
      @Throws(SSLPeerUnverifiedException::class)
      override fun getPeerCertificates(): Array<Certificate> =
        if (certificates.isEmpty()) {
          throw SSLPeerUnverifiedException("peer not authenticated")
        } else {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

       *     writing process sets something else. This is used to encode SEQUENCES in values that are
       *     declared to have non-constructed values, like OCTET STRING values.
       */
      @Suppress("UNCHECKED_CAST") // read() produces a single element of the expected type.
      fun withExplicitBox(
        tagClass: Int = DerHeader.TAG_CLASS_CONTEXT_SPECIFIC,
        tag: Long,
        forceConstructed: Boolean? = null,
      ): BasicDerAdapter<T> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

    import java.net.ProtocolException
    import okio.ByteString
    
    /**
     * ASN.1 adapters adapted from the specifications in [RFC 5280][rfc_5280].
     *
     * [rfc_5280]: https://tools.ietf.org/html/rfc5280
     */
    @Suppress("UNCHECKED_CAST") // This needs to cast decoded collections.
    internal object CertificateAdapters {
      /**
       * ```
       * Time ::= CHOICE {
       *   utcTime        UTCTime,
       *   generalTime    GeneralizedTime
       * }
       * ```
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 13.6K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

    @Suppress("NOTHING_TO_INLINE")
    internal inline fun <K, V> Map<K, V>.unmodifiable(): Map<K, V> = Collections.unmodifiableMap(this)
    
    /** Returns an immutable copy of this. */
    @Suppress("UNCHECKED_CAST")
    internal fun <T> List<T>.toImmutableList(): List<T> =
      when {
        this.isEmpty() -> emptyList()
        this.size == 1 -> Collections.singletonList(this[0])
        // Collection.toArray returns Object[] (covariant).
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt

          }
        }
      }
      return false
    }
    
    internal fun Array<String>.indexOf(
      value: String,
      comparator: Comparator<String>,
    ): Int = indexOfFirst { comparator.compare(it, value) == 0 }
    
    @Suppress("UNCHECKED_CAST")
    internal fun Array<String>.concat(value: String): Array<String> {
      val result = copyOf(size + 1)
      result[result.lastIndex] = value
      return result as Array<String>
    }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/HttpUrl.kt

                alreadyEncoded = true,
                strict = true,
                unicodeAllowed = true,
              )
          }
    
        fun build(): HttpUrl {
          @Suppress("UNCHECKED_CAST") // percentDecode returns either List<String?> or List<String>.
          return HttpUrl(
            scheme = scheme ?: throw IllegalStateException("scheme == null"),
            username = encodedUsername.percentDecode(),
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 63.5K bytes
    - Viewed (0)
Back to top