Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for verifyCn (0.16 sec)

  1. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

            """.trimIndent(),
          )
        assertThat(verifier.verify("foo.com", session)).isFalse()
        assertThat(verifier.verify("a.foo.com", session)).isFalse()
        assertThat(verifier.verify("bar.com", session)).isFalse()
        assertThat(verifier.verify("a.bar.com", session)).isFalse()
        assertThat(verifier.verify("\u82b1\u5b50.co.jp", session)).isFalse()
        assertThat(verifier.verify("a.\u82b1\u5b50.co.jp", session)).isFalse()
      }
    
    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)
  2. mockwebserver/README.md

    
    ### Motivation
    
    This library makes it easy to test that your app Does The Right Thing when it
    makes HTTP and HTTPS calls. It lets you specify which responses to return and
    then verify that requests were made as expected.
    
    Because it exercises your full HTTP stack, you can be confident that you're
    testing everything. You can even copy & paste HTTP responses from your real web
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  3. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeTestBase.kt

          return result
        }
    
        /**
         * Checks if `expected` and `observed` are equal when viewed as a set and headers are
         * deduped.
         *
         * TODO: See if duped headers should be preserved on decode and verify.
         */
        private fun assertSetEquals(
          message: String,
          expected: List<Header>,
          observed: List<Header>,
        ) {
          assertThat(LinkedHashSet(observed), message)
    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)
  4. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

    import org.junit.Assert
    import org.junit.Test
    
    /**
     * Simplified from
     * https://hc.apache.org/httpcomponents-client-5.0.x/httpclient5/examples/AsyncClientTlsAlpn.java
     *
     * Mainly intended to verify behaviour of popular clients across Android versions, similar
     * to observing Firefox or Chrome browser behaviour.
     */
    class ApacheHttpClientHttp2Test {
      @Test
      fun testHttp2() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

     * addresses nor hostnames; they will be verified as IP addresses (which is a more strict
     * verification).
     */
    private val VERIFY_AS_IP_ADDRESS = "([0-9a-fA-F]*:[0-9a-fA-F:.]*)|([\\d.]+)".toRegex()
    
    /** Returns true if this string is not a host name and might be an IP address. */
    fun String.canParseAsIpAddress(): Boolean = VERIFY_AS_IP_ADDRESS.matches(this)
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

        val signedData = CertificateAdapters.tbsCertificate.toDer(tbsCertificate)
    
        return Signature.getInstance(tbsCertificate.signatureAlgorithmName).run {
          initVerify(issuer)
          update(signedData.toByteArray())
          verify(signatureValue.byteString.toByteArray())
        }
      }
    
      fun toX509Certificate(): X509Certificate {
        val data = CertificateAdapters.certificate.toDer(this)
        try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun connectViaHttpProxyToHttpsUsingHttpsProxySystemProperty() {
        testConnectViaHttpProxyToHttps(ProxyConfig.HTTPS_PROXY_SYSTEM_PROPERTY)
      }
    
      /**
       * We were verifying the wrong hostname when connecting to an HTTPS site through a proxy.
       * http://b/3097277
       */
      private fun testConnectViaHttpProxyToHttps(proxyConfig: ProxyConfig) {
        val hostnameVerifier = RecordingHostnameVerifier()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  8. docs/changelogs/changelog_4x.md

        This applies to `Authorization`, `Cookie`, `Proxy-Authorization`, and `Set-Cookie` headers.
     *  Fix: Don't crash with an `InaccessibleObjectException` when running on JDK17+ with strong
        encapsulation enabled.
     *  Fix: Strictly verify hostnames used with OkHttp's `HostnameVerifier`. Programs that make direct
        manual calls to `HostnameVerifier` could be defeated if the hostnames they pass in are not
        strictly ASCII. This issue is tracked as [CVE-2021-0341].
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        url: HttpUrl,
        handshake: Handshake,
      ): Boolean {
        val peerCertificates = handshake.peerCertificates
    
        return peerCertificates.isNotEmpty() &&
          OkHostnameVerifier.verify(url.host, peerCertificates[0] as X509Certificate)
      }
    
      @Throws(SocketException::class)
      internal fun newCodec(
        client: OkHttpClient,
        chain: RealInterceptorChain,
      ): ExchangeCodec {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

      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(
        host: String,
        certificate: X509Certificate,
    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)
Back to top