flow_file_flags |= (FLOWFILE_NO_MAGIC_TS|FLOWFILE_NO_MAGIC_TC);
}
#endif
-#ifdef HAVE_NSS
if (!(sgh->flags & SIG_GROUP_HEAD_HAVEFILEMD5)) {
SCLogDebug("requesting disabling md5 for flow");
flow_file_flags |= (FLOWFILE_NO_MD5_TS|FLOWFILE_NO_MD5_TC);
SCLogDebug("requesting disabling sha256 for flow");
flow_file_flags |= (FLOWFILE_NO_SHA256_TS|FLOWFILE_NO_SHA256_TC);
}
-#endif
if (!(sgh->flags & SIG_GROUP_HEAD_HAVEFILESIZE)) {
SCLogDebug("requesting disabling filesize for flow");
flow_file_flags |= (FLOWFILE_NO_SIZE_TS|FLOWFILE_NO_SIZE_TC);
#include <signal.h>
#endif
-#ifdef HAVE_NSS
-#include <prinit.h>
-#include <nss.h>
-#endif
-
#include "suricata.h"
#include "decode.h"
#include "feature.h"
TmqhCleanup();
TmModuleRunDeInit();
ParseSizeDeinit();
-#ifdef HAVE_NSS
- if (NSS_IsInitialized()) {
- NSS_Shutdown();
- PR_Cleanup();
- }
-#endif
#ifdef HAVE_AF_PACKET
AFPPeersListClean();
#ifdef PCRE_HAVE_JIT
strlcat(features, "PCRE_JIT ", sizeof(features));
#endif
-#ifdef HAVE_NSS
+ /* For compatibility, just say we have HAVE_NSS. */
strlcat(features, "HAVE_NSS ", sizeof(features));
-#endif
#ifdef HAVE_LUA
strlcat(features, "HAVE_LUA ", sizeof(features));
#endif
SCReturnInt(TM_ECODE_FAILED);
}
-
-#ifdef HAVE_NSS
- if (suri->run_mode != RUNMODE_CONF_TEST) {
- /* init NSS for hashing */
- PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
- NSS_NoDB_Init(NULL);
- }
-#endif
-
if (suri->disabled_detect) {
SCLogConfig("detection engine disabled");
/* disable raw reassembly */
*/
static int LuaCallbackFileInfoPushToStackFromFile(lua_State *luastate, const File *file)
{
-#ifdef HAVE_NSS
- char md5[33] = "";
- char *md5ptr = md5;
- if (file->flags & FILE_MD5) {
- size_t x;
- for (x = 0; x < sizeof(file->md5); x++) {
- char one[3] = "";
- snprintf(one, sizeof(one), "%02x", file->md5[x]);
- strlcat(md5, one, sizeof(md5));
+ char *md5ptr = NULL;
+ char *sha1ptr = NULL;
+ char *sha256ptr = NULL;
+ if (!g_disable_hashing) {
+ char md5[33] = "";
+ md5ptr = md5;
+ if (file->flags & FILE_MD5) {
+ size_t x;
+ for (x = 0; x < sizeof(file->md5); x++) {
+ char one[3] = "";
+ snprintf(one, sizeof(one), "%02x", file->md5[x]);
+ strlcat(md5, one, sizeof(md5));
+ }
}
- }
- char sha1[41] = "";
- char *sha1ptr = sha1;
- if (file->flags & FILE_SHA1) {
- size_t x;
- for (x = 0; x < sizeof(file->sha1); x++) {
- char one[3] = "";
- snprintf(one, sizeof(one), "%02x", file->sha1[x]);
- strlcat(sha1, one, sizeof(sha1));
+ char sha1[41] = "";
+ sha1ptr = sha1;
+ if (file->flags & FILE_SHA1) {
+ size_t x;
+ for (x = 0; x < sizeof(file->sha1); x++) {
+ char one[3] = "";
+ snprintf(one, sizeof(one), "%02x", file->sha1[x]);
+ strlcat(sha1, one, sizeof(sha1));
+ }
}
- }
- char sha256[65] = "";
- char *sha256ptr = sha256;
- if (file->flags & FILE_SHA256) {
- size_t x;
- for (x = 0; x < sizeof(file->sha256); x++) {
- char one[3] = "";
- snprintf(one, sizeof(one), "%02x", file->sha256[x]);
- strlcat(sha256, one, sizeof(sha256));
+ char sha256[65] = "";
+ sha256ptr = sha256;
+ if (file->flags & FILE_SHA256) {
+ size_t x;
+ for (x = 0; x < sizeof(file->sha256); x++) {
+ char one[3] = "";
+ snprintf(one, sizeof(one), "%02x", file->sha256[x]);
+ strlcat(sha256, one, sizeof(sha256));
+ }
}
}
-#else
- char *md5ptr = NULL;
- char *sha1ptr = NULL;
- char *sha256ptr = NULL;
-#endif
lua_pushnumber(luastate, file->file_store_id);
lua_pushnumber(luastate, file->txid);