-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement PNI #245
Implement PNI #245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm just leaving comments here after testing registration. I'm not a maintainer but would like to see presage registration working again.
Server setup:
WORK_DIR $ git clone https://github.com/signalapp/Signal-Server
WORK_DIR $ cd Signal-Server
WORK_DIR/Signal-Server $ git checkout v12.51.0
WORK_DIR/Signal-Server $ ./mvnw integration-test -Ptest-server -Dskip-tests=true
Client test:
WORK_DIR $ git clone https://github.com/whisperfish/libsignal-service-rs
WORK_DIR $ cd libsignal-service-rs
WORK_DIR/libsignal-service-rs $ git apply PATCH
WORK_DIR/libsignal-service-rs $ cd ..
WORK_DIR $ git clone https://github.com/whisperfish/presage -b aci-pni
WORK_DIR $ cd presage/presage-cli
WORK_DIR/presage/presage-cli $ cargo run -- register -s staging --phone-number +xxxxxxxxxxx --captcha signalcaptcha://test.test.registration.test
Patch to libsignal-service-rs that uses the local server:
diff --git a/libsignal-service/src/configuration.rs b/libsignal-service/src/configuration.rs
index fff3cc6eb..1cdc5794c 100644
--- a/libsignal-service/src/configuration.rs
+++ b/libsignal-service/src/configuration.rs
@@ -119,16 +119,16 @@ impl From<&SignalServers> for ServiceConfiguration {
// configuration with the Signal API staging endpoints
// see: https://github.com/signalapp/Signal-Desktop/blob/master/config/default.json
SignalServers::Staging => ServiceConfiguration {
- service_url: "https://chat.staging.signal.org".parse().unwrap(),
- storage_url:"https://storage-staging.signal.org".parse().unwrap(),
+ service_url: "http://localhost:8080".parse().unwrap(),
+ storage_url:"https://0.0.0.0".parse().unwrap(),
cdn_urls: {
let mut map = HashMap::new();
- map.insert(0, "https://cdn-staging.signal.org".parse().unwrap());
- map.insert(2, "https://cdn2-staging.signal.org".parse().unwrap());
+ map.insert(0, "https://0.0.0.0".parse().unwrap());
+ map.insert(2, "https://0.0.0.0".parse().unwrap());
map
},
contact_discovery_url:
- "https://api-staging.directory.signal.org".parse().unwrap(),
+ "https://0.0.0.0".parse().unwrap(),
certificate_authority: include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/certs/staging-root-ca.pem")).to_string(),
unidentified_sender_trust_root:
PublicKey::deserialize(&BASE64_RELAXED.decode("BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx").unwrap()).unwrap(),
@flamingradian Thank you for testing. Since @gferon is not available right now, I will try to finish this PR. |
The keys are stored in the state tree of the `SledStore` under static keys next to registered data. This allows to get/set them independently of registered data.
Looks like I can't push to this PR. I have a fix for register/linking devices. |
Thanks! I'll invite you as a collaborator to the repo and then it should work. |
Manually tested with gurk. So far did not see any problems. Migration did not work, however I am not sure my v4 store state was correct. |
Testing with Flare works for me. Migration worked as well. |
Now, next step is to extend presage's contacts store with a flag whether to send a pni signuture or not. |
Make use of whisperfish/libsignal-service-rs#285