file-hashing: restore 'force-md5'

We don't want to break existing setups.

Do issue a warning that a new option is available.
pull/2266/head
Victor Julien 9 years ago
parent 4426f3ff55
commit f7481c4078

@ -134,6 +134,22 @@ void FileForceHashParseCfg(ConfNode *conf)
ConfNode *forcehash_node = NULL;
/* legacy option */
const char *force_md5 = ConfNodeLookupChildValue(conf, "force-md5");
if (force_md5 != NULL) {
SCLogWarning(SC_ERR_DEPRECATED_CONF, "deprecated 'force-md5' option "
"found. Please use 'force-hash: [md5]' instead");
if (ConfValIsTrue(force_md5)) {
#ifdef HAVE_NSS
FileForceMd5Enable();
SCLogInfo("forcing md5 calculation for logged files");
#else
SCLogInfo("md5 calculation requires linking against libnss");
#endif
}
}
if (conf != NULL)
forcehash_node = ConfNodeLookupChild(conf, "force-hash");

Loading…
Cancel
Save