* Steve Reid's public domain code, or based on Intel's SSSE3 SHA1 code.
*/
-const u8 empty_file_sha1sum[SHA1_HASH_SIZE] = {
- 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55,
- 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09,
-};
-
-
#ifdef WITH_LIBCRYPTO
#define sha1_init SHA1_Init
fp = fopen(filename, "rb");
if (!fp) {
- ERROR("Cannot open the file `%s' for reading: %m\n", filename);
+ ERROR_WITH_ERRNO("Cannot open the file `%s' for reading",
+ filename);
return WIMLIB_ERR_OPEN;
}
ret = sha1_stream(fp, md);
+ if (ret != 0) {
+ ERROR_WITH_ERRNO("Error calculating SHA1 message digest of "
+ "`%s'", filename);
+ }
fclose(fp);
return ret;
}