1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-25 20:18:00 +01:00

Remove unnecessary lines from OX backup restore function

The manual construction of the public key ring as
done in the removed lines is already performed in the BCUtil
method called a line above.
This commit is contained in:
Paul Schaub 2020-07-04 20:02:33 +02:00
parent 0eeb89409a
commit 8850a2950c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -482,13 +482,6 @@ public final class OpenPgpManager extends Manager {
provider.getStore().importSecretKey(getJidOrThrow(), secretKeys);
provider.getStore().importPublicKey(getJidOrThrow(), BCUtil.publicKeyRingFromSecretKeyRing(secretKeys));
ByteArrayOutputStream buffer = new ByteArrayOutputStream(2048);
for (PGPSecretKey sk : secretKeys) {
PGPPublicKey pk = sk.getPublicKey();
if (pk != null) pk.encode(buffer);
}
PGPPublicKeyRing publicKeys = new PGPPublicKeyRing(buffer.toByteArray(), new BcKeyFingerprintCalculator());
provider.getStore().importPublicKey(getJidOrThrow(), publicKeys);
return new OpenPgpV4Fingerprint(secretKeys);
}