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
1 changed files with 0 additions and 7 deletions

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);
}