Don't use deprecated PGPPublicKeyRingCollection constructor
The PGPPublicKeyRingCollection constructor was deprecated in Bouncycastle v1.51. Use BcPGPPublicKeyRingCollection instead. Change-Id: I5bc4fb4927ba37ecbf7d3763809acc2f53d7fd4e
This commit is contained in:
parent
52c55526d8
commit
d26e43f22f
@ -38,6 +38,7 @@ import org.bouncycastle.openpgp.PGPPublicKey;
|
||||
import org.bouncycastle.openpgp.PGPPublicKeyRing;
|
||||
import org.bouncycastle.openpgp.PGPPublicKeyRingCollection;
|
||||
import org.bouncycastle.openpgp.PGPUtil;
|
||||
import org.bouncycastle.openpgp.bc.BcPGPPublicKeyRingCollection;
|
||||
import org.bouncycastle.openpgp.operator.bc.BcPGPDataEncryptorBuilder;
|
||||
import org.bouncycastle.openpgp.operator.bc.BcPublicKeyKeyEncryptionMethodGenerator;
|
||||
import org.slf4j.Logger;
|
||||
@ -108,7 +109,7 @@ class EncryptedContactStore implements ContactStore {
|
||||
private static PGPPublicKeyRingCollection readPubRing(final File pub) {
|
||||
try (InputStream fin = new FileInputStream(pub);
|
||||
InputStream in = PGPUtil.getDecoderStream(fin)) {
|
||||
return new PGPPublicKeyRingCollection(in);
|
||||
return new BcPGPPublicKeyRingCollection(in);
|
||||
} catch (IOException e) {
|
||||
throw new ProvisionException("Cannot read " + pub, e);
|
||||
} catch (PGPException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user