mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
Fixing build with Spongy Castle 1.51
This commit is contained in:
parent
602fd546f7
commit
aa35f6cffb
@ -523,13 +523,7 @@ public class PgpDecryptVerify {
|
|||||||
|
|
||||||
// update signature buffer if signature is also present
|
// update signature buffer if signature is also present
|
||||||
if (signature != null) {
|
if (signature != null) {
|
||||||
try {
|
signature.update(buffer, 0, length);
|
||||||
signature.update(buffer, 0, length);
|
|
||||||
} catch (SignatureException e) {
|
|
||||||
Log.e(Constants.TAG, "SignatureException -> Not a valid signature!", e);
|
|
||||||
signatureResultBuilder.validSignature(false);
|
|
||||||
signature = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alreadyWritten += length;
|
alreadyWritten += length;
|
||||||
|
@ -96,9 +96,6 @@ public class WrappedSignature {
|
|||||||
} catch (PGPException e) {
|
} catch (PGPException e) {
|
||||||
// no matter
|
// no matter
|
||||||
Log.e(Constants.TAG, "exception reading embedded signatures", e);
|
Log.e(Constants.TAG, "exception reading embedded signatures", e);
|
||||||
} catch (IOException e) {
|
|
||||||
// no matter
|
|
||||||
Log.e(Constants.TAG, "exception reading embedded signatures", e);
|
|
||||||
}
|
}
|
||||||
return sigs;
|
return sigs;
|
||||||
}
|
}
|
||||||
@ -150,27 +147,17 @@ public class WrappedSignature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(byte[] data, int offset, int length) throws PgpGeneralException {
|
public void update(byte[] data, int offset, int length) {
|
||||||
try {
|
mSig.update(data, offset, length);
|
||||||
mSig.update(data, offset, length);
|
|
||||||
} catch(SignatureException e) {
|
|
||||||
throw new PgpGeneralException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(byte data) throws PgpGeneralException {
|
public void update(byte data) {
|
||||||
try {
|
mSig.update(data);
|
||||||
mSig.update(data);
|
|
||||||
} catch(SignatureException e) {
|
|
||||||
throw new PgpGeneralException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean verify() throws PgpGeneralException {
|
public boolean verify() throws PgpGeneralException {
|
||||||
try {
|
try {
|
||||||
return mSig.verify();
|
return mSig.verify();
|
||||||
} catch(SignatureException e) {
|
|
||||||
throw new PgpGeneralException(e);
|
|
||||||
} catch(PGPException e) {
|
} catch(PGPException e) {
|
||||||
throw new PgpGeneralException(e);
|
throw new PgpGeneralException(e);
|
||||||
}
|
}
|
||||||
@ -179,8 +166,6 @@ public class WrappedSignature {
|
|||||||
boolean verifySignature(PGPPublicKey key) throws PgpGeneralException {
|
boolean verifySignature(PGPPublicKey key) throws PgpGeneralException {
|
||||||
try {
|
try {
|
||||||
return mSig.verifyCertification(key);
|
return mSig.verifyCertification(key);
|
||||||
} catch (SignatureException e) {
|
|
||||||
throw new PgpGeneralException("Sign!", e);
|
|
||||||
} catch (PGPException e) {
|
} catch (PGPException e) {
|
||||||
throw new PgpGeneralException("Error!", e);
|
throw new PgpGeneralException("Error!", e);
|
||||||
}
|
}
|
||||||
@ -189,8 +174,6 @@ public class WrappedSignature {
|
|||||||
boolean verifySignature(PGPPublicKey masterKey, PGPPublicKey subKey) throws PgpGeneralException {
|
boolean verifySignature(PGPPublicKey masterKey, PGPPublicKey subKey) throws PgpGeneralException {
|
||||||
try {
|
try {
|
||||||
return mSig.verifyCertification(masterKey, subKey);
|
return mSig.verifyCertification(masterKey, subKey);
|
||||||
} catch (SignatureException e) {
|
|
||||||
throw new PgpGeneralException("Sign!", e);
|
|
||||||
} catch (PGPException e) {
|
} catch (PGPException e) {
|
||||||
throw new PgpGeneralException("Error!", e);
|
throw new PgpGeneralException("Error!", e);
|
||||||
}
|
}
|
||||||
@ -199,8 +182,6 @@ public class WrappedSignature {
|
|||||||
boolean verifySignature(PGPPublicKey key, String uid) throws PgpGeneralException {
|
boolean verifySignature(PGPPublicKey key, String uid) throws PgpGeneralException {
|
||||||
try {
|
try {
|
||||||
return mSig.verifyCertification(uid, key);
|
return mSig.verifyCertification(uid, key);
|
||||||
} catch (SignatureException e) {
|
|
||||||
throw new PgpGeneralException("Error!", e);
|
|
||||||
} catch (PGPException e) {
|
} catch (PGPException e) {
|
||||||
throw new PgpGeneralException("Error!", e);
|
throw new PgpGeneralException("Error!", e);
|
||||||
}
|
}
|
||||||
|
2
extern/spongycastle
vendored
2
extern/spongycastle
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 512965ac61c2b0054550e8daed71242d51f4da58
|
Subproject commit d65458612838f7de0b222c0b7168db97018cac32
|
Loading…
Reference in New Issue
Block a user