Skip to content

Commit

Permalink
update client cert TTL to 30 days instead of 180 (#146)
Browse files Browse the repository at this point in the history
* update client cert TTL to 30 days instead of 180
  • Loading branch information
gadphly authored Jul 13, 2023
1 parent 74b2d19 commit 85a4473
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[libraries]
android-gradle-plugin = { module = "com.android.tools.build:gradle", version = "7.4.2" }
android-gradle-plugin = { module = "com.android.tools.build:gradle", version = "7.4.0-beta02" }
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.7.20" }
mavenPublish-gradle-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.23.2" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version = "1.7.10" }
Expand Down
6 changes: 2 additions & 4 deletions jvm/src/main/kotlin/app/cash/trifle/CertificateRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ sealed interface CertificateRequest {
companion object {
internal const val MOBILE_CERTIFICATE_REQUEST_VERSION: Int = 0

// Validity time for device-certificate, currently scoped to 180 days, based entirely on
// intuition. This is not currently used, and should be configurable by the client when usage is
// desired.
internal const val MOBILE_CERTIFICATE_VALIDITY_PERIOD_DAYS: Int = 180
// Validity time for device-certificate, currently scoped to 30 days
internal const val MOBILE_CERTIFICATE_VALIDITY_PERIOD_DAYS: Int = 30

/**
* Converts the given serialized MobileCertRequest into a CertificateRequest. This enables clients
Expand Down
2 changes: 1 addition & 1 deletion jvm/src/test/kotlin/app/cash/trifle/TrifleTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal class TrifleTest {
.minusMillis(certHolder.notBefore.toInstant().toEpochMilli())
.toEpochMilli()
)
assertEquals(180, duration.toDays())
assertEquals(30, duration.toDays())
}

@Test
Expand Down

0 comments on commit 85a4473

Please sign in to comment.