summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2013-02-05 23:46:39 +0000
committerwtc%google.com <devnull@localhost>2013-02-05 23:46:39 +0000
commit41f36fc0661e33aec62b48283047c5f9d16ed8ec (patch)
tree94fec5d539d382ba5a5dffd6eea77a15d83e3ca4
parent31b8a11d85c215a518404aa0d9f2c8a5e2c93ba6 (diff)
downloadnss-hg-41f36fc0661e33aec62b48283047c5f9d16ed8ec.tar.gz
Bug 822365: the SHA_HTONL macro (used by the SHA_STORE_RESULT macro) needs
a local variable named 'tmp' in some build configurations. Undefine 'tmp' as 'lenB' at the end of SHA1_End. r=kaie.
-rw-r--r--security/nss/lib/freebl/sha_fast.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/security/nss/lib/freebl/sha_fast.c b/security/nss/lib/freebl/sha_fast.c
index 6044610ab..4db53fe15 100644
--- a/security/nss/lib/freebl/sha_fast.c
+++ b/security/nss/lib/freebl/sha_fast.c
@@ -178,12 +178,16 @@ SHA1_End(SHA1Context *ctx, unsigned char *hashout,
if (pDigestLen) {
*pDigestLen = SHA1_LENGTH;
}
+#undef tmp
}
void
SHA1_EndRaw(SHA1Context *ctx, unsigned char *hashout,
unsigned int *pDigestLen, unsigned int maxDigestLen)
{
+#if defined(SHA_NEED_TMP_VARIABLE)
+ register PRUint32 tmp;
+#endif
PRUint32 tmpbuf[5];
PORT_Assert (maxDigestLen >= SHA1_LENGTH);
@@ -193,7 +197,6 @@ SHA1_EndRaw(SHA1Context *ctx, unsigned char *hashout,
}
#undef B
-#undef tmp
/*
* SHA: Compression function, unrolled.
*