Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update CC to rc.56.hotfix.2 #2737

Merged
merged 5 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ actual suspend fun coreCryptoCentral(
): CoreCryptoCentral {
val path = "$rootDir/${CoreCryptoCentralImpl.KEYSTORE_NAME}"
File(rootDir).mkdirs()
val coreCrypto = coreCryptoDeferredInit(path, databaseKey, allowedCipherSuites, null)
val coreCrypto = coreCryptoDeferredInit(path, databaseKey)
coreCrypto.setCallbacks(Callbacks())
return CoreCryptoCentralImpl(
cc = coreCrypto,
Expand All @@ -46,12 +46,12 @@ actual suspend fun coreCryptoCentral(

private class Callbacks : CoreCryptoCallbacks {

override fun authorize(conversationId: ByteArray, clientId: ClientId): Boolean {
override suspend fun authorize(conversationId: ByteArray, clientId: ClientId): Boolean {
ohassine marked this conversation as resolved.
Show resolved Hide resolved
// We always return true because our BE is currently enforcing that this constraint is always true
return true
}

override fun clientIsExistingGroupUser(
override suspend fun clientIsExistingGroupUser(
conversationId: ConversationId,
clientId: ClientId,
existingClients: List<ClientId>,
Expand All @@ -61,7 +61,7 @@ private class Callbacks : CoreCryptoCallbacks {
return true
}

override fun userAuthorize(
override suspend fun userAuthorize(
conversationId: ConversationId,
externalClientId: ClientId,
existingClients: List<ClientId>
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pbandk = "0.14.2"
turbine = "1.0.0"
avs = "9.6.13"
jna = "5.14.0"
core-crypto = "1.0.0-rc.56-hotfix.1"
core-crypto = "1.0.0-rc.59"
core-crypto-multiplatform = "0.6.0-rc.3-multiplatform-pre1"
completeKotlin = "1.1.0"
desugar-jdk = "2.0.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ import uniffi.core_crypto.CryptoError
actual fun mapMLSException(exception: Exception): MLSFailure =
if (exception is CoreCryptoException.CryptoException) {
when (exception.error) {
is CryptoError.WrongEpoch -> MLSFailure.WrongEpoch
is CryptoError.DuplicateMessage -> MLSFailure.DuplicateMessage
is CryptoError.BufferedFutureMessage -> MLSFailure.BufferedFutureMessage
is CryptoError.SelfCommitIgnored -> MLSFailure.SelfCommitIgnored
is CryptoError.UnmergedPendingGroup -> MLSFailure.UnmergedPendingGroup
is CryptoError.StaleProposal -> MLSFailure.StaleProposal
is CryptoError.StaleCommit -> MLSFailure.StaleCommit
is CryptoError.ConversationAlreadyExists -> MLSFailure.ConversationAlreadyExists
is CryptoError.MessageEpochTooOld -> MLSFailure.MessageEpochTooOld
CryptoError.WRONG_EPOCH -> MLSFailure.WrongEpoch
CryptoError.DUPLICATE_MESSAGE -> MLSFailure.DuplicateMessage
CryptoError.BUFFERED_FUTURE_MESSAGE -> MLSFailure.BufferedFutureMessage
CryptoError.SELF_COMMIT_IGNORED -> MLSFailure.SelfCommitIgnored
CryptoError.UNMERGED_PENDING_GROUP -> MLSFailure.UnmergedPendingGroup
CryptoError.STALE_PROPOSAL -> MLSFailure.StaleProposal
CryptoError.STALE_COMMIT -> MLSFailure.StaleCommit
CryptoError.CONVERSATION_ALREADY_EXISTS -> MLSFailure.ConversationAlreadyExists
CryptoError.MESSAGE_EPOCH_TOO_OLD -> MLSFailure.MessageEpochTooOld
else -> MLSFailure.Generic(exception)
}
} else {
Expand Down
Loading