- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for toDer (0.05 sec)
-
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt
assertThat(adapter.fromDer(bytes)).isEqualTo(sequenceOf) assertThat(adapter.toDer(sequenceOf)).isEqualTo(bytes) } @Test fun `point with only x set`() { val bytes = "3003800109".decodeHex() val point = Point(9L, null) assertThat(Point.ADAPTER.fromDer(bytes)).isEqualTo(point) assertThat(Point.ADAPTER.toDer(point)).isEqualTo(bytes) } @Test fun `point with only y set`() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 31.7K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt
) return choice to choice.fromDer(reader) } override fun toDer( writer: DerWriter, value: Pair<DerAdapter<*>, Any?>, ) { val (adapter, v) = value (adapter as DerAdapter<Any?>).toDer(writer, v) } override fun toString(): String = choices.joinToString(separator = " OR ") } } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 15K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt
@Test fun `time before 2050 uses UTC_TIME`() { val utcTimeDer = "170d3439313233313233353935395a".decodeHex() val decoded = CertificateAdapters.time.fromDer(utcTimeDer) val encoded = CertificateAdapters.time.toDer(decoded) assertThat(decoded).isEqualTo(date("2049-12-31T23:59:59.000+0000").time) assertThat(encoded).isEqualTo(utcTimeDer) } @Test fun `time not before 2050 uses GENERALIZED_TIME`() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 43.9K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt
} } override fun toDer( writer: DerWriter, value: Long, ) { // [1950-01-01T00:00:00..2050-01-01T00:00:00Z) if (value in -631_152_000_000L until 2_524_608_000_000L) { Adapters.UTC_TIME.toDer(writer, value) } else { Adapters.GENERALIZED_TIME.toDer(writer, value) } } } /** * ```
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.6K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
// Signature. val signature = Signature.getInstance(tbsCertificate.signatureAlgorithmName).run { initSign(issuerKeyPair.private) update(CertificateAdapters.tbsCertificate.toDer(tbsCertificate).toByteArray()) sign().toByteString() } // Complete signed certificate. val certificate = Certificate( tbsCertificate = tbsCertificate,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.6K bytes - Viewed (0)