pgpdecryptverify: fix non-onepass signature checking
This commit is contained in:
@@ -963,6 +963,8 @@ public class PgpDecryptVerifyOperation extends BaseOperation<PgpDecryptVerifyInp
|
|||||||
|
|
||||||
log.add(LogType.MSG_DC_OK, indent);
|
log.add(LogType.MSG_DC_OK, indent);
|
||||||
|
|
||||||
|
// TODO return metadata object?
|
||||||
|
|
||||||
DecryptVerifyResult result = new DecryptVerifyResult(DecryptVerifyResult.RESULT_OK, log);
|
DecryptVerifyResult result = new DecryptVerifyResult(DecryptVerifyResult.RESULT_OK, log);
|
||||||
result.setSignatureResult(signatureChecker.getSignatureResult());
|
result.setSignatureResult(signatureChecker.getSignatureResult());
|
||||||
result.setDecryptionResult(
|
result.setDecryptionResult(
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ class PgpSignatureChecker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for insecure hash algorithms
|
// 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);
|
log.add(LogType.MSG_DC_INSECURE_HASH_ALGO, indent + 1);
|
||||||
signatureResultBuilder.setInsecure(true);
|
signatureResultBuilder.setInsecure(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user