From cc0c8022e3a0802a7b6aba4abf8831a73c96bcb4 Mon Sep 17 00:00:00 2001 From: Jacob Persson <7156+typfel@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:34:48 +0100 Subject: [PATCH] build: release 2.0.0 --- CHANGELOG.md | 82 +++++++++++++++++++++++++++ Cargo.lock | 22 +++---- crypto-attributes/Cargo.toml | 2 +- crypto-ffi/Cargo.toml | 2 +- crypto-ffi/bindings/gradle.properties | 2 +- crypto/Cargo.toml | 2 +- interop/Cargo.toml | 2 +- keystore-dump/Cargo.toml | 2 +- keystore/Cargo.toml | 2 +- mls-provider/Cargo.toml | 2 +- package.json | 2 +- 11 files changed, 102 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c09212c89c..677ad72389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,87 @@ # Changelog +## v2.0.0 - 2024-12-02 + +### Highlights + +- The number of public errors has been reduced and simplified. It's no longer necessary to use the + `proteus_last_error_code` function, since thrown error should contain all the information. +- The logger callback now includes an additional context parameter which contains additional context + for a log event in the form of a JSON Object string. +- It's now possible to change the logger and log level at runtime (see `setLogLevel` and `setLogger`). + +### Breaking changes + +- Dropped support for `i686-linux-android` target. +- `CoreCryptoLogger` takes an additional `context` parameter. +- `CoreCryptoError` and its child errors have been refactored to reduce the amount of error we expose and provide explicit + errors for Proteus errors. The errors we have removed will appear under the `Other` case. + ``` + enum ProteusError { + SessionNotFound, + DuplicateMessage, + RemoteIdentityChanged, + Other(Int), + } + + pub enum MlsError { + ConversationAlreadyExists, + DuplicateMessage, + BufferedFutureMessage, + WrongEpoch, + MessageEpochTooOld, + SelfCommitIgnored, + UnmergedPendingGroup, + StaleProposal, + StaleCommit, + Other(String) + } + ``` + +### Features + +- include the message of the source error when bundling errors together [WPB-14614] (16bc6e6) +- refactor non-WASM error types (9d41c11) +- proteus error codes are `Option` not `u32` outside wasm also (52547a0) +- refactor WASM error types (31c860a) +- proteus error codes are `Option` not `u32` (838c1ce) +- add logging for following the changes in mls groups WPB-11544 (8cc0e7f) +- support logs with a context of key/value pairs (b6ef534) +- disambiguate `WrongEpoch` [WPB-14351] (e6a5e01) +- support changing the logger and log level at runtime WPB-11541 (cd071f0) +- add helper to extract data from within a transaction (c852363) +- relax `Debug` trait bound on `CoreCryptoCommand` and add Rust helper [WPB-12132] (e952a0f) + +### Bug Fixes + +- bump ios deployment target to 15.0 to fix linker issue (1327b1b) +- improve errors when hitting an idb error during IndexedDB migration (0c0c954) +- don't obfuscate rexie error in keystore v1.0.0 (6ed43e6) +- improve errors when hitting a indexdb error during cryptobox migration (682bd9a) +- build without error without default features (97e2d24) + +### Documentation + +- improve platform-specific test instructions (a08a3b2) +- improve naming and documentation for `TransactionHelper` (e8b4756) + +### Testing + +- cause jvm kotlin tests to pass (3b8d930) +- fixup tests broken by recent changes (59db9ed) +- change test for build metadata to achieve closer parity with the kotlin test (ffd4e02) +- use wdio where `bun test` was used previously (9c67569) +- use util functions, migrate tests from puppeteer to wdio [WPB-12176] (fbff47a) +- add test util functions [WPB-12176] (196c877) +- crypto: use world.com instead of wire.com [WPB-14356] (6edcef7) +- crypto: use explicit functions to create certificate bundles [WPB-14356] (c52b9b6) +- crypto: remove From impls for CertificateBundle [WPB-14356] (2f59009) +- add js test for for logs with context data (600ba7c) +- add test that build metadata is available in kotlin via uniffi (87c3ab9) +- add test that build metadata is available in ts (4aa18e6) +- add js binding test verifying that we can replace a logger (30d9db7) +- update js tests after renaming initLogger to setLogger (1c1c949) + ## v1.1.2 - 2024-11-27 ### Bug Fixes diff --git a/Cargo.lock b/Cargo.lock index 4a144dc37c..7616762ab4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -588,7 +588,7 @@ dependencies = [ [[package]] name = "certval" version = "0.1.4" -source = "git+https://github.com/wireapp/rust-pki.git?branch=wire/stable#b08b3f97fd75131b366b0bbcc42811a21887e602" +source = "git+https://github.com/wireapp/rust-pki.git?branch=wire%2Fstable#b08b3f97fd75131b366b0bbcc42811a21887e602" dependencies = [ "cfg-if", "ciborium", @@ -906,7 +906,7 @@ dependencies = [ [[package]] name = "core-crypto" -version = "1.1.0" +version = "2.0.0" dependencies = [ "anyhow", "async-fs", @@ -969,7 +969,7 @@ dependencies = [ [[package]] name = "core-crypto-attributes" -version = "1.1.0" +version = "2.0.0" dependencies = [ "proc-macro2", "quote", @@ -978,7 +978,7 @@ dependencies = [ [[package]] name = "core-crypto-ffi" -version = "1.1.0" +version = "2.0.0" dependencies = [ "async-lock", "async-trait", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "core-crypto-keystore" -version = "1.1.0" +version = "2.0.0" dependencies = [ "aes-gcm", "async-fs", @@ -2591,7 +2591,7 @@ dependencies = [ [[package]] name = "interop" -version = "1.1.0" +version = "2.0.0" dependencies = [ "async-trait", "base64 0.22.1", @@ -2750,7 +2750,7 @@ dependencies = [ [[package]] name = "keystore-dump" -version = "1.1.0" +version = "2.0.0" dependencies = [ "chrono", "clap", @@ -2949,7 +2949,7 @@ dependencies = [ [[package]] name = "mls-crypto-provider" -version = "1.1.0" +version = "2.0.0" dependencies = [ "aes-gcm", "async-lock", @@ -3494,7 +3494,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "pkiprocmacros" version = "0.1.2" -source = "git+https://github.com/wireapp/rust-pki.git?branch=wire/stable#b08b3f97fd75131b366b0bbcc42811a21887e602" +source = "git+https://github.com/wireapp/rust-pki.git?branch=wire%2Fstable#b08b3f97fd75131b366b0bbcc42811a21887e602" dependencies = [ "proc-macro2", "quote", @@ -3646,7 +3646,7 @@ dependencies = [ [[package]] name = "proteus" version = "1.0.3" -source = "git+https://github.com/wireapp/proteus?branch=otak/fix-1.0.3#f3cd17da5f788d243a17bf624be71794358724f8" +source = "git+https://github.com/wireapp/proteus?branch=otak%2Ffix-1.0.3#f3cd17da5f788d243a17bf624be71794358724f8" dependencies = [ "cbor-codec 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "hkdf 0.3.2", diff --git a/crypto-attributes/Cargo.toml b/crypto-attributes/Cargo.toml index e93790458f..1346048c09 100644 --- a/crypto-attributes/Cargo.toml +++ b/crypto-attributes/Cargo.toml @@ -2,7 +2,7 @@ name = "core-crypto-attributes" description = "Macros for core-crypto" repository = "https://github.com/wireapp/core-crypto" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" diff --git a/crypto-ffi/Cargo.toml b/crypto-ffi/Cargo.toml index ba8b8a4e81..931a89364b 100644 --- a/crypto-ffi/Cargo.toml +++ b/crypto-ffi/Cargo.toml @@ -2,7 +2,7 @@ name = "core-crypto-ffi" description = "Platform-specific bindings (Android, iOS, WASM) for CoreCrypto" repository = "https://github.com/wireapp/core-crypto" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" publish = false diff --git a/crypto-ffi/bindings/gradle.properties b/crypto-ffi/bindings/gradle.properties index 57c48dd396..7ae6dab378 100644 --- a/crypto-ffi/bindings/gradle.properties +++ b/crypto-ffi/bindings/gradle.properties @@ -15,7 +15,7 @@ kotlin.code.style=official # gradle-maven-publish configuration GROUP=com.wire -VERSION_NAME=1.1.0 +VERSION_NAME=2.0.0 SONATYPE_HOST=DEFAULT SONATYPE_AUTOMATIC_RELEASE=true RELEASE_SIGNING_ENABLED=true diff --git a/crypto/Cargo.toml b/crypto/Cargo.toml index a0a2b9c2e1..407b88bec3 100644 --- a/crypto/Cargo.toml +++ b/crypto/Cargo.toml @@ -2,7 +2,7 @@ name = "core-crypto" description = "Abstraction over OpenMLS with persistent keystore" repository = "https://github.com/wireapp/core-crypto" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" publish = false diff --git a/interop/Cargo.toml b/interop/Cargo.toml index 1a63dcbc1c..8946a1348e 100644 --- a/interop/Cargo.toml +++ b/interop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "interop" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" diff --git a/keystore-dump/Cargo.toml b/keystore-dump/Cargo.toml index a4ae3a0456..863a3e4b02 100644 --- a/keystore-dump/Cargo.toml +++ b/keystore-dump/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "keystore-dump" description = "Dumps a keystore to JSON on stdout" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" diff --git a/keystore/Cargo.toml b/keystore/Cargo.toml index e7985f4d2b..86215760e6 100644 --- a/keystore/Cargo.toml +++ b/keystore/Cargo.toml @@ -2,7 +2,7 @@ name = "core-crypto-keystore" description = "Encrypted keystore with support for OpenMLS and Proteus" repository = "https://github.com/wireapp/core-crypto" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" publish = false diff --git a/mls-provider/Cargo.toml b/mls-provider/Cargo.toml index c912f35dce..59cf96e007 100644 --- a/mls-provider/Cargo.toml +++ b/mls-provider/Cargo.toml @@ -2,7 +2,7 @@ name = "mls-crypto-provider" description = "MLS Crypto Provider wrapping core-crypto-keystore" repository = "https://github.com/wireapp/core-crypto" -version = "1.1.0" +version = "2.0.0" edition = "2021" license = "GPL-3.0-only" publish = false diff --git a/package.json b/package.json index 51c1034429..18263edec7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wireapp/core-crypto", - "version": "1.1.0", + "version": "2.0.0", "description": "CoreCrypto bindings for the Web", "type": "module", "module": "platforms/web/corecrypto.js",