Commit Graph

502 Commits

Author SHA1 Message Date
nelsonb%netscape.com
08a19951bd Remove support for MOZILLA_BSAFE_BUILD. Bug 193090. 2003-05-16 20:14:59 +00:00
nelsonb%netscape.com
ff2431f5c0 Fix bug 202270. Eliminate a potential infinite loop. 2003-05-12 21:07:01 +00:00
ian.mcgreer%sun.com
f11e523f03 fix bug in last patch 2003-05-09 18:12:11 +00:00
ian.mcgreer%sun.com
8ce0ef089a bug 191757, eliminate some memcpy calls from MD5
r=nelsonb
2003-05-08 17:51:55 +00:00
bishakhabanerjee%netscape.com
b939a52974 Removed gcc warning - bug 203449 2003-04-29 23:13:33 +00:00
wtc%netscape.com
213a402f9d Bug 134113: make NSS build on Win32 using GCC (MinGW). The patch
(attachment 121068) is contributed by Chris Seawood (cls@seawood.org).
2003-04-20 04:23:37 +00:00
wtc%netscape.com
86445ec495 Bug 195127: Turn off debugging output now that we have the AIX tinderbox
working correctly.
2003-03-29 04:30:02 +00:00
nelsonb%netscape.com
3f52ba47c1 Changes to enable ECC over characteristic 2^m fields.
Contribution from Vipul Gupta <Vipul.Gupta@Sun.COM>
Modified Files:
 nss/cmd/strsclnt/strsclnt.c nss/lib/cryptohi/seckey.c
 nss/lib/freebl/blapit.h nss/lib/freebl/ec.c
 nss/lib/freebl/manifest.mn nss/lib/freebl/mpi/Makefile
 nss/lib/softoken/ecdecode.c nss/lib/softoken/pkcs11.c
 nss/lib/ssl/ssl3con.c nss/lib/util/secoid.c
 nss/lib/util/secoidt.h
2003-03-29 00:18:30 +00:00
nelsonb%netscape.com
365a37032d Add support for Elliptic Curve Cryptography. Bug 195135.
Contributor(s):
* Sheueling Chang Shantz <sheueling.chang@sun.com> and
* Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
Added Files:
    GF2m_ecl.c GF2m_ecl.h mpi/mp_gf2m.c mpi/mp_gf2m.h
    mpi/tests/mptest-b.c
2003-03-26 05:03:11 +00:00
ian.mcgreer%sun.com
26d35ef643 bug 198622, redundant memset calls 2003-03-24 22:25:52 +00:00
wtc%netscape.com
e60662c072 Resurrected the workaround in revision 1.2. It may be difficult for some
OSF1 users to upgrade their C compiler to the required versions.
2003-03-21 15:10:11 +00:00
wtc%netscape.com
a5c5715cab Bugzilla 198461: fixed build problem on OpenBSD. The patch is contributed
by timeless@bemail.org.
2003-03-21 05:24:29 +00:00
wtc%netscape.com
47c8a2f084 Bugzilla 198481: fixed all build problems with gcc on Solaris.
1. Removed the workarounds we put in before -- hardcoding LD to
/usr/ccs/bin/ld and passing the -B/usr/ccs/bin/ flag to gcc.
2. Use the compiler, $(CC), to build shared libraries.
3. If gcc is used, determine whether gcc uses GNU ld or Solaris
ld and set the new make variable GCC_USE_GNU_LD accordingly.
Modified Files:
	coreconf/SunOS5.mk nss/cmd/platlibs.mk nss/lib/freebl/Makefile
2003-03-21 03:31:00 +00:00
nelsonb%netscape.com
de78b20e51 Fix type mismatches in return values that were breaking gcc builds.
No bug number.
2003-03-18 03:24:59 +00:00
wtc%netscape.com
8f947046b1 Bug 195127: 1. Enable DEBUG_SHVERIFY. 2. Added debug output to print the
file name if PR_Open fails.
2003-03-01 01:53:11 +00:00
nelsonb%netscape.com
f87129ad87 Add support for Elliptic Curve Cryptography. Bug 195135.
Modified Files:
 	cmd/lib/SECerrs.h cmd/selfserv/selfserv.c
 	cmd/tstclnt/tstclnt.c lib/cryptohi/keyhi.h
 	lib/cryptohi/keythi.h lib/cryptohi/seckey.c
 	lib/cryptohi/secvfy.c lib/freebl/Makefile lib/freebl/blapi.h
 	lib/freebl/blapit.h lib/freebl/ldvector.c lib/freebl/loader.c
 	lib/freebl/loader.h lib/freebl/manifest.mn lib/nss/nss.def
 	lib/pk11wrap/pk11skey.c lib/pk11wrap/pk11slot.c
 	lib/softoken/lowkeyti.h lib/softoken/manifest.mn
 	lib/softoken/pkcs11.c lib/softoken/pkcs11c.c
 	lib/softoken/pkcs11t.h lib/ssl/ssl3con.c lib/ssl/ssl3prot.h
 	lib/ssl/sslcon.c lib/ssl/sslenum.c lib/ssl/sslimpl.h
 	lib/ssl/sslinfo.c lib/ssl/sslproto.h lib/ssl/sslsecur.c
 	lib/ssl/sslsock.c lib/ssl/sslt.h lib/util/secerr.h
 	lib/util/secoid.c lib/util/secoidt.h
Added Files:
 	lib/freebl/GFp_ecl.c lib/freebl/GFp_ecl.h lib/freebl/ec.c
 	lib/freebl/ec.h lib/softoken/ecdecode.c
2003-02-27 01:31:38 +00:00
nelsonb%netscape.com
53f415bde5 Fix bug 194840. Get new random seed before each attempt to sign with DSA. 2003-02-25 23:45:23 +00:00
wtc%netscape.com
08b98e2fe3 Bug 194309: cvs removed libpath.c because the freebl_GetLibraryFilePathname
function has been replaced by the new NSPR 4.3 function
PR_GetLibraryFilePathname.
2003-02-21 02:40:52 +00:00
wtc%netscape.com
c049211d54 Bug 194309: replaced freebl_GetLibraryFilePathname by the new NSPR 4.3
function PR_GetLibraryFilePathname.
Modified files: config.mk manifest.mn shvfy.c
2003-02-21 00:41:24 +00:00
wtc%netscape.com
42ae3a8e2c There should be no token after #endif. 2003-02-14 05:32:35 +00:00
relyea%netscape.com
f9dd52a261 Turn off debugging output now that we have the tinderboxen working correctly. 2003-02-13 17:41:45 +00:00
relyea%netscape.com
267c0b8095 Add debugging information. Turn on tempararily to get debug info from tinderbox failures. 2003-02-07 19:22:42 +00:00
wtc%netscape.com
5cc66223d8 Backed out the previous checkin because it doesn't work on Windows. 2003-02-06 05:33:33 +00:00
wtc%netscape.com
025206b16f Bug 177387: include the *.chk files in the mdbinary.jar files generated by
the release makefile target.
Modified Files: lib/freebl/manifest.mn lib/softoken/manifest.mn
2003-02-06 03:52:37 +00:00
nelsonb%netscape.com
3f08900d2f Fix an uninitialized variable. Bug 191396. 2003-01-31 22:26:56 +00:00
nelsonb%netscape.com
9b5a756ce6 Fix bug 191396. Don't generate SEC_ERROR_LIBRARY_FAILURE unnecessarily
while doing dsa signatures.
2003-01-31 02:39:36 +00:00
relyea%netscape.com
691d3e25e1 FIPS library verifier 2003-01-30 23:36:37 +00:00
wtc%netscape.com
060a90105f Bug 177387: temporarily added freebl_GetLibraryFilePathname to libfreebl.a.
This function has the same semantics as the NSPR 4.3 function
PR_GetLibraryFilePathname. This patch should be backed out when NSPR 4.3 is
released.
Modified Files: config.mk manifest.mn
Added Files: libpath.c
2003-01-30 07:00:32 +00:00
relyea%netscape.com
99d710be9c New header file to dump defines for managing signed FIPs libraries. 2003-01-28 18:50:02 +00:00
nelsonb%netscape.com
66dbe61852 One more fix for HPUX and Solaris. 2003-01-16 01:44:43 +00:00
nelsonb%netscape.com
52c0e7f513 Fix compilation error. This file is only compiled on 2 platforms. 2003-01-16 00:55:53 +00:00
nelsonb%netscape.com
b4debe71ef Complete the addition of AES Key Wrap to blapi in freebl. 2003-01-16 00:15:21 +00:00
nelsonb%netscape.com
c74e098433 aeskeywrap.c - implement AES Key Wrap algorithm from RFC 3394 2003-01-14 22:16:04 +00:00
wtc%netscape.com
22b938bb47 Bug 186201: should handle a null 'environ' pointer, which can happen on
Solaris if NSS is loaded with dlopen() by an executable linked with the
RTLD_GROUP flag.
2003-01-09 04:34:31 +00:00
nelsonb%netscape.com
924b265d37 Use the 32-bit code on Solaris x86 platforms, too. 2002-11-21 02:54:04 +00:00
nelsonb%netscape.com
c9be494de9 Back out revision 1.2, which was a workaround for a c preprocessor bug
in a certain version of the c compiler for Dec/Compaq Alpha OSF1.
The file now requires one of these compilers on that platform:
Compaq C V6.3-132  or Compaq C V6.4-214 (dtk)
2002-11-20 05:25:58 +00:00
nelsonb%netscape.com
6986b980f7 Optimization: change macros to do only 32-bit arithmetic on platforms
with only 32-bit registers.
2002-11-20 00:48:09 +00:00
nelsonb%netscape.com
0391c3a0ab Change all functions that create contexts for encryption to treat their
input buffers as const.  Warning reduction.
2002-11-16 06:09:58 +00:00
nelsonb%netscape.com
eeb4bc7c50 Now that we have hashes larger than SHA1,
#define HASH_LENGTH_MAX         SHA512_LENGTH
2002-11-16 03:21:53 +00:00
nelsonb%netscape.com
e1484b41c3 Workaround a c preprocessor bug on a certain 64-bit platform. Bug 178314. 2002-11-05 01:52:49 +00:00
nelsonb%netscape.com
c2ff4f68a2 Add some processor and compiler dependent optimizations to SHA1. 2002-11-02 01:53:01 +00:00
nelsonb%netscape.com
2ff4c01664 Add SHA256 SHA512 and SHA384 hashes to freebl. 2002-11-02 01:51:44 +00:00
nelsonb%netscape.com
8bdfd22acf Add targets for HPUX Itanium family processors. 2002-09-27 01:23:28 +00:00
wtc%netscape.com
fda8e75512 Bug 170379: fix the stack overflow crash by not allocating the 32K "sieve"
array on the stack.
2002-09-26 00:04:25 +00:00
wtc%netscape.com
3f0df98640 Bug 91224: Make sure that we use Solaris ld, not GNU ld, to build NSS.
Modified Files:
	coreconf/SunOS5.mk nss/Makefile nss/cmd/platlibs.mk
	nss/lib/freebl/Makefile
2002-09-18 23:25:29 +00:00
wtc%netscape.com
31d3d63a0b Bug 168722: fix compiler warnings.
Modified Files: rijndael.c rijndael.h
2002-09-17 04:24:11 +00:00
jpierre%netscape.com
3558a42662 Undo check-in that broke QA 2002-09-16 09:32:09 +00:00
jpierre%netscape.com
041a42e886 Fix compiler warnings 2002-09-14 06:42:39 +00:00
wtc%netscape.com
50a10a145b Backed out the previous checkin, which broke 64-bit platforms. 2002-09-09 03:56:25 +00:00
ian.mcgreer%sun.com
19b8f21eb7 fix compiler warnings 2002-09-08 16:47:58 +00:00
jpierre%netscape.com
595f01c3fd Roll back checkin to fix QA tests 2002-09-07 02:59:04 +00:00
jpierre%netscape.com
e2b8be5319 Fix compiler warnings 2002-09-07 01:24:27 +00:00
jpierre%netscape.com
486fd19230 Fix compiler warnings 2002-09-07 01:00:04 +00:00
nicolson%netscape.com
e179fe8904 Fix 164126: makefile build error.
Change the NSS module name from "security" to "nss".
2002-09-06 16:38:56 +00:00
ian.mcgreer%sun.com
d681129497 make dsa_SignDigest static (mentioned in bug 166722) 2002-09-05 20:44:09 +00:00
jpierre%netscape.com
2c39c4639f Fix for 153245 2002-07-17 00:21:09 +00:00
wtc%netscape.com
a1bc754db7 Bugzilla bug 131171: added HP-UX IPF (ia64) support. Portions of the patch
(attachment 84127) were contributed by Jim Dunn <jdunn@netscape.com>.
2002-05-18 00:52:11 +00:00
relyea%netscape.com
7143d6f89c Fix the RSA key check to correctly accept keys with p < q. 2002-05-02 17:39:13 +00:00
relyea%netscape.com
57da95c52b Tempararily back out random change so that we don't actually read *every* file in system32. 2002-04-05 09:18:57 +00:00
nelsonb%netscape.com
153a1e1fa9 WinCE mods (2nd try). Use NSPR for file system I/O on WinCE.
Change algorithm for selecting files to read for seeding the PRNG.
Old algorithm sometimes read very few files if opens failed.
2002-04-05 03:49:35 +00:00
nelsonb%netscape.com
6fea29075e Back out win_rand changes. The changes used NSPR for file I/O instead
of using libc.  But some of our DLLs don't link against NSPR :-(.
2002-04-04 02:09:01 +00:00
nelsonb%netscape.com
d378f5131e Get freebl and mpi to build for WinCE. Use NSPR for I/O in sysrand. 2002-04-04 00:19:43 +00:00
nelsonb%netscape.com
e61fb92200 Fix (er, improve) Makefile dependencies for sysrand.{o,obj} 2002-04-04 00:17:17 +00:00
wtc%netscape.com
dd90c969db Bugzilla bug 133668: use PR_MIN instead of MIN, which is no longer defined
by the Mozilla header file that we include.
2002-03-27 07:29:57 +00:00
wtc%netscape.com
6c79ece2fe Bugzilla bug 70217: ported NSS to BeOS. The patch is contributed by
Christopher Seawood <seawood@netscape.com>.
2002-02-22 04:23:30 +00:00
nelsonb%netscape.com
e023b4422a Change most coreconf and NSS makefiles to use OS_TARGET (which can
be overridden via an environment variable) rather than OS_ARCH.
This is a precursor to more flexibility in cross-platform builds.
Bug 104541.
2002-02-15 22:54:08 +00:00
wtc%netscape.com
da15146da7 Bugzilla bug 112198: Port NSS to Mac OS X (Darwin). The patch is
contributed by Javier Pedemonte <pedemonte@alumni.utexas.net>.
Modified Files:
	coreconf/config.mk coreconf/nsinstall/nsinstall.c
	coreconf/nsinstall/pathsub.c nss/lib/freebl/unix_rand.c
	nss/lib/ssl/unix_err.c
2002-02-10 05:24:49 +00:00
sonja.mirtitsch%sun.com
562719f774 removed compiler workshop 5 marker bug# 124256 r=nelsonb 2002-02-08 00:43:18 +00:00
wtc%netscape.com
4f95c4463a Bugzilla bug 119376: fixed the uninitialized variable 'rv' in
rsa_PrivateKeyOp.
2002-02-07 01:00:31 +00:00
wtc%netscape.com
d2e3ab55fb Bugzilla bug 100447: on BSD/OS 4.2 and 4.3, we have problem calling
safe_popen in a threaded program.  So we don't call safe_popen when
we obtained some entropy from /dev/urandom.  Thanks to lidl@pix.net
for the bug report and the fix.
2002-01-27 00:14:59 +00:00
wtc%netscape.com
63dd3ebaf8 Bugzilla bug 111206: make the Solaris version test flexible so that we
don't need to add a new test for each new Solaris release.
2002-01-26 16:19:51 +00:00
nelsonb%netscape.com
9af2ddfe10 Don't allocate sieve from stack on machines with very-limited stacks.
Bug 115012.  Patch from Michael Kaply mkaply@us.ibm.com
2001-12-18 21:49:49 +00:00
jpierre%netscape.com
8861c70ad5 Fix for 105764 - compiler warnings 2001-12-12 04:14:48 +00:00
ian.mcgreer%sun.com
264c4e04c8 merge in 3.3 branch changes to tip 2001-12-10 18:14:23 +00:00
wtc%netscape.com
3b03ab07c0 Bugzilla bug 111294: make NSS build on QNX6 (Neutrino). The patch was
contributed by Dave Inglis <dinglis@qnx.com>. r=wtc.
Modified Files:
	coreconf/config.mk coreconf/nsinstall/nsinstall.c
	nss/lib/freebl/unix_rand.c nss/lib/ssl/unix_err.c
Added Files:
	coreconf/QNX.mk
2001-12-04 18:20:57 +00:00
relyea%netscape.com
0ad6ee3eca Fix Solaris and HP build failures. 2001-12-03 19:51:57 +00:00
relyea%netscape.com
b3b596f673 Add code to 'shutdown' freebl (clean up the blinding cache in rsa).
merge the NSS 3.3 changes to export Ian's double check code through the loader.
2001-11-30 23:21:49 +00:00
nelsonb%netscape.com
c3dc286eab Add one more missing declaration of environ; 2001-11-15 20:40:44 +00:00
nelsonb%netscape.com
b31c9eb0fd Go back to declaring "extern char ** environ". 2001-11-15 20:35:31 +00:00
nelsonb%netscape.com
cd6006d2cd Now that the implementations of all the RNG_ functions have been moved
from lib/util to lib/freebl, move the RNG header file there, too.
Eliminate secrngt.h, which has been empty (except for the license
boilerplate) for many releases.
2001-11-15 04:29:27 +00:00
nelsonb%netscape.com
30e87452c1 Use data from /dev/urandom to initialize PRNG, when possible.
and related changes.  Bug 96626.
2001-11-15 02:41:20 +00:00
ian.mcgreer%sun.com
a7f8233621 merge 3.3 branch checkin; rsa double check and key consistency functions (see bug 74226) 2001-11-14 23:03:20 +00:00
relyea%netscape.com
2888df9f80 HP ans Solaris are still down... 2001-11-08 15:27:56 +00:00
relyea%netscape.com
93489fda0a OK, try this again. FreeBL needs Get_Noise in the freebl .so on solaris, so
move the random number stuff there where it belongs.
2001-11-08 15:02:25 +00:00
wtc%netscape.com
1e45173d8f Bugzilla bug 103933: loader.c should not be compiled with -xchip=ultra2.
r=nelsonb.
2001-11-01 05:25:31 +00:00
ian.mcgreer%sun.com
e774d95a8f patch to fix behavior on AIX's optimizing compiler. Shoul also improve performance on all platforms. 2001-10-30 22:11:49 +00:00
jpierre%netscape.com
8ff9efeee1 Fix NT comment in OS/2 Makefile 2001-10-17 22:15:26 +00:00
jpierre%netscape.com
49daf179ce Fix for 104740 - build bignum library on OS/2 with mpi_x86 assembly code . reviewed by nelsonb 2001-10-17 20:35:37 +00:00
nelsonb%netscape.com
b4e1895f0d Fix bug 105185, which sometimes caused the result to be greater than n.
Fix suggested by Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>
2001-10-17 20:35:04 +00:00
nelsonb%netscape.com
a56382dc9a Use new assembly language multiply code contributed by Richard C. Swift. 2001-10-10 01:05:02 +00:00
nelsonb%netscape.com
6be66357d1 Build mpi with new file mpvalpha.c.
Contributed by Richard C. Swift (swift@netscape.com)
2001-10-09 23:51:36 +00:00
nelsonb%netscape.com
d774c7301a The Original Code is Multiple Precision Integer optimization code for
the Compaq Alpha processor.
The Initial Developer of the Original Code is Richard C. Swift.
Portions created by the Initial Developer are Copyright (C) 2001
the Initial Developer. All Rights Reserved.
2001-10-09 23:47:59 +00:00
ian.mcgreer%sun.com
5c602aa7e2 reuse intermediate multiplication values when decrypting; speeds up decryption in the RIJNDAEL_GENERATE_VALUES case by 60%. (todo: something similar with RIJNDAEL_GENERATE_VALUES_MACRO) 2001-10-08 19:06:31 +00:00
ian.mcgreer%sun.com
1c483cab92 allow various ways of building AES 2001-10-08 16:11:52 +00:00
nelsonb%netscape.com
dd97606577 Fix the 128-bit block encrypt and decrypt functions for unaligned buffers. 2001-09-26 04:24:29 +00:00
relyea%netscape.com
2b60cb8953 Replace variable that belongs in an ifdef. 2001-09-20 23:15:12 +00:00
relyea%netscape.com
9cc2e54698 Fix compiler warnings on AIX, Linux, HP, and Solaris. 2001-09-20 22:14:09 +00:00
ian.mcgreer%sun.com
5081fc7e70 disable AES for blocksizes > 128 until it is fixed. 2001-09-20 17:11:08 +00:00
wtc%netscape.com
ef8a0c68f8 Bugzilla bug 94685: added 'const' to eliminate compiler warnings. 2001-08-22 23:55:53 +00:00
javi%netscape.com
8d8886f4b0 Fix for bug 87865 r=nelsonb,mcgreer
Use the constant SIEVE_SIZE instead of the sizeof operator since
  the type for the variable sieve is different on the Mac.
2001-06-28 00:05:55 +00:00
nelsonb%netscape.com
2e44115f91 Use symbolic names for the maximum and mimimum Rijndael block sizes.
Allocate the IV directly in the contect block, rather than being
separately allocated.  This fixes a memory leak.  Change CBC mode to
correctly update the IV from one set of blocks to the next in a stream.
More testing is needed.  Bug 85538.
2001-06-20 03:17:01 +00:00
wtc%netscape.com
be066b2226 Bugzilla bug #86125: removed the support for MP_DIGIT_MAX < 256. This
#if preprocessor directive broke some C preprocessors that don't recognize
LL constants even though the C compilers support long long.  r=nelsonb.
2001-06-18 19:54:21 +00:00
wtc%netscape.com
89d09973a5 Restored MPI_USERS as these files do depend on $(MPI_HDRS). 2001-06-02 03:07:26 +00:00
wtc%netscape.com
12c47a150a It is more efficient to use := to when the value of the assignment is
$(shell ...).
2001-06-02 03:03:58 +00:00
wtc%netscape.com
5012fa24d8 Deleted unused variables CPORLN and MPI_USERS. 2001-06-01 01:07:58 +00:00
wtc%netscape.com
ce8559de1b Bugzilla bug #82837: backed out the workaround as we are not affected by
this compiler bug with Nelson's fix in bug #73115.
2001-05-31 00:12:18 +00:00
wtc%netscape.com
32d9e72f6b Bugzilla bug #82837: work around a Forte6 compiler optimization bug on
Solaris x86.
2001-05-30 18:15:30 +00:00
wtc%netscape.com
c83d9284ee Bugzilla bug #80809: use the correct assembler flags under gcc on IRIX.
Thanks to John Vandenberg <zeroJ@null.net> for the patch.
2001-05-22 13:43:47 +00:00
wtc%netscape.com
70ba3f51b2 Bugzilla bug #77199: Make NSS build under OS/2. Thanks to Javier
Pedemonte <pedemont@us.ibm.com> for the patch.
Modified Files:
        coreconf/OS2.mk coreconf/rules.mk coreconf/ruleset.mk
        nss/lib/freebl/Makefile nss/lib/pkcs12/p12.h nss/lib/ssl/ssl.h
        nss/lib/util/secport.h
2001-05-21 21:25:32 +00:00
nelsonb%netscape.com
1ca01b9eec Restore explicit dependencies on headers and other sources. 2001-05-08 03:50:02 +00:00
relyea%netscape.com
8b5d6059c9 Add .asm to the vpath as well. 2001-05-01 00:22:30 +00:00
relyea%netscape.com
7f6d97c8f1 Set vpath up so builds in readonly trees will work. 2001-04-30 21:52:46 +00:00
nelsonb%netscape.com
80046e3076 MPI now uses assembler code for Solaris i86pc. 2001-04-27 20:49:17 +00:00
nelsonb%netscape.com
142643b2df A version of the Intel assembler code for Solaris i86pc's as assembler. 2001-04-27 20:47:39 +00:00
nelsonb%netscape.com
a87ed3e7fe Build freebl on Solaris x86 with either gcc or Forte'. Not yet using
x86 assembler sources though.  That's TBD.   Bug 73115.
2001-04-27 04:17:59 +00:00
nicolson%netscape.com
94755d42a1 Fix bug 75770: RSA_NewKey returns an incomplete key. Reviewed by mcgreer
and nelsonb.
2001-04-12 20:23:42 +00:00
nelsonb%netscape.com
a6ff2f9594 Build changes for Solaris and gcc. Get gcc to use the proper architecture
flags when building v8plus code on Solaris/Ultrasparc.  Use gcc instead of
ld to build the freebl DSOs when using gcc on Solaris.  And stop using the
"sparkfix" program on Solaris.  It is no longer needed.  Bug 69052.
2001-03-14 23:30:37 +00:00
relyea%netscape.com
b22a7c1f09 bug 70992 patches to build 4.2 BSD 2001-03-13 19:02:05 +00:00
wtc%netscape.com
a83eb31b00 Bugzilla bug #63768: removed references to the obsolete PURE_LIBRARY,
HAVE_PURIFY etc. make variables in NSS files.  Reviewed by nelson Bolyard.
Modified Files:
	cmd/platrules.mk cmd/crmf-cgi/config.mk cmd/crmftest/config.mk
	cmd/lib/config.mk cmd/zlib/config.mk lib/base/config.mk
	lib/certdb/config.mk lib/certhigh/config.mk lib/ckfw/config.mk
	lib/crmf/config.mk lib/cryptohi/config.mk
	lib/fortcrypt/swfort/config.mk lib/freebl/config.mk
	lib/jar/config.mk lib/nss/config.mk lib/pk11wrap/config.mk
	lib/pkcs12/config.mk lib/pkcs7/config.mk lib/smime/config.mk
	lib/softoken/config.mk lib/ssl/config.mk lib/util/config.mk
2001-02-02 01:49:57 +00:00
mcgreer%netscape.com
57379e33fe bug 67100, memory leaks in rsa.c and pqg.c fixed. 2001-01-31 15:49:19 +00:00
nelsonb%netscape.com
e69cdb69fa Fix memory leak in mpp_make_prime. Bug 67094. 2001-01-31 00:37:40 +00:00
mcgreer%netscape.com
d27b33644d handle leading zeroes in q bug (66558). suggested by nicolson; r=mcgreer,a=wtc 2001-01-29 14:24:57 +00:00
wtc%netscape.com
752be879db Bugzilla bug #66286: link libnss3.so with -R '$ORIGIN' on Solaris so that
it searches for libfreebl_*.so in the same directory where it resides.
As a result, libnss3.so, not libnspr4.so, must be the one calling dlopen,
so libnss3.so can't call PR_LoadLibraryWithFlags.
Modified files: lib/freebl/loader.c, lib/nss/config.mk
2001-01-24 05:26:19 +00:00
mcgreer%netscape.com
73586118bb fixes for prime generatation:
1.  Increase maximum tries to 600 (based on 2*(approx. frequency of 1024-bit primes))
2.  Lower the number of Miller-Rabin iterations for p and q based on HAC table 4.4
r=nelsonb,a=wtc
2001-01-18 16:39:10 +00:00
nelsonb%netscape.com
fe9fa27179 When searching for a prime, the number of Miller-Rabin tests to be
performed will be done in accordance with a table published in the
Handbook of Applied Cryptography.  See Bug 65151.  Also, changes to
test program for this function.
2001-01-18 01:39:17 +00:00
mcgreer%netscape.com
03f5d37be2 remove unspecified arg check (bug 65122) 2001-01-12 14:30:44 +00:00
mcgreer%netscape.com
3f0e83ae0c bug 64706
when prime generation step fails, retry up to a specified number of times
2001-01-12 14:29:47 +00:00
nelsonb%netscape.com
a6efa3c2c5 Save and restore %ebx register in all functions. Fixes bug 64940. 2001-01-12 01:37:02 +00:00
nelsonb%netscape.com
729c505bf3 Changed HP assembler routine multacc512 in hpma512.s so that it
propagates carries exactly the same way that maxpy_little does.
Re-enabled use of multacc512 in mpi_hp.c.
2001-01-08 05:58:34 +00:00
nelsonb%netscape.com
c974f7d877 Fix infinite loop by making "i" be signed again.
Also match up braces for vi editor.
2001-01-08 03:26:50 +00:00
nelsonb%netscape.com
1f1f72480e Generation of prime numbers has been failing on HP since MPI began to
use the newest HP assembler function, multacc512.  So, that function
has been disabled.  Further investigation is needed.
2001-01-08 01:01:35 +00:00
mcgreer%netscape.com
a12fc02b67 reflect function declaration changes to loader module (const stuff) 2001-01-06 17:07:07 +00:00
mcgreer%netscape.com
ffeb56bbd2 on hypbrid cpu models (except sparc), use long long instead of long 2001-01-06 17:06:26 +00:00
mcgreer%netscape.com
50c492d08c fix broken build on bigendian platforms 2001-01-06 16:34:23 +00:00
mcgreer%netscape.com
ec87616c36 widespread changes to reduce compiler warnings. liberal application of const. 2001-01-05 22:37:50 +00:00
nelsonb%netscape.com
97cc48fda6 Reduce warnings by adding missing #includes to eliminate calls to
undeclared functions.
2001-01-04 08:21:15 +00:00
larryh%netscape.com
351f30a205 Bugzilla: 64132. NSS lock instrumentation 2001-01-03 19:51:22 +00:00
mcgreer%netscape.com
2266954d60 fix problem in decrypt 2001-01-02 16:57:47 +00:00
nelsonb%netscape.com
dfe078513f Don't build libfreebl_*_3.a . Just build the .so's. 2000-12-29 23:21:51 +00:00
nelsonb%netscape.com
16a28a548d This file has been superseded by mpv_sparcv8.s and mpv_sparcv9.s 2000-12-29 01:07:00 +00:00
nelsonb%netscape.com
165ce1171a Implement new mpi function mpi_read_variable_radix(). It's like
mpi_read_radix(), except that if the input stream begins with a leading
zero or "0x", it will interpret the input as octal or hex, respectively.
2000-12-29 01:01:37 +00:00
nelsonb%netscape.com
99f5c067fe Optimized version of these functions, contributed by Sun. 2000-12-29 00:36:31 +00:00
nelsonb%netscape.com
2701ecb476 Add missing release_md target. This will cause the new DSOs to be
included in the released jar files.
2000-12-28 21:35:55 +00:00
nelsonb%netscape.com
30ce773929 Define NSS_USE_HYBRID in hybrid builds. 2000-12-28 04:13:02 +00:00
nelsonb%netscape.com
19aaa707ef Separate the floating point and integer implementations of modular
exponentiation into two functions that can be chosen at run time.
2000-12-28 03:41:50 +00:00
nelsonb%netscape.com
d84a97a8ac Radical change to freebl "32-bit" builds on Solaris and HP-UX "32-bit".
Build two DSOs, both conforming to the platform's 32-bit ABI, one of
which uses only 32-bit instructions, the other uses 64-bit instructions.
Then load the best one for the local CPU at run time.  This allows
greatly enhanced performance on 64-bit CPUs while still supporting older
32-bit CPUs.
2000-12-28 03:39:01 +00:00
nelsonb%netscape.com
3cf4961be7 mapfile defines the public ABI for the new freebl DSOs. 2000-12-28 03:35:43 +00:00
nelsonb%netscape.com
4a9ba412bb Verify vector version and length before relying on the DSO's vector. 2000-12-28 03:26:29 +00:00
wtc%netscape.com
46ef2e65b7 Bugzilla bug #63807: fixed function prototype of SHA1_TraceState. 2000-12-27 18:47:57 +00:00
nelsonb%netscape.com
b41b82ce9d This code permits multiple implementations of freebl to coexist for a
single platform.  The best implementation for the local CPU is dynamicly
loaded at run time.  Requires DSOs to be in the LD_LIBRARY_PATH or
equivalent (e.g. SHLIB_PATH).
2000-12-27 03:20:04 +00:00
nelsonb%netscape.com
855cec4af9 Stubs for RC5 functions. This is NOT a working implementation of RC5. 2000-12-27 03:16:59 +00:00
nelsonb%netscape.com
f7c24847c7 Attempt to clarify code to reduce confusion about side effect of
MP_CHECKOK macro.
2000-12-27 03:14:28 +00:00
nelsonb%netscape.com
29c09b0208 Ensure function SHA1_TraceState is always defined, even when TRACING_SSL
is not defined.
2000-12-27 02:41:59 +00:00
nelsonb%netscape.com
3dc39fe215 Change HP 64-bit and hybrid builds to use new HP assembly code.
Fix uses of $(LIB).
2000-12-27 02:08:54 +00:00
nelsonb%netscape.com
9e517f5d33 The Initial Developer of the Original Code is Netscape
Communications Corporation.  Portions created by Netscape are
Copyright (C) 2000 Netscape Communications Corporation.  All Rights
Reserved.
2000-12-27 01:48:25 +00:00
nelsonb%netscape.com
ed7c69d604 The Initial Developer of the Original Code is the Hewlett-Packard Company.
Portions created by Hewlett-Packard Company are
Copyright (C) 1999 Hewlett-Packard Company.  All Rights Reserved.
2000-12-27 01:45:23 +00:00
nelsonb%netscape.com
14f9d75af8 The Initial Developer of the Original Code is the Hewlett-Packard Company.
Portions created by Hewlett-Packard Company are
Copyright (C) 1997 Hewlett-Packard Company.  All Rights Reserved.
2000-12-27 01:44:44 +00:00
nelsonb%netscape.com
2b04b7346c Revise mp_div and s_mp_div substantially. Reduce the number of temporary
variables.  Eliminate inner loop of shifts from s_mp_div.
2000-12-20 05:54:18 +00:00
mcgreer%netscape.com
49ed8cb93a initial checkin of Rijndael (AES) implementation. Only blocksize == 128 bits
has been tested on this checkin.
Added make target "rijndael_tables", which will generate rijndael32.tab.
2000-12-19 23:43:12 +00:00
nelsonb%netscape.com
f6d5a84b79 Correct make variable name for AIX. 2000-12-15 06:00:55 +00:00
nelsonb%netscape.com
a758f782ec Change AIX 32-bit options to use new fine-grained feature test macros. 2000-12-15 05:54:08 +00:00
nelsonb%netscape.com
fd321489ff Implement new feature test macros for controlling the use of mp_word over
individual types of operations, e.g., multiply, divide, add, subtract.
Use a specific combination of these for 32-bit on AIX.
2000-12-15 05:38:09 +00:00
nelsonb%netscape.com
cbcc0658f2 Add missing Makefile lines to build mpi optimally for AIX 32 and 64-bit. 2000-12-15 03:01:23 +00:00
nelsonb%netscape.com
a99008bc8d Fix mpi-test for machines that have long or long long digits. 2000-12-15 03:00:00 +00:00
nelsonb%netscape.com
6502891944 Fix hybrid model builds for HP-UX. 2000-12-13 04:36:28 +00:00
nelsonb%netscape.com
3be31901cc Start building freebl with MPI's new floating point acceleration code. 2000-12-13 01:26:48 +00:00
nelsonb%netscape.com
d50f40cfc7 Add support for unsigned long long mp_digits.
Revise and simplify the scheme of feature test macros used in mpi.h.
Remove all NSS_ and SOLARIS ifdefs from the source.
2000-12-13 01:22:22 +00:00
nelsonb%netscape.com
18d92f7b48 This file is the output of Sun's WorkShop 5.0 compiler for mpv_sparc.c,
when compiled for the v8+ or v9 architecture.  This file may be built
with WorkShop 4.2 and will produce the same .o as WorkShop 5.0.
2000-12-13 01:19:55 +00:00
nelsonb%netscape.com
5073b4c76e On DEC Alpha/OSF1, following the examples in <c_asm.h>, use inline
assembly code to get 64-bit products and squares from 32-bit multipliers
in just two instructions.  Speeds up multiplication and squaring a lot.
2000-12-09 03:36:41 +00:00
nelsonb%netscape.com
04688e0249 When building without the inline assembly macros, use a simple cast
rather than the math lib's floor() function.  Also, don't and with a
mask of all 1 bits when casting to a smaller unsigned type will suffice.
2000-12-09 03:32:41 +00:00
nelsonb%netscape.com
7a0b5a0ef2 This modification, contributed by Sun, avoids computing values >= 2^52.
This code runs much faster than the previous version on UltraSparc-3 CPUs,
and slightly slower than the previous version on UltraSparc-II CPUs.
2000-12-08 00:20:36 +00:00
nelsonb%netscape.com
885d29d0b4 Use the new floating point Montgomery multiply code from Sun on Solaris. 2000-12-02 02:37:22 +00:00
nelsonb%netscape.com
f49b012cd4 Back out a previous change to one line of this code for performance. 2000-12-01 03:58:17 +00:00
nelsonb%netscape.com
6abe6c9e6c Add new optional third argument which specifies modulus size in bytes.
Don't print values for powers 0, 1, and 2 unless the repetition count
(the optional second argument) is 1.
2000-12-01 03:56:12 +00:00
nelsonb%netscape.com
32b43a3ae6 Replace compiler-generated inner loop code with optimized code.
This optimized code was contributed by Sun Microsystems Inc.
2000-12-01 03:53:13 +00:00
nelsonb%netscape.com
196b9b582c * The Original Code is SPARC hand-optimized Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.
2000-12-01 03:18:27 +00:00
nelsonb%netscape.com
291aa8039a * inline macros for SPARC Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.
2000-12-01 03:17:53 +00:00
nelsonb%netscape.com
8f9113a6de Add missing error detection to identest. Change the order in which
mp_ints are destroyed to make debugging easier.  These changes
facilitated detecting and fixing bug 61394.
2000-11-29 04:07:10 +00:00
nelsonb%netscape.com
4a90b4de0b Fix bug 61394. Don't increase length of input vector by 1. Avoid
copying the vector twice.
2000-11-29 01:30:28 +00:00
nelsonb%netscape.com
2889df8598 Get the montmulf code to build, in preparation for integration into MPI. 2000-11-17 20:15:29 +00:00
mcgreer%netscape.com
1342aa1546 checkin of blinding implementation 2000-11-17 17:58:35 +00:00
mcgreer%netscape.com
a5f98d63db return SEC_ERR_NEED_RANDOM when the RNG does not have sufficient seeding data to proceed. 2000-11-17 01:01:36 +00:00
mcgreer%netscape.com
0c02bcc920 these functions should be static 2000-11-17 00:59:51 +00:00
nelsonb%netscape.com
7a6c3be3e4 Add values for test modulus and exponent for benchmarking purposes. 2000-11-08 02:44:17 +00:00
nelsonb%netscape.com
c029359f7f Fix mpp_pprime (Miller-Rabin Pseudo Primality test) to report MP_NO,
instead of MP_OKAY, for numbers == 3 mod 4 that are composite.
Also added two test cases to mpi-test.c.  Fixes bug 59438.
2000-11-08 01:52:52 +00:00
javi%netscape.com
ae93637c3d Make this file buildable on Mac 2000-11-08 01:11:23 +00:00
mcgreer%netscape.com
0bc2e73f90 Changes to RSA keygen:
* use mp_invmod instead of mp_xgcd.  nelsonb optimized mp_invmod for even moduli, and this will take advantage of it.
* Assure that p > q.
* Assure that n is actually keysizeInBits long by setting the two high-order bits of p and q during generation.  Previously, it was possible for n to be 1 bit short.
2000-10-31 16:52:31 +00:00
nelsonb%netscape.com
575f23cc64 Performance benchmark for modular exponentiation.
Test modulus and exponent to be added later.
2000-10-26 23:30:50 +00:00
nelsonb%netscape.com
667d4a7e36 New implementation of mp_invmod for even moduli. 3x-500x faster than
xgcd for even moduli.
2000-10-24 21:32:53 +00:00
mcgreer%netscape.com
e7bf810f5e fix for 64-bit platforms. 2000-10-18 15:41:23 +00:00
nelsonb%netscape.com
6534f684da * The Original Code is SPARC hand-optimized Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.
2000-10-13 00:30:36 +00:00
nelsonb%netscape.com
00b0412ddb * inline macros for SPARC Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.
2000-10-13 00:28:48 +00:00
nelsonb%netscape.com
67dc4d8c49 * interface file for SPARC Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.
2000-10-13 00:28:08 +00:00
nelsonb%netscape.com
5e81658537 * The Original Code is SPARC optimized Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.
2000-10-13 00:27:04 +00:00
mcgreer%netscape.com
8882eb9358 HPUX 64-bit also failed. 2000-10-05 02:47:43 +00:00
mcgreer%netscape.com
4979496e5a workaround for bug #55234. optimized arcfour is not working on solaris 64-bit. 2000-10-05 01:33:54 +00:00
wtc%netscape.com
1f2ad178df Bugzilla bug #54869: support gcc for 32-bit Solaris/SPARC build. 2000-10-02 22:52:43 +00:00
mcgreer%netscape.com
544ec0f11a fix 3.1 bugs: change && to || for arg check, two new functions are static 2000-10-02 17:39:37 +00:00
wtc%netscape.com
2444aa8c5e Added missing closing comment delimiter "*/". 2000-09-30 04:30:08 +00:00
nelsonb%netscape.com
e118ef4f63 Incorporate multiplication performance enhancements for UltraSparc CPUs
with the VIS instructions.
2000-09-30 01:46:30 +00:00