mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Trust key upon import
This commit is contained in:
parent
a587827ef8
commit
44d76430a3
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,6 @@ import org.jivesoftware.smack.packet.Message;
|
|||
import org.jivesoftware.smack.util.Async;
|
||||
import org.jivesoftware.smack.util.stringencoder.Base64;
|
||||
import org.jivesoftware.smack.xml.XmlPullParserException;
|
||||
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.ox.callback.backup.AskForBackupCodeCallback;
|
||||
import org.jivesoftware.smackx.ox.callback.backup.DisplayBackupCodeCallback;
|
||||
|
@ -475,9 +474,11 @@ public final class OpenPgpManager extends Manager {
|
|||
String backupCode = codeCallback.askForBackupCode();
|
||||
|
||||
PGPSecretKeyRing secretKeys = SecretKeyBackupHelper.restoreSecretKeyBackup(backup, backupCode);
|
||||
OpenPgpV4Fingerprint fingerprint = new OpenPgpV4Fingerprint(secretKeys);
|
||||
provider.getStore().importSecretKey(getJidOrThrow(), secretKeys);
|
||||
provider.getStore().importPublicKey(getJidOrThrow(), BCUtil.publicKeyRingFromSecretKeyRing(secretKeys));
|
||||
|
||||
getOpenPgpSelf().trust(fingerprint);
|
||||
|
||||
return new OpenPgpV4Fingerprint(secretKeys);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue