pgpdecryptverify: fix non-onepass signature checking

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

View File

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

View File

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