224 Commits

Author SHA1 Message Date
nelson%bolyard.com
c74c0d6ec1 Bug 80092: SSL write indicates all data sent when some is buffered.
SSL now follows NSPR socket semantics and never returns a short write
count on a blocking socket.  On a blocking socket, it returns either
the full count or -1 (with an error code set).
For non-blocking sockets, SSL no longer returns a full write count
when some of the data remains buffered in the SSL record layer.
Instead it returns a number is that always at least 1 byte short of a
full write count, so that the caller will  keep retrying until it is done.
SSL makes sure that the first byte sent by the caller in the retry
matches the last byte previously buffered.  r=rrelyea.
Modified Files: ssl3con.c sslcon.c ssldef.c sslimpl.h sslsecur.c


git-svn-id: svn://10.0.0.236/trunk@194962 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-20 08:46:34 +00:00
nelson%bolyard.com
f31b5a729a Fix buffer overflow regression. Bug 236245. sr=wtchang
git-svn-id: svn://10.0.0.236/trunk@194956 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-20 06:57:54 +00:00
alexei.volkov.bugs%sun.com
b2c388de76 Patch contributed by timeless@bemail.org
[Bug 334459] Variable "cipherName" tracked as NULL was passed to a
 function that dereferences it. [@ PORT_Strdup - SSL_SecurityStatus]. r=nelson


git-svn-id: svn://10.0.0.236/trunk@194743 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-20 00:22:58 +00:00
nelson%bolyard.com
782997f209 Fix broken optimized builds, caused by last checkin. Bug 236245.
git-svn-id: svn://10.0.0.236/trunk@194370 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-14 00:43:19 +00:00
nelson%bolyard.com
bafb7f6292 Implement TLS Hello extensions for ECC. Bug 236245. r=rrelyea.
This patch has a known problem, choosing ephemeral ECDH curves
according to the wrong (suboptimal, non-FIPS) criteria.
Modified Files: ssl3con.c ssl3ecc.c sslimpl.h


git-svn-id: svn://10.0.0.236/trunk@194359 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-13 23:08:18 +00:00
nelson%bolyard.com
d362c8829d Implement generic support for TLS Hello Extensions. Bug 226271. r=vipul
git-svn-id: svn://10.0.0.236/trunk@193802 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-07 06:24:07 +00:00
nelson%bolyard.com
a27efac04e Don't negotiate an ECDH_RSA cipher suite when the server's only ECDH cert
has an ECDSA signature.  bug 332350. r=vipul.gupta.


git-svn-id: svn://10.0.0.236/trunk@193659 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-06 04:40:49 +00:00
nelson%bolyard.com
cfbcd913d7 Define alerts and error codes for TLS Hello extensions. Bug 226271.
r=julien.pierre


git-svn-id: svn://10.0.0.236/trunk@193468 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-04 00:32:27 +00:00
rrelyea%redhat.com
3df0eb0674 From Bug 331279.
Free ECDHE Ephemeral key. Fixes server-side leak.
r=julien r=alexei


git-svn-id: svn://10.0.0.236/trunk@193280 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-30 21:07:22 +00:00
rrelyea%redhat.com
ca7ccce0f9 Bug 238051 Enable SSL session reuse for ECC cipher suites
r=nelson r=thomas.

patch in bug + white space changes suggested by nelson.


git-svn-id: svn://10.0.0.236/trunk@192798 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-22 19:18:30 +00:00
wtchang%redhat.com
538e541701 Bugzilla bug 326482: code cleanup: ssl3_NewKeyPair should not create a key
pair with only one key. r=nelson.bolyard.


git-svn-id: svn://10.0.0.236/trunk@191707 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-03 18:48:09 +00:00
wtchang%redhat.com
72043e97f0 Bugzilla bug 326482: removed incorrect comments. r=nelson.bolyard.
git-svn-id: svn://10.0.0.236/trunk@191706 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-03 18:45:54 +00:00
wtchang%redhat.com
0106d5446d Bugzilla Bug 320589: fixed PK11_SignatureLen to return the exact length of
ECDSA signatures.  Backed out a temporary workaround in
ECDSA_SignDigestWithSeed.  Made other changes related to signature lengths.
r=relyea,nelson.bolyard.
Modified Files:
	cryptohi/keyhi.h cryptohi/seckey.c cryptohi/secsign.c
	freebl/ec.c pk11wrap/pk11obj.c pk11wrap/pk11pub.h
	ssl/ssl3con.c


git-svn-id: svn://10.0.0.236/trunk@191542 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-02 00:07:08 +00:00
wtchang%redhat.com
00618619a6 Bugzilla Bug 326403: use "Mozilla Foundation" as the manufacturer or
producer of our shared libraries/DLLs.  Removed the optional copyright
notices from our DLLs. r=relyea,jpierre.
Modified Files:
	lib/ckfw/builtins/constants.c lib/ckfw/builtins/nssckbi.rc
	lib/ckfw/capi/nsscapi.rc lib/ckfw/dbm/instance.c
	lib/freebl/freebl.rc lib/nss/nss.rc lib/smime/smime.rc
	lib/softoken/pkcs11.c lib/softoken/softokn.rc lib/ssl/ssl.rc


git-svn-id: svn://10.0.0.236/trunk@191511 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-01 19:44:36 +00:00
nelson%bolyard.com
0b3fed0e68 Bug 328262. Increment ssl3 statistics counters atomicly. r=wtchang,julien.pierre
git-svn-id: svn://10.0.0.236/trunk@191464 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-01 05:49:27 +00:00
nelson%bolyard.com
d827ad7877 Bug 327105. Reintroduce an old bug that prevents _DHE_ cipher suites
from being negotiated by NSS servers.  Necessary until the server side
of the _DHE_ cipher suites is fully implemented.  r=Julien,Wan-Teh,Vipul


git-svn-id: svn://10.0.0.236/trunk@191364 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-28 04:20:23 +00:00
alexei.volkov.bugs%sun.com
5b6736aa0f [Bug 326963] Interoperability test with apache/mod_ssl: tstclnt
produces: assertion failure: secmod_PrivateModuleCount == 0; r=nelson, sr=julie
n


git-svn-id: svn://10.0.0.236/trunk@190145 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-15 22:22:32 +00:00
rrelyea%redhat.com
99fa932ed0 Bugzilla Bug 326482 NSS ECC performance problems.
Patch by Nelson, r=relyea.

Save the public key when we create the keypair so we can use it later.


git-svn-id: svn://10.0.0.236/trunk@189566 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-10 19:39:53 +00:00
nelsonb%netscape.com
5f09451b56 Set SSL2 and SSL3 timeout times properly for SSL server session cache.
Bug 223242. r=jullien.pierre


git-svn-id: svn://10.0.0.236/trunk@188382 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-28 02:21:31 +00:00
nelsonb%netscape.com
d6b69e6906 Detect NULL server key pair pointer. Bug 321161. r=wtchang.
git-svn-id: svn://10.0.0.236/trunk@187904 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-20 17:40:21 +00:00
wtchang%redhat.com
9a9352d0f2 Bugzilla Bug 318217: use the new NSPR functions PR_EmulateAcceptRead and
PR_EmulateSendFile added in NSPR 4.1.  r=nelsonb.
Modified files: manifest.mn sslimpl.h sslsock.c
Removed file: emulate.c


git-svn-id: svn://10.0.0.236/trunk@187784 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-18 23:06:57 +00:00
wtchang%redhat.com
67e2b4967d Bugzilla Bug 236245: Updated NSS to "ECC Cipher Suites for TLS" draft 12
plus upcoming revisions.  The patch is contributed by Douglas Stebila
of Sun Labs <douglas@stebila.ca>. r=wtc.
Modified Files:
	cmd/selfserv/selfserv.c cmd/strsclnt/strsclnt.c
	cmd/tstclnt/tstclnt.c cmd/vfyserv/vfyserv.c lib/ssl/ssl3con.c
	lib/ssl/ssl3ecc.c lib/ssl/ssl3prot.h lib/ssl/sslenum.c
	lib/ssl/sslimpl.h lib/ssl/sslinfo.c lib/ssl/sslproto.h
	lib/ssl/sslsock.c tests/ssl/ecssl.sh tests/ssl/ecsslauth.txt
	tests/ssl/ecsslcov.txt tests/ssl/ecsslstress.txt
	tests/ssl/ssl.sh


git-svn-id: svn://10.0.0.236/trunk@186032 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-14 01:49:40 +00:00
nelsonb%netscape.com
5ee8d93e1b Initialize slot pointer in ssl3_HandleServerHello. Bug 311590. r=wtchang
git-svn-id: svn://10.0.0.236/trunk@184877 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-18 01:25:20 +00:00
nelsonb%netscape.com
27841c7a9e Restore binary compatilibity for old Fortezza cipher suites.
Bug 316640. r-glen.beasley


git-svn-id: svn://10.0.0.236/trunk@184876 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-18 01:21:22 +00:00
julien.pierre.bugs%sun.com
8f4becb003 Fix for 292156. Prevent crash in SSL session cache init if invalid arguments are passed. r=nelson
git-svn-id: svn://10.0.0.236/trunk@184446 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-11 02:45:59 +00:00
wtchang%redhat.com
4244eba8b0 Improved a comment. Suggested by Nelson Bolyard of Sun. r=wtc.
git-svn-id: svn://10.0.0.236/trunk@184318 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-08 22:00:46 +00:00
julien.pierre.bugs%sun.com
5f414362eb Add dependency on freebl so ssl will rebuild if freebl has changed.
git-svn-id: svn://10.0.0.236/trunk@182514 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-19 01:04:16 +00:00
wtchang%redhat.com
e202386881 Bugzilla bug 311440: ssl3_ConsumeHandshakeVariable now longer returns a
SECItem pointing to memory allocated with PORT_Alloc, so we don't need to
use PORT_Free to free the SECItem's buffer.  r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@182253 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-14 16:48:58 +00:00
nelsonb%netscape.com
848ac6f433 Avoid NULL ptr deref. Bug 310260. patch by Glen.Beasley. r=nelson.
git-svn-id: svn://10.0.0.236/trunk@181117 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-28 07:55:37 +00:00
nelsonb%netscape.com
e5258a5137 Eliminate environment variable SSLNOLOCKS, add environment variable
SSLFORCELOCKS. Make SSL_FDX option mutually exclusive with SSL_NOLOCKS
option.  Bug 305147. r=rrelyea.


git-svn-id: svn://10.0.0.236/trunk@180840 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-23 01:04:32 +00:00
julien.pierre.bugs%sun.com
b35f511ca1 Fix hoarked build from previous checkin. Doh.
git-svn-id: svn://10.0.0.236/trunk@180439 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-16 21:28:20 +00:00
julien.pierre.bugs%sun.com
219677d209 Fix for bug 127960 . Add SSL force handshake APIs which take a timeout . r=nelson
git-svn-id: svn://10.0.0.236/trunk@180433 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-16 20:33:09 +00:00
nelsonb%netscape.com
5a588d70f0 Plug leaks in SSL bypass code. Add freeit argument to HMAC_Destroy function.
Change existing callers to pass this argument.  Call HMAC_Destroy from SSL.
Bug 305147. r=Julien.Pierre
Modified Files:  freebl/alghmac.c freebl/alghmac.h freebl/loader.c
  freebl/loader.h freebl/tlsprfalg.c softoken/lowpbe.c softoken/pkcs11c.c
  ssl/ssl3con.c


git-svn-id: svn://10.0.0.236/trunk@180173 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-14 04:12:50 +00:00
nelsonb%netscape.com
3a10973679 Fix regression introduced in last checkin. If the caller disables the
use of locks while locks are in use, don't forget to unlock the locks
already locked on the stack.  bug 305147. r=julien.pierre


git-svn-id: svn://10.0.0.236/trunk@179937 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-10 01:18:40 +00:00
nelsonb%netscape.com
66cf75f421 Implement two new SSL socket options: SSL_BYPASS_PKCS11 and SSL_NO_LOCKS.
Reorganize the SSL Socket structure contents to obviate ssl3 pointer.
Move much of the ECC code from ssl3con to new file ssl3ecc.c.  derive.c
implements derivation of the SSL/TLS master secret and the encryption and
MAC keys and IVs without using PKCS11. Bug 305147. r=rrelyea.
Modified Files: ssl/config.mk ssl/manifest.mn ssl/ssl.h ssl/ssl3con.c
    ssl/ssl3gthr.c ssl/sslauth.c ssl/sslcon.c ssl/ssldef.c ssl/sslgathr.c
    ssl/sslimpl.h ssl/sslinfo.c ssl/sslnonce.c ssl/sslsecur.c ssl/sslsnce.c
    ssl/sslsock.c
Added Files: ssl/derive.c ssl/ssl3ecc.c


git-svn-id: svn://10.0.0.236/trunk@179892 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-09 03:02:16 +00:00
glen.beasley%sun.com
94315c4075 305984 update FIPS values for cipher suites file=sslinfo.c r=bob,sr=wtc
git-svn-id: svn://10.0.0.236/trunk@179701 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-06 17:15:32 +00:00
julien.pierre.bugs%sun.com
51daf2d40e Fix AIX build problem
git-svn-id: svn://10.0.0.236/trunk@178211 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-18 23:37:31 +00:00
nelsonb%netscape.com
00749853c3 Remove fortezza code from libSSL and from the SSL test programs.
Stop building fortezza's special software token, and fortezza specific
test programs.   Bug 239960. r=rrelyea.
Modified Files:
    cmd/manifest.mn cmd/platlibs.mk cmd/SSLsample/server.c
    cmd/SSLsample/sslsample.c cmd/modutil/modutil.c
    cmd/selfserv/selfserv.c cmd/sslstrength/sslstrength.c
    cmd/strsclnt/strsclnt.c cmd/tstclnt/tstclnt.c
    cmd/vfyserv/vfyserv.c cmd/vfyserv/vfyutil.c lib/manifest.mn
    lib/ssl/nsskea.c lib/ssl/preenc.h lib/ssl/prelib.c
    lib/ssl/ssl.h lib/ssl/ssl3con.c lib/ssl/ssl3prot.h
    lib/ssl/sslauth.c 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/sslsnce.c lib/ssl/sslsock.c
    lib/ssl/sslt.h


git-svn-id: svn://10.0.0.236/trunk@177810 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-16 03:42:26 +00:00
wtchang%redhat.com
78e668b9ca Bugzilla Bug 288647: enable building NSS with an NSPR binary distribution.
Introduced NSPR_INCLUDE_DIR and NSPR_LIB_DIR make variables. Portions of
the patch were contributed by Chris Seawood <cls@seawood.org>. r=relyea.
Modified Files:
	coreconf/OS2.mk coreconf/OpenVMS.mk coreconf/location.mk
	nss/cmd/platlibs.mk nss/cmd/shlibsign/Makefile
	nss/cmd/shlibsign/sign.cmd nss/cmd/shlibsign/sign.sh
	nss/lib/ckfw/builtins/Makefile
	nss/lib/fortcrypt/swfort/pkcs11/Makefile nss/lib/nss/config.mk
	nss/lib/smime/config.mk nss/lib/softoken/config.mk
	nss/lib/ssl/config.mk


git-svn-id: svn://10.0.0.236/trunk@176418 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-21 23:48:30 +00:00
wtchang%redhat.com
12e08cdf73 Bugzilla Bug 298953: fixed a memory leak in sslBuffer_Grow if PORT_Realloc
fails. r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@175233 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-28 17:48:26 +00:00
nelsonb%netscape.com
663db84c36 Back out the preceeding fortezza removal patch, which was accidentally
applied to the trunk, not to the intended branch.


git-svn-id: svn://10.0.0.236/trunk@171823 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-06 21:35:45 +00:00
nelsonb%netscape.com
b62572db42 Remove fortezza support from libSSL and related commands. Bug 239960.
ON PERFORMANCE_HACKS_BRANCH.  r=rrelyea.


git-svn-id: svn://10.0.0.236/trunk@171820 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-06 19:43:19 +00:00
nelsonb%netscape.com
0137ccc6f8 Fix implementation of SSL_NO_STEP_DOWN. Bug 148452. r=julien.pierre.
Modified Files:  sslimpl.h sslinfo.c sslsecur.c sslsock.c


git-svn-id: svn://10.0.0.236/trunk@171630 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-05 03:48:20 +00:00
nelsonb%netscape.com
07cab5177e Do not crash if Server SID cache is uninitialized. Bug 237724 r=Julien
Instead, if SSL_NO_CACHE is not set, return an error code.


git-svn-id: svn://10.0.0.236/trunk@170428 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-09 05:20:44 +00:00
julien.pierre.bugs%sun.com
3ee7fc35b6 Fix for 269581 - cache the value of CKA_PRIVATE on private keys to avoid unnecessary C_GetAttributeValue . Also fix i
ncorrect logic in attribute tests. r=rrelyea,wtchang


git-svn-id: svn://10.0.0.236/trunk@169706 18797224-902f-48f8-a5cc-f745e15eee43
2005-02-24 00:38:23 +00:00
wtchang%redhat.com
a5e1388150 Bug 236613: fixed the fallout from the change to MPL/LGPL/GPL tri-license.
Our script for processing the *.def on the Mac cannot handle blank lines.
Modified Files: nssckbi.def nss.def smime.def softokn.def ssl.def


git-svn-id: svn://10.0.0.236/trunk@169661 18797224-902f-48f8-a5cc-f745e15eee43
2005-02-23 19:25:39 +00:00
gerv%gerv.net
a2d903c9f2 Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@168726 18797224-902f-48f8-a5cc-f745e15eee43
2005-02-02 22:28:27 +00:00
julien.pierre.bugs%sun.com
7098fa8db9 Fix for 273993 . SSL client cache grows with non-restartable sessions . r=saul,nelson
git-svn-id: svn://10.0.0.236/trunk@166798 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-17 02:01:35 +00:00
nelsonb%netscape.com
9fe96f18ad Follow the SSL2 specification more closely in accepting and rejecting
SSL messages.  Previously NSS would reject some it should accept
and vice versa.  Bugscape bug 57121. r=wtc,julien


git-svn-id: svn://10.0.0.236/trunk@158397 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-24 02:06:41 +00:00
jpierre%netscape.com
8385c4f9e2 Fix for 237934 - nss_InitLock not atomic. r=nelson
git-svn-id: svn://10.0.0.236/trunk@158176 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-19 03:21:39 +00:00