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

8 Commits

Author SHA1 Message Date
Alex Konradi
eb63e3037c
Import latest backup proto definition
Notable changes:
- addition of payment notifications
2024-05-22 15:25:05 -04:00
Alex Konradi
f18b39f5b0
Revert "Move message backup proto and I/O to new crate"
This reverts commit 55536686be.
2024-05-20 16:50:03 -04:00
Alex Konradi
55536686be
Move message backup proto and I/O to new crate
Add a new crate, libsignal-message-backup-io, and move the existing code that 
handles backup decryption, deframing, and protobuf deserialization there. Keep 
the actual validation of the protobuf contents in the libsignal-message-backup 
crate.

This allows the existing example binproto<->json binaries to be built with 
local modifications to the backup.proto file without also requiring all the 
validation code to be modified.
2024-05-15 14:10:53 -04:00
Alex Konradi
467b0f17b9
Add message backup validation negative tests
Add the ability to write tests that check error messages produced during
validation. Add a couple test cases.
2024-02-15 14:59:08 -05:00
Alex Konradi
9dc14c6726
Use static dispatch for proto unknown field detection
Add a derive macro and attach it to each generated protobuf message. The 
generated code will walk each field in the message and dispatch recursively to 
the same trait to find all unknown fields. Keep the existing 
dynamically-dispatched descriptor-walking implementation since it's easier to 
understand, but only use it to ensure parity with the macro-generated version 
via test cases.
2024-01-23 09:05:29 -05:00
Alex Konradi
3afe5bfe58
Implement protobuf unknown field detection using field descriptors
Implement protobuf unknown field search by walking the tree of field
descriptors.
2024-01-10 17:08:13 -05:00
Alex Konradi
60b7c42d71
Add basic message backup protobuf validation
Check for duplicate records and foreign keys. Checking for unknown fields is 
deferred for a future change.
2024-01-05 16:09:29 -05:00
Alex Konradi
4733aceef4
Start message-backup crate with protos and keys
Introduce the message-backup crate with protobuf definitions and code to derive 
keys used to encrypt, store, and decrypt backups.
2023-12-15 18:15:07 -05:00