diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2014-11-13 10:59:53 +0900 |
---|---|---|
committer | Hugo Arès <hugo.ares@ericsson.com> | 2014-11-19 14:47:52 +0000 |
commit | 3921163d4866f6e157ca5eac1f1e86cc2f42a9a9 (patch) | |
tree | 683269aa98e7b4a8eb979ab613aa210dd47c3133 | |
parent | 1dbc53126cafc0f553b70955dffaaa0ab8ddac54 (diff) |
Don't use deprecated PGPPublicKeyRingCollection constructor
The PGPPublicKeyRingCollection constructor was deprecated in
Bouncycastle v1.51.
Use BcPGPPublicKeyRingCollection instead.
Change-Id: I5bc4fb4927ba37ecbf7d3763809acc2f53d7fd4e
(cherry picked from commit d26e43f22f2336efd18213ac88c285f8b95827cd)
-rw-r--r-- | gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java b/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java index f200879963..d82180deaf 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/contact/EncryptedContactStore.java @@ -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; @@ -113,7 +114,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) { |