diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 19:36:22 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 19:36:22 +0000 |
commit | abd4aba8725fdd0e604f727e617105725b709259 (patch) | |
tree | 007c410bf538052e0868b545f5a0bac497904331 /base/third_party | |
parent | 11f85946bf3db866584e83c92bbea9c2a769fcd7 (diff) | |
download | chromium_src-abd4aba8725fdd0e604f727e617105725b709259.zip chromium_src-abd4aba8725fdd0e604f727e617105725b709259.tar.gz chromium_src-abd4aba8725fdd0e604f727e617105725b709259.tar.bz2 |
Use nss_util.{h,cc} also on Windows. On Windows, NSS is
initialized without databases because we'll continue to use
the Windows system certificate store.
base\third_party\nss is now compiled with -DNO_NSPR_10_SUPPORT
(because the NSPR 1.0 types int8 - int64 and uint8 - uint64
conflict with the same-named types in "base/basictypes.h"),
so the uint32 type needs to be replaced by unsigned int.
R=agl,mark
BUG=28744
TEST=No build errors.
Review URL: http://codereview.chromium.org/557012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/third_party')
-rw-r--r-- | base/third_party/nss/README.chromium | 5 | ||||
-rw-r--r-- | base/third_party/nss/blapi.h | 6 | ||||
-rw-r--r-- | base/third_party/nss/sha512.cc | 8 |
3 files changed, 12 insertions, 7 deletions
diff --git a/base/third_party/nss/README.chromium b/base/third_party/nss/README.chromium index 7106351..44cecac 100644 --- a/base/third_party/nss/README.chromium +++ b/base/third_party/nss/README.chromium @@ -6,3 +6,8 @@ deleted or commented out unused code, and tweaked them for Chrome's source tree. sha512.c is renamed sha512.cc so that it can include Chrome's C++ header "base/basictypes.h". We define NOUNROLL256 to reduce the object code size. + +In blapi.h and sha512.cc, replaced uint32 by unsigned int so that they can +be compiled with -DNO_NSPR_10_SUPPORT. NO_NSPR_10_SUPPORT turns off the +definition of the NSPR 1.0 types int8 - int64 and uint8 - uint64 to avoid +conflict with the same-named types defined in "base/basictypes.h". diff --git a/base/third_party/nss/blapi.h b/base/third_party/nss/blapi.h index 6e57ee0..b1f8dc0 100644 --- a/base/third_party/nss/blapi.h +++ b/base/third_party/nss/blapi.h @@ -54,7 +54,7 @@ extern void SHA256_Update(SHA256Context *cx, const unsigned char *input, extern void SHA256_End(SHA256Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA256_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + unsigned int src_length); extern SECStatus SHA256_Hash(unsigned char *dest, const char *src); extern void SHA256_TraceState(SHA256Context *cx); extern unsigned int SHA256_FlattenSize(SHA256Context *cx); @@ -72,7 +72,7 @@ extern void SHA512_Update(SHA512Context *cx, const unsigned char *input, extern void SHA512_End(SHA512Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA512_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + unsigned int src_length); extern SECStatus SHA512_Hash(unsigned char *dest, const char *src); extern void SHA512_TraceState(SHA512Context *cx); extern unsigned int SHA512_FlattenSize(SHA512Context *cx); @@ -90,7 +90,7 @@ extern void SHA384_Update(SHA384Context *cx, const unsigned char *input, extern void SHA384_End(SHA384Context *cx, unsigned char *digest, unsigned int *digestLen, unsigned int maxDigestLen); extern SECStatus SHA384_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length); + unsigned int src_length); extern SECStatus SHA384_Hash(unsigned char *dest, const char *src); extern void SHA384_TraceState(SHA384Context *cx); extern unsigned int SHA384_FlattenSize(SHA384Context *cx); diff --git a/base/third_party/nss/sha512.cc b/base/third_party/nss/sha512.cc index 5a02f46..6ad0645 100644 --- a/base/third_party/nss/sha512.cc +++ b/base/third_party/nss/sha512.cc @@ -54,7 +54,7 @@ #include <string.h> #define PORT_New(type) static_cast<type*>(malloc(sizeof(type))) #define PORT_ZFree(ptr, len) do { memset(ptr, 0, len); free(ptr); } while (0) -#define PORT_Strlen(s) static_cast<uint32>(strlen(s)) +#define PORT_Strlen(s) static_cast<unsigned int>(strlen(s)) #define PORT_Memcpy memcpy /* ============= Common constants and defines ======================= */ @@ -475,7 +475,7 @@ SHA256_End(SHA256Context *ctx, unsigned char *digest, #if 0 SECStatus SHA256_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + unsigned int src_length) { SHA256Context ctx; unsigned int outLen; @@ -1133,7 +1133,7 @@ SHA512_End(SHA512Context *ctx, unsigned char *digest, SECStatus SHA512_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + unsigned int src_length) { SHA512Context ctx; unsigned int outLen; @@ -1241,7 +1241,7 @@ SHA384_End(SHA384Context *ctx, unsigned char *digest, SECStatus SHA384_HashBuf(unsigned char *dest, const unsigned char *src, - uint32 src_length) + unsigned int src_length) { SHA512Context ctx; unsigned int outLen; |