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

398 Commits

Author SHA1 Message Date
Alex Konradi
4c78373114
Expose libsignal-net function for CDSI via JNI
Expose the existing CDSI lookup async function to Java clients. Provide a small
library that can be easily integrated into the existing codebase.
2023-11-15 10:00:46 -05:00
Jordan Rose
3b6100eb1d Bump to version v0.35.0 2023-11-13 10:39:59 -08:00
Jordan Rose
8fd34ff3c6 Node: Update to ES2020
We were formally targeting ES2015 and relying on TypeScript desugaring
the use of newer features like async/await, which is unnecessary.
Desktop targets ES2020; we can too. One thing TypeScript was *not*
desugaring was BigInt literals, which we can now use freely.
2023-11-08 09:11:09 -08:00
Max Moiseev
611deac10d Bump to version 0.34.0 2023-11-03 11:46:38 -07:00
akonradi-signal
89630ece20
Fixes for CDSI lookup in node
Fix issues that made this harder to use in client libraries:

- mutable arguments made Net.cdsiLookup harder to call
- a missing error code field made discriminating a RateLimitedError un-idiomatic
2023-11-03 13:37:14 -04:00
Jordan Rose
d5cd742e73 Update Node to 18.15.0, node-gyp to 10.0.1, and yarn upgrade 2023-11-02 16:55:37 -07:00
Jordan Rose
d768f47020 usernames: Allow generating a new link buffer with existing entropy
This allows updating the encrypted username associated with a link
without rotating the link itself.
2023-11-02 15:02:36 -07:00
akonradi-signal
e0465badb6
Add CDSI lookup bridge code for node
Use the async CDSI lookup function introduced in libsignal-net and expose it via
the bridging layer to node. Add a typescript library that provides a more
convenient interface for callers and exposes a close-to-drop-in-compatible API
for the desktop client.
2023-11-02 16:33:24 -04:00
Jordan Rose
37c7b482ca Bump to version v0.33.0 2023-10-26 14:03:22 -07:00
Jessa
7af14c6b06
Add WebP sanitizer
This adds integration bits for the new webpsan, a WebP image sanitizer -- which
currently simply checks the validity of a WebP file input, so that passing a
malformed file to an unsafe parser can be avoided. The integration pretty much
just leverages the integration work that was already done for mp4san.
2023-10-26 15:16:59 -04:00
ravi-signal
790db2383e
zkgroup: add backup auth credential
Allows a client to request a credential for a backup-id without
revealing the backup-id to the issuing server. Later, the client may use
this to make requests for the backup-id without identifying themselves
to the server.
2023-10-25 17:26:58 -05:00
Jordan Rose
90bbc3b156 Install git in the Node Dockerfile to satisfy boring-sys
boring-sys expects git to be present to apply patches, even though we
don't actually have any patches to apply.
2023-10-18 09:50:17 -07:00
Jordan Rose
55a1958a15 Test various error and panic scenarios for bridge_fn and bridge_io 2023-10-12 12:23:22 -07:00
Jordan Rose
25ca7cc1f7 bridge: Implement bridge_io for Node/Neon
bridge_fn already supported async functions for Node, by running them
on the Node microtask queue using the work in the signal_neon_futures
crate. This PR fits that into the AsyncRuntime trait added for
bridge_io, allowing async bridge_fn and async bridge_io to share code
and the same basic structure when compiling for Node.
2023-10-05 10:07:26 -07:00
moiseev-signal
840a1906c7
Update prost to version 0.12 2023-09-20 14:00:54 -07:00
Alex Konradi
d1f9dff273 Bump to version v0.32.1 2023-09-20 14:26:31 -04:00
moiseev-signal
62657f2f51
Implement new logic for incremental mac chunk size 2023-09-13 14:33:37 -07:00
Max Moiseev
72f046fe19 Bump to version v0.32.0 2023-09-01 13:43:06 -07:00
moiseev-signal
6abe26a0c1
Improve incremental MAC API 2023-08-31 15:28:39 -07:00
Jordan Rose
9aad792fc6
Update all the RustCrypto crates 2023-08-25 11:28:49 -07:00
Jordan Rose
024c618f20 protocol: Throw SessionNotFound for an expired unacknowledged session
For the most part this should happen transparently without any
explicit adoption, like the previous change, but for Java code the
NoSessionException is now properly declared on SessionCipher.encrypt.
(This was always technically possible, but clients were expected to
have previously checked for session validity before using
SessionCipher; now that there's an expiration involved, that's not
strictly possible.)
2023-08-22 17:00:35 -07:00
Jordan Rose
a04c4f27a6 protocol: Check expiration in hasSenderChain/hasCurrentState
And consolidate the implementations of these two separate checks; now
they both check for a valid session by looking for a sender chain
instead of just *some* current session, in addition to the new check
for an expired unacknowledged session. At the Rust level, this is now
one check named has_usable_sender_chain; at the app levels, the old
names of hasSenderChain (Java) and hasCurrentState (Swift, TypeScript)
have been preserved.

Tests to come in the next commit.
2023-08-22 17:00:35 -07:00
Jordan Rose
9ca91fe2c0 protocol: Record the timestamp when a pre-key bundle is processed 2023-08-22 17:00:35 -07:00
Max Moiseev
32f53a7894 Bump to version v0.31.0 2023-08-09 15:26:47 -07:00
Jordan Rose
24f6c6bc20 Bump to version v0.30.2 2023-08-03 10:50:59 -07:00
Jordan Rose
602a21c17d Node: Tweak TypeScript tricks for producing subclass-typed values
The compiler will actually check these, which unfortunately does lead
to a case where the compiler *cannot* check them and we have to use
'as'.
2023-08-02 17:51:23 -07:00
Jordan Rose
ff81905fc6 Add senderAci() to SenderCertificate and DecryptionResult
Like ProtocolAddresses in 88a2d5c, these APIs will eventually only
support ACIs, so introducing strong types now helps move in that
direction. However, the existing APIs that produce strings have not
been removed yet.
2023-08-02 17:51:23 -07:00
Jordan Rose
45fb135880 Add {Aci,Pni}.parseFromServiceId{String,Binary}
These work the same as the equivalent factory methods on ServiceId,
but throw if the resulting parsed ServiceId doesn't match the specific
type you were trying to parse.
2023-08-02 17:51:23 -07:00
Jordan Rose
008fad966e protocol: Rip "Context" out of the Rust layer
Only the iOS client ever used this extra parameter, and it's one
that's easily stored alongside the reference to a store. This is
massively simpler than having it threaded down to the Rust
libsignal_protocol and back up through the bridging layer.
2023-07-27 15:40:44 -07:00
Jordan Rose
dea887e94c Bump to version v0.30.1 2023-07-27 15:40:01 -07:00
Jordan Rose
6b86969113 node: Explicitly specify minimum macOS version to build for 2023-07-27 15:38:56 -07:00
Jordan Rose
3b7f3173cc Bump to version v0.30.0 2023-07-20 14:02:10 -07:00
Jordan Rose
231aa16510 Give AuthCredentialWithPni "PniAsServiceId" and "PniAsAci" variants
The former is what we want going forward; the latter is equivalent to
the old format for compatibility with previous client builds.
2023-07-20 12:28:19 -07:00
Jordan Rose
6a547bf3f2 zkgroup: Use ServiceId and Aci in public APIs instead of UidBytes
Some of these APIs have to match up with UuidCiphertexts, and so we
convert them all for consistency.
2023-07-20 12:26:46 -07:00
Jordan Rose
af34c38c03 zkgroup: Convert UuidCiphertext operations to use ServiceId
Eventually all of zkgroup will use ServiceId, but this part will
actually behave differently.
2023-07-20 12:23:10 -07:00
Sergey Skrobotov
28fea98c1b Bump to version v0.29.0 2023-07-19 18:24:46 -07:00
Sergey Skrobotov
1d1a335df1 node: username links API refactoring 2023-07-19 16:42:29 -07:00
Jordan Rose
8a2bdc758d node: Use Debian Bullseye (base of Ubuntu 20.04) for Docker prebuilds
Signal Desktop only supports Ubuntu 20.04 and newer, so we no longer
need to build against Ubuntu 16.04 to ensure compatibility. And
bullseye-slim is a smaller base image than the Ubuntu images, so if we
don't specifically need an Ubuntu package this should be an easy
improvement.
2023-07-19 14:18:15 -07:00
Jordan Rose
88a2d5c740 Add convenience APIs to ProtocolAddress for using ServiceIds
In a future release ProtocolAddresses will *only* support ServiceIds,
so these APIs are designed to be the nullable version of the signature
they'll eventually have. Since ProtocolAddresses are created by the
client app in nearly all cases, they should be able to ignore the null
case if they only use ServiceIds in their input.
2023-07-19 14:12:05 -07:00
Jordan Rose
86b2fcc427 Bump to version v0.28.1 2023-07-14 13:45:10 -07:00
Sergey Skrobotov
68f851e1ca Bump to version v0.28.0 2023-07-13 17:26:49 -07:00
Sergey Skrobotov
43a3a31179 making UsernameLink fields accessible in javascript 2023-07-13 16:54:01 -07:00
Jordan Rose
89f34af1c6 node: Force nominal typing, not structural, for Aci and Pni 2023-07-13 16:47:43 -07:00
Jordan Rose
6800244a53
protocol: Add the ServiceId, Aci, and Pni types
Co-authored-by: Max Moiseev <moiseev@signal.org>
2023-07-13 13:54:53 -07:00
Sergey Skrobotov
ca262db5ec bridge for username links 2023-07-06 15:51:52 -07:00
Jordan Rose
af7bb8567c Bump to version v0.27.0 2023-06-09 11:49:48 -07:00
moiseev-signal
19d9e9f0f4
node: Add PQXDH support 2023-06-02 10:42:39 -07:00
Jordan Rose
8abeeeb4ef Bump to version v0.26.0 2023-05-31 13:58:46 -07:00
Ravi Khadiwala
a196fb8ecd Bump to version v0.25.0 2023-05-17 13:31:29 -05:00
Max Moiseev
0e2f87f39a Bump to version v0.24.0 2023-05-09 17:19:28 -07:00
Rolfe Schmidt
ff09619432 Add Kyber KEM and implement PQXDH protocol
Co-authored-by: Jordan Rose <jrose@signal.org>
Co-authored-by: Max Moiseev <moiseev@signal.org>
2023-05-09 16:44:40 -07:00
moiseev-signal
2b46ae1e85
Implement incremental MAC 2023-05-09 12:29:25 -07:00
Jordan Rose
0e74a41eb9 bridge: Put signal-media behind a feature flag, off for iOS by default
The JNI tests have also been conditionalized in case we want to take
this out for Android as well. (Node still unconditionally depends on
it being present.) I've given it a separate feature flag from just
ffi/jni/node so that we can preserve the tests Jessa wrote for each
platform.
2023-05-09 11:02:31 -07:00
Jessa
9eb3483938 Add MP4 format sanitizer
This MP4 format "sanitizer" currently only transforms (when necessary) outgoing media on iOS, Android, or Desktop to
make it suitable for streaming playback by the recepient. In the future, it will validate and be able to either repair
or reject outbound AND inbound media, to prevent malformed media from being fed to third party or OS media players.

An generic io module was added to the libsignal rust bridge containing the InputStream trait, modeled loosely after
Java's InputStream, which calls back into the client language to perform reads or skips. This infrastructure could
potentially also be for any other future large data inputs to libsignal functions.
2023-05-01 12:01:08 -07:00
Jordan Rose
d3e38b9e5c Bump version to v0.23.0 2023-05-01 12:01:08 -07:00
Jordan Rose
c433d1e34c Expose ProfileKey.deriveAccessKey()
Client apps will be able to switch over to this at their leisure.
2023-04-25 18:42:51 -07:00
Jordan Rose
e588fa5450
zkgroup: Add CallLinkAuthCredential
This is very similar to the AuthCredential used by the group server,
but using CallLinkParams to encrypt the user ID rather than
GroupParams (and using GenericServerParams to issue the credential
rather than the group server's ServerParams).
2023-04-25 17:18:05 -07:00
Jordan Rose
1b5449e777
zkgroup: Add a "Create Call Link" credential
This will allow a user to request to create a call link from the chat
server without revealing anything about the room, and then later
actually create it by giving the room ID to the calling server without
identifying themself.

This involves a new, stripped-down GenericServer{Secret,Public}Params,
which currently only contains a generic "zkcredential" key. Apart from
the calling server not needing to handle all the credentials that the
group storage server supports, the structure of zkcredential means it
is safe to use the same key for multiple kinds of credentials. 
Similarly, CallLink{Secret,Public}Params plays the same role as
Group{Secret,Public}Params for encrypting user IDs when talking to the
calling server.

Following from that, the APIs for CreateCallLinkCredentials are
located on the individual types (RequestContext, Request, Response,
Credential, Presentation) rather than all being on the Server*Params
types; adding a new credential type won't change the API of the
Server*Params types at all.

The main Server*Params may make use of zkcredential in the future as
well, but for now it's only for new Signal servers that want to use
zero-knowledge credentials.
2023-04-25 16:53:42 -07:00
Jordan Rose
4175751cbe Remove the non-expiring ProfileKeyCredential
Keep support for deserializing ProfileKeyCredentialPresentationV2
because that may be in some group history.
2023-04-18 17:47:49 -07:00
Jordan Rose
bf984c7b54 Remove deprecated PniCredential 2023-04-18 17:47:49 -07:00
Ravi Khadiwala
1f8c279622 pin: Add pin hashing and an svr2 client
- Add a new SGX client that can be used for testing svr2
- Add pin hashing that can be used with svr1 and svr2
2023-03-29 13:59:28 -05:00
Jordan Rose
3f3f404be6 Node: add some more ESLint TypeScript checks 2023-03-06 15:30:08 -08:00
Jordan Rose
f3e0f61667 bridge: Remove bridge_fn_buffer
At this point, the only special behavior of bridge_fn_buffer is to
support multiple return values for the C bridge (a pointer/length
pair), and that doesn't pull its weight. Remove it in favor of a plain
bridge_fn.

This did reveal that Username_Hash was using bridge_fn_buffer and now
produces a fixed-size array, imported into Swift as a tuple, so this
commit also factors out a new helper invokeFnReturningFixedLengthArray.
2023-02-21 16:41:03 -08:00
Max Moiseev
39293fa906 Bump to version v0.22.2 2023-02-10 12:07:18 -08:00
Max Moiseev
90c02f3b69 Bump to version v0.22.1 2023-02-09 11:45:09 -08:00
Max Moiseev
c98ed9cb6d Bump to version v0.22.0 2023-02-03 17:57:44 -08:00
Max Moiseev
33d8421ca9 Bridge username hashing APIs to all client platforms 2023-02-03 17:44:29 -08:00
Jordan Rose
019e60498d Node: Update TypeScript, eslint, and prettier to match Desktop 2023-02-01 16:11:08 -08:00
Jordan Rose
f9dededc4c Node: On Windows in GitHub CI, *always* use $TMP as the build dir
Follow-up to ec4faf26 where we tried to guess if the build directory
path was short enough for non-long-path-aware build tools. Give up on
that and just always use $RUNNER_TEMP if that's shorter.
2022-12-01 10:31:56 -08:00
Jordan Rose
dd0315ad26 Bump to version v0.21.1 2022-10-20 13:04:57 -07:00
Jordan Rose
d94f1b3d70 Bump version to v0.21.0 2022-10-14 13:53:57 -07:00
Jordan Rose
d270e06127 Docker: Use -it and --init to handle SIGTERM (^C) properly
-i (interactive) and -t (allocate a tty) allow the shell running
inside Docker to handle Ctrl-C (^C) and other shell commands, so you
can stop a command in the interactive process you ran it. However,
they only work if the containing shell (the one where you ran `docker
run`) is also interactive with a tty hooked up, so we test for that
first in both scripts that invoke `docker run`, using `test -t`.

--init passes signals from *outside* Docker down to its subprocesses,
so that cancellation from *another* context works for our Docker
images. This includes the Cancel button in GitHub Actions.
2022-08-23 13:31:30 -07:00
Jordan Rose
ab29fed4db Bump version to v0.20.0 2022-08-22 15:21:40 -07:00
Jordan Rose
e8d73665b4 zkgroup: Move AuthCredential redemption time checking down to Rust
This was previously in the Java layer because it only really affects
the server, but it's more consistent to have all verification in the
Rust layer. We do lose the separate exception type for it, though.
2022-08-09 13:47:17 -07:00
Jordan Rose
13b60197a9 Bump version to v0.19.3 2022-08-04 11:04:31 -07:00
Jordan Rose
3c365ab1da Bump to version v0.19.2 2022-08-01 16:04:37 -07:00
Jordan Rose
eff149b398 GitHub: Build Ubuntu Node releases using Docker, for Ubuntu 16 compat
The only supported way to target an older glibc is to build against
that glibc; consequently, we need to build on an Ubuntu 16 system (or
similar) to target Ubuntu 16. This requires downloading second-party
versions of Clang and CMake, which are too old in the default Ubuntu
repository, as well as building our own Python.

Do all this in a new Dockerfile based on Ubuntu 16.04. This isn't as
rigorous as the Java "reproducible build" Dockerfile, since we're not
pinning the base image or the repositories we're fetching from, but
it's still an image with the environment and tools we need.
2022-08-01 15:59:29 -07:00
Jordan Rose
2f07edaa02 Bump to version v0.19.1 2022-07-25 17:13:19 -07:00
Jordan Rose
c02cb26018 Bump version to 0.19.0 2022-07-22 15:36:22 -07:00
Chris Eager
8035a70509
[feature] CDS2 attestation
Implements (a subset of) Intel's DCAP attestation,
making heavy use of 'boring' for X509 and ECDSA.
Cds2Client is now ready for use!

Co-authored-by: Jordan Rose <jrose@signal.org>
Co-authored-by: Ravi Khadiwala <ravi@signal.org>
2022-07-22 12:23:57 -07:00
Jordan Rose
3a01a7848d Node: Add missing IdentityKeyPair_Deserialize
This annoying function is implemented separately for each bridge
because it produces two results, and the optimal way of doing that for
each bridge differs.
2022-07-19 18:16:23 -07:00
Jordan Rose
ec4faf2601 Node: On Windows in GitHub CI, use $TMP as the build directory
Otherwise, we can run into paths that exceed the classic Windows path
limit due to the nesting of build systems (GitHub Actions > node-gyp >
Cargo > CMake > Visual Studio). Unfortunately, at least some of Visual
Studio's tools are not long-path-aware.
2022-06-30 10:59:29 -07:00
Jordan Rose
e54685b281 Bump to version v0.18.1 2022-06-29 12:01:17 -07:00
Jordan Rose
6b50c991f8 node: Include new credentials in the default zkgroup exports
And tweak the test file to remind that the top-level zkgroup/index.ts
exists, though since we still don't reference most types by name in
the tests this wouldn't have actually caught the oversight.
2022-06-29 10:13:54 -07:00
Jordan Rose
e6f149c93d zkgroup: Deprecate PniCredential operations
...but not the types at this time, because that produces extra
warnings that need silencing.
2022-06-28 17:21:41 -07:00
Jordan Rose
366b030841 Re-apply "device transfer: replace picky with boring"
This reverts commit 09c043c54a.
2022-06-22 16:33:21 -07:00
Jordan Rose
09c043c54a Revert "device transfer: replace picky with boring"
We need to work out more kinks cross-compiling boring-sys, so revert
this for now. (But keep the fix to use the correct Android NDK.)
2022-06-22 15:56:21 -07:00
Jordan Rose
bee544ec73 Bump version to v0.18.0 2022-06-21 15:58:48 -07:00
Jordan Rose
70ec1ca26f
zkgroup: Add AuthCredentialWithPni
This is a variant of AuthCredential that carries two UUIDs, intended
to be a user's ACI and PNI. Why? Because when you've been invited to a
group, you may have been invited by your ACI or by your PNI, or by
both, and it's easier for clients to treat all those states the same
by having a credential that covers both identities. The downside is
that it's larger (both the data, obviously, but also the zkgroup proof
of validity, unsurprisingly).

AnyAuthCredentialPresentation gains a 'get_pni_ciphertext' method,
which will return `None` for the existing presentations and
`Some(encrypted_pni)` for the new credential. Having a separate
credential type but a common presentation type makes it easier for the
server to handle all possible credentials uniformly.
2022-06-21 15:11:57 -07:00
Jordan Rose
9e6343b6e4 Node: Force nominal typing for zkgroup ByteArray subclasses
Without this, two ByteArray types without any additional operations
are structurally equivalent, and so TypeScript permits passing one as
the other. (Thanks, Fedor!)
2022-06-17 14:14:12 -07:00
Jordan Rose
395e36e9f2
zkgroup: Add ExpiringProfileKeyCredential
Like ProfileKeyCredential, but with an expiration timestamp embedded
in it. This has its own credential type and response type, but uses
the same request type as a "classic" ProfileKeyCredential, and
generates presentations usable with AnyProfileKeyCredential-
Presentation, so that existing server code accepting presentations
will automatically do the right thing.

Adoption for servers:

- Update secret params
- When presentations are saved in group state, use 
  ProfileKeyCredentialPresentation.getStructurallyValidV1PresentationBytes()
  to maintain backwards compatibility with existing clients.
- Add an endpoint to issue ExpiringProfileKeyCredentials
- (future) Remove the endpoint that issues regular ProfileKeyCredentials

Adoption for clients, after the server has updated:

- Update public params
- Start fetching and using ExpiringProfileKeyCredentials instead of 
  regular ProfileKeyCredentials (the old endpoint will eventually
  go away)
- Node: To bring types into harmony, a receipt's expiration time has
  been changed to a `number` instead of a `bigint`
2022-06-17 13:10:10 -07:00
Chris Eager
2b0b5119f2
device transfer: replace picky with boring
Upcoming work in `attest` requires additional X509 support, and swapping these libraries 
is a negligible impact on binary size. This uses a fork of `cloudflare/boring`, as
we have some additions that haven’t yet been contributed upstream.
2022-06-16 13:14:17 -07:00
Jordan Rose
f1825c4892 Revert "Expose SessionRecord.needsPniSignature/.setNeedsPniSignature"
This reverts commit 71fdd6566e.
2022-05-25 10:38:32 -07:00
Chris Eager
2c32fb802d Bump version to v0.17.0 2022-05-13 14:30:30 -07:00
Chris Eager
7e734dd5b4
CDS2: add initial, not-for-production, client bindings 2022-05-13 13:39:26 -07:00
Jordan Rose
41e0a269a7 Node: Test with plain 'mocha' instead of 'electron-mocha'
...which drops our dependency on Electron altogether. We originally
tested with electron-mocha to more closely resemble the Desktop app,
but libsignal-client doesn't actually use anything Electron-specific,
and because it uses N-API we don't have to sync up versions exactly
(and indeed we haven't been updating the Electron in this repo as
often as the Desktop app has taken new Electrons).

Two benefits of this: you can now run the tests on headless systems
(see the change to the CI script), and `yarn install` has less to
download.
2022-04-12 12:50:53 -07:00
Jordan Rose
0c9bbb23be Node: Update dependencies
- Update .nvmrc to match Desktop
- Update electron, electron-mocha, and typescript to match Desktop
- Update indirect dependency 'minimist' per `yarn audit`

In signal-neon-futures test package:

- Update mocha
- `yarn upgrade` to clear audit advisories
2022-04-06 12:03:38 -07:00
Jordan Rose
916269c3e5 Bump to version v0.16.0 2022-04-06 11:08:56 -07:00
Trevor Perrin
7e12a71889
zkgroup: Optimize credential presentation and FFI cleanup
Optimize presentation of credentials (AuthCredentialPresentationV2, ProfileKeyCredentialPresentationV2, PniCredentialPresentationV2). Server will accept V1 or V2 presentations. Clients will produce V2.

Various improvements to FFI to support this, and some minor optimizations (in particular "lazy statics" to avoid redundant loading of SystemParams).
2022-04-06 11:07:08 -07:00
Jordan Rose
ba47c9d681 Bump to version v0.15.1 2022-03-24 17:01:23 -07:00
Jordan Rose
b5d48df116 Bump to version v0.15.0 2022-03-23 10:57:54 -07:00
Jordan Rose
970677795a Node: Rename SignalClientError to LibSignalError 2022-03-23 10:49:09 -07:00
Jordan Rose
0542686e70 Update artifact/package/module names across all three app languages
- Java: org.whispersystems:signal-client-java ->
    org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
    org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
    org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
    github.com/signalapp/libsignal
2022-03-23 10:49:09 -07:00
Jordan Rose
d26cf8b46d Add dedicated error types for invalid 1:1 and Sender Key sessions
In Java these are subclasses of IllegalStateException, a
RuntimeException, so that every session operation isn't annotated as
throwing InvalidSessionException. Swift and TypeScript don't have
typed errors, so they're just additional specific cases that can be
caught.
2022-03-21 14:12:04 -07:00
Jordan Rose
13292a001c node: Update devDependencies with yarn upgrade
No updates needed for the run-time dependencies.
2022-03-21 11:32:56 -07:00
Jordan Rose
0f5744a712 protocol: Remove the ability to create an empty SenderKeyRecord 2022-03-16 14:09:08 -07:00
Jordan Rose
6787408e5d Bump to version v0.14.0 2022-03-11 11:00:16 -08:00
Jordan Rose
257fc95526 Node: Update to node-gyp 8.4.1 for VS 2022 support 2022-03-08 14:35:51 -08:00
Jordan Rose
613338d54a Bump version to v0.13.0 2022-02-18 15:45:31 -08:00
Jordan Rose
d9b60b5776 Node: use a plain Buffer for the HsmEnclave public key
The PublicKey type includes a type byte prefix to support different
kinds of public keys in the future, but that doesn't really apply to
HsmEnclave keys. This matches the Java implementation and the
recently-updated Swift implementation.
2022-02-18 15:19:57 -08:00
Jordan Rose
4bd3778e69 Bump to version v0.12.4 2022-02-10 10:47:45 -08:00
Jordan Rose
00c1822b9c Node: Don't export initLogger and LogLevel directly from Native.d.ts
Native.d.ts only applies in TypeScript mode, not plain JavaScript.
This also confuses esbuild. Rather than try to fight that, return to
having Native not be exported at all, using a translation layer.

Also, make sure we use "true" TypeScript enums rather than `const
enum`, for the same reasons.
2022-02-10 10:33:44 -08:00
Jordan Rose
e2f4c4542e Bump to version v0.12.3 2022-02-09 11:34:44 -08:00
Jordan Rose
71dac29e42 Bump to version v0.12.2 2022-01-31 18:02:49 -08:00
Jordan Rose
3c5c312e45 Bump to version v0.12.1 2022-01-27 14:37:36 -08:00
Jordan Rose
3da7078ffe Bump to version v0.12.0 2021-12-20 11:21:02 -08:00
Jordan Rose
600b9070c1
Merge pull request #435 from signalapp/jrose/signAlternateIdentity
Add signAlternateIdentity and verifyAlternateIdentity operations
2021-12-20 11:06:54 -08:00
Jordan Rose
66c65cda86 Expose signAlternateIdentity and verifyAlternateIdentity
- Java: on IdentityKeyPair and IdentityKey, respectively
- Swift: on IdentityKeyPair and IdentityKey, respectively
- Node: on IdentityKeyPair and PublicKey; Node doesn't have a separate
  IdentityKey API

For convenience, exposes IdentityKeyPair.generate() in Java and Node
as well. (This API already existed in Swift.)
2021-12-20 10:30:42 -08:00
Jordan Rose
71fdd6566e Expose SessionRecord.needsPniSignature/.setNeedsPniSignature 2021-12-20 10:21:31 -08:00
Jordan Rose
5104d199d0 Bump to version v0.11.1 2021-12-03 13:37:25 -08:00
Jordan Rose
e4c31a62f6 Bump to version v0.11.0 2021-11-17 11:09:39 -08:00
Jordan Rose
145ba7f47c Expose PniCredential operations to app languages 2021-11-15 10:27:57 -08:00
Jordan Rose
7681db8a30 Bump to version v0.10.1 2021-11-09 09:58:20 -08:00
Jordan Rose
734c0e02a3 node: Move TypeScript source files into ts/ directory
This way, files that reference the non-compiled Native.js/.d.ts can
consistently refer to it as '../Native' without having to copy
anything around.
2021-11-08 16:40:50 -08:00
Jordan Rose
1d216bf3a1 node: Collapse Native.d.ts and NativeImpl.ts
...by making Native.js, which re-exports the loaded Neon module, whose
interface Native.d.ts already defined.
2021-11-08 16:40:50 -08:00
Jordan Rose
3fd42d7a60 Move package.json inside the node/ directory
Previously all APIs were available through the top-level index.ts, but
now the zkgroup APIs are in their own module. To access that in the
old packaging required writing

    import * from '@signalapp/signal-client/node/dist/zkgroup'

This commit moves the package root into the node/ directory to
eliminate the 'node/' component, then adds a top-level, precompiled
zkgroup.js/.d.ts so that clients can use

    import * from '@signalapp/signal-client/zkgroup'
2021-11-08 16:40:50 -08:00
Jordan Rose
8cf56835ef zkgroup: Move blob padding/unpadding into Rust
Previously this was defined in the app layers, because zkgroup's
original codegen didn't support custom exception types. However, we
can now move it to a common implementation in Rust.
2021-11-08 11:06:32 -08:00
Jordan Rose
014f190cab node: Improve zkgroup's ByteArray helper class
Don't validate sizes explicitly; that's already handled by the
*_CheckValidContents functions exposed in the bridge layer.
2021-11-08 11:06:32 -08:00
Jordan Rose
78b2f1cf64 node: Fix eslint issues 2021-11-08 11:06:32 -08:00
Jordan Rose
ec16fb3067 yarn format 2021-11-08 11:06:32 -08:00
Jordan Rose
32a05f398c node: Add/standardize zkgroup license headers 2021-11-08 11:06:32 -08:00
Jordan Rose
ef958176bd node: Get zkgroup working (and passing tests) 2021-11-08 11:06:32 -08:00
Jordan Rose
96c85fb545 node: Add zkgroup sources verbatim (does not compile) 2021-11-08 11:06:32 -08:00
Jordan Rose
852069bdc9 bridge: Add zkgroup APIs
These APIs are designed to match the generated "simpleapi" entry
points in the original zkgroup repository, to make it easier to adapt
the existing Java, Swift, and TypeScript code to libsignal-client.

The cbindgen-generated signal_ffi.h now includes constants, so that
the fixed-size arrays used to serialize zkgroup types can use named
constants in Rust. This meant filtering out some constants that were
getting picked up but that should not be included.

Note that this commit makes references to Java exception types that
will be added in a later commit.
2021-11-08 11:04:41 -08:00
Jordan Rose
4dc3ca5e6e bridge: Add support for bincode-serialized args and results
This will be used by zkgroup. Note that in order to print the type
correctly in C, a type `Serialized<FooBar>` will be translated to
`[u8; FOO_BAR_LEN]`, where 'FOO_BAR_LEN' has to be a constant that's
in scope.
2021-11-08 11:04:41 -08:00
Jordan Rose
ad5166e814 node: Factor out loading the native module into its own file
This logic is a bit finicky and it's better not to repeat it.
2021-11-01 11:46:52 -07:00
Jordan Rose
2544f3d827 bridge: Be more explicit about bridging u64 timestamps
u64 can't be represented as a primitive in Java or TypeScript (and for
the latter, Neon doesn't support bigint yet). However, for timestamps
represented as milliseconds, the integer-safe range of float64 still
covers more than 285,000 years, so it's reasonably safe to use
TypeScript's 'number' or Java's 'long' to represent these
ostensibly-64-bit values. Indicate this with a new Timestamp wrapper
type in the bridge layer.

In theory we could push this new Timestamp type down to the
libsignal-protocol crate. However, the protocol itself doesn't impose
any restrictions on the timestamp fields, so I figured it was best to
put it at the bridge layer, to indicate that it's about how Signal
specifically uses these fields.

This commit paves the way for being stricter about *other* u64 values
that might want to use the full 64-bit space.
2021-11-01 11:46:16 -07:00
Jim Gustafson
8310666076 Implement node interfaces for HsmEnclave 2021-10-26 18:58:20 -07:00
Jordan Rose
ed2e5bce3a bridge: Update generated decls 2021-10-25 15:19:47 -07:00
Jordan Rose
26ebba20ab bridge: Restrict bridge_deserialize! to only the most common case
Unlike bridge_get or bridge_get_bytearray, bridge_deserialize doesn't
do any complicated transformation of the return value to accept
optional or non-optional, failable and non-failable results alike. At
the same time, its syntax has been subtly different from the other
bridge_fn macros, dating from when we were first setting up this
library. Since the extra parameters to rename or disable a particular
bridge's entry point were rarely used, this commit removes them and
replaces those use sites with spelled-out bridge_fns. This in turn
allows removing the custom per-bridge implementations of
bridge_deserialize in favor of a bridge_fn-based implementation like
bridge_get already has.
2021-10-25 13:18:11 -07:00
Jordan Rose
64ad39c54d Remove support for HKDF "versions"
Previously, we had HKDF-for-session-version-3, which matches RFC 5869,
and HKDF-for-session-version-2, which produced slightly different
results. However, nothing in the current versions of Signal uses
anything but the RFC-compliant version. Therefore, this commit removes
support for version 2 and deprecates the entry points that take a
version:

- Java: The HKDFv3 class is deprecated in favor of static methods on
  the HKDF class.
- Swift: The hkdf function that takes a 'version' parameter is
  deprecated in favor of a new overload that does not.
- TypeScript: The HKDF class is deprecated in favor of a top-level
  hkdf function.
- Rust: The libsignal-protocol implementation of HKDF has been removed
  entirely in favor of the hkdf crate.

There are no significant benchmark deltas from this change, and a
minimal code size increase that's the cost for removing our own
implementation of HKDF. The deprecations can be removed as a later
breaking change.
2021-10-14 16:02:56 -07:00
Jordan Rose
ddce4ee3a4 Make it clear to node-gyp which action arguments are paths
On Windows, node-gyp tries to be helpful by changing forward slashes
to backslashes and making paths relative to the source root rather
than the build directory, and indeed we rely on that. However, it has
to guess what's a path and what isn't. Previously, we worked around
that by manually stripping the prepended "..\", but the node-gyp
maintainers suggested a better workaround of using joined arguments
instead (`--foo=bar` instead of `--foo bar`).
2021-09-21 10:28:11 -07:00
Jordan Rose
8c5b6af3fa Sealed sender v2: add an InvalidRegistrationId exception/error
This dedicated error is thrown when a recipient has a registration ID
that's out of the range used by Signal [0, 0x3FFF]. These IDs cannot
be encoded in the sealed sender v2 format and are not supported, even
though they don't cause any problems for 1:1 messages.
2021-08-31 13:11:10 -07:00
Jordan Rose
d72047a245 Bridge: expose RustCrypto's AES-GCM-SIV instead of our own
Same as before, but for the wrapper exposed to the app languages.
2021-07-01 13:46:20 -07:00
Andreas Schneider
a8a24f66c6 node: Build node modules with python3
This fixes the build on openSUSE Tumbleweed.
2021-06-09 09:19:17 +02:00
Jordan Rose
b780409c1b Add a deviceId field to DecryptionErrorMessage
This allows a device to know whether it's the one that sent a bad
message, and take action accordingly.

We could have a slightly more typesafe API here by using
ProtocolAddress and extracting the device ID, but that doesn't match
up with getting the device ID out of a sealed sender certificate.
2021-05-26 17:23:42 -07:00
Jordan Rose
b17b83614c Node: fix merge conflict in tests. 2021-05-26 16:41:48 -07:00
Jordan Rose
2491447ee7
Merge pull request #316 from signalapp/jrose/DecryptionErrorMessage-and-PlaintextContent-2
Add DecryptionErrorMessage and PlaintextContent (alternate)
2021-05-26 16:27:49 -07:00
Jordan Rose
51dd86a1db Finalize ContentHint design
- Default: sender will not resend; an error should be shown
  immediately
- Resendable: sender will try to resend; delay any error UI if
  possible
- Implicit: don't show any error UI at all; this is something sent
  implicitly like a typing message or a receipt
2021-05-26 15:57:45 -07:00
Jordan Rose
f7acf9005e Add SessionRecord.currentRatchetKeyMatches
This checks if there is an active sender state using the given ratchet
key, for use with decryption error messages. In this case, the app may
choose to archive the current session, or take even stronger actions
such as fetching new prekeys for the recipient.
2021-05-26 15:41:04 -07:00
Jordan Rose
3f3a6e1aca Expose DecryptionErrorMessage and PlaintextContent to Java/Swift/TS 2021-05-26 15:41:04 -07:00
Jordan Rose
6f9083175e Get registration IDs from sessions for Sealed Sender v2
The app-visible change is that sealedSenderMultiRecipientEncrypt now
takes a SessionStore as well. Sessions will be looked up in bulk using
a new SessionStore API, 'loadExistingSessions' or
'getExistingSessions`. The registration ID is then loaded from each
session and included in the resulting SSv2 payload.

The implementation is a bit of a divergence from some other APIs in
libsignal-client in that the "look up in bulk" step is performed in
the Java, Swift, or TypeScript layer, with the resulting sessions
passed down to Rust. Why? Because otherwise we'd pass a list of
addresses into Rust, which would have to turn them back into a Java,
Swift, or TypeScript array to call the SessionStore method. This would
be (1) a bunch of extra work to implement, and (2) a waste of CPU when
we already /have/ a list of addresses in the correct format: the
argument to sealedSenderMultiRecipientEncrypt.

This is an example of "the boundaries between the Rust and
Java/Swift/TypeScript parts of the library don't have to be perfect;
they're internal to the overall product". In this case, we've taken
that a little further than usual: usually we try to make the
libsignal-protocol API as convenient as possible as well, but here it
had to be a bit lower-level to satisfy the needs of the app language
wrappers. (Specifically, callers need to fetch the list of
SessionRecords themselves.)

P.S. Why doesn't v1 of sealed sender include registration IDs? Because
for SSv1, libsignal-client isn't producing the entire request body to
upload to the server; it's only producing the message content that
will be decrypted by the recipient. With SSv2, the serialized message
the recipient downloads has both shared and per-recipient data in it,
which the server must assemble from the uploaded request. Because of
this, SSv2's encrypt API might as well produce the entire request.
2021-05-20 18:04:03 -07:00
Jordan Rose
1fd8da669b
Revert "Add registration IDs to the Sealed Sender v2 upload (encrypt) format" (#303) 2021-05-17 10:03:49 -07:00
Jordan Rose
b5cddf9dbb Add registration IDs to the Sealed Sender v2 upload (encrypt) format
Registration IDs are used to detect if a device ID has been reused,
since the new device will (with high probability) use a different
randomly-generated registration ID from the old one. The server should
be able to validate this for SSv2 like it does for SSv1, though the
handling of this for SSv1 is in the various apps.
2021-05-14 15:38:31 -07:00
Jordan Rose
5ef78c0004
Merge pull request #293 from signalapp/jrose/SenderKey-message-versions
A SenderKeyMessage's version must match the SenderKeyState
2021-05-10 17:02:23 -07:00
Jordan Rose
1871473315
Merge pull request #282 from signalapp/jrose/node-DuplicatedMessageError
Node: Make a dedicated error code for DuplicatedMessage
2021-05-10 10:05:52 -07:00
Jordan Rose
4569e1ffaf SenderKey: Use the session version as the message version
We still encode the "current" version in the message version byte, but
the part that the receiver will check is now based on the session's
original message version rather than the "current" version in the
sender. (Note that these are the /same/ version right now, so this
change won't have any effect on the current wire format.)

This matches the behavior of SignalMessage and PreKeySignalMessage.
2021-05-07 18:24:44 -07:00
Jordan Rose
8af0ab17f2 Remove public constructors for *Message types
The parameters for these constructors cannot be chosen correctly in
isolation; messages always need to be created as part of a session.

The Node APIs have been renamed with leading underscores rather than
removed because we *did* have tests that explicitly constructed
messages just to test that they faithfully preserve information. In
this case the parameters are plausible values but not used for
anything.
2021-05-07 18:17:46 -07:00
Jordan Rose
f962e387b7 Java: allow a null info for HKDF (treated as empty)
Restores compatibility with libsignal-protocol-java.
2021-05-07 10:47:34 -07:00
Jordan Rose
e60e62286c Node: Make a dedicated error code for DuplicatedMessage
This was MessageCounterError in libtextsecure; it's an "error" in that
it interrupts processing of an individual message, but that message
is then be discarded in practice.
2021-04-29 10:57:39 -07:00
Jordan Rose
8db505b4f7 GitHub: add a workflow to publish a tag to NPM
And remove the old copy_repo.sh used to generate
libsignal-client-node.
2021-04-28 10:50:27 -07:00
Jordan Rose
1ccc91ae81 Node: use prebuildify to handle package prebuilding 2021-04-28 10:50:27 -07:00
Jordan Rose
9e74165f0d Bridge: add support for strongly-typed Node errors
Within a new 'Errors' module, we have a base class that indicates this
is a strongly-typed error, and an enum to identify what kind of error
it is and thus what extra properties it might have. TypeScript's type
narrowing support make this possible to do safely as long as all
instances of the base class do in fact have the extra properties that
match their code (and do not have an invalid code).

To expose this to Rust (via Neon):

- After loading the Rust library into Node, set an 'Errors' property
  with the relevant error types on the module object.

- Whenever a bridge_fn produces an error, pass it to a new
  SignalNodeError::throw API along with the 'this' object, which is
  assumed to have to be the object with the 'Errors' property.

This is a little less tidy than how we do Java exceptions, but it
comes from not having access to the error classes by some kind of
absolute name. Alternate approaches considered include:

- Use an initialized-once global. Downside: would not work if you ever
  had more than one Node engine live in a process, or quit and restarted
  it.

- Store the errors on the global object under some long, complicated
  key (like "org.signal.libsignal-client.Errors"). Downside: pollutes
  the global object.

- Generate the base class using Neon instead of writing it in
  TypeScript. Downsides: inconvenient, difficult to maintain, harder to
  use /from/ TypeScript.
2021-04-07 10:23:43 -07:00
Jordan Rose
18463e8357 Switch to a flat (non-protobuf) encoding for SealedSender v2
We're optimizing for size overhead in this encoding, so forego the
flexibility of protobufs in favor of a flat encoding (though one that
still uses protobuf's varints). Additionally, this encoding includes
the recipients inline in the message so the client can dump it all to
server in one go.

As a side effect, this means an SSv2 message encoded for sending no
longer has the same format as one encoded for receiving when there's
only one recipient. Consequently, all the tests need to be modified to
"fan out" a multi-recipient message to several single-recipient
messages. For simplicity, the wrapper language tests only support this
operation for SSv2 messages sent to exactly one recipient.
2021-04-05 11:46:52 -07:00
Jordan Rose
690dfde027 Add contentHint and groupId fields to UnidentifiedSenderMessageContent
And to the ProtocolExceptions for Java, thrown when a sealed sender
message's content fails to decrypt. (Eventually all languages will
support this.)
2021-04-05 11:46:52 -07:00
Jordan Rose
d339d5a072 Expose Sealed Sender v2 to clients
- Add a new "multi-recipient encrypt" entry point
- Add an "encrypt v1 sealed sender from UnidentifiedSenderMessage-
  Content" entry point
- Add a public constructor for UnidentifiedSenderMessageContent
- Change group_encrypt to return a CiphertextMessage instead of bytes,
  so it can be used with the above
- Java: add SenderKeyStore to SignalProtocolStore requirements
2021-04-05 11:31:27 -07:00
Jordan Rose
8509374928 SenderKeyDistributionMessage is not a CiphertextMessage
It's a payload message, something that would go inside a SignalMessage
or PreKeySignalMessage. Drop it from all the enums, and while we're
here let's sync up the CiphertextMessageType::SenderKey case with the
sealed sender content type and the envelope content type.
2021-04-05 11:31:27 -07:00
Jordan Rose
35810dc80b protocol: Test version bytes the same way as libsignal-protocol-java
This slipped in the original translation to Rust, but it doesn't
matter in practice because both nibbles of the version byte have had
the same value for a long time.
2021-03-31 14:53:33 -07:00
Jordan Rose
fd21109476 Use a strongly-typed UUID for the distribution ID of SenderKeyMessages
That's a java.util.UUID for Android, Foundation.UUID for iOS, and, uh,
strings for Electron.
2021-03-25 12:48:14 -07:00
Jordan Rose
f6267f3391 Remove SenderKeyName abstraction
With distribution IDs embedded in SenderKeyMessage and
SenderKeyDistributionMessage, the abstraction of SenderKeyName (a
sender address + distribution ID tuple) is no longer pulling its
weight. Remove it from the implementation and the public API.
2021-03-25 09:44:31 -07:00
Jordan Rose
4ce9f7c192 Include distribution ID inside SenderKey[Distribution]Message
The distribution ID is used to identify which key a particular sender
is using to encrypt their SenderKeyMessage, so it has to be known as
part of decryption. The previous design had the distribution ID stored
alongside each message (perhaps on the "envelope" structure that's
received from the server), but that's harder to keep track of, and it
would only be present for certain message kinds anyway.
2021-03-25 09:44:04 -07:00
Jordan Rose
1a25f63a95 SenderKey: Rename 'keyId' to 'chainId', 'groupId' to 'distributionId'
Clarifies the use of "ID" in SenderKey-related APIs. I've left
deprecated entry points for Java but not for Swift and TypeScript
(which are not in use yet).

- SenderKeyMessage::key_id -> chain_id (avoids double "key" in name)
- SenderKeyDistributionMessage::id -> chain_id (to match SKM)
- SenderKeyName::group_id -> distribution_id (it's not the global group ID)
2021-03-25 09:40:20 -07:00
Jack Lloyd
09dd544f8a Fix bridge_handle! logic for disabling for certain targets
It only matched exactly `$typ as false` so for example
`$typ as false, mut = true` would cause the type to still be emitted.
2021-03-17 17:26:58 -04:00
Jack Lloyd
f8648c21cd Add hashes and HMAC for Java 2021-03-15 13:30:39 -04: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
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
400ad3ed56 Node: align log levels for TypeScript with log levels in the Rust enum 2021-03-09 10:17:07 -08:00
Jack Lloyd
875b18489d Test other SessionRecord getters 2021-03-08 15:42:31 -05: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
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
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
54af088e04 Expose HasCurrentState for Node
Desktop relies on this notion
2021-03-03 12:58:19 -05:00
Jack Lloyd
7de6609d87 Fix test 2021-02-26 12:14:19 -05:00
Jordan Rose
9a9b59160b Bridge: Move remaining JNI and Node store-based APIs over to bridge_fn
The exception is Java's SessionCipher_EncryptMessage, which
instantiates a different Java type based on the message type.
2021-02-19 17:31:35 -08:00
Jordan Rose
25c7b19891 Port SenderKeyStore to async bridge_fn 2021-02-19 14:55:26 -08:00
Jordan Rose
9d14d77bad Node: handle cleanups when there are argument type errors 2021-02-19 14:50:34 -08:00
Jordan Rose
cca278480e Node: Rust handle arguments should always be wrapped in JS objects
This will be necessary for async, which needs to keep the boxed Rust
values alive. (Node N-API only allows keeping JS objects alive; boxed
values don't count on their own.)
2021-02-19 12:16:30 -08:00
Jordan Rose
45d06344b1
Merge pull request #206 from signalapp/jrose/node-build-fixes
Node: fix debug build, generate source maps for testing
2021-02-19 10:59:57 -08:00
Jordan Rose
60234869ec Node: generate source maps for testing 2021-02-19 09:58:54 -08:00
Jordan Rose
e9be91f34d build_node_bridge.py: fix debug build 2021-02-19 09:58:54 -08:00
Jack Lloyd
e58c723c29 Have fns names match Swift's camalCase names 2021-02-19 08:42:35 -05:00
Jack Lloyd
852d3542eb Add sealed sender TS test 2021-02-18 15:24:42 -05:00
Jack Lloyd
6c94e037b4 TS store APIs 2021-02-18 14:27:23 -05:00
Jordan Rose
10976eb755 Node: statically link the C runtime on Windows
On Windows, the C runtime doesn't come preinstalled, so we need to
link it to avoid passing a dependency on to our users.
2021-02-16 15:44:53 -08:00
Jordan Rose
65c6efd64d
Merge pull request #195 from dennisameling/add-cross-compilation-support
Add node multi-arch/cross-compilation support
2021-02-12 17:02:36 -08:00
Dennis Ameling
0042e0d60c Add Node multi-arch support 2021-02-13 01:45:37 +01:00
Jack Lloyd
89670ba4d9 Fix store interface to return Promise 2021-02-12 16:13:53 -05:00
Jack Lloyd
4e75eda3dd Add support for SenderKeyStore in TypeScript API 2021-02-12 15:41:38 -05:00
Jack Lloyd
b10f747048 Add a few missing bindings 2021-02-08 13:53:07 -05:00