mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Log profile decryption failure
This commit is contained in:
parent
f03df0a8c0
commit
7e803dfc46
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,8 @@ package org.asamk.signal.manager.util;
|
|||
import org.asamk.signal.manager.api.Pair;
|
||||
import org.asamk.signal.manager.storage.recipients.Profile;
|
||||
import org.signal.zkgroup.profiles.ProfileKey;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.signalservice.api.crypto.InvalidCiphertextException;
|
||||
import org.whispersystems.signalservice.api.crypto.ProfileCipher;
|
||||
import org.whispersystems.signalservice.api.profiles.SignalServiceProfile;
|
||||
|
@ -12,6 +14,8 @@ import java.util.HashSet;
|
|||
|
||||
public class ProfileUtils {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(ProfileUtils.class);
|
||||
|
||||
public static Profile decryptProfile(
|
||||
final ProfileKey profileKey, final SignalServiceProfile encryptedProfile
|
||||
) {
|
||||
|
@ -31,6 +35,7 @@ public class ProfileUtils {
|
|||
getUnidentifiedAccessMode(encryptedProfile, profileCipher),
|
||||
getCapabilities(encryptedProfile));
|
||||
} catch (InvalidCiphertextException e) {
|
||||
logger.debug("Failed to decrypt profile for {}", encryptedProfile.getAci(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue