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

Patch v0.32.1 #16

Merged
merged 124 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
9eb3483
Add MP4 format sanitizer
jessa0 Mar 13, 2023
a27fc0c
java: Allow Unicode characters in javadocs
jrose-signal Apr 26, 2023
ec649f7
Fix disabling error-stack/std on nightly
jessa0 Apr 26, 2023
d9feb9d
protocol: Distinguish pre-key ID 0 from "no one-time pre-key"
jrose-signal May 2, 2023
f8e67a6
Derive Debug for CiphertextMessage
moiseev-signal May 2, 2023
0e74a41
bridge: Put signal-media behind a feature flag, off for iOS by default
jrose-signal Apr 28, 2023
2b46ae1
Implement incremental MAC
moiseev-signal May 9, 2023
ff09619
Add Kyber KEM and implement PQXDH protocol
rolfeschmidt May 9, 2023
0e2f87f
Bump to version v0.24.0
moiseev-signal May 10, 2023
806ceb9
Update boring for a newer version of BoringSSL
jrose-signal May 11, 2023
c70f19d
attest: update svr2 constants
ravi-signal May 11, 2023
1a1e8e0
attest: mark svr2 apis ready for use
ravi-signal May 11, 2023
a196fb8
Bump to version v0.25.0
ravi-signal May 17, 2023
b0a1bf2
Make javac treat sources as UTF-8
moiseev-signal May 10, 2023
28e112b
Add PQXDH tests
moiseev-signal May 23, 2023
c0a8e34
add missing throws declarations on KEM*Key constructors
jkt-signal May 23, 2023
f89d43f
Fix zkgroup benchmark
moiseev-signal May 24, 2023
e8b1e15
Test benches in CI
moiseev-signal May 23, 2023
11047fc
Make it clear that the KEM keys in the repo are for testing only
jrose-signal May 26, 2023
d285438
Upgrade Rust toolchain to nightly-2023-03-17
moiseev-signal May 26, 2023
dcfd0c1
cargo update and fix the fallout (upgrade snow to 0.9.2)
moiseev-signal May 26, 2023
df707cf
verify_duplicate_crates: Remove comment about serde
jrose-signal May 26, 2023
2b96d3a
update mp4san to eliminate error-stack
jessa0 May 16, 2023
803e7fe
pin: move svr2 pin hash out of Svr2Client
ravi-signal May 30, 2023
dda3e0f
Update Java tests with PQXDH cases
moiseev-signal May 30, 2023
d61cc8f
java: Include a ProtocolAddress in NoSessionException
jrose-signal May 31, 2023
5b95457
Downgrade cmake crate to 0.1.48
jrose-signal May 31, 2023
5b653c6
CI: Add the Windows ARM64 cross-compile to the Slow Tests
jrose-signal May 31, 2023
8abeeeb
Bump to version v0.26.0
jrose-signal May 31, 2023
e1e80aa
CI: Create a commit comment when scheduled Slow Tests fail
jrose-signal May 31, 2023
19d9e9f
node: Add PQXDH support
moiseev-signal Jun 2, 2023
db0ae12
CI: Run Android Emulator tests on Linux rather than macOS
jrose-signal Jun 2, 2023
65ccd5a
CI: Remove `-Z unstable-options` from Rust tests
jrose-signal Jun 8, 2023
30ce471
swift: Add PQXDH support
moiseev-signal Jun 9, 2023
af7bb85
Bump to version v0.27.0
jrose-signal Jun 9, 2023
7d37b1c
Better handle incremental mac edge case
moiseev-signal Jun 28, 2023
901be54
Address Swift linter warnings
moiseev-signal Jun 30, 2023
e50bec6
Adding support for username links
sergey-signal Jun 30, 2023
ca262db
bridge for username links
sergey-signal Jul 6, 2023
6800244
protocol: Add the ServiceId, Aci, and Pni types
jrose-signal Jul 13, 2023
89f34af
node: Force nominal typing, not structural, for Aci and Pni
jrose-signal Jul 13, 2023
43a3a31
making UsernameLink fields accessible in javascript
sergey-signal Jul 13, 2023
68f851e
Bump to version v0.28.0
sergey-signal Jul 14, 2023
e32cd70
java: Override 'hashCode' in ServiceId to go with 'equals'
jrose-signal Jul 14, 2023
86b2fcc
Bump to version v0.28.1
jrose-signal Jul 14, 2023
88a2d5c
Add convenience APIs to ProtocolAddress for using ServiceIds
jrose-signal Jul 19, 2023
8a2bdc7
node: Use Debian Bullseye (base of Ubuntu 20.04) for Docker prebuilds
jrose-signal Jul 14, 2023
bc19fb3
java: Use our own mirror to reproducibly build for Android and Server
jrose-signal Jul 19, 2023
1d1a335
node: username links API refactoring
sergey-signal Jul 19, 2023
28fea98
Bump to version v0.29.0
sergey-signal Jul 20, 2023
8108b6d
zkgroup: Add support for encoding ServiceIds in UidStructs
jrose-signal Jul 12, 2023
664d1ed
swift: Add helper invokeFnReturningServiceId
jrose-signal Jul 15, 2023
af34c38
zkgroup: Convert UuidCiphertext operations to use ServiceId
jrose-signal Jul 12, 2023
6a547bf
zkgroup: Use ServiceId and Aci in public APIs instead of UidBytes
jrose-signal Jul 13, 2023
231aa16
Give AuthCredentialWithPni "PniAsServiceId" and "PniAsAci" variants
jrose-signal Jul 18, 2023
6206df0
Update multi-recepient sealed sender to use ServiceId
moiseev-signal Jul 14, 2023
643f4c3
Update to a newer 'uuid' crate for increased inlining
jrose-signal Jul 20, 2023
3b7f317
Bump to version v0.30.0
jrose-signal Jul 20, 2023
22e4795
CI: Only run the slow tests on the private repo
jrose-signal Jul 20, 2023
6b86969
node: Explicitly specify minimum macOS version to build for
jrose-signal Jul 27, 2023
dea887e
Bump to version v0.30.1
jrose-signal Jul 27, 2023
008fad9
protocol: Rip "Context" out of the Rust layer
jrose-signal Jul 21, 2023
761c808
java: Reorganize tests
jrose-signal Jul 22, 2023
2938b65
java: Prefer checked exceptions for ServiceId parsing methods
moiseev-signal Jul 27, 2023
4f3305f
Bump iOS deployment target to 13
jrose-signal Jul 31, 2023
45fb135
Add {Aci,Pni}.parseFromServiceId{String,Binary}
jrose-signal Aug 1, 2023
ff81905
Add senderAci() to SenderCertificate and DecryptionResult
jrose-signal Aug 1, 2023
602a21c
Node: Tweak TypeScript tricks for producing subclass-typed values
jrose-signal Aug 2, 2023
24f6c6b
Bump to version v0.30.2
jrose-signal Aug 3, 2023
4564991
Refer to curve25519-dalek by tag
moiseev-signal Aug 4, 2023
716e683
Update dependencies following curve25519-dalek 4.0.0 release
moiseev-signal Aug 9, 2023
c292fd9
Add tag_it.sh script to aid tagging
moiseev-signal Aug 9, 2023
32f53a7
Bump to version v0.31.0
moiseev-signal Aug 9, 2023
62853d7
Address javadoc warnings
moiseev-signal Aug 10, 2023
1e9492e
java: Piggyback on base.clean Gradle task
moiseev-signal Aug 14, 2023
c07da6f
Update x25519-dalek to v2.0.0
moiseev-signal Aug 15, 2023
81a8360
Add Automatic-Module-Name attribute to jar manifest
AsamK May 21, 2023
0df9163
swift/build_ffi.sh: only set IPHONEOS_DEPLOYMENT_TARGET for iOS
jrose-signal Aug 17, 2023
f9471c9
Set up and apply code formatting for Java
moiseev-signal Aug 22, 2023
21d3947
protocol: Make the "base key" part of the SessionState constructor
jrose-signal Aug 21, 2023
02e1c45
protocol: Remove SessionRecord.fromSingleSessionState
jrose-signal Aug 22, 2023
9ca91fe
protocol: Record the timestamp when a pre-key bundle is processed
jrose-signal Aug 17, 2023
a04c4f2
protocol: Check expiration in hasSenderChain/hasCurrentState
jrose-signal Aug 22, 2023
024c618
protocol: Throw SessionNotFound for an expired unacknowledged session
jrose-signal Aug 22, 2023
468ea4a
protocol: Simplify key derivation for multi-recipient sealed sender
jrose-signal Aug 22, 2023
efe6bc1
Update snow to 0.9.3
moiseev-signal Aug 23, 2023
b27f5c0
Gradle: Set version and group info in the root project
jrose-signal Aug 23, 2023
e11a825
Gradle: Adopt Nexus plugin to automatically close releases on Sonatype
jrose-signal Aug 23, 2023
9aad792
Update all the RustCrypto crates
jrose-signal Aug 25, 2023
4331c12
iOS: Stop building for Catalyst
jrose-signal Aug 25, 2023
3810154
Automate the Android and Server publishing to Sonatype
jrose-signal Aug 24, 2023
6abe26a
Improve incremental MAC API
moiseev-signal Aug 31, 2023
e26381a
java: Implement readBuffer missing from older Androids
moiseev-signal Sep 1, 2023
9d1ab78
java: Do not close the inner stream in IncrementalMacOutputStream
moiseev-signal Sep 1, 2023
72f046f
Bump to version v0.32.0
moiseev-signal Sep 1, 2023
144a003
Use hex! macro in more tests, rather than hex::decode + expect
jrose-signal Sep 1, 2023
c2dda2f
Replace lazy_static HashMaps with arrays (#318)
akonradi-signal Sep 8, 2023
37f750b
Remove unhelpful doctest for SmallMap
akonradi-signal Sep 11, 2023
639b480
bridge: Remove 'jni_crate' workaround, predating 'dep:jni' syntax
jrose-signal Aug 29, 2023
c8ff09a
bridge: Convert JNI arguments by reference instead of by value
jrose-signal Aug 29, 2023
2098971
bridge: Simplify jni::ArgTypeInfo::load_from
jrose-signal Aug 29, 2023
c9ba9df
bridge: pass JNIEnv through jni::run_ffi_safe
jrose-signal Aug 29, 2023
156b42d
bridge: Remove jni::ResultTypeInfo::convert_into_jobject
jrose-signal Aug 30, 2023
7ea6e09
bridge: Update to jni crate 0.21
jrose-signal Aug 30, 2023
0fefef0
bridge: Wrap cloned JNIEnv to make sure no local references escape
jrose-signal Aug 30, 2023
600c0e8
bridge: Reuse slice loading in Serialized<T>: jni::ArgTypeInfo
jrose-signal Sep 2, 2023
6a7b83d
bridge: Simplify Result<T, E>: ResultTypeInfo for FFI and JNI bridges
jrose-signal Sep 2, 2023
ef542e3
Bump rust compiler version to nightly 2023-09-01
akonradi-signal Sep 12, 2023
d464d00
Implement Nitro attestation
moiseev-signal Sep 12, 2023
501f27c
Remove unnecessary mut
akonradi-signal Sep 13, 2023
9752b6e
Use hex! for binary strings in zkgroup and zkcredential
akonradi-signal Sep 13, 2023
62657f2
Implement new logic for incremental mac chunk size
moiseev-signal Sep 13, 2023
e94dc9c
verify_duplicate_crates: Use improved `--edges no-proc-macro`
jrose-signal Sep 13, 2023
212094e
Use scalar::clamp_integer
moiseev-signal Sep 14, 2023
d07b90f
Fix Rust documentation
akonradi-signal Sep 15, 2023
3636375
Reimplement IncrementalMacInputStream backed by directly allocated By…
moiseev-signal Sep 15, 2023
f836427
protocol: Add missing 'digest' feature for curve25519-dalek dependency
jrose-signal Aug 30, 2023
301a117
Add a cross-version-testing crate for libsignal-protocol
jrose-signal Aug 30, 2023
ffc6747
CI: Add protocol/cross-version-testing to Slow Tests
jrose-signal Sep 18, 2023
2a0ba64
Copy less in nitro attestation implementation
moiseev-signal Sep 20, 2023
d1f9dff
Bump to version v0.32.1
akonradi-signal Sep 20, 2023
a27f323
Merge branch 'main' into patch-v0.32.1
tiainen Nov 22, 2023
7a2729d
extra required changes for 0.32.1
tiainen Nov 22, 2023
fa3509e
fix versioning
tiainen Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 14 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:
- '.github/workflows/build_and_test.yml'
- 'bin/**'
- 'rust/*'
- 'rust/!(bridge)/**'
- 'rust/!(bridge|protocol)/**'
- 'rust/bridge/shared/**'
- 'rust/protocol/*'
- 'rust/protocol/!(cross-version-testing)/**'
- 'rust-toolchain'
- 'Cargo.toml'
- 'Cargo.lock'
Expand All @@ -49,7 +51,7 @@ jobs:
- '.clippy.toml'
- '.rustfmt.license-template'
- '.rustfmt.toml'
- 'rust/**' # deliberately re-include the rust/bridge/ directories
- 'rust/**' # deliberately re-include rust/bridge/* and rust/protocol/cross-version-testing
java:
- *all
- '.dockerignore'
Expand Down Expand Up @@ -119,6 +121,11 @@ jobs:
run: cargo fmt --all -- --check
if: matrix.version == 'nightly'

- name: Rustfmt check for cross-version-testing
run: cargo fmt --all -- --check
working-directory: rust/protocol/cross-version-testing
if: matrix.version == 'nightly'

- name: Check bridge versioning
run: ./bin/update_versions.py
if: matrix.version == 'nightly'
Expand Down Expand Up @@ -149,6 +156,11 @@ jobs:
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
if: matrix.version == 'nightly'

- name: Rust docs
run: cargo doc --workspace --all-features
env:
RUSTFLAGS: -D warnings

# We check the fuzz targets on stable because they don't have lockfiles,
# and crates don't generally support arbitrary nightly versions.
# See https://github.com/dtolnay/proc-macro2/issues/307 for an example.
Expand Down Expand Up @@ -306,5 +318,3 @@ jobs:
- name: Run pod lint
# No import validation because it tries to build unsupported platforms (like 32-bit iOS).
run: pod lib lint --verbose --platforms=ios --include-podspecs=SignalCoreKit/SignalCoreKit.podspec --skip-import-validation
env:
SKIP_CATALYST: 1
10 changes: 0 additions & 10 deletions .github/workflows/ios_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ jobs:
env:
CARGO_BUILD_TARGET: aarch64-apple-ios-sim

- name: Build for x86_64-apple-ios-macabi
run: swift/build_ffi.sh --release --build-std
env:
CARGO_BUILD_TARGET: x86_64-apple-ios-macabi

- name: Build for aarch64-apple-ios-macabi
run: swift/build_ffi.sh --release --build-std
env:
CARGO_BUILD_TARGET: aarch64-apple-ios-macabi

- run: tar -c --auto-compress --no-mac-metadata -f ${{ steps.archive-name.outputs.name }} target/*/release/libsignal_ffi.a

- run: 'shasum -a 256 ${{ steps.archive-name.outputs.name }} | tee -a $GITHUB_STEP_SUMMARY ${{ steps.archive-name.outputs.name }}.sha256'
Expand Down
119 changes: 92 additions & 27 deletions .github/workflows/jni_artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Publish JNI Artifacts to GitHub Release
name: Upload Java libraries to Sonatype
run-name: ${{ github.workflow }} (${{ github.ref_name }})

on:
push:
tags:
- v*
workflow_dispatch: {} # no parameters
workflow_dispatch:
inputs:
dry_run:
description: "Just build, don't publish"
default: false
required: false
type: boolean

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build

# Only run this in the public repository unless manually invoked.
if: ${{ github.event_name == 'workflow_dispatch' || !endsWith(github.repository, '-private') }}
name: Build for local development

runs-on: ${{ matrix.os }}

Expand All @@ -24,21 +25,14 @@ jobs:

strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
os: [windows-latest, macos-latest]
include:
- os: ubuntu-20.04
library: libsignal_jni.so
- os: windows-latest
library: signal_jni.dll
- os: macos-latest
library: libsignal_jni.dylib
additional-rust-target: aarch64-apple-darwin

env:
# Keep this settings in sync with java/build_jni.sh, which supports Android as well.
CARGO_PROFILE_RELEASE_DEBUG: 1
CARGO_PROFILE_RELEASE_LTO: thin
CARGO_PROFILE_RELEASE_OPT_LEVEL: s
# Ubuntu binaries are built using Docker, below

steps:
- uses: actions/checkout@v3
Expand All @@ -54,26 +48,97 @@ jobs:
run: choco install nasm
shell: cmd

- name: Build for host (should be x86_64)
run: java/build_jni.sh desktop
shell: bash

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- run: cargo build --release -p libsignal-jni

- run: cargo build --release -p libsignal-jni --target aarch64-apple-darwin
- name: Build for alternate target (arm64)
run: java/build_jni.sh desktop
if: matrix.os == 'macos-latest'
env:
CARGO_BUILD_TARGET: ${{ matrix.additional-rust-target }}

- name: Merge library slices (for macOS)
# Using target/release/ for both the input and output wouldn't normally be ideal
# from a build system perspective, but we're going to immediately upload the merged library.
run: lipo -create target/release/${{ matrix.library }} target/aarch64-apple-darwin/release/${{ matrix.library }} -output target/release/${{ matrix.library }}
run: lipo -create target/release/${{ matrix.library }} target/${{ matrix.additional-rust-target }}/release/${{ matrix.library }} -output target/release/${{ matrix.library }}
if: matrix.os == 'macos-latest'

- name: Upload
uses: ncipollo/release-action@4c75f0f2e4ae5f3c807cf0904605408e319dcaac # v1.11.1
- name: Upload library
uses: actions/upload-artifact@v3
with:
name: libsignal_jni (${{matrix.os}})
path: target/release/${{ matrix.library }}

verify-rust:
name: Verify JNI bindings
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- run: rustup toolchain install $(cat rust-toolchain) --profile minimal

- name: Verify that the JNI bindings are up to date
run: rust/bridge/jni/bin/gen_java_decl.py --verify

publish:
name: Build for production and publish

runs-on: ubuntu-latest

needs: [build, verify-rust]

steps:
- uses: actions/checkout@v3

- name: Download built libraries
id: download
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Copy libraries
run: mv ${{ steps.download.outputs.download-path }}/*/* java/shared/resources && find java/shared/resources

- run: make
if: ${{ inputs.dry_run }}
working-directory: java

- name: Upload libsignal-android
if: ${{ inputs.dry_run }}
uses: actions/upload-artifact@v3
with:
name: libsignal-android
path: java/android/build/outputs/aar/libsignal-android-release.aar

- name: Upload libsignal-client
if: ${{ inputs.dry_run }}
uses: actions/upload-artifact@v3
with:
name: libsignal-client
path: java/client/build/libs/libsignal-client-*.jar

- name: Upload libsignal-server
if: ${{ inputs.dry_run }}
uses: actions/upload-artifact@v3
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: target/release/${{ matrix.library }}
name: libsignal-server
path: java/server/build/libs/libsignal-server-*.jar

- run: make publish_java
if: ${{ !inputs.dry_run }}
working-directory: java
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEYID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
# ASCII-armored PGP secret key
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
38 changes: 26 additions & 12 deletions .github/workflows/slow_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
working-directory: node

swift-cocoapod:
name: Swift CocoaPod (with Catalyst)
name: Swift CocoaPod (all architectures)
runs-on: macOS-latest
needs: [check-up-to-date]
if: ${{ always() && (needs.check-up-to-date.outputs.has-changes || github.event_name != 'schedule') }}
Expand Down Expand Up @@ -167,24 +167,38 @@ jobs:
env:
CARGO_BUILD_TARGET: aarch64-apple-ios-sim

- name: Build for x86_64-apple-ios-macabi
run: swift/build_ffi.sh --release --build-std
env:
CARGO_BUILD_TARGET: x86_64-apple-ios-macabi

- name: Build for aarch64-apple-ios-macabi
run: swift/build_ffi.sh --release --build-std
env:
CARGO_BUILD_TARGET: aarch64-apple-ios-macabi

- name: Run pod lint
# No import validation because it tries to build unsupported platforms (like 32-bit iOS).
run: pod lib lint --verbose --platforms=ios --include-podspecs=SignalCoreKit/SignalCoreKit.podspec --skip-import-validation

rust-protocol-cross-version-testing:
name: libsignal-protocol Cross-version Tests
runs-on: ubuntu-latest
needs: [check-up-to-date]
if: ${{ always() && (needs.check-up-to-date.outputs.has-changes || github.event_name != 'schedule') }}

steps:
- uses: actions/checkout@v3

- run: sudo apt-get update && sudo apt-get install gcc-multilib g++-multilib

- run: rustup +stable target add i686-unknown-linux-gnu

- name: Run tests
run: cargo +stable test
working-directory: rust/protocol/cross-version-testing

- name: Run tests (32-bit)
run: cargo +stable test --target i686-unknown-linux-gnu
working-directory: rust/protocol/cross-version-testing

# We don't run Clippy because GitHub silently updates `stable` and that can introduce new lints,
# and we don't have a guarantee that any particular pinned nightly can build older libsignals.

report_failures:
name: Report Failures
runs-on: ubuntu-latest
needs: [java-docker, android-emulator-tests, node-docker, node-windows-arm64, swift-cocoapod]
needs: [java-docker, android-emulator-tests, node-docker, node-windows-arm64, swift-cocoapod, rust-protocol-cross-version-testing]
if: ${{ failure() && github.event_name == 'schedule' }}

permissions:
Expand Down
Loading
Loading