Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 210 for Certificate (2.98 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/tls/CertificateChainCleaner.kt

     * certificate.
     *
     * Use of the chain cleaner is necessary to omit unexpected certificates that aren't relevant to
     * the TLS handshake and to extract the trusted CA certificate for the benefit of certificate
     * pinning.
     */
    abstract class CertificateChainCleaner {
      @Throws(SSLPeerUnverifiedException::class)
      abstract fun clean(
        chain: List<Certificate>,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CertificatePinnerTest.kt

        }
    
        // Should not be pinned:
        certificatePinner.check("uk", listOf(certB1.certificate))
        certificatePinner.check("co.uk", listOf(certB1.certificate))
        certificatePinner.check("anotherexample.co.uk", listOf(certB1.certificate))
        certificatePinner.check("foo.anotherexample.co.uk", listOf(certB1.certificate))
      }
    
      @Test
      fun testBadPin() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/tls/BasicCertificateChainCleaner.kt

       * This is unexpected unless the trust root index in this class has a different trust manager than
       * what was used to establish [chain].
       */
      @Throws(SSLPeerUnverifiedException::class)
      override fun clean(
        chain: List<Certificate>,
        hostname: String,
      ): List<Certificate> {
        val queue: Deque<Certificate> = ArrayDeque(chain)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/FakeSSLSession.kt

      }
    
      @Suppress("UNCHECKED_CAST")
      @Throws(SSLPeerUnverifiedException::class)
      override fun getPeerCertificates(): Array<Certificate> {
        return if (certificates.isEmpty()) {
          throw SSLPeerUnverifiedException("peer not authenticated")
        } else {
          certificates as Array<Certificate>
        }
      }
    
      @Throws(
        SSLPeerUnverifiedException::class,
      )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

        @Override public Response intercept(Chain chain) throws IOException {
          for (Certificate certificate : chain.connection().handshake().peerCertificates()) {
            String pin = CertificatePinner.pin(certificate);
            if (denylist.contains(pin)) {
              throw new IOException("Denylisted peer certificate: " + pin);
            }
          }
          return chain.proceed(chain.request());
        }
      };
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  6. internal/kms/kes.go

    	}
    	go func() {
    		if config.Certificate == nil || config.ReloadCertEvents == nil {
    			return
    		}
    		var prevCertificate tls.Certificate
    		for {
    			certificate, ok := <-config.ReloadCertEvents
    			if !ok {
    				return
    			}
    			sameCert := len(certificate.Certificate) == len(prevCertificate.Certificate)
    			for i, b := range certificate.Certificate {
    				if !sameCert {
    					break
    				}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

        }
      }
    
      fun verify(
        host: String,
        certificate: X509Certificate,
      ): Boolean {
        return when {
          host.canParseAsIpAddress() -> verifyIpAddress(host, certificate)
          else -> verifyHostname(host, certificate)
        }
      }
    
      /** Returns true if [certificate] matches [ipAddress]. */
      private fun verifyIpAddress(
        ipAddress: String,
        certificate: X509Certificate,
      ): Boolean {
    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)
  8. okhttp/src/test/java/okhttp3/CertificateChainCleanerTest.kt

        assertThat(cleaner.clean(certificates, "hostname")).isEqualTo(certificates)
        assertThat(cleaner.clean(certificates.subList(0, 9), "hostname")).isEqualTo(
          certificates,
        )
      }
    
      @Test
      fun chainTooLong() {
        val heldCertificates = chainOfLength(11)
        val certificates: MutableList<Certificate> = ArrayList()
        for (heldCertificate in heldCertificates) {
          certificates.add(heldCertificate.certificate)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. cmd/sts-handlers.go

    	// configured expiry and the duration until the certificate itself
    	// expires.
    	// We must not issue credentials that out-live the certificate.
    	if validUntil := time.Until(certificate.NotAfter); validUntil < expiry {
    		expiry = validUntil
    	}
    
    	// Associate any service accounts to the certificate CN
    	parentUser := "tls:" + certificate.Subject.CommonName
    
    	claims[expClaim] = UTCNow().Add(expiry).Unix()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  10. cmd/common-main.go

    				}
    				return certificate, nil
    			}
    
    			reloadCertEvents := make(chan tls.Certificate, 1)
    			certificate, err := certs.NewCertificate(env.Get(kms.EnvKESClientCert, ""), env.Get(kms.EnvKESClientKey, ""), loadX509KeyPair)
    			if err != nil {
    				logger.Fatal(err, "Failed to load KES client certificate")
    			}
    			certificate.Watch(context.Background(), 15*time.Minute, syscall.SIGHUP)
    			certificate.Notify(reloadCertEvents)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
Back to top