From fa6606183b2271528279a66bb98c6f11a03bfc94 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Tue, 16 Jan 2024 17:05:19 +0000 Subject: [PATCH 01/10] wip: update mls-test-cli --- integration/test/MLS/Util.hs | 2 +- integration/test/Test/MLS.hs | 5 ++--- libs/wire-api/test/unit/Test/Wire/API/MLS.hs | 2 +- nix/pkgs/mls-test-cli/default.nix | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/integration/test/MLS/Util.hs b/integration/test/MLS/Util.hs index 23686c5f18..670b430136 100644 --- a/integration/test/MLS/Util.hs +++ b/integration/test/MLS/Util.hs @@ -747,7 +747,7 @@ createApplicationMessage cid messageContent = do message <- mlscli cid - ["message", "--group-in", "", messageContent, "--group-out", ""] + ["message", "--group", "", messageContent, "--group-out", ""] Nothing pure diff --git a/integration/test/Test/MLS.hs b/integration/test/Test/MLS.hs index 4315b64f55..049d3d8d4a 100644 --- a/integration/test/Test/MLS.hs +++ b/integration/test/Test/MLS.hs @@ -319,9 +319,8 @@ testMLSProtocolUpgrade secondDomain = do resp.status `shouldMatchInt` 200 resp.json %. "protocol" `shouldMatch` "mls" --- TODO(leif): temporarily disabled to unblock client devs. Fix mls-test-cli and re-enable ASAP. -_testAddUserSimple :: HasCallStack => Ciphersuite -> CredentialType -> App () -_testAddUserSimple suite ctype = do +testAddUserSimple :: HasCallStack => Ciphersuite -> CredentialType -> App () +testAddUserSimple suite ctype = do setMLSCiphersuite suite [alice, bob] <- createAndConnectUsers [OwnDomain, OwnDomain] [alice1, bob1, bob2] <- traverse (createMLSClient def {credType = ctype}) [alice, bob, bob] diff --git a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs index b1f51f3b25..cb8c91f35c 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs @@ -130,7 +130,7 @@ testParseApplication = do msgData <- withSystemTempDirectory "mls" $ \tmp -> do void $ spawn (cli qcid tmp ["init", qcid]) Nothing groupJSON <- spawn (cli qcid tmp ["group", "create", "Zm9v"]) Nothing - spawn (cli qcid tmp ["message", "--group-in", "-", "hello"]) (Just groupJSON) + spawn (cli qcid tmp ["message", "--group", "-", "hello"]) (Just groupJSON) msg <- case decodeMLS' @Message msgData of Left err -> assertFailure (T.unpack err) diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index 9b755e9b6a..32fea1f6c5 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "wireapp"; repo = "mls-test-cli"; - rev = "baaa5c78411a5bf6d697803276b991523c111631"; - sha256 = "sha256-M6bWB5hWl+WSblcH6L+AyGD+7ef9TvRs8wKYq7lJyS8="; + rev = "c03e0f21a27f30a4aeb6381ffd43910a69b5dc19"; + sha256 = "sha256-BFdkGm+HUNaWbKu5p32C9oJXNo4wYDfYCG8OGAVZPDc="; }; pname = "mls-test-cli"; - version = "0.9.0"; + version = "0.10.2"; cargoLock = { lockFile = "${src}/Cargo.lock"; outputHashes = { "hpke-0.10.0" = "sha256-T1+BFwX6allljNZ/8T3mrWhOejnUU27BiWQetqU+0fY="; - "openmls-1.0.0" = "sha256-tAIm8+IgubNnU2M2A5cxHY5caiEQmisw73I9/cqfvUc="; + "openmls-1.0.0" = "sha256-s1ejM/aicFGvsKY7ajEun1Mc645/k8QVrE8YSbyD3Fg="; "safe_pqc_kyber-0.6.0" = "sha256-Ch1LA+by+ezf5RV0LDSQGC1o+IWKXk8IPvkwSrAos68="; "tls_codec-0.3.0" = "sha256-IO6tenXKkC14EoUDp/+DtFNOVzDfOlLu8K1EJI7sOzs="; }; From 0998d5b4c6b2c8241aee9ed99b67b75e87f03750 Mon Sep 17 00:00:00 2001 From: Leif Battermann Date: Wed, 17 Jan 2024 09:32:35 +0000 Subject: [PATCH 02/10] updated mls-test-cli --- nix/pkgs/mls-test-cli/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index 32fea1f6c5..14b24054f9 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -7,8 +7,8 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "wireapp"; repo = "mls-test-cli"; - rev = "c03e0f21a27f30a4aeb6381ffd43910a69b5dc19"; - sha256 = "sha256-BFdkGm+HUNaWbKu5p32C9oJXNo4wYDfYCG8OGAVZPDc="; + rev = "7d97772f52f8dfaae79d4c73de2e32b551d2d0bf"; + sha256 = "sha256-OU/bEz98Gh/HPVymGpoQ2K4ccpTZIV0xwsgEEnakOws="; }; pname = "mls-test-cli"; version = "0.10.2"; @@ -16,8 +16,8 @@ rustPlatform.buildRustPackage rec { lockFile = "${src}/Cargo.lock"; outputHashes = { "hpke-0.10.0" = "sha256-T1+BFwX6allljNZ/8T3mrWhOejnUU27BiWQetqU+0fY="; - "openmls-1.0.0" = "sha256-s1ejM/aicFGvsKY7ajEun1Mc645/k8QVrE8YSbyD3Fg="; - "safe_pqc_kyber-0.6.0" = "sha256-Ch1LA+by+ezf5RV0LDSQGC1o+IWKXk8IPvkwSrAos68="; + "openmls-1.0.0" = "sha256-nyIMAlTy7CTV0bVQ0ytamKHpERgtsVKTX4zv7aHzemo="; + "safe_pqc_kyber-0.6.2" = "sha256-9t+IIohCJcMIWRtqLA0idyMmjev82BtpST15Tthlge4="; "tls_codec-0.3.0" = "sha256-IO6tenXKkC14EoUDp/+DtFNOVzDfOlLu8K1EJI7sOzs="; }; }; From 218150c501adf2efd213ac1ef5e49f48f1328f1c Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Wed, 17 Jan 2024 14:23:17 +0000 Subject: [PATCH 03/10] temporary deactivate CipherSuite 0xf031 --- integration/test/Testlib/Env.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/test/Testlib/Env.hs b/integration/test/Testlib/Env.hs index 0593e78347..540ee47a31 100644 --- a/integration/test/Testlib/Env.hs +++ b/integration/test/Testlib/Env.hs @@ -164,7 +164,7 @@ emptyClientGroupState :: ClientGroupState emptyClientGroupState = ClientGroupState Nothing Nothing allCiphersuites :: [Ciphersuite] -allCiphersuites = map Ciphersuite ["0x0001", "0xf031"] +allCiphersuites = map Ciphersuite ["0x0001"] -- , "0xf031" mkMLSState :: Codensity IO MLSState mkMLSState = Codensity $ \k -> From f5b3016633640ee12b92d7a913c57a183277c7c4 Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Wed, 17 Jan 2024 14:38:33 +0000 Subject: [PATCH 04/10] fix linter --- integration/test/Testlib/Env.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/test/Testlib/Env.hs b/integration/test/Testlib/Env.hs index 540ee47a31..e4df95f881 100644 --- a/integration/test/Testlib/Env.hs +++ b/integration/test/Testlib/Env.hs @@ -164,7 +164,7 @@ emptyClientGroupState :: ClientGroupState emptyClientGroupState = ClientGroupState Nothing Nothing allCiphersuites :: [Ciphersuite] -allCiphersuites = map Ciphersuite ["0x0001"] -- , "0xf031" +allCiphersuites = [Ciphersuite "0x0001"] -- , "0xf031" mkMLSState :: Codensity IO MLSState mkMLSState = Codensity $ \k -> From 1b902e178e53f09685de408da26b7c256a79fc3c Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Thu, 18 Jan 2024 07:41:24 +0000 Subject: [PATCH 05/10] revert to mls-test-cli in branch sb/fix-client-id --- integration/test/MLS/Util.hs | 2 +- nix/pkgs/mls-test-cli/default.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration/test/MLS/Util.hs b/integration/test/MLS/Util.hs index 670b430136..23686c5f18 100644 --- a/integration/test/MLS/Util.hs +++ b/integration/test/MLS/Util.hs @@ -747,7 +747,7 @@ createApplicationMessage cid messageContent = do message <- mlscli cid - ["message", "--group", "", messageContent, "--group-out", ""] + ["message", "--group-in", "", messageContent, "--group-out", ""] Nothing pure diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index 14b24054f9..56216bf5b1 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -7,17 +7,17 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "wireapp"; repo = "mls-test-cli"; - rev = "7d97772f52f8dfaae79d4c73de2e32b551d2d0bf"; - sha256 = "sha256-OU/bEz98Gh/HPVymGpoQ2K4ccpTZIV0xwsgEEnakOws="; + rev = "93d42a76c5a5edfba4e6e1ef01830770fa1bc6bb"; + sha256 = "sha256-cQULHeVejXAtyPrZiEAlPGTlkx5E9QJFjQIxPn7LXdI="; }; pname = "mls-test-cli"; - version = "0.10.2"; + version = "0.9.1"; cargoLock = { lockFile = "${src}/Cargo.lock"; outputHashes = { "hpke-0.10.0" = "sha256-T1+BFwX6allljNZ/8T3mrWhOejnUU27BiWQetqU+0fY="; - "openmls-1.0.0" = "sha256-nyIMAlTy7CTV0bVQ0ytamKHpERgtsVKTX4zv7aHzemo="; - "safe_pqc_kyber-0.6.2" = "sha256-9t+IIohCJcMIWRtqLA0idyMmjev82BtpST15Tthlge4="; + "openmls-1.0.0" = "sha256-tAIm8+IgubNnU2M2A5cxHY5caiEQmisw73I9/cqfvUc="; + "safe_pqc_kyber-0.6.0" = "sha256-Ch1LA+by+ezf5RV0LDSQGC1o+IWKXk8IPvkwSrAos68="; "tls_codec-0.3.0" = "sha256-IO6tenXKkC14EoUDp/+DtFNOVzDfOlLu8K1EJI7sOzs="; }; }; From f61843bc5bb85aa53fecc7ab74e13fe7e933fac4 Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Thu, 18 Jan 2024 09:42:44 +0000 Subject: [PATCH 06/10] fixit! revert to mls-test-cli in branch sb/fix-client-id --- libs/wire-api/test/unit/Test/Wire/API/MLS.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs index cb8c91f35c..b1f51f3b25 100644 --- a/libs/wire-api/test/unit/Test/Wire/API/MLS.hs +++ b/libs/wire-api/test/unit/Test/Wire/API/MLS.hs @@ -130,7 +130,7 @@ testParseApplication = do msgData <- withSystemTempDirectory "mls" $ \tmp -> do void $ spawn (cli qcid tmp ["init", qcid]) Nothing groupJSON <- spawn (cli qcid tmp ["group", "create", "Zm9v"]) Nothing - spawn (cli qcid tmp ["message", "--group", "-", "hello"]) (Just groupJSON) + spawn (cli qcid tmp ["message", "--group-in", "-", "hello"]) (Just groupJSON) msg <- case decodeMLS' @Message msgData of Left err -> assertFailure (T.unpack err) From eeb6d670582d5368f427468161180f4b3db03819 Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Thu, 18 Jan 2024 10:08:24 +0000 Subject: [PATCH 07/10] fixit! revert to mls-test-cli in branch sb/fix-client-id --- nix/pkgs/mls-test-cli/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index 56216bf5b1..35590998cd 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -7,8 +7,8 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "wireapp"; repo = "mls-test-cli"; - rev = "93d42a76c5a5edfba4e6e1ef01830770fa1bc6bb"; - sha256 = "sha256-cQULHeVejXAtyPrZiEAlPGTlkx5E9QJFjQIxPn7LXdI="; + rev = "30417661eb4e006972ffbdbac80fce6ec64fa90e"; + sha256 = "sha256-VYSzPejf+Oc5goyxOqlZTwbPj6kqGM6eotefH4eskKE="; }; pname = "mls-test-cli"; version = "0.9.1"; @@ -16,8 +16,8 @@ rustPlatform.buildRustPackage rec { lockFile = "${src}/Cargo.lock"; outputHashes = { "hpke-0.10.0" = "sha256-T1+BFwX6allljNZ/8T3mrWhOejnUU27BiWQetqU+0fY="; - "openmls-1.0.0" = "sha256-tAIm8+IgubNnU2M2A5cxHY5caiEQmisw73I9/cqfvUc="; - "safe_pqc_kyber-0.6.0" = "sha256-Ch1LA+by+ezf5RV0LDSQGC1o+IWKXk8IPvkwSrAos68="; + "openmls-1.0.0" = "sha256-nyIMAlTy7CTV0bVQ0ytamKHpERgtsVKTX4zv7aHzemo="; + "safe_pqc_kyber-0.6.2" = "sha256-9t+IIohCJcMIWRtqLA0idyMmjev82BtpST15Tthlge4="; "tls_codec-0.3.0" = "sha256-IO6tenXKkC14EoUDp/+DtFNOVzDfOlLu8K1EJI7sOzs="; }; }; From 5db40909e3d15e906d901d7b6df7fbab483e2354 Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Thu, 18 Jan 2024 15:08:30 +0000 Subject: [PATCH 08/10] fixit! revert to mls-test-cli in branch sb/fix-client-id --- nix/pkgs/mls-test-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index 35590998cd..e19db7dccd 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -7,8 +7,8 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "wireapp"; repo = "mls-test-cli"; - rev = "30417661eb4e006972ffbdbac80fce6ec64fa90e"; - sha256 = "sha256-VYSzPejf+Oc5goyxOqlZTwbPj6kqGM6eotefH4eskKE="; + rev = "a18470061977211ecf81911de0f2632eefc81efd"; + sha256 = "sha256-HgwR6vuVL3eN7NVox+iClPxqsat3Znc9+ZtENuEJKSU="; }; pname = "mls-test-cli"; version = "0.9.1"; From 62b89da2caba8ab26363d7818786b2fd8881a7a5 Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Thu, 18 Jan 2024 15:50:27 +0000 Subject: [PATCH 09/10] fixit! revert to mls-test-cli in branch sb/fix-client-id --- integration/test/Testlib/Env.hs | 2 +- nix/pkgs/mls-test-cli/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/test/Testlib/Env.hs b/integration/test/Testlib/Env.hs index e4df95f881..fdcf7bc5ab 100644 --- a/integration/test/Testlib/Env.hs +++ b/integration/test/Testlib/Env.hs @@ -164,7 +164,7 @@ emptyClientGroupState :: ClientGroupState emptyClientGroupState = ClientGroupState Nothing Nothing allCiphersuites :: [Ciphersuite] -allCiphersuites = [Ciphersuite "0x0001"] -- , "0xf031" +allCiphersuites = [Ciphersuite "0x0001"] -- TODO fix testsMLS.testAddUserSimple for "0xf031" mkMLSState :: Codensity IO MLSState mkMLSState = Codensity $ \k -> diff --git a/nix/pkgs/mls-test-cli/default.nix b/nix/pkgs/mls-test-cli/default.nix index e19db7dccd..65166a8db8 100644 --- a/nix/pkgs/mls-test-cli/default.nix +++ b/nix/pkgs/mls-test-cli/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-HgwR6vuVL3eN7NVox+iClPxqsat3Znc9+ZtENuEJKSU="; }; pname = "mls-test-cli"; - version = "0.9.1"; + version = "0.10.3"; cargoLock = { lockFile = "${src}/Cargo.lock"; outputHashes = { From fc998d3ebc16b8a92dbc406ff85e5191398f9408 Mon Sep 17 00:00:00 2001 From: Stefan Berthold Date: Thu, 18 Jan 2024 16:42:46 +0000 Subject: [PATCH 10/10] hi ci