Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 74 for certifikat (0.18 sec)

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

        val data = CertificateAdapters.certificate.toDer(this)
        try {
          val certificateFactory = CertificateFactory.getInstance("X.509")
          val certificates = certificateFactory.generateCertificates(Buffer().write(data).inputStream())
          return certificates.single() as X509Certificate
        } catch (e: NoSuchElementException) {
          throw IllegalArgumentException("failed to decode certificate", e)
        } catch (e: IllegalArgumentException) {
    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)
  2. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

        val certificate = heldCertificate.certificate
        assertThat(certificate.getSubjectX500Principal().name, "self-signed")
          .isEqualTo(certificate.getIssuerX500Principal().name)
        assertThat(certificate.getIssuerX500Principal().name).matches(Regex("CN=[0-9a-f-]{36}"))
        assertThat(certificate.serialNumber).isEqualTo(BigInteger.ONE)
        assertThat(certificate.subjectAlternativeNames).isNull()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  3. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

    import okhttp3.OkHttpClient;
    import okhttp3.Protocol;
    import okhttp3.Request;
    import okhttp3.Response;
    import org.junit.Test;
    import org.junit.runner.RunWith;
    
    import java.io.IOException;
    import java.security.cert.Certificate;
    import java.security.cert.X509Certificate;
    
    import static org.junit.Assert.assertEquals;
    import static org.junit.Assert.assertTrue;
    
    /**
     * Simple test adaptable to show a failure in older versions of OkHttp
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

    import okhttp3.mockwebserver.MockResponse;
    import okhttp3.mockwebserver.MockWebServer;
    import okhttp3.tls.HandshakeCertificates;
    import okhttp3.tls.HeldCertificate;
    
    /**
     * Create an HTTPS server with a self-signed certificate that OkHttp trusts.
     */
    public class HttpsServer {
      public void run() throws Exception {
        HeldCertificate localhostCertificate = new HeldCertificate.Builder()
            .addSubjectAlternativeName("localhost")
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  5. docs/changelogs/changelog_4x.md

    
    ## Version 4.2.0
    
    _2019-09-10_
    
     *  New: API to decode a certificate and private key to create a `HeldCertificate`. This accepts a
        string containing both a certificate and PKCS #8-encoded private key.
    
        ```kotlin
        val heldCertificate = HeldCertificate.decode("""
            |-----BEGIN CERTIFICATE-----
            |MIIBYTCCAQegAwIBAgIBKjAKBggqhkjOPQQDAjApMRQwEgYDVQQLEwtlbmdpbmVl
    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)
  6. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
    
        val dns =
          Dns {
            Dns.SYSTEM.lookup(server.hostName)
          }
    
        val client =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        if (routes == null || !routeMatchesAny(routes)) return false
    
        // 3. This connection's server certificate's must cover the new host.
        if (address.hostnameVerifier !== OkHostnameVerifier) return false
        if (!supportsUrl(address.url)) return false
    
        // 4. Certificate pinning must match the host.
        try {
          address.certificatePinner!!.check(address.url.host, handshake()!!.peerCertificates)
    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)
  8. okhttp/src/test/java/okhttp3/OpenJSSETest.kt

            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
    
        client =
          client.newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    import okio.Buffer
    import okio.ByteString
    
    /**
     * Encode and decode a model object like a [Long] or [Certificate] as DER bytes.
     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
       * Returns a value from this adapter.
    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 (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        }
    
        private fun certificatesToString(certificates: Array<X509Certificate>): String {
          val result: MutableList<String> = ArrayList()
          for (certificate in certificates) {
            result.add(certificate.subjectDN.toString() + " " + certificate.serialNumber)
          }
          return result.toString()
        }
      }
    
      /**
    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)
Back to top