Skip to content

Commit

Permalink
feat: Remove third party library for certificate decoding (WPB-6765) …
Browse files Browse the repository at this point in the history
…- cherrypick (#2565)

* feat: Remove third party library for certificate decoding (WPB-6765) (#2557)

* feat: remove third party library for certificate decoding

* chore: detekt

* chore: unit test
  • Loading branch information
ohassine authored Mar 1, 2024
1 parent 98ca20e commit 42f2f69
Show file tree
Hide file tree
Showing 31 changed files with 434 additions and 846 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ class MLSClientImpl(
value.domain,
value.certificate,
toDeviceStatus(value.status),
value.thumbprint
value.thumbprint,
value.serialNumber
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ data class WireIdentity(
val domain: String,
val certificate: String,
val status: CryptoCertificateStatus,
val thumbprint: String
val thumbprint: String,
val serialNumber: String
)

enum class CryptoCertificateStatus {
Expand Down
4 changes: 0 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ faker = "1.15.0"
robolectric = "4.9"
stately = "2.0.6"
micrometer = "1.11.3"
bouncy-castle = "1.70"
konsist = "0.13.0"
postgres = "1.0.2.RELEASE"
r2dbc = "1.0.0.RELEASE"
Expand Down Expand Up @@ -213,6 +212,3 @@ jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
kermit = { module = "co.touchlab:kermit", version.ref = "kermit" }
micrometer = { module = "io.micrometer:micrometer-registry-prometheus", version.ref = "micrometer" }
slf4js = { module = "org.slf4j:slf4j-simple", version.ref = "slf4js" }

# bouncy castle
bouncy-castle = { module = "org.bouncycastle:bcprov-jdk15on", version.ref = "bouncy-castle" }
1 change: 0 additions & 1 deletion logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ kotlin {
dependencies {
implementation(libs.jna)
implementation(libs.coreCryptoJvm)
implementation(libs.bouncy.castle)
}
}
val jvmTest by getting {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/

package com.wire.kalium.logic.feature.e2ei

import com.wire.kalium.cryptography.CryptoCertificateStatus

actual interface CertificateStatusChecker {
actual fun status(notAfterTimestamp: Long, certificateStatus: CryptoCertificateStatus): CertificateStatus
interface CertificateStatusMapper {
fun toCertificateStatus(certificateStatus: CryptoCertificateStatus): CertificateStatus
}

actual class CertificateStatusCheckerImpl : CertificateStatusChecker {
override fun status(notAfterTimestamp: Long, certificateStatus: CryptoCertificateStatus): CertificateStatus {
TODO("Not yet implemented")
}
class CertificateStatusMapperImpl : CertificateStatusMapper {
override fun toCertificateStatus(certificateStatus: CryptoCertificateStatus): CertificateStatus =
when (certificateStatus) {
CryptoCertificateStatus.EXPIRED -> CertificateStatus.EXPIRED
CryptoCertificateStatus.REVOKED -> CertificateStatus.REVOKED
CryptoCertificateStatus.VALID -> CertificateStatus.VALID
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
package com.wire.kalium.logic.feature.e2ei

data class E2eiCertificate(
val issuer: String = "",
val status: CertificateStatus = CertificateStatus.EXPIRED,
val serialNumber: String = "",
val certificateDetail: String = ""
val status: CertificateStatus,
val serialNumber: String,
val certificateDetail: String
)

This file was deleted.

This file was deleted.

Loading

0 comments on commit 42f2f69

Please sign in to comment.