Skip to content

Commit

Permalink
ValidateTool: fix digest validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-nagel committed Nov 7, 2024
1 parent 5a9b5ff commit 6444c81
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 6444c81

Please sign in to comment.