Move to Signal Protocol written in Rust.

Co-authored-by: Alex Hart <alex@signal.org>
This commit is contained in:
Jack Lloyd
2020-11-12 14:29:06 -05:00
committed by Alex Hart
parent 02931f1826
commit 13c014215d
14 changed files with 53 additions and 57 deletions

View File

@@ -22,6 +22,7 @@ import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.megaphone.Megaphones;
import org.thoughtcrime.securesms.registration.service.KeyBackupSystemWrongPinException;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.whispersystems.libsignal.InvalidKeyException;
import org.whispersystems.libsignal.util.guava.Optional;
import org.whispersystems.signalservice.api.KbsPinData;
import org.whispersystems.signalservice.api.KeyBackupService;
@@ -90,7 +91,7 @@ public final class PinState {
}
return kbsData;
} catch (UnauthenticatedResponseException e) {
} catch (UnauthenticatedResponseException | InvalidKeyException e) {
Log.w(TAG, "Failed to restore key", e);
throw new IOException(e);
} catch (KeyBackupServicePinException e) {
@@ -170,7 +171,7 @@ public final class PinState {
*/
@WorkerThread
public static synchronized void onPinChangedOrCreated(@NonNull Context context, @NonNull String pin, @NonNull PinKeyboardType keyboard)
throws IOException, UnauthenticatedResponseException
throws IOException, UnauthenticatedResponseException, InvalidKeyException
{
Log.i(TAG, "onPinChangedOrCreated()");
@@ -272,7 +273,7 @@ public final class PinState {
*/
@WorkerThread
public static synchronized void onMigrateToRegistrationLockV2(@NonNull Context context, @NonNull String pin)
throws IOException, UnauthenticatedResponseException
throws IOException, UnauthenticatedResponseException, InvalidKeyException
{
Log.i(TAG, "onMigrateToRegistrationLockV2()");