Enable the Zk group library.
parent
098b298646
commit
36df3f234f
|
@ -126,7 +126,7 @@ android {
|
|||
buildConfigField "String", "KBS_ENCLAVE_NAME", "\"fe7c1bfae98f9b073d220366ea31163ee82f6d04bead774f71ca8e5c40847bfe\""
|
||||
buildConfigField "String", "KBS_MRENCLAVE", "\"a3baab19ef6ce6f34ab9ebb25ba722725ae44a8872dc0ff08ad6d83a9489de87\""
|
||||
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\""
|
||||
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"\""
|
||||
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X0=\""
|
||||
buildConfigField "String[]", "LANGUAGES", "new String[]{\"" + autoResConfig().collect { s -> s.replace('-r', '_') }.join('", "') + '"}'
|
||||
buildConfigField "int", "CANONICAL_VERSION_CODE", "$canonicalVersionCode"
|
||||
|
||||
|
@ -161,7 +161,6 @@ android {
|
|||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/proguard/androidx-annotations.pro'
|
||||
exclude 'lib/*/libzkgroup.so' // TODO: GV2 Remove line to include .so when used
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@ -201,7 +200,7 @@ android {
|
|||
buildConfigField "String", "CDS_MRENCLAVE", "\"ba4ebb438bc07713819ee6c98d94037747006d7df63fc9e44d2d6f1fec962a79\""
|
||||
buildConfigField "String", "KBS_ENCLAVE_NAME", "\"823a3b2c037ff0cbe305cc48928cfcc97c9ed4a8ca6d49af6f7d6981fb60a4e9\""
|
||||
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx\""
|
||||
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"\""
|
||||
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdls=\""
|
||||
}
|
||||
flipper {
|
||||
initWith debug
|
||||
|
|
|
@ -4,7 +4,7 @@ import androidx.annotation.NonNull;
|
|||
|
||||
public final class BadGroupIdException extends Exception {
|
||||
|
||||
public BadGroupIdException() {
|
||||
BadGroupIdException() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
|
|
@ -425,11 +425,7 @@ public final class PushProcessMessageJob extends BaseJob {
|
|||
Log.w(TAG, e);
|
||||
handleCorruptMessage(e.getSender(), e.getSenderDevice(), timestamp, smsMessageId);
|
||||
} catch (BadGroupIdException e) {
|
||||
if (!FeatureFlags.ZK_GROUPS) {
|
||||
Log.w(TAG, "Ignoring message with GV2 - no ZK_GROUP library", e);
|
||||
} else {
|
||||
Log.w(TAG, "Ignoring message with bad group id", e);
|
||||
}
|
||||
Log.w(TAG, "Ignoring message with bad group id", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ public final class FeatureFlags {
|
|||
|
||||
/** Groups v2 send and receive. */
|
||||
public static boolean groupsV2() {
|
||||
return org.whispersystems.signalservice.FeatureFlags.ZK_GROUPS && getBoolean(GROUPS_V2, false);
|
||||
return getBoolean(GROUPS_V2, false);
|
||||
}
|
||||
|
||||
/** Groups v2 send and receive. */
|
||||
|
@ -507,7 +507,4 @@ public final class FeatureFlags {
|
|||
|
||||
/** Read and write versioned profile information. */
|
||||
public static final boolean VERSIONED_PROFILES = org.whispersystems.signalservice.FeatureFlags.VERSIONED_PROFILES;
|
||||
|
||||
/** Enabled ZKGroups library. */
|
||||
public static final boolean ZK_GROUPS = org.whispersystems.signalservice.FeatureFlags.ZK_GROUPS;
|
||||
}
|
||||
|
|
|
@ -41,9 +41,6 @@ public final class GroupUtil {
|
|||
if (groupContext.getGroupV1().isPresent()) {
|
||||
return GroupId.v1(groupContext.getGroupV1().get().getGroupId());
|
||||
} else if (groupContext.getGroupV2().isPresent()) {
|
||||
if (!FeatureFlags.ZK_GROUPS) {
|
||||
throw new BadGroupIdException();
|
||||
}
|
||||
return GroupId.v2(groupContext.getGroupV2().get().getMasterKey());
|
||||
} else {
|
||||
throw new AssertionError();
|
||||
|
|
|
@ -5,9 +5,7 @@ package org.whispersystems.signalservice;
|
|||
* After a feature has been launched, the flag should be removed.
|
||||
*/
|
||||
public final class FeatureFlags {
|
||||
/** Zero Knowledge Group functions */
|
||||
public static final boolean ZK_GROUPS = false;
|
||||
|
||||
/** Read and write versioned profile information. */
|
||||
public static final boolean VERSIONED_PROFILES = ZK_GROUPS && false;
|
||||
public static final boolean VERSIONED_PROFILES = false;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.whispersystems.signalservice.api.groupsv2;
|
|||
import org.signal.zkgroup.ServerPublicParams;
|
||||
import org.signal.zkgroup.auth.ClientZkAuthOperations;
|
||||
import org.signal.zkgroup.profiles.ClientZkProfileOperations;
|
||||
import org.whispersystems.signalservice.FeatureFlags;
|
||||
import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration;
|
||||
|
||||
/**
|
||||
|
@ -24,8 +23,7 @@ public final class ClientZkOperations {
|
|||
}
|
||||
|
||||
public static ClientZkOperations create(SignalServiceConfiguration configuration) {
|
||||
return FeatureFlags.ZK_GROUPS ? new ClientZkOperations(new ServerPublicParams(configuration.getZkGroupServerPublicParams()))
|
||||
: new ClientZkOperations(null);
|
||||
return new ClientZkOperations(new ServerPublicParams(configuration.getZkGroupServerPublicParams()));
|
||||
}
|
||||
|
||||
public ClientZkAuthOperations getAuthOperations() {
|
||||
|
|
Loading…
Reference in New Issue