~ubuntu-branches/ubuntu/karmic/nss/karmic-updates

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/freebl/sha512.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-03-31 02:23:43 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100331022343-ck07ylqk8q474x26
Tags: 3.12.6-0ubuntu0.9.10.1
* New upstream release 3.12.6 RTM (NSS_3_12_6_RTM)
  - fixes CVE-2009-3555 aka US-CERT VU#120541
* Adjust patches to changed upstream code base
  - update debian/patches/38_kbsd.patch
  - update debian/patches/38_mips64_build.patch
  - update debian/patches/85_security_load.patch
* Remove patches that are merged upstream
  - delete debian/patches/91_nonexec_stack.patch
  - update debian/patches/series
* Bump nspr dependency to 4.8
  - update debian/control
* Add new symbols for 3.12.6
  - update debian/libnss3-1d.symbols 
* Enable transitional scheme for SSL renegotiation
  - add 97_SSL_RENEGOTIATE_TRANSITIONAL.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 * the terms of any one of the MPL, the GPL or the LGPL.
37
37
 *
38
38
 * ***** END LICENSE BLOCK ***** */
39
 
/* $Id: sha512.c,v 1.13 2008/11/19 21:10:52 nelson%bolyard.com Exp $ */
 
39
/* $Id: sha512.c,v 1.14 2009/04/09 22:11:07 julien.pierre.boogz%sun.com Exp $ */
40
40
 
41
41
#ifdef FREEBL_NO_DEPEND
42
42
#include "stubs.h"
43
43
#endif
44
44
 
45
45
#include "prcpucfg.h"
46
 
#if (defined(_X86_) && !defined(__x86_64__)) || defined(SHA_NO_LONG_LONG)
 
46
#if defined(NSS_X86) || defined(SHA_NO_LONG_LONG)
47
47
#define NOUNROLL512 1
48
48
#undef HAVE_LONG_LONG
49
49
#endif
103
103
#pragma intrinsic(_byteswap_ulong)
104
104
#define SHA_HTONL(x) _byteswap_ulong(x)
105
105
#define BYTESWAP4(x)  x = SHA_HTONL(x)
106
 
#elif defined(_MSC_VER) && defined(_X86_)
 
106
#elif defined(_MSC_VER) && defined(NSS_X86_OR_X64)
107
107
#ifndef FORCEINLINE
108
108
#if (_MSC_VER >= 1200)
109
109
#define FORCEINLINE __forceinline
125
125
#define SHA_HTONL(x) swap4b(x)
126
126
#define BYTESWAP4(x)  x = SHA_HTONL(x)
127
127
 
128
 
#elif defined(__GNUC__) && defined(_X86_)
 
128
#elif defined(__GNUC__) && defined(NSS_X86_OR_X64)
129
129
static __inline__ PRUint32 swap4b(PRUint32 value)
130
130
{
131
131
    __asm__("bswap %0" : "+r" (value));