pgpdecryptverify: fix non-onepass signature checking

This commit is contained in:
Vincent Breitmoser committed 2015-10-08 18:37:30 +02:00
1 parent ac28b6bbac
commit cda1ba47d2
2 files changed
+3 -1

No files matched your search

@@ -963,6 +963,8 @@ public class PgpDecryptVerifyOperation extends BaseOperation<PgpDecryptVerifyInp
log.add(LogType.MSG_DC_OK, indent);
// TODO return metadata object?
DecryptVerifyResult result = new DecryptVerifyResult(DecryptVerifyResult.RESULT_OK, log);
result.setSignatureResult(signatureChecker.getSignatureResult());
result.setDecryptionResult(
@@ -203,7 +203,7 @@ class PgpSignatureChecker {
}
// check for insecure hash algorithms
if (!PgpSecurityConstants.isSecureHashAlgorithm(onePassSignature.getHashAlgorithm())) {
if (!PgpSecurityConstants.isSecureHashAlgorithm(signature.getHashAlgorithm())) {
log.add(LogType.MSG_DC_INSECURE_HASH_ALGO, indent + 1);
signatureResultBuilder.setInsecure(true);
}