This allows the file to be checked by tsc, which would have caught
some of the missing type aliases sooner (now added to Native.ts.in).
Strictly speaking the behavior is slightly different: we have returned
to exporting many items individually instead of collecting them on a
single object.
Co-authored-by: Alex Bakon <akonradi@signal.org>
The "fingerprint" / safety number operations *are* tied to the
"protocol" in that they provide a way to verify identity keys, but
they are also completely distinct from the message handling that the
rest of SignalProtocolError is used for.
Exceptions:
- Buffers decoding from strings (usually for tests)
- Buffer.concat, if immediately fed into libsignal, which we know
won't rely on the diverging behavior of slice()
- Encoding GroupIdentifier to base64
Everywhere else, Uint8Array was nearly a drop-in replacement. Places
where it wasn't:
- For tests, use assertArrayEquals more, which converts to hex first
(better diffs anyway)
- Use TextEncoder and TextDecoder for going back and forth between
strings and UTF-8 buffers *not* in the tests
This is a bit "belt and suspenders" in that the build scripts are also
the code setting the `log` crate feature that strips the logs, but it
does at least add confidence that we haven't flipped a condition
somewhere, or that the `log` crate feature doesn't work the same way
anymore.
This on-connect header will be used for lightweight "alerts" from the
server to an authenticated client. For now, it's only threaded through
to the Node implementation; the iOS and Android ones will come later.
On slow machines (like GitHub runners), capturing the first backtrace
was taking longer than the default Mocha timeout for each test. Take
that out of the automated testing; it can still be set manually if
necessary.
For 'authors' and 'license' this is a bulk setting for basically every
crate in the repo. It's not really *shorter* to say that they all get
their values from the root Cargo.toml, but it sets a precedent for
other values.
'version' is a little more interesting. The versions we use for tags
only really apply to the app libraries; it would be odd for Rust
clients to see a bump in the "version" for libsignal-protocol whenever
we do a release when most releases have no changes in
libsignal-protocol. So for now, only the bridge crates are taking the
version from the workspace; if we ever, say, release
libsignal-protocol on crates.io, it'll be important that it has its
own versioning scheme separate from libsignal as a whole.