Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/util-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,26 +187,26 @@ void FileForceHashParseCfg(SCConfNode *conf)
FileForceMd5Enable();
SCLogConfig("forcing md5 calculation for logged or stored files");
}
}

if (strcasecmp("sha1", field->val) == 0) {
} else if (strcasecmp("sha1", field->val) == 0) {
if (g_disable_hashing) {
SCLogInfo("not forcing sha1 calculation for logged files: hashing globally "
"disabled");
} else {
FileForceSha1Enable();
SCLogConfig("forcing sha1 calculation for logged or stored files");
}
}

if (strcasecmp("sha256", field->val) == 0) {
} else if (strcasecmp("sha256", field->val) == 0) {
if (g_disable_hashing) {
SCLogInfo("not forcing sha256 calculation for logged files: hashing globally "
"disabled");
} else {
FileForceSha256Enable();
SCLogConfig("forcing sha256 calculation for logged or stored files");
}
} else {
FatalError("Invalid configuration: force-hash algorithm '%s' must be one of: md5, "
"sha1, sha256",
field->val);
}
}
}
Expand Down
Loading