Commit 15011aaf authored by Victor Tapia's avatar Victor Tapia

Bug 1582169 - Disable reading /proc/sys/crypto/fips_enabled if FIPS is not...

Bug 1582169 - Disable reading /proc/sys/crypto/fips_enabled if FIPS is not enabled on build r=jcj,rrelyea

Differential Revision: https://phabricator.services.mozilla.com/D61236

--HG--
extra : moz-landing-system : lando
parent d9aea9ca
......@@ -99,6 +99,7 @@ int
secmod_GetSystemFIPSEnabled(void)
{
#ifdef LINUX
#ifndef NSS_FIPS_DISABLED
FILE *f;
char d;
size_t size;
......@@ -116,6 +117,7 @@ secmod_GetSystemFIPSEnabled(void)
if (d == '1') {
return 1;
}
#endif
#endif
return 0;
}
......
......@@ -168,6 +168,7 @@ getFIPSEnv(void)
static PRBool
getFIPSMode(void)
{
#ifndef NSS_FIPS_DISABLED
FILE *f;
char d;
size_t size;
......@@ -186,6 +187,9 @@ getFIPSMode(void)
if (d != '1')
return PR_FALSE;
return PR_TRUE;
#else
return PR_FALSE;
#endif
}
#define NSS_DEFAULT_FLAGS "flags=readonly"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment