From 532b84a221804697c9d2e72e0bc3ca5d886e0e56 Mon Sep 17 00:00:00 2001 From: Lukas Burkhalter Date: Thu, 24 Sep 2026 15:49:53 +0200 Subject: [PATCH 1/2] test: Do no assert exact size in compression tests --- crypto/message_test.go | 12 +++++++++++- crypto/sessionkey_test.go | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/crypto/message_test.go b/crypto/message_test.go index 4bde133f..d751e701 100644 --- a/crypto/message_test.go +++ b/crypto/message_test.go @@ -164,7 +164,17 @@ func TestTextMessageEncryptionWithCompression(t *testing.T) { t.Fatal("Expected no error when splitting, got:", err) } - assert.Len(t, split.GetBinaryDataPacket(), 117) // Assert uncompressed encrypted body length + uncompressedCiphertext, err := keyRingTestPublic.Encrypt(message, nil) + if err != nil { + t.Fatal("Expected no error when encrypting, got:", err) + } + + uncompressedSplit, err := uncompressedCiphertext.SplitMessage() + if err != nil { + t.Fatal("Expected no error when splitting, got:", err) + } + + assert.Less(t, len(split.GetBinaryDataPacket()), len(uncompressedSplit.GetBinaryDataPacket())) decrypted, err := keyRingTestPrivate.Decrypt(ciphertext, nil, 0) if err != nil { diff --git a/crypto/sessionkey_test.go b/crypto/sessionkey_test.go index 64a42c67..afd9ebd5 100644 --- a/crypto/sessionkey_test.go +++ b/crypto/sessionkey_test.go @@ -329,7 +329,12 @@ func TestDataPacketEncryptionWithCompression(t *testing.T) { t.Fatal("Expected no error when encrypting, got:", err) } - assert.Len(t, dataPacket, 117) // Assert compressed encrypted body length + uncompressedDataPacket, err := testSessionKey.Encrypt(message) + if err != nil { + t.Fatal("Expected no error when encrypting, got:", err) + } + + assert.Less(t, len(dataPacket), len(uncompressedDataPacket)) // Decrypt data with the good session key decrypted, err := testSessionKey.Decrypt(dataPacket) From 0c3907f562656bec361e6e4b830d325eb681860d Mon Sep 17 00:00:00 2001 From: Lukas Burkhalter Date: Thu, 24 Sep 2026 15:51:24 +0200 Subject: [PATCH 2/2] ci: Update ios xcode version --- .github/workflows/ios.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index ab6a3987..ae085a55 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -12,10 +12,10 @@ jobs: runs-on: macos-latest steps: - - name: Set up xcode 16.0 + - name: Set up xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: 16.0.0 + xcode-version: 26.0.1 id: xcode - name: Set up Go 1.x