From 9155f62d0b506e43568879878e757e8b2990b898 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 27 Sep 2018 18:14:57 -0300 Subject: [PATCH] Remove Amnesty International's key and add F-Droid Ripple key instead Fixes #1352 --- .../android/panic/FDroidSignaturePin.java | 84 +++++++++++++++++++ .../android/panic/PanicResponderActivity.java | 5 +- 2 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 briar-android/src/main/java/org/briarproject/briar/android/panic/FDroidSignaturePin.java diff --git a/briar-android/src/main/java/org/briarproject/briar/android/panic/FDroidSignaturePin.java b/briar-android/src/main/java/org/briarproject/briar/android/panic/FDroidSignaturePin.java new file mode 100644 index 000000000..ecbc01212 --- /dev/null +++ b/briar-android/src/main/java/org/briarproject/briar/android/panic/FDroidSignaturePin.java @@ -0,0 +1,84 @@ +package org.briarproject.briar.android.panic; + +import info.guardianproject.trustedintents.ApkSignaturePin; + +// needs to be public, because TrustedIntents will instantiate +public final class FDroidSignaturePin extends ApkSignaturePin { + + public FDroidSignaturePin() { + this.fingerprints = new String[] { + "927f7e38b6acbecd84e02dace33efa9a7a2f0979750f28f585688ee38b3a4e28"}; + this.certificates = new byte[][] { + {48, -126, 3, 95, 48, -126, 2, 71, -96, 3, 2, 1, 2, 2, 4, 28, + -30, 107, -102, 48, 13, 6, 9, 42, -122, 72, -122, -9, + 13, 1, 1, 11, 5, 0, 48, 96, 49, 11, 48, 9, 6, 3, 85, 4, + 6, 19, 2, 85, 75, 49, 12, 48, 10, 6, 3, 85, 4, 8, 19, 3, + 79, 82, 71, 49, 12, 48, 10, 6, 3, 85, 4, 7, 19, 3, 79, + 82, 71, 49, 19, 48, 17, 6, 3, 85, 4, 10, 19, 10, 102, + 100, 114, 111, 105, 100, 46, 111, 114, 103, 49, 15, 48, + 13, 6, 3, 85, 4, 11, 19, 6, 70, 68, 114, 111, 105, 100, + 49, 15, 48, 13, 6, 3, 85, 4, 3, 19, 6, 70, 68, 114, 111, + 105, 100, 48, 30, 23, 13, 49, 55, 49, 50, 48, 55, 49, + 55, 51, 48, 52, 50, 90, 23, 13, 52, 53, 48, 52, 50, 52, + 49, 55, 51, 48, 52, 50, 90, 48, 96, 49, 11, 48, 9, 6, 3, + 85, 4, 6, 19, 2, 85, 75, 49, 12, 48, 10, 6, 3, 85, 4, 8, + 19, 3, 79, 82, 71, 49, 12, 48, 10, 6, 3, 85, 4, 7, 19, + 3, 79, 82, 71, 49, 19, 48, 17, 6, 3, 85, 4, 10, 19, 10, + 102, 100, 114, 111, 105, 100, 46, 111, 114, 103, 49, 15, + 48, 13, 6, 3, 85, 4, 11, 19, 6, 70, 68, 114, 111, 105, + 100, 49, 15, 48, 13, 6, 3, 85, 4, 3, 19, 6, 70, 68, 114, + 111, 105, 100, 48, -126, 1, 34, 48, 13, 6, 9, 42, -122, + 72, -122, -9, 13, 1, 1, 1, 5, 0, 3, -126, 1, 15, 0, 48, + -126, 1, 10, 2, -126, 1, 1, 0, -107, -115, -106, 1, -26, + 72, -105, -99, 62, 3, -55, 34, 99, -112, -68, -20, -115, + 31, 34, 118, -50, 12, -32, -59, 74, -58, -37, -87, 21, + 105, 36, -82, 13, -51, 66, 4, 55, -111, 13, -46, -7, + -69, -15, 36, 118, -7, 101, -86, 123, -83, -103, 110, + 116, -54, 112, 46, 12, 96, -76, -48, -70, -33, -81, 52, + 59, 73, 107, -126, -72, -25, 32, 93, 29, -20, 5, -41, + -27, 123, -9, 104, -31, -59, -1, -83, -93, 99, 85, -116, + -62, -55, 18, -63, 6, -51, -110, 33, 9, 7, -49, 102, + -20, -122, -124, -68, 93, -102, 31, 48, 86, 96, -99, + 105, -52, 95, 12, 57, 99, 12, -24, 70, 40, -99, -20, + -21, -85, -70, -105, 95, 117, -31, 126, -126, -39, 46, + -62, 59, -23, -74, 108, -12, -56, -40, -96, 79, -37, + -82, 1, 99, -104, 48, -60, 92, 14, 109, 127, -22, 31, + 115, -27, 108, 9, 92, 118, -45, 103, 117, 57, -50, -82, + 114, -113, 68, -82, 87, 96, 111, 72, 65, -63, 12, 31, + -34, -31, -55, -101, 101, 101, 59, 73, -119, -122, 82, + 28, 47, -108, -85, 59, 46, 89, -93, -1, 9, -11, -51, 63, + -44, 109, -76, -103, -26, -49, -80, 6, 52, -27, 73, + -104, 40, 2, -101, -124, 60, -52, -105, -70, -24, -62, + 88, 38, 53, -99, -92, 31, 119, 26, 79, 60, -124, 25, + -115, -89, -115, -109, 0, 6, 122, -78, 116, 82, 3, 39, + -67, 45, -43, 17, -39, 2, 3, 1, 0, 1, -93, 33, 48, 31, + 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 63, 109, -42, + -109, 25, 22, 7, -37, -22, -41, -38, 58, -56, 2, -68, + -38, -22, 65, -28, -60, 48, 13, 6, 9, 42, -122, 72, + -122, -9, 13, 1, 1, 11, 5, 0, 3, -126, 1, 1, 0, 94, 17, + 31, 36, 85, -11, 85, 44, 19, -80, -20, -92, -118, 93, + 40, 45, 96, 31, -3, -37, -110, -96, 102, 81, 61, -74, + -125, -117, -112, 58, -47, 17, 78, -18, 111, -116, 26, + -91, 73, 100, 84, -99, 21, 87, 73, -106, 108, -51, -125, + -21, 119, -88, -78, 2, 82, -109, -64, -9, -86, -112, + -115, 66, -86, 46, 71, 107, -65, 96, -102, 47, 35, -45, + -126, 33, 34, 121, -25, -85, -121, -56, -42, 22, -1, + -95, -86, 81, 100, -70, 113, 104, -73, 22, -19, 79, -19, + 52, 62, 42, 76, -112, 94, -34, 42, -57, -75, -90, -58, + 118, 127, -106, -39, 108, -56, -79, 103, -33, 22, 3, 47, + 103, -76, -81, 53, -22, -44, -26, -102, 63, -99, 39, 38, + -108, 75, 33, 10, 25, -110, -125, -115, 114, -69, 73, + -112, 36, 74, 77, -82, -44, 29, -123, -8, -117, 71, + -105, 15, -109, 51, 22, 4, 80, 1, 43, 118, 121, -113, + -70, 83, -56, 82, -110, 4, -63, 16, -57, 126, -70, 81, + 73, 61, 2, -61, 24, -14, -10, 4, -21, 90, 24, 66, 41, + -57, -60, -113, -18, -54, -1, 103, -75, 32, -64, 67, + 103, 109, -79, -12, -113, -27, 114, 89, 116, 115, -13, + -123, -70, 61, -41, -46, -118, 29, -105, -97, -75, 39, + -51, 60, 88, 125, 55, -46, -95, 52, 57, 52, -115, 80, + 44, 109, 119, -116, -62, -77, -74, -88, 41, 57, -65, + -71, -115, -67, 23, 66, -21, 56, 51, -91, 109}}; + } + + +} diff --git a/briar-android/src/main/java/org/briarproject/briar/android/panic/PanicResponderActivity.java b/briar-android/src/main/java/org/briarproject/briar/android/panic/PanicResponderActivity.java index 9d64d1500..1fc500edf 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/panic/PanicResponderActivity.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/panic/PanicResponderActivity.java @@ -11,7 +11,6 @@ import org.briarproject.bramble.api.account.AccountManager; import org.briarproject.bramble.api.system.AndroidExecutor; import org.briarproject.briar.android.activity.ActivityComponent; import org.briarproject.briar.android.activity.BriarActivity; -import org.iilab.IilabEngineeringRSA2048Pin; import java.util.logging.Logger; @@ -44,8 +43,8 @@ public class PanicResponderActivity extends BriarActivity { TrustedIntents trustedIntents = TrustedIntents.get(this); // Guardian Project Ripple trustedIntents.addTrustedSigner(GuardianProjectRSA4096.class); - // Amnesty International's Panic Button, made by iilab.org - trustedIntents.addTrustedSigner(IilabEngineeringRSA2048Pin.class); + // F-Droid + trustedIntents.addTrustedSigner(FDroidSignaturePin.class); Intent intent = trustedIntents.getIntentFromTrustedSender(this); if (intent != null) {