commit d6baa0f6da2663235688f774619dbf494add2f27 from: Omar Polo date: Sun Feb 26 21:34:11 2023 UTC remove now unused sha1 handling from inflate and deflate both were changed to use the new got_hash APIs. commit - c3b9af18468be6672f62e2d321b5fc2893837c62 commit + d6baa0f6da2663235688f774619dbf494add2f27 blob - 68040e9a601ee88f5422f037dee26c3ce0213fc0 blob + e3bcc46c3b9a45e6960c6ddc97f2e530e28329cd --- lib/deflate.c +++ lib/deflate.c @@ -88,9 +88,6 @@ csum_output(struct got_deflate_checksum *csum, const u if (csum->output_crc) *csum->output_crc = crc32(*csum->output_crc, buf, len); - if (csum->output_sha1) - SHA1Update(csum->output_sha1, buf, len); - if (csum->output_ctx) got_hash_update(csum->output_ctx, buf, len); } blob - b2bda4a5026dccd005650cb802799dd42a235574 blob + 4bdb5f64edbbd9ea0e541c57a33289de76ca6fc5 --- lib/got_lib_deflate.h +++ lib/got_lib_deflate.h @@ -18,9 +18,6 @@ struct got_deflate_checksum { /* If not NULL, mix output bytes into this CRC checksum. */ uint32_t *output_crc; - /* If not NULL, mix output bytes into this SHA1 context. */ - SHA1_CTX *output_sha1; - /* If not NULL, mix output bytes into this hash context. */ struct got_hash *output_ctx; }; blob - 1f5de8404ec67a5500a3ef801466a208558ba9d3 blob + e840cb74426e3420d5429948e642c13e3480f331 --- lib/got_lib_inflate.h +++ lib/got_lib_inflate.h @@ -18,18 +18,12 @@ struct got_inflate_checksum { /* If not NULL, mix input bytes into this CRC checksum. */ uint32_t *input_crc; - /* If not NULL, mix input bytes into this SHA1 context. */ - SHA1_CTX *input_sha1; - /* if not NULL, mix input bytes into this hash context. */ struct got_hash *input_ctx; /* If not NULL, mix output bytes into this CRC checksum. */ uint32_t *output_crc; - /* If not NULL, mix output bytes into this SHA1 context. */ - SHA1_CTX *output_sha1; - /* If not NULL, mix output bytes into this hash context. */ struct got_hash *output_ctx; }; blob - adf582371c406cc4a2a79408bde3913ff792159f blob + 60434b412cdbc4824102355a4d0931b6f95ec7ec --- lib/inflate.c +++ lib/inflate.c @@ -92,9 +92,6 @@ csum_input(struct got_inflate_checksum *csum, const ui { if (csum->input_crc) *csum->input_crc = crc32(*csum->input_crc, buf, len); - - if (csum->input_sha1) - SHA1Update(csum->input_sha1, buf, len); if (csum->input_ctx) got_hash_update(csum->input_ctx, buf, len); @@ -106,9 +103,6 @@ csum_output(struct got_inflate_checksum *csum, const u if (csum->output_crc) *csum->output_crc = crc32(*csum->output_crc, buf, len); - if (csum->output_sha1) - SHA1Update(csum->output_sha1, buf, len); - if (csum->output_ctx) got_hash_update(csum->output_ctx, buf, len); }