Skip to content

Commit

Permalink
Merge branch 'master' into dbus_identities
Browse files Browse the repository at this point in the history
  • Loading branch information
Adimarantis authored May 25, 2023
2 parents a9f8e2e + ee12805 commit 4c8c794
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 11 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Changelog

## [Unreleased]
**Attention**: Now requires native libsignal-client version 0.24.0

## [0.11.11] - 2023-05-24
**Attention**: Now requires native libsignal-client version 0.25.0

### Added
- New `--text-style` and `--quote-text-style` flags for `send` command

### Fixed
- Fixed migration of older account files
- Fix deleting old unregistered recipient

## [0.11.10] - 2023-05-11
**Attention**: Now requires native libsignal-client version 0.23.1
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id("org.graalvm.buildtools.native") version "0.9.22"
}

version = "0.11.10"
version = "0.11.11"

java {
sourceCompatibility = JavaVersion.VERSION_17
Expand Down
1 change: 1 addition & 0 deletions graalvm-config-dir/reflect-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3434,6 +3434,7 @@
{"name":"bitField0_"},
{"name":"blocked_"},
{"name":"callEvent_"},
{"name":"callLinkUpdate_"},
{"name":"configuration_"},
{"name":"contacts_"},
{"name":"fetchLatest_"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration;
import org.whispersystems.signalservice.internal.configuration.SignalServiceUrl;
import org.whispersystems.signalservice.internal.configuration.SignalStorageUrl;
import org.whispersystems.signalservice.internal.configuration.SignalSvr2Url;

import java.util.Base64;
import java.util.Collection;
Expand Down Expand Up @@ -43,13 +44,16 @@ class LiveConfig {
private final static String SIGNAL_KEY_BACKUP_URL = "https://api.backup.signal.org";
private final static String STORAGE_URL = "https://storage.signal.org";
private final static String SIGNAL_CDSI_URL = "https://cdsi.signal.org";
private final static String SIGNAL_SVR2_URL = "https://svr2.staging.signal.org";
private final static TrustStore TRUST_STORE = new WhisperTrustStore();

private final static Optional<Dns> dns = Optional.empty();
private final static Optional<SignalProxy> proxy = Optional.empty();

private final static byte[] zkGroupServerPublicParams = Base64.getDecoder()
.decode("AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94GXTLfN0/vLt98KDPnxwAQL9j5V1jGOY8jQl6MLxEs56cwXN0dqCnImzVH3TZT1cJ8SW1BRX6qIVxEzjsSGx3yxF3suAilPMqGRp4ffyopjMD1JXiKR2RwLKzizUe5e8XyGOy9fplzhw3jVzTRyUZTRSZKkMLWcQ/gv0E4aONNqs4P");
private final static byte[] genericServerPublicParams = Base64.getDecoder()
.decode("AByD873dTilmOSG0TjKrvpeaKEsUmIO8Vx9BeMmftwUs9v7ikPwM8P3OHyT0+X3EUMZrSe9VUp26Wai51Q9I8mdk0hX/yo7CeFGJyzoOqn8e/i4Ygbn5HoAyXJx5eXfIbqpc0bIxzju4H/HOQeOpt6h742qii5u/cbwOhFZCsMIbElZTaeU+BWMBQiZHIGHT5IE0qCordQKZ5iPZom0HeFa8Yq0ShuEyAl0WINBiY6xE3H/9WnvzXBbMuuk//eRxXgzO8ieCeK8FwQNxbfXqZm6Ro1cMhCOF3u7xoX83QhpN");

static SignalServiceConfiguration createDefaultServiceConfiguration(
final List<Interceptor> interceptors
Expand All @@ -62,10 +66,12 @@ static SignalServiceConfiguration createDefaultServiceConfiguration(
new SignalKeyBackupServiceUrl[]{new SignalKeyBackupServiceUrl(SIGNAL_KEY_BACKUP_URL, TRUST_STORE)},
new SignalStorageUrl[]{new SignalStorageUrl(STORAGE_URL, TRUST_STORE)},
new SignalCdsiUrl[]{new SignalCdsiUrl(SIGNAL_CDSI_URL, TRUST_STORE)},
new SignalSvr2Url[]{new SignalSvr2Url(SIGNAL_SVR2_URL, TRUST_STORE, null, null)},
interceptors,
dns,
proxy,
zkGroupServerPublicParams);
zkGroupServerPublicParams,
genericServerPublicParams);
}

static ECPublicKey getUnidentifiedSenderTrustRoot() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration;
import org.whispersystems.signalservice.internal.configuration.SignalServiceUrl;
import org.whispersystems.signalservice.internal.configuration.SignalStorageUrl;
import org.whispersystems.signalservice.internal.configuration.SignalSvr2Url;

import java.util.Base64;
import java.util.Collection;
Expand Down Expand Up @@ -43,13 +44,16 @@ class StagingConfig {
private final static String SIGNAL_KEY_BACKUP_URL = "https://api-staging.backup.signal.org";
private final static String STORAGE_URL = "https://storage-staging.signal.org";
private final static String SIGNAL_CDSI_URL = "https://cdsi.staging.signal.org";
private final static String SIGNAL_SVR2_URL = "https://svr2.staging.signal.org";
private final static TrustStore TRUST_STORE = new WhisperTrustStore();

private final static Optional<Dns> dns = Optional.empty();
private final static Optional<SignalProxy> proxy = Optional.empty();

private final static byte[] zkGroupServerPublicParams = Base64.getDecoder()
.decode("ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdlukrpzzsCIvEwjwQlJYVPOQPj4V0F4UXXBdHSLK05uoPBCQG8G9rYIGedYsClJXnbrgGYG3eMTG5hnx4X4ntARBgELuMWWUEEfSK0mjXg+/2lPmWcTZWR9nkqgQQP0tbzuiPm74H2wMO4u1Wafe+UwyIlIT9L7KLS19Aw8r4sPrXZSSsOZ6s7M1+rTJN0bI5CKY2PX29y5Ok3jSWufIKcgKOnWoP67d5b2du2ZVJjpjfibNIHbT/cegy/sBLoFwtHogVYUewANUAXIaMPyCLRArsKhfJ5wBtTminG/PAvuBdJ70Z/bXVPf8TVsR292zQ65xwvWTejROW6AZX6aqucUj");
private final static byte[] genericServerPublicParams = Base64.getDecoder()
.decode("AHILOIrFPXX9laLbalbA9+L1CXpSbM/bTJXZGZiuyK1JaI6dK5FHHWL6tWxmHKYAZTSYmElmJ5z2A5YcirjO/yfoemE03FItyaf8W1fE4p14hzb5qnrmfXUSiAIVrhaXVwIwSzH6RL/+EO8jFIjJ/YfExfJ8aBl48CKHgu1+A6kWynhttonvWWx6h7924mIzW0Czj2ROuh4LwQyZypex4GuOPW8sgIT21KNZaafgg+KbV7XM1x1tF3XA17B4uGUaDbDw2O+nR1+U5p6qHPzmJ7ggFjSN6Utu+35dS1sS0P9N");

static SignalServiceConfiguration createDefaultServiceConfiguration(
final List<Interceptor> interceptors
Expand All @@ -62,10 +66,12 @@ static SignalServiceConfiguration createDefaultServiceConfiguration(
new SignalKeyBackupServiceUrl[]{new SignalKeyBackupServiceUrl(SIGNAL_KEY_BACKUP_URL, TRUST_STORE)},
new SignalStorageUrl[]{new SignalStorageUrl(STORAGE_URL, TRUST_STORE)},
new SignalCdsiUrl[]{new SignalCdsiUrl(SIGNAL_CDSI_URL, TRUST_STORE)},
new SignalSvr2Url[]{new SignalSvr2Url(SIGNAL_SVR2_URL, TRUST_STORE, null, null)},
interceptors,
dns,
proxy,
zkGroupServerPublicParams);
zkGroupServerPublicParams,
genericServerPublicParams);
}

static ECPublicKey getUnidentifiedSenderTrustRoot() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
Expand All @@ -66,7 +66,7 @@ class GroupV2Helper {
private final SignalDependencies dependencies;
private final Context context;

private HashMap<Long, AuthCredentialWithPniResponse> groupApiCredentials;
private Map<Long, AuthCredentialWithPniResponse> groupApiCredentials;

GroupV2Helper(final Context context) {
this.dependencies = context.getDependencies();
Expand Down Expand Up @@ -646,7 +646,9 @@ private GroupsV2AuthorizationString getGroupAuthForToday(
final var todaySeconds = currentDaySeconds();
if (groupApiCredentials == null || !groupApiCredentials.containsKey(todaySeconds)) {
// Returns credentials for the next 7 days
groupApiCredentials = dependencies.getGroupsV2Api().getCredentials(todaySeconds);
groupApiCredentials = dependencies.getGroupsV2Api()
.getCredentials(todaySeconds)
.getAuthCredentialWithPniResponseHashMap();
// TODO cache credentials on disk until they expire
}
try {
Expand All @@ -656,7 +658,9 @@ private GroupsV2AuthorizationString getGroupAuthForToday(
groupApiCredentials.clear();
}

groupApiCredentials = dependencies.getGroupsV2Api().getCredentials(todaySeconds);
groupApiCredentials = dependencies.getGroupsV2Api()
.getCredentials(todaySeconds)
.getAuthCredentialWithPniResponseHashMap();
try {
return getAuthorizationString(groupSecretParams, todaySeconds);
} catch (VerificationFailedException e) {
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dependencyResolutionManagement {
library("logback", "ch.qos.logback", "logback-classic").version("1.4.7")


library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_71")
library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_72")
library("protobuf", "com.google.protobuf", "protobuf-javalite").version("3.23.0")
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.41.2.1")
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.42.0.0")
library("hikari", "com.zaxxer", "HikariCP").version("5.0.1")
library("junit", "org.junit.jupiter", "junit-jupiter").version("5.9.3")
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/asamk/signal/BaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class BaseConfig {
public final static String PROJECT_NAME = BaseConfig.class.getPackage().getImplementationTitle();
public final static String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();

final static String USER_AGENT_SIGNAL_ANDROID = "Signal-Android/6.21.2";
final static String USER_AGENT_SIGNAL_ANDROID = "Signal-Android/6.22.0";
final static String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
? "signal-cli"
: PROJECT_NAME + "/" + PROJECT_VERSION;
Expand Down

0 comments on commit 4c8c794

Please sign in to comment.