0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 12:02:18 +02:00
Commit Graph

299 Commits

Author SHA1 Message Date
Jack Lloyd
c577c3528c Add AES256-GCM-SIV (RFC 8452) 2020-10-28 17:01:20 -04:00
Jordan Rose
be6f28682b
Merge pull request #17 from signalapp/jrose/CiphertextMessageType
ffi: Expose CiphertextMessageType constants
2020-10-23 14:42:32 -07:00
Jordan Rose
0e78a8ac4f
Merge pull request #19 from signalapp/jrose/paths-ignore
GitHub: Fix paths-ignore for Rust PR testing
2020-10-23 14:37:53 -07:00
Jordan Rose
5de4dec116
Merge pull request #18 from signalapp/jrose/ClonableHandleOwnerTests
swift: Add some tests for the ClonableHandleOwner helper
2020-10-23 10:01:45 -07:00
Jordan Rose
bf12512c51 GitHub: Fix paths-ignore for Rust PR testing
There's no reason to re-test Rust things for changes in Swift.
2020-10-22 17:44:36 -07:00
Jordan Rose
c89c94b3a0 swift: Add some tests for the ClonableHandleOwner helper 2020-10-22 17:42:14 -07:00
Jordan Rose
3425025134 ffi: Drop dependency on num_traits::ToPrimitive
We were only using it on enums, and unconditionally at that, so Rust's
built-in numeric casts will have the same effect.
2020-10-22 11:34:42 -07:00
Jordan Rose
c1ffb1b805 ffi: Expose named constants for CiphertextMessageType
Also:
- Expose them to Swift as well in a type-safe way
- Verify that each constant matches the encoding used in rust/protocol/
2020-10-22 11:34:25 -07:00
Jordan Rose
8b7363a1b0
Merge pull request #16 from signalapp/jrose/verifySignature-against-PublicKey
verifySignature(against:) takes a PublicKey, not a PrivateKey
2020-10-21 14:20:51 -07:00
Jordan Rose
7f88b80a12 verifySignature(against:) takes a PublicKey, not a PrivateKey 2020-10-21 13:01:02 -07:00
Jordan Rose
b712fc1ad0
Merge pull request #13 from signalapp/jrose/no-clean-necessary
ffi: Cache cbindgen intermediates from build to build
2020-10-19 15:08:09 -07:00
Jack Lloyd
5ece875587
Merge pull request #12 from signalapp/jack/jni-store-ctor
Remove some intermediate helper functions when creating JNI store objects
2020-10-19 16:53:35 -04:00
Jack Lloyd
aefc781fe2 cargo fmt 2020-10-19 16:44:39 -04:00
Jordan Rose
cc34341a73 ffi: Cache cbindgen intermediates from build to build 2020-10-19 12:22:11 -07:00
Jordan Rose
c3d5f4dbcb
Merge pull request #8 from signalapp/jrose/merge-swift
Merge libsignal-protocol-swift
2020-10-19 11:51:31 -07:00
Jack Lloyd
5c4ee6588c Remove some intermediate helper functions when creating JNI store objects
Closes #7
2020-10-19 14:50:30 -04:00
Jordan Rose
e6e389e643 Swift: Drop 'SignalProtocol' module and just use 'SignalClient'
We can use folders for grouping within targets, but it's not obvious
that "protocol" is a useful group for the stuff we have, long-term.
2020-10-19 11:29:30 -07:00
Jack Lloyd
c0b6076a2d
Merge pull request #3 from signalapp/jack/merge-jni
Merge libsignal-jni
2020-10-19 11:13:49 -04:00
Jack Lloyd
c1331eb42f Add license headers 2020-10-16 18:30:17 -04:00
Jack Lloyd
3d24f94cef Update paths and workspace config 2020-10-16 18:26:26 -04:00
Jack Lloyd
52ae600210 Merge libsignal-jni history into libsignal-client 2020-10-16 18:19:11 -04:00
Jack Lloyd
e5840644c7 Move libsignal-jni to rust/bridge/jni 2020-10-16 18:17:21 -04:00
Jordan Rose
c7ca442410 PR testing for Swift 2020-10-16 14:32:10 -07:00
Jordan Rose
79441611a7 gitignore Swift's build directory too 2020-10-16 14:28:15 -07:00
Jordan Rose
d2a4463846 Swift: Build against the in-tree libsignal-ffi
And change the full package name to "SignalClient" instead of
"SignalProtocol", since it will eventually contain multiple modules.

This configuration won't allow the package to be used as a dependency
elsewhere without the client having its own set of search paths and
stuff, but that's fine.
2020-10-16 14:25:21 -07:00
Jordan Rose
5bb6adc81f Build libsignal-ffi as a staticlib for now
We don't want it to get linked into an app multiple times, but we also
have no reason to force the Swift wrapper to be a /separate/ dynamic
library.
2020-10-16 14:25:21 -07:00
Jordan Rose
58bba8f000 Merge libsignal-protocol-swift history into libsignal-client 2020-10-16 14:24:20 -07:00
Jordan Rose
b30bf7e59d
Merge pull request #4 from signalapp/jrose/merge-ffi
Merge libsignal-ffi
2020-10-16 14:21:18 -07:00
Jordan Rose
54f363c814 Default the project to nightly Rust toolchains 2020-10-16 13:04:02 -07:00
Jordan Rose
c8834a875a Add missing license headers to libsignal-ffi sources 2020-10-16 13:01:12 -07:00
Jordan Rose
8d8504669c Move libsignal-protocol-swift to swift/ 2020-10-16 11:23:50 -07:00
Jordan Rose
2fb87a0ab4 ffi: Fold signal_ffi.h generation into the Rust build
We're going to need nightly Rust for other things anyway, so we may as
well drop the extra Makefile and just require Cargo.

Also, delete the pkg-config file now that we no longer need to access
libsignal_ffi from arbitrary locations.
2020-10-16 11:19:00 -07:00
Jordan Rose
0c996fe221 Add ffi to workspace and refer to libsignal-protocol-rust via path 2020-10-16 10:45:49 -07:00
Jordan Rose
2ea57f3582 Merge libsignal-ffi history into libsignal-client 2020-10-16 10:36:45 -07:00
Jordan Rose
e5e55b1cd1 Move libsignal-ffi to rust/bridge/ffi 2020-10-16 10:36:12 -07:00
Jack Lloyd
a4a3dc6cbb
Merge pull request #1 from signalapp/jack/move-to-subdir
Move libsignal-protocol-rust to rust/protocol
2020-10-15 15:49:07 -04:00
Jack Lloyd
a0a4ffb40f Move libsignal-protocol-rust to rust/protocol 2020-10-15 15:41:20 -04:00
Jordan Rose
fa5657c051
Merge pull request #3 from signalapp/jrose/pr-testing
GitHub: run tests on PRs
2020-10-14 11:48:51 -07:00
Jordan Rose
a409ed3815 Generate a coverage report for each PR test 2020-10-14 11:43:20 -07:00
Jordan Rose
fb56458e41 GitHub: add swiftlint action as well 2020-10-14 11:43:20 -07:00
Jordan Rose
4e9f13067a GitHub: run tests on PRs 2020-10-14 11:43:20 -07:00
Jordan Rose
b3f500b639
Merge pull request #12 from signalapp/jrose/public-dependency
Switch to the public libsignal-protocol-rust for libsignal-ffi
2020-10-14 11:37:05 -07:00
Jordan Rose
cf18ad4594
Merge pull request #11 from signalapp/jrose/CARGO_BUILD_TARGET
Makefile: Respect CARGO_BUILD_TARGET for cross-compilation
2020-10-14 11:36:48 -07:00
Jordan Rose
87c001e7c8 Switch to the public libsignal-protocol-rust for libsignal-ffi
To set up relative paths for a particular checkout of libsignal-ffi,
run the following series of commands:

echo 'Cargo.toml filter=local-deps' >> .git/info/attributes
git config filter.local-deps.smudge \
  'sed -E -e "s|{ *git *= *\"ssh://git@github\.com/signalapp/(.+)\.git\" *}|{ path = \"../\1\" } # local-deps: &|"'
git config filter.local-deps.clean \
  'sed -E -e "s|{.+} # local-deps: {(.+)}|{\1}|"'

This will replace any dependencies on GitHub repositories under the
signalapp organization with path dependencies in the parent folder.
The checkout must be named the same as the repo on GitHub.
2020-10-13 17:24:58 -07:00
Jordan Rose
5047350456 Makefile: Respect CARGO_BUILD_TARGET for cross-compilation
Explicitly /don't/ respect CARGO_BUILD_TARGET for cbindgen because
that uses a nightly toolchain, and the nightly toolchain may not
support the platform being cross-compiled for.
2020-10-13 17:17:05 -07:00
Jordan Rose
39ba4489fe Derive all (Partial)?(Ord|Eq) for IdentityKey
...instead of deriving some and synthesizing others. Caught by nightly
`cargo clippy`.
2020-10-13 11:23:01 -07:00
Jordan Rose
90cf751e8a
Merge pull request #7 from signalapp/jrose/rustfmt-clippy
Add rustfmt and clippy to our PR tests (and fix issues)
2020-10-13 11:10:33 -07:00
Jordan Rose
3d68f690f6 Add rustfmt and clippy to our PR tests (and fix issues) 2020-10-13 11:00:35 -07:00
Jordan Rose
2f38129f37
Merge pull request #10 from signalapp/jrose/NULL-can-mean-empty
Allow NULL/0 as a valid 0-length buffer
2020-10-12 15:19:52 -07:00
Jordan Rose
3c1da026f4
Merge pull request #19 from signalapp/jrose/stray-handle-property
Fix PreKeyRecord having two 'handle' properties
2020-10-12 14:29:46 -07:00