mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 19:10:38 +00:00
Implement listIdentities and trust commands
Print the fingerprints of all known phone numbers and can set their trust
This commit is contained in:
parent
bfb51e414b
commit
f095d947f8
5 changed files with 156 additions and 2 deletions
|
@ -85,6 +85,16 @@ class JsonIdentityKeyStore implements IdentityKeyStore {
|
|||
return false;
|
||||
}
|
||||
|
||||
public Map<String, List<Identity>> getIdentities() {
|
||||
// TODO deep copy
|
||||
return trustedKeys;
|
||||
}
|
||||
|
||||
public List<Identity> getIdentities(String name) {
|
||||
// TODO deep copy
|
||||
return trustedKeys.get(name);
|
||||
}
|
||||
|
||||
public static class JsonIdentityKeyStoreDeserializer extends JsonDeserializer<JsonIdentityKeyStore> {
|
||||
|
||||
@Override
|
||||
|
@ -165,8 +175,8 @@ class JsonIdentityKeyStore implements IdentityKeyStore {
|
|||
trustLevel == TrustLevel.TRUSTED_VERIFIED;
|
||||
}
|
||||
|
||||
public String getFingerprint() {
|
||||
return Hex.toStringCondensed(identityKey.getPublicKey().serialize());
|
||||
public byte[] getFingerprint() {
|
||||
return identityKey.getPublicKey().serialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue