jgit/org.eclipse.jgit/resources/org/eclipse/jgit
Anna Papitto 8123dcd699 PackReverseIndex: verify checksums
The new version 1 file-based reverse index has a footer with the
checksum of the corresponding pack file and a checksum of its own
contents. The initial implementation doesn't enforce that the pack
checksum matches the checksum found in the forward index nor that the
self checksum matches the contents of the file just read in.

Offer a method for reverse index users to verify the checksums in a way
appropriate to the version being used. For the pre-existing computed
version, always succeed since it is not based on a file so there is no
possibility of corruption.

Check for corruption of the file itself during parsing the checksum
footer, by comparing the self checksum with the digest of the file
contents read.

Change-Id: I87ff3933cf1afa76663350400b616695e4966cb6
Signed-off-by: Anna Papitto <annapapitto@google.com>
2023-07-18 15:19:26 -07:00
..
gitrepo/internal RepoText: Remove unused externalized string 2019-09-07 01:19:06 +02:00
internal PackReverseIndex: verify checksums 2023-07-18 15:19:26 -07:00
util/sha1 Move SHA1 compress/recompress files to resource folder 2017-03-18 16:46:58 +01:00