Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for matchesCertificate (0.07 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerTest.kt

        Assertions.assertTrue(pin.matchesCertificate(certA1.certificate))
        Assertions.assertFalse(pin.matchesCertificate(certB1.certificate))
      }
    
      @Test
      fun testMatchesSha1() {
        val pin = CertificatePinner.Pin("example.com", certC1Sha1Pin)
        Assertions.assertTrue(pin.matchesCertificate(certC1.certificate))
        Assertions.assertFalse(pin.matchesCertificate(certB1.certificate))
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/CertificatePinner.kt

                hostname.lastIndexOf('.', prefixLength - 1) == -1
            }
            else -> hostname == pattern
          }
    
        fun matchesCertificate(certificate: X509Certificate): Boolean =
          when (hashAlgorithm) {
            "sha256" -> hash == certificate.sha256Hash()
            "sha1" -> hash == certificate.sha1Hash()
            else -> false
          }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 14.1K bytes
    - Viewed (0)
Back to top