Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 199 for elseif (0.3 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

              ),
            )
    
          return result
        }
    
        private fun validity(): Validity {
          val notBefore = if (notBefore != -1L) notBefore else System.currentTimeMillis()
          val notAfter = if (notAfter != -1L) notAfter else notBefore + DEFAULT_DURATION_MILLIS
          return Validity(
            notBefore = notBefore,
            notAfter = notAfter,
          )
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  2. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

                hostname.lastIndexOf('.', prefixLength - 1) == -1
            }
            else -> hostname == pattern
          }
        }
    
        fun matchesCertificate(certificate: X509Certificate): Boolean {
          return when (hashAlgorithm) {
            "sha256" -> hash == certificate.sha256Hash()
            "sha1" -> hash == certificate.sha1Hash()
            else -> false
          }
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          !response.promisesBody() -> 0L
          response.isChunked -> -1L
          else -> response.headersContentLength()
        }
      }
    
      override fun openResponseBodySource(response: Response): Source {
        return when {
          !response.promisesBody() -> newFixedLengthSource(0)
          response.isChunked -> newChunkedSource(response.request.url)
          else -> {
            val contentLength = response.headersContentLength()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

          false
        } else {
          try {
            verify(host, session.peerCertificates[0] as X509Certificate)
          } catch (_: SSLException) {
            false
          }
        }
      }
    
      fun verify(
        host: String,
        certificate: X509Certificate,
      ): Boolean {
        return when {
          host.canParseAsIpAddress() -> verifyIpAddress(host, certificate)
          else -> verifyHostname(host, certificate)
        }
    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)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt

            if (console != null) {
              callback.password = console.readPassword(callback.prompt)
            } else {
              System.err.println(callback.prompt)
              callback.password = System.`in`.bufferedReader().readLine().toCharArray()
            }
          } else {
            throw UnsupportedCallbackException(callback)
          }
        }
      }
    }
    
    fun main() {
      YubikeyClientAuth().run()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (1)
  6. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        this.server = server
      }
    
      @Test
      fun testPlatform() {
        assertTrue(Platform.isAndroid)
    
        if (Build.VERSION.SDK_INT >= 29) {
          assertTrue(Platform.get() is Android10Platform)
        } else {
          assertTrue(Platform.get() is AndroidPlatform)
        }
      }
    
      @Test
      fun testRequest() {
        assumeNetwork()
    
        val request = Request.Builder().url("https://api.twitter.com/robots.txt").build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt

        result = 31 * result + tagClass
        result = 31 * result + tag.toInt()
        result = 31 * result + codec.hashCode()
        result = 31 * result + (if (isOptional) 1 else 0)
        result = 31 * result + defaultValue.hashCode()
        result = 31 * result + (if (typeHint) 1 else 0)
        return result
      }
    
      override fun toString(): String = "$name [$tagClass/$tag]"
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

            if (throwable != null) {
              if (throwable !is IOException) throw throwable
              if (firstException == null) {
                firstException = throwable
              } else {
                firstException.addSuppressed(throwable)
              }
            }
    
            val nextPlan = connectResult.nextPlan
            if (nextPlan != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformVersion.kt

     * limitations under the License.
     */
    package okhttp3.testing
    
    object PlatformVersion {
      val majorVersion: Int by lazy {
        when (val jvmSpecVersion = getJvmSpecVersion()) {
          "1.8" -> 8
          else -> jvmSpecVersion.toInt()
        }
      }
    
      fun getJvmSpecVersion(): String {
        return System.getProperty("java.specification.version", "unknown")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 917 bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

            }
            is SSLException -> {
              // javax.net.ssl.SSLException: readRecord
            }
            is SocketException -> {
              // Conscrypt, JDK 8 (>= 292), JDK 9
            }
            else -> {
              assertThat(expected.message).isEqualTo("exhausted all routes")
            }
          }
        }
      }
    
      @Test
      fun commonNameIsNotTrusted() {
        serverCert =
          HeldCertificate.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 12.5K bytes
    - Viewed (0)
Back to top