Use bio_hash_data() to compute a message digest value of a CAB file

This commit is contained in:
olszomal
2023-02-07 12:41:41 +01:00
committed by Michał Trojnara
parent b0391244a6
commit 11eb76d4f3
3 changed files with 19 additions and 24 deletions

2
msi.c
View File

@ -745,7 +745,7 @@ int msi_calc_digest(char *indata, int mdtype, u_char *mdbuf, uint32_t fileend)
return 0; /* FAILED */
}
BIO_push(bhash, BIO_new(BIO_s_null()));
if (!bio_hash_data(indata, bhash, 0, fileend)) {
if (!bio_hash_data(indata, bhash, 0, 0, fileend)) {
printf("Unable to calculate digest\n");
BIO_free_all(bhash);
return 0; /* FAILED */