Skip to content

Conversation

@rubdos
Copy link
Member

@rubdos rubdos commented Jan 14, 2026

@rubdos rubdos marked this pull request as ready for review January 14, 2026 10:47
@rubdos
Copy link
Member Author

rubdos commented Jan 14, 2026

Untested, but this should work.

I had to

                    &self.trust_roots.iter().collect::<Vec<_>>(),

because Signal exposes the validate_with_trust_roots with &[&PublicKey]. They do this as it's easier for FFI (Java bridge, Java is pointers everywhere), but I don't find it very Rusty. The alternative would be to patch libsignal-core to accept &[PublicKey], and to make the bridges do the realloc instead... I can try and see whether I can coerce Jordan (get it, coerce? haha)

rubdos added a commit to whisperfish/libsignal-client that referenced this pull request Jan 14, 2026
This refactors SenderCertificate::validate_with_trust_roots to take
`&[PublicKey]` instead of the double indirection `&[&PublicKey]`.
Originally, this seems to have been introduced to be more FFI-friendly,
but is rather inconvenient to work with from the Rust-API side.

This does, however, require that FFI-calls reallocate the incoming PublicKey
list.

For context, see whisperfish/libsignal-service-rs#385
@rubdos rubdos merged commit 10c734f into main Jan 14, 2026
7 checks passed
@rubdos rubdos deleted the trust-roots branch January 14, 2026 18:06
rubdos added a commit to whisperfish/libsignal-client that referenced this pull request Jan 17, 2026
This refactors SenderCertificate::validate_with_trust_roots to take
`&[PublicKey]` instead of the double indirection `&[&PublicKey]`.
Originally, this seems to have been introduced to be more FFI-friendly,
but is rather inconvenient to work with from the Rust-API side.

This does, however, require that FFI-calls reallocate the incoming PublicKey
list.

For context, see whisperfish/libsignal-service-rs#385
rubdos added a commit to whisperfish/libsignal-client that referenced this pull request Jan 17, 2026
This refactors SenderCertificate::validate_with_trust_roots to take
`&[PublicKey]` instead of the double indirection `&[&PublicKey]`.
Originally, this seems to have been introduced to be more FFI-friendly,
but is rather inconvenient to work with from the Rust-API side.

This does, however, require that FFI-calls reallocate the incoming PublicKey
list.

For context, see whisperfish/libsignal-service-rs#385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants