mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 11:45:28 +00:00
Upgrade to libsignal 0.80.3 and add a new trust root for sealed sender.
This commit is contained in:
committed by
Greyson Parrelli
parent
f0df1b99e5
commit
0b71b1837c
@@ -24,6 +24,7 @@ import org.whispersystems.signalservice.api.crypto.SealedSenderAccess;
|
||||
import org.whispersystems.signalservice.api.crypto.UnidentifiedAccess;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
@@ -185,8 +186,15 @@ public class SealedSenderAccessUtil {
|
||||
|
||||
private static CertificateValidator buildCertificateValidator() {
|
||||
try {
|
||||
ECPublicKey unidentifiedSenderTrustRoot = new ECPublicKey(Base64.decode(BuildConfig.UNIDENTIFIED_SENDER_TRUST_ROOT));
|
||||
return new CertificateValidator(unidentifiedSenderTrustRoot);
|
||||
String[] base64Strings = BuildConfig.UNIDENTIFIED_SENDER_TRUST_ROOTS;
|
||||
ArrayList<ECPublicKey> roots = new ArrayList<>(base64Strings.length);
|
||||
|
||||
for (String base64String: base64Strings) {
|
||||
ECPublicKey unidentifiedSenderTrustRoot = new ECPublicKey(Base64.decode(base64String));
|
||||
roots.add(unidentifiedSenderTrustRoot);
|
||||
}
|
||||
|
||||
return new CertificateValidator(roots);
|
||||
} catch (InvalidKeyException | IOException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user