Skip to content

Commit

Permalink
Merge pull request #87 from sebastian-nagel/validate-tool-does-not-va…
Browse files Browse the repository at this point in the history
…lidate-digests

ValidateTool: fix digest validation
  • Loading branch information
ato authored Nov 8, 2024
2 parents 5a9b5ff + 6444c81 commit f26a4d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/netpreserve/jwarc/tools/ValidateTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private static long readBody(MessageBody body, Consumer<ByteBuffer> consumer) th

private static void validateDigest(WarcDigest digestExpected, WarcDigest digestCalculated, long size)
throws DigestException {
if (!digestCalculated.equals(digestCalculated)) {
if (!digestExpected.equals(digestCalculated)) {
throw new java.security.DigestException("Failed to validate digest: expected " + digestExpected + ", got "
+ digestCalculated + " (on " + size + " bytes)");
}
Expand Down

0 comments on commit f26a4d6

Please sign in to comment.