Update dependency

This commit is contained in:
AsamK 2016-11-14 13:25:30 +01:00
parent 447dd1cb4f
commit 1bae3ba6f0
3 changed files with 10 additions and 9 deletions

View file

@ -18,7 +18,7 @@ repositories {
} }
dependencies { dependencies {
compile 'com.github.turasa:signal-service-java:2.3.1_unofficial_1' compile 'com.github.turasa:signal-service-java:2.4.0_unofficial_1'
compile 'org.bouncycastle:bcprov-jdk15on:1.55' compile 'org.bouncycastle:bcprov-jdk15on:1.55'
compile 'net.sourceforge.argparse4j:argparse4j:0.7.0' compile 'net.sourceforge.argparse4j:argparse4j:0.7.0'
compile 'org.freedesktop.dbus:dbus-java:2.7.0' compile 'org.freedesktop.dbus:dbus-java:2.7.0'

View file

@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.*;
import org.whispersystems.libsignal.IdentityKey; import org.whispersystems.libsignal.IdentityKey;
import org.whispersystems.libsignal.IdentityKeyPair; import org.whispersystems.libsignal.IdentityKeyPair;
import org.whispersystems.libsignal.InvalidKeyException; import org.whispersystems.libsignal.InvalidKeyException;
import org.whispersystems.libsignal.SignalProtocolAddress;
import org.whispersystems.libsignal.state.IdentityKeyStore; import org.whispersystems.libsignal.state.IdentityKeyStore;
import java.io.IOException; import java.io.IOException;
@ -36,8 +37,8 @@ class JsonIdentityKeyStore implements IdentityKeyStore {
} }
@Override @Override
public void saveIdentity(String name, IdentityKey identityKey) { public void saveIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
saveIdentity(name, identityKey, TrustLevel.TRUSTED_UNVERIFIED, null); saveIdentity(address.getName(), identityKey, TrustLevel.TRUSTED_UNVERIFIED, null);
} }
/** /**
@ -71,8 +72,8 @@ class JsonIdentityKeyStore implements IdentityKeyStore {
} }
@Override @Override
public boolean isTrustedIdentity(String name, IdentityKey identityKey) { public boolean isTrustedIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
List<Identity> identities = trustedKeys.get(name); List<Identity> identities = trustedKeys.get(address.getName());
if (identities == null) { if (identities == null) {
// Trust on first use // Trust on first use
return true; return true;

View file

@ -65,8 +65,8 @@ class JsonSignalProtocolStore implements SignalProtocolStore {
} }
@Override @Override
public void saveIdentity(String name, IdentityKey identityKey) { public void saveIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
identityKeyStore.saveIdentity(name, identityKey); identityKeyStore.saveIdentity(address, identityKey);
} }
public void saveIdentity(String name, IdentityKey identityKey, TrustLevel trustLevel) { public void saveIdentity(String name, IdentityKey identityKey, TrustLevel trustLevel) {
@ -82,8 +82,8 @@ class JsonSignalProtocolStore implements SignalProtocolStore {
} }
@Override @Override
public boolean isTrustedIdentity(String name, IdentityKey identityKey) { public boolean isTrustedIdentity(SignalProtocolAddress address, IdentityKey identityKey) {
return identityKeyStore.isTrustedIdentity(name, identityKey); return identityKeyStore.isTrustedIdentity(address, identityKey);
} }
@Override @Override