Jack Lloyd
6c030d56a5
Drop down to 25k
2021-01-16 15:07:42 -05:00
Jack Lloyd
6c4cd62d1d
Many encryptings
2021-01-16 14:32:22 -05:00
Jordan Rose
2d8c877baa
Move SignalMessage and PreKeySignalMessage to bridge_fn
2021-01-14 13:34:58 -08:00
Jordan Rose
19be1c569d
Convert publickey_verify to bridge_fn
...
This included reordering parameters in the C version so that the
output parameter is always first. That's consistent with our other C
APIs anyway.
2021-01-14 13:34:34 -08:00
Jordan Rose
c7b4785b9e
Merge pull request #114 from signalapp/jrose/rethrow-errors-and-exceptions
...
Propagate callback exceptions/errors when they fail the whole operation
2021-01-12 12:37:45 -08:00
Jordan Rose
8fa2f4a73f
JNI: Rethrow callback exceptions instead of wrapping them
2021-01-12 11:54:19 -08:00
Jordan Rose
049300d9d4
JNI: Report callback exceptions as the "cause" of a callback failing
2021-01-12 11:54:19 -08:00
Jack Lloyd
7f87232e3d
Bump Java version to 0.2.1 for release
2021-01-11 16:58:21 -05:00
Jack Lloyd
ba91fe441e
Merge pull request #135 from signalapp/jack/fix-decrypt-logic
...
Fix handling when attempting to decrypt with a session that isn't found
2021-01-07 16:47:51 -05:00
Jack Lloyd
0184984db5
Add a test that decryption works after you archive a session state
2021-01-07 15:24:44 -05:00
Jack Lloyd
564a1b7d54
Resolve difference in behavior between Java and Rust SessionRecord
...
In libsignal-protocol-java, SessionRecord holds a SesssionState struct which is
the "active" session plus a list of old states. If the record is freshly
created, there is still a SessionState, but it is an uninitialized/new protobuf
structure which causes all fields to be empty/zero/false.
So in the original Java logic you can call for example hasSenderChain, and on
an empty/fresh record it will return false. However in Rust, in this case the
Option is empty and we return an error instead.
For hasSenderChain, it seems reasonable to return false if there is no active
session, since if there is no session there is certainly no chain.
Android also expects the session version to be == 0 on such sessions, but this
makes less sense, so have this logic only in the Java binding and not in the
Rust library proper.
2021-01-07 13:15:25 -05:00
Jack Lloyd
8ae34e784b
Remove SessionState from Java interface
...
With https://github.com/signalapp/Signal-Android-Private/pull/1279 merged,
Android no longer uses SessionState
2021-01-06 12:57:41 -05:00
Jordan Rose
7b3093ddbb
Add a --verify option to gen_java_decl.py
...
And bump the copyright years to 2021.
2021-01-04 12:08:26 -08:00
Sebastian
b9cfddb97a
Implement IdentityKeyPair Deserialize
2021-01-04 17:42:41 +01:00
Jordan Rose
e4ad87fb85
Merge pull request #76 from signalapp/jrose/begin-merging-bridge-libraries
...
Begin merging bridge libraries (ffi and jni)
2020-12-10 13:12:33 -08:00
Jordan Rose
0e19342801
Build libsignal_jni.so with LTO when using it from Java
...
When building a cdylib, Rust currently doesn't export public symbols
on Linux if they come from a dependency. However, enabling LTO gets
around this by performing the filtering step after the merging.
https://github.com/rust-lang/rfcs/issues/2771
2020-12-10 11:29:42 -08:00
Jack Lloyd
059d514611
Merge pull request #113 from signalapp/jack/bump-java-version
...
Bump the Java version number
2020-12-10 14:06:49 -05:00
Jack Lloyd
6cd9771fab
Bump the Java version number
...
Arbitrarily bumping the minor version to signify more notable changes
than prior versions, eg
- Sealed sender now in Rust
- Removed protobufs from Java
- Partial removal of SessionState from Java
- Adding AES-GCM-SIV
2020-12-10 13:24:06 -05:00
Jack Lloyd
21ddb9f112
Merge pull request #93 from signalapp/jack/docker-clean
...
Fix clean target and use it during Docker builds
2020-12-10 13:20:33 -05:00
Jack Lloyd
adb4a65772
For clean target on Desktop, also remove dll and dylib
2020-12-10 13:08:31 -05:00
Jack Lloyd
4131f8075c
Merge pull request #105 from signalapp/jack/no-more-java-protobuf
...
Remove protobuf from Java binding
2020-12-10 10:24:14 -05:00
Jack Lloyd
4b4af51b08
Remove more of SessionState from the Java binding
...
Leaving only a few bits still directly used by Android
2020-12-09 17:29:20 -05:00
Jack Lloyd
f471a455c0
Merge pull request #102 from signalapp/jack/java-session-cleanup
...
Cleanup Java Session logic
2020-12-09 16:52:14 -05:00
Jack Lloyd
f4f2a98985
Remove bogus constructor
2020-12-09 15:31:29 -05:00
Jack Lloyd
4b4b7e3df6
Make some changes on the road to removing SessionState from Java
2020-12-09 13:48:14 -05:00
Jack Lloyd
612ef9f44c
Remove protobuf from Java
2020-12-09 13:01:31 -05:00
Jordan Rose
d05089e6e8
Java: get local tests working on Mac as well
2020-12-08 17:24:03 -08:00
Jack Lloyd
a8c0555f4e
Transfer SessionRecords via handle instead of serialization
2020-12-08 18:18:46 -05:00
Jack Lloyd
f8182af008
Invoke native methods instead of manipulating protobufs within Java
2020-12-08 18:13:12 -05:00
Jack Lloyd
a32efa2d24
Remove some Java API surface no longer needed
...
Some cruft still remains for the tests which is hard to avoid, eg getAliceBaseKey
2020-12-08 18:13:06 -05:00
Jordan Rose
64ee8d34ef
Java: add old JUnit as a dependency for the on-Android tests
2020-12-08 14:44:40 -08:00
Jack Lloyd
07ac8befdc
Merge pull request #100 from signalapp/jack/log-java-exceptions
...
Have Maven log stack traces of tests that fail with exceptions
2020-12-07 17:55:32 -05:00
Jack Lloyd
fe45db9c82
Have Maven log stack traces of tests that fail with exceptions
2020-12-07 17:28:03 -05:00
Jack Lloyd
9f11b256a8
Expose AES-GCM-SIV to Java and Swift
2020-12-04 18:13:16 -05:00
Jordan Rose
725ded881b
Java: Generate debug symbols for the native Rust library
2020-12-04 11:35:03 -08:00
Jack Lloyd
ffa29d133a
Fix clean target and use it during Docker builds
2020-12-03 16:34:11 -05:00
Jordan Rose
d1df148cc8
Java: Escape some non-ASCII characters in a test case
2020-12-01 16:54:35 -08:00
Jordan Rose
df87cd2edf
UnidentifiedSenderMessageContent: Don't validate the sender up front
...
Both the Android and iOS clients currently allow customizing this
validatation logic for testing purposes, and iOS additionally wants to
log the information about the unwrapped message even if there are
problems with it.
iOS does also currently log information about the unwrapped message
even if the static key being used is wrong, but in order to fix that
we'd have to have a secondary return value (either the expected static
key, computed during decrypt-to-USMC, or a flag saying whether the
comparison failed).
2020-12-01 16:50:49 -08:00
Jack Lloyd
643a637b34
Merge pull request #77 from signalapp/jack/sealed-sender
...
Sealed Sender
2020-12-01 17:43:30 -05:00
jimio-signal
97e3da2adc
modify Dockerfile for openjdk installation again
2020-11-30 21:37:13 -08:00
jimio-signal
e7ee1a617a
bump version number, publish clean build artifacts
2020-11-30 17:26:50 -08:00
Jordan Rose
84c380b0cd
Bump Java version number to 0.1.4
2020-11-24 10:17:06 -08:00
Jordan Rose
e64fa771e5
JNI: Handle InvalidKeyIdException in (Signed)PreKeyStore
...
And test that the exception is handled and not propagated.
2020-11-23 13:20:23 -08:00
Jack Lloyd
153fe71238
Remove Java-side protobufs for Sealed Sender
...
They were still being used in the tests
2020-11-21 04:58:57 -05:00
Jordan Rose
f7c6e27a90
Skip Gradle's daemon when building in Docker
2020-11-19 16:37:29 -08:00
Jordan Rose
99bffda143
Docker: Remove unnecessary extra copy of rust-toolchain
2020-11-19 16:20:16 -08:00
Jack Lloyd
786b9b5792
SealedSessionCipher decrypt
2020-11-19 16:06:04 -05:00
Jack Lloyd
405d071ead
SealedSessionCipher encrypt
2020-11-19 13:24:29 -05:00
Jack Lloyd
ddda1a3635
UnidentifiedSenderMessage
2020-11-19 13:24:29 -05:00
Jack Lloyd
4a8705dce1
UnidentifiedSenderMessageContent
2020-11-19 13:24:29 -05:00