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

926 Commits

Author SHA1 Message Date
Jack Lloyd
ad495ccab9 Move AES-GCM-SIV implementation into rust/crypto 2021-03-15 13:33:33 -04:00
Jack Lloyd
f8648c21cd Add hashes and HMAC for Java 2021-03-15 13:30:39 -04:00
Jordan Rose
3b38704707
Merge pull request #244 from signalapp/jrose/node-native
Node: use 'Native' to refer to the loaded Rust library
2021-03-12 13:19:41 -08:00
Jordan Rose
a37295e3a8 Node: use 'Native' to refer to the loaded Rust library
Specifically, use 'NativeImpl' to refer to the run-time bindings
(instead of 'SC'), and 'Native' to refer to the TypeScript module for
those bindings (instead of 'SignalClient'). This makes
compile-time diagnostics clearer, since the overall Node package is
named 'signal-client'.
2021-03-12 12:57:10 -08:00
Jordan Rose
08d6495635
Merge pull request #245 from signalapp/jrose/shellcheck-command-v
Use `command -v` instead of `which`, as recommended by Shellcheck
2021-03-12 09:43:32 -08:00
Jordan Rose
dac294acdb Use command -v instead of which, as recommended by Shellcheck 2021-03-11 16:08:30 -08:00
Jordan Rose
2b8c797a58
Merge pull request #243 from signalapp/jrose/null-context-to-reduce-duplication
Bridge: add ignored Context args to methods taking stores for JNI/Node
2021-03-11 10:06:37 -08:00
Jordan Rose
70e495446d Bridge: add ignored Context args to methods taking stores for JNI/Node
Previously we defined one entry point for FFI (Swift) that took an
extra "context" parameter (to pass through iOS's database
transactions), and one for JNI+Node that did not (no context needed
currently). But this is all in our glue layer, which doesn't need to
be a perfect reflection of the outside interface. Remove that
duplication by accepting a Context parameter for both JNI and Node
that, for now, must be null.
2021-03-10 17:59:08 -08:00
Jordan Rose
26c394af47
Merge pull request #241 from signalapp/jrose/skip-slow-tests-locally
By default, skip Rust tests that take over 10s in debug builds
2021-03-10 11:06:17 -08:00
Jordan Rose
56afeb885c By default, skip Rust tests that take over 10s in debug builds
We'll still run them in CI, but we don't need to run them locally.
2021-03-10 09:54:49 -08:00
Jack Lloyd
f10ff54888
Merge pull request #240 from signalapp/jack/java-0.4.0
Bump Java version to 0.3.4
2021-03-09 15:57:27 -05:00
Jack Lloyd
8641994ee7 Bump Java version to 0.3.4 2021-03-09 15:35:53 -05:00
Jack Lloyd
60f1795c66
Merge pull request #236 from signalapp/jack/device-transfer-cert
Device Sender Utilities - Generate Key + Self-Signed Certificate
2021-03-09 13:48:56 -05:00
Jordan Rose
bbfd8ef14c
Merge pull request #239 from signalapp/jrose/node-log-levels
Node: align log levels for TypeScript with log levels in the Rust enum
2021-03-09 10:34:47 -08:00
Jack Lloyd
9050c5d000 Make the public things public 2021-03-09 13:22:21 -05:00
Jordan Rose
400ad3ed56 Node: align log levels for TypeScript with log levels in the Rust enum 2021-03-09 10:17:07 -08:00
Jack Lloyd
564990a926 Switch DN org name to match what iOS does 2021-03-09 10:38:24 -05:00
Jack Lloyd
846bcdfe7d Fix the Java interface for DeviceTransferKey 2021-03-09 10:23:19 -05:00
Jack Lloyd
7bd9c5f987 Switch to using picky crate for forming PKCS8 and X.509 data 2021-03-08 16:46:19 -05:00
Jack Lloyd
1944d16dec Device Sender Utilities - Generate Key + Self-Signed Certificate 2021-03-08 16:46:19 -05:00
Jack Lloyd
5f5687ed74 Update libsignal-node version in Cargo.lock 2021-03-08 16:44:37 -05:00
Jack Lloyd
d5cde9e583
Merge pull request #238 from signalapp/jack/node-0.3.3
Bump Node to 0.3.3
2021-03-08 16:29:22 -05:00
Jack Lloyd
b3efdd4b1d
Merge pull request #237 from signalapp/jack/has-current-state
Fix Node SessionRecord accessor funnctions
2021-03-08 15:57:42 -05:00
Jack Lloyd
e1ef2211b5 Bump Node to 0.3.3 2021-03-08 15:51:36 -05:00
Jack Lloyd
875b18489d Test other SessionRecord getters 2021-03-08 15:42:31 -05:00
Jordan Rose
ce671ac97d Bridge: deserialization should always go through ResultTypeInfo
This is critical for the Node bridge, where mutable types are boxed
differently from immutable types.
2021-03-08 12:18:59 -08:00
Jordan Rose
a925ef1fff Node: fix bridging for mutable handles
These get wrapped in a RefCell, and as arguments come in wrapped in a
JavaScript object, but we weren't treating that uniformly across all
use sites.
2021-03-08 12:18:59 -08:00
Jack Lloyd
7bfd89c82b Fix lint 2021-03-08 12:28:57 -05:00
Jack Lloyd
1d479fb928 Add a test of hasCurrentState
(which fails at the moment)
2021-03-08 12:07:35 -05:00
Jack Lloyd
5f8ca859ed
Merge pull request #234 from signalapp/jack/node-0.3.2
Bump node to 0.3.2
2021-03-04 11:33:02 -05:00
Jack Lloyd
a005082984 Bump Cargo.lock 2021-03-03 17:28:26 -05:00
Jack Lloyd
f6ed5de9b8 Bump node to 0.3.2 2021-03-03 17:24:07 -05:00
Jack Lloyd
4d0557c6c4
Merge pull request #233 from signalapp/jack/self-send-indicator
Have TS binding return null on a sealed sender self-send
2021-03-03 16:10:41 -05:00
Jack Lloyd
050342baaa
Merge pull request #184 from signalapp/jack/no-unwrap
Avoid using unwrap
2021-03-03 15:14:26 -05:00
Jack Lloyd
655a2a050d Have TS binding return null on a sealed sender self-send
As untyped errors make it difficult to detect this case vs other error conditions
2021-03-03 14:13:36 -05:00
Jack Lloyd
a56874e3e1 Add clippy no_unwrap to the other crates
Remove some unwrap from poksho and futures crates
2021-03-03 14:09:35 -05:00
Jordan Rose
eccf27818f
Merge pull request #230 from signalapp/jrose/log-panics
Log panics in all three bridges
2021-03-03 10:26:15 -08:00
Jack Lloyd
9b62203e59
Merge pull request #232 from signalapp/jack/node-current-state
Expose HasCurrentState for Node
2021-03-03 13:17:08 -05:00
Jack Lloyd
54af088e04 Expose HasCurrentState for Node
Desktop relies on this notion
2021-03-03 12:58:19 -05:00
Jordan Rose
5ac206dbb0 Log panics in all three bridges 2021-03-03 09:58:01 -08:00
Jack Lloyd
14060ae168 Remove all uses of unwrap from library source 2021-03-03 12:04:24 -05:00
Jack Lloyd
57b2e63f0b
Merge pull request #231 from signalapp/jack/self-send-jumps
Accept an arbitrarily large counter jump when talking to self
2021-03-03 10:07:03 -05:00
Jack Lloyd
1e969ef72b cargo fmt 2021-03-02 19:13:05 -05:00
Jack Lloyd
ce3ae25361 Accept an arbitrarily large counter jump when talking to self 2021-03-02 18:44:50 -05:00
Jordan Rose
5d350cd3ef
Merge pull request #229 from signalapp/jrose/bridge_get_bytearray
Bridge: Limit bridge_get_bytearray so it can use bridge_fn_buffer
2021-03-01 09:46:37 -08:00
Jack Lloyd
f7a7551201
Merge pull request #226 from signalapp/jack/clamp-private-key-on-deserialize
Always clamp private keys on deserialize
2021-03-01 11:17:08 -05:00
Jack Lloyd
7de6609d87 Fix test 2021-02-26 12:14:19 -05:00
Jordan Rose
7ab3580b9d Bridge: Convert a Vec<u8> return to bridge_fn_buffer
In this case it doesn't matter since we had an owned value to return
anyway, but we want to avoid unnecessary copies.
2021-02-25 18:08:13 -08:00
Jordan Rose
f9dc12947e Bridge: Limit bridge_get_bytearray so it can use bridge_fn_buffer
By disallowing arbitrary expressions, bridge_get_bytearray (and
bridge_get_optional_bytearray) ends up a lot more like bridge_get,
and can reuse the infrastructure in bridge_fn_buffer instead of
needing a separate per-bridge implementation.
2021-02-25 18:08:13 -08:00
Jordan Rose
0bd5db57a6
Merge pull request #224 from signalapp/jrose/bridge_fn-docs
Bridge: Document the bridge_* macros and supporting traits
2021-02-25 10:10:32 -08:00