From b84c9a8fb6b14b219bf6daf6240d3b89e7d4bfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Tue, 22 Dec 2015 13:31:55 +0100 Subject: Update spongycastle to 1.53 --- .../sufficientlysecure/keychain/pgp/CanonicalizedPublicKeyRing.java | 3 ++- .../org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java | 2 +- .../java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedPublicKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedPublicKeyRing.java index be5f21f23..5c0472949 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedPublicKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedPublicKeyRing.java @@ -23,6 +23,7 @@ import org.spongycastle.openpgp.PGPPublicKey; import org.spongycastle.openpgp.PGPPublicKeyRing; import org.spongycastle.openpgp.PGPSecretKey; import org.spongycastle.openpgp.PGPSecretKeyRing; +import org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator; import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException; import org.sufficientlysecure.keychain.util.IterableIterator; @@ -42,7 +43,7 @@ public class CanonicalizedPublicKeyRing extends CanonicalizedKeyRing { super(verified); if(mRing == null) { // get first object in block - PGPObjectFactory factory = new PGPObjectFactory(blob); + PGPObjectFactory factory = new PGPObjectFactory(blob, new JcaKeyFingerprintCalculator()); try { Object obj = factory.nextObject(); if (! (obj instanceof PGPPublicKeyRing)) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java index 40d6a710b..1290dcdcf 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java @@ -32,10 +32,10 @@ import org.spongycastle.openpgp.PGPException; import org.spongycastle.openpgp.PGPLiteralData; import org.spongycastle.openpgp.PGPLiteralDataGenerator; import org.spongycastle.openpgp.PGPSignatureGenerator; -import org.spongycastle.openpgp.PGPUtil; import org.spongycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator; import org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder; import org.spongycastle.openpgp.operator.jcajce.NfcSyncPGPContentSignerBuilder; +import org.spongycastle.openpgp.operator.jcajce.PGPUtil; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.operations.BaseOperation; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java index c6fad1a73..65604f58f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/WrappedSignature.java @@ -30,6 +30,7 @@ import org.spongycastle.openpgp.PGPPublicKey; import org.spongycastle.openpgp.PGPSignature; import org.spongycastle.openpgp.PGPSignatureList; import org.spongycastle.openpgp.PGPUserAttributeSubpacketVector; +import org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator; import org.spongycastle.openpgp.operator.jcajce.JcaPGPContentVerifierBuilderProvider; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException; @@ -131,7 +132,7 @@ public class WrappedSignature { SignatureSubpacketTags.REVOCATION_REASON); // For some reason, this is missing in SignatureSubpacketInputStream:146 if (!(p instanceof RevocationReason)) { - p = new RevocationReason(false, p.getData()); + p = new RevocationReason(false, false, p.getData()); } return ((RevocationReason) p).getRevocationDescription(); } @@ -222,7 +223,7 @@ public class WrappedSignature { } public static WrappedSignature fromBytes(byte[] data) { - PGPObjectFactory factory = new PGPObjectFactory(data); + PGPObjectFactory factory = new PGPObjectFactory(data, new JcaKeyFingerprintCalculator()); PGPSignatureList signatures = null; try { if ((signatures = (PGPSignatureList) factory.nextObject()) == null || signatures.isEmpty()) { -- cgit v1.2.3