Skip to content

Bmap file integrity check#59#120

Open
tintou wants to merge 3 commits intocollabora:mainfrom
tintou:wip/rafaelgarrui/integritybmap
Open

Bmap file integrity check#59#120
tintou wants to merge 3 commits intocollabora:mainfrom
tintou:wip/rafaelgarrui/integritybmap

Conversation

@tintou
Copy link
Copy Markdown

@tintou tintou commented Apr 9, 2026

Checks if the bmap hash is correct for the current bmap file.
Bmap file checksum is calculated having that field as all 0s.

Closes: #50

Supersedes: #59

Razaloc added 3 commits April 9, 2026 10:07
bmap_file_checksum is going to be used to check the integrity of the
file. It is now included in the Bmap struct type and the
builder.

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
Before using a Bmap file checks if its checksum is correct for the
current bmap file.
Bmap checksum is the application of Sha256 to the file data. When the
bmap file is created, the value of the checksum has to be zero (all ASCII
"0" symbols). Once calculated, zeros are replaced by the checksum, notice
this modifies the file itself.
In order to calculate the checksum before using it and compare it with
the original, we need to set the field as all "0" before applying Sha256.

Closes: collabora#50

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
Remote copy checks the integrity of the bmap file after downloading it.

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
@tintou
Copy link
Copy Markdown
Author

tintou commented Apr 9, 2026

I just rebased #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

bmap file integrity

2 participants