Index: nss/lib/freebl/rijndael.c |
diff --git a/nss/lib/freebl/rijndael.c b/nss/lib/freebl/rijndael.c |
index 4e4be79fdf10696e8b286a31cc06d52d7199d360..f6e38f62bdc792b4956c1cac7997ce445c726e88 100644 |
--- a/nss/lib/freebl/rijndael.c |
+++ b/nss/lib/freebl/rijndael.c |
@@ -7,6 +7,7 @@ |
#endif |
#include "prinit.h" |
+#include "prenv.h" |
#include "prerr.h" |
#include "secerr.h" |
@@ -30,6 +31,9 @@ static PRBool use_hw_aes = PR_FALSE; |
static int has_intel_avx = 0; |
static int has_intel_clmul = 0; |
static PRBool use_hw_gcm = PR_FALSE; |
+#if defined(_MSC_VER) && !defined(_M_IX86) |
+#include <intrin.h> /* for _xgetbv() */ |
+#endif |
#endif |
#endif /* USE_HW_AES */ |
@@ -1038,7 +1042,7 @@ aes_InitContext(AESContext *cx, const unsigned char *key, unsigned int keysize, |
#ifdef USE_HW_AES |
if (has_intel_aes == 0) { |
unsigned long eax, ebx, ecx, edx; |
- char *disable_hw_aes = getenv("NSS_DISABLE_HW_AES"); |
+ char *disable_hw_aes = PR_GetEnvSecure("NSS_DISABLE_HW_AES"); |
if (disable_hw_aes == NULL) { |
freebl_cpuid(1, &eax, &ebx, &ecx, &edx); |