Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for generateCertificates (0.2 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)
    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/main/kotlin/okhttp3/tls/Certificates.kt

     * ```
     */
    fun String.decodeCertificatePem(): X509Certificate {
      try {
        val certificateFactory = CertificateFactory.getInstance("X.509")
        val certificates =
          certificateFactory
            .generateCertificates(
              Buffer().writeUtf8(this).inputStream(),
            )
    
        return certificates.single() as X509Certificate
      } catch (nsee: NoSuchElementException) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (2)
  3. okhttp/src/main/kotlin/okhttp3/Cache.kt

              val bytes = Buffer()
              val certificateBytes = line.decodeBase64() ?: throw IOException("Corrupt certificate in cache entry")
              bytes.write(certificateBytes)
              result.add(certificateFactory.generateCertificate(bytes.inputStream()))
            }
            return result
          } catch (e: CertificateException) {
            throw IOException(e.message)
          }
        }
    
        @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

        assertThat("www.nintendo.co.jp".canParseAsIpAddress()).isFalse()
      }
    
      private fun certificate(certificate: String): X509Certificate {
        return CertificateFactory.getInstance("X.509")
          .generateCertificate(ByteArrayInputStream(certificate.toByteArray()))
          as X509Certificate
      }
    
      private fun session(certificate: String): SSLSession = FakeSSLSession(certificate(certificate))
    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)
  5. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

                  "-----END CERTIFICATE-----";
    
          CertificateFactory cf = CertificateFactory.getInstance("X.509");
          Certificate isgCertificate = cf.generateCertificate(new ByteArrayInputStream(isgCert.getBytes("UTF-8")));
    
          HandshakeCertificates certificates = new HandshakeCertificates.Builder()
                  .addTrustedCertificate((X509Certificate) isgCertificate)
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Nov 17 07:40:31 GMT 2020
    - 6.1K bytes
    - Viewed (0)
Back to top