Update spongycastle to 1.53

This commit is contained in:
Dominik Schürmann
2015-12-22 13:31:55 +01:00
parent cb365e450b
commit b84c9a8fb6
5 changed files with 9 additions and 7 deletions

View File

@@ -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)) {

View File

@@ -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;

View File

@@ -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()) {