From eb38734452d3ff5c6efc07220bc8264f3af4157d Mon Sep 17 00:00:00 2001 From: Juraj Bednar Date: Sun, 5 Jul 2015 19:53:15 +0200 Subject: [PATCH] signalingKey needs to be set at register phase, otherwise loading of JSON would fail at verify step, because the key is not contained in JSON there. --- src/main/java/cli/Manager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cli/Manager.java b/src/main/java/cli/Manager.java index 97070c97..76d54ee0 100644 --- a/src/main/java/cli/Manager.java +++ b/src/main/java/cli/Manager.java @@ -117,6 +117,7 @@ public class Manager { public void register() throws IOException { password = Util.getSecret(18); + signalingKey = Util.getSecret(52); accountManager = new TextSecureAccountManager(URL, TRUST_STORE, username, password); @@ -126,7 +127,6 @@ public class Manager { public void verifyAccount(String verificationCode) throws IOException { verificationCode = verificationCode.replace("-", ""); - signalingKey = Util.getSecret(52); accountManager.verifyAccount(verificationCode, signalingKey, false, axolotlStore.getLocalRegistrationId()); //accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));