97 Commits

Author SHA1 Message Date
nelsonb%netscape.com
7e4958958b Add localCert field to sid cache entry so SSL_LocalCertificate can
remember the certs it sent back when it established the SSL session.
Bug 78959.  Also, hold on the certs in the received cert chain until
the SSL connection is complete.  This makes it easier for applications
to look at the entire cert chain after the handshake is over without
having to write their own custom authCert callbacks.  It is backwards
compatible with older NSS SSL applications, but may use more memory.


git-svn-id: svn://10.0.0.236/trunk@107729 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-09 05:39:36 +00:00
nelsonb%netscape.com
076553af57 Implement new function SSL_LocalCertificate(). Bug 78959.
git-svn-id: svn://10.0.0.236/trunk@107638 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 02:15:38 +00:00
relyea%netscape.com
162c530b16 Land BOB_WORK_BRANCH unto the tip.
remove lots of depricated files.
move some files to appropriate directories (pcertdb *_rand
associated headers to soft token, for instance)
rename several stan files which had the same name as other nss files.
remove depricated functions.


git-svn-id: svn://10.0.0.236/trunk@107628 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 00:15:51 +00:00
nelsonb%netscape.com
b91f3120f1 Reimplement SSL_GetChannelInfo. Add new function SSL_GetCipherSuiteInfo().
Also, implement new ciphersuite preference order.  Bug 78959.


git-svn-id: svn://10.0.0.236/trunk@107060 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:24:28 +00:00
nelsonb%netscape.com
5b7036cc69 Put better comments by the table of preconfigured policies.
git-svn-id: svn://10.0.0.236/trunk@107058 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 04:00:27 +00:00
relyea%netscape.com
6e5fb40196 Don't crash on SSL2 failures.
git-svn-id: svn://10.0.0.236/trunk@106837 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 20:03:29 +00:00
nelsonb%netscape.com
845d4b22d8 Fix bug 107619. The new DHE_ ciphersuites were enabled by default.
Now they are disabled by default, for compatibility with NSS 2.0.


git-svn-id: svn://10.0.0.236/trunk@106706 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 21:09:47 +00:00
jpierre%netscape.com
15289e2464 Fix Linux build
git-svn-id: svn://10.0.0.236/trunk@104803 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 18:49:17 +00:00
jpierre%netscape.com
5ed89505e1 Fix for 102251 . Just updating a comment
git-svn-id: svn://10.0.0.236/trunk@104700 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-06 00:16:56 +00:00
jpierre%netscape.com
4ce9c2c54f Fix for 102251 . Implement 2-level locking for the SSL session cache to properly support SSL server applications using Windows NT fibers . Also optimize and enhance portability of locking primitives for single-process servers on all platforms by using a PRLock instead of cross-process locks . Reviewed by wtc
git-svn-id: svn://10.0.0.236/trunk@104699 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-06 00:14:33 +00:00
wtc%netscape.com
1fadf88660 Bugzilla bug 83593: worked around a possible HP-UX B.11.00 bug, where
getpeername() occasionally fails with ENOTCONN after a successful
completion of non-blocking connect.


git-svn-id: svn://10.0.0.236/trunk@103680 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 01:25:41 +00:00
nelsonb%netscape.com
f978c68393 Add support to TLS for new 128-bit and 256-bit AES ciphersuites. 87021.
git-svn-id: svn://10.0.0.236/trunk@103408 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-21 03:07:35 +00:00
relyea%netscape.com
2938d8768c Remove dependancy on direct calls inside softoken.
git-svn-id: svn://10.0.0.236/trunk@103342 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 21:26:40 +00:00
nelsonb%netscape.com
c38ee88985 Implement new function SSL_GetChannelInfo(). Bugzilla bug 78959.
git-svn-id: svn://10.0.0.236/trunk@103057 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 01:59:21 +00:00
wtc%netscape.com
8790f9d8ae Bugzilla bug 94685: deleted the unreferenced label 'no_wrapped_key'.
git-svn-id: svn://10.0.0.236/trunk@101654 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:15:45 +00:00
javi%netscape.com
102f8d04c2 Check to make sure we're still logged into a slot when trying
to re-use a client-auth session.


git-svn-id: svn://10.0.0.236/trunk@101649 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 22:50:26 +00:00
wtc%netscape.com
80a638c9fa NSS 3.3 has been renamed NSS 3.4. Two '-' chars should be '+'.
git-svn-id: svn://10.0.0.236/trunk@98568 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-03 17:41:19 +00:00
nelsonb%netscape.com
f13e723d49 Change PR_Writev so it will drive the handshake when len == 0.
Patch by John G Myers.  Bug 87359.


git-svn-id: svn://10.0.0.236/trunk@97792 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-23 00:01:17 +00:00
nelsonb%netscape.com
06c3f37e12 The environment variable NSS_SSL_SERVER_CACHE_MUTEX_TIMEOUT specifies
the maximum amount of time to wait before recovering a session cache
mutex (semaphore) from a dead process on Unix.


git-svn-id: svn://10.0.0.236/trunk@97732 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-22 03:38:05 +00:00
nelsonb%netscape.com
eb9c042167 Fix bug 68869. Don't ignore TLS no certificate messages when the server
requires client auth.  Work around bug in NT TCP stack by only shutting
down the socket for SEND (not for BOTH) after sending a bad_certificate
alert.  This avoids bogus CONNECTION_RESET_BY_PEER errors at the client.


git-svn-id: svn://10.0.0.236/trunk@97079 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-13 21:14:54 +00:00
nelsonb%netscape.com
2ed8b2b199 Don't use PR_Atomic functions on AIX since PPC cpus require memory
barrier instructions.


git-svn-id: svn://10.0.0.236/trunk@96982 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-12 22:53:00 +00:00
nelsonb%netscape.com
611ba43412 Add two new functions to permit application tuning of the number of SSL
server session cache locks.  We may yet decide to back this out for the
NSS 3.3 release.  Modified Files: ssl.def ssl.h sslsnce.c


git-svn-id: svn://10.0.0.236/trunk@96958 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-12 20:27:12 +00:00
nelsonb%netscape.com
54469bf7dd Use NSPR's Atomic increment and decrement functions in the simulated
Posix semaphore code to make the non-contention case really fast.
Modified Files: sslmutex.c sslmutex.h


git-svn-id: svn://10.0.0.236/trunk@96909 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-12 01:10:01 +00:00
nelsonb%netscape.com
e4aee1e624 Reduce warnings on Unix platforms that don't like bitfields in chars.
git-svn-id: svn://10.0.0.236/trunk@96787 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-09 19:45:22 +00:00
nelsonb%netscape.com
4d7b87db53 Fix two bugs found in nightly QA. On Solaris/x86, don't assert that the
sid cache entry is a multiple of 8 bytes long.  On OSF1, reduce the
maximum number of POSIX semaphores so it doesn't exceed the per-process
limit of 256.


git-svn-id: svn://10.0.0.236/trunk@96786 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-09 19:30:21 +00:00
nelsonb%netscape.com
e94d4a0a95 Change ssl_Time() to use time() instead of PR_Now on systems that have it.
git-svn-id: svn://10.0.0.236/trunk@96769 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-09 03:20:13 +00:00
nelsonb%netscape.com
3959edfa77 3 Changes:
1. New SSL server session cache implementation that uses finer grained
locking to reduce lock contention, and does 128-way associative caching.
2. rename symbol SSL_SESSIONID_BYTES to SSL2_SESSIONID_BYTES.
3. Work around compiler bug on Solaris i386.
Modified Files:
    manifest.mn sslcon.c sslimpl.h sslsecur.c sslsnce.c


git-svn-id: svn://10.0.0.236/trunk@96768 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-09 03:18:09 +00:00
nelsonb%netscape.com
5c36fcf24a Portable POSIX-like unnamed semaphores that work in process-shared memory.
git-svn-id: svn://10.0.0.236/trunk@96676 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-08 02:56:31 +00:00
nelsonb%netscape.com
50cb1eea79 Fix bug that caused version number to be wrong in SSL3 client hellos
when restarting an SSL3 (not TLS) session.  (no bug number)


git-svn-id: svn://10.0.0.236/trunk@96372 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-05 00:26:37 +00:00
wtc%netscape.com
f563c9425e 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


git-svn-id: svn://10.0.0.236/trunk@95606 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-21 21:25:32 +00:00
nelsonb%netscape.com
7cb7d57775 Add a workaround for bug 80092. If the last write returned WOULDBLOCK
and data is now buffered for sending and the application calls PR_Poll
to poll on read, poll on write also.  This way, if the socket becomes
writable, the application's read attempt will send (more of) the buffered
write data.


git-svn-id: svn://10.0.0.236/trunk@95409 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-18 20:44:35 +00:00
nelsonb%netscape.com
1059f8553b Only disable Nagle delays on those platforms that benefit from doing so.
git-svn-id: svn://10.0.0.236/trunk@94437 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 02:37:59 +00:00
nelsonb%netscape.com
fca8e0742a Disable TCP Nagle delays on SSL sockets for NSS 3.3. Bug 67898.
Modified Files:
	ssldef.c sslimpl.h sslsecur.c sslsock.c


git-svn-id: svn://10.0.0.236/trunk@94297 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 23:12:34 +00:00
nelsonb%netscape.com
dca4d8204e Eliminate cause of assertion failure that occurs when SSL is not the top
protocol on the socket's stack.


git-svn-id: svn://10.0.0.236/trunk@93184 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 21:53:11 +00:00
nelsonb%netscape.com
fb67735977 Merge in NSS 3.2.1 changes. (VersionCheck function)
git-svn-id: svn://10.0.0.236/trunk@92008 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:52:09 +00:00
nelsonb%netscape.com
b2661ccb4d Implementation of 5 DHE ciphersuites, client side only.
Contributed by Dr Stephen Henson <stephen.henson@gemplus.com>


git-svn-id: svn://10.0.0.236/trunk@91917 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:29:18 +00:00
nelsonb%netscape.com
5b276cd67e Fix a couple of memory leaks that occur in rare error paths.
git-svn-id: svn://10.0.0.236/trunk@90938 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-31 02:49:59 +00:00
nelsonb%netscape.com
ad03c5b0d0 Fix bug in SSL_ResetHandshake introduced in last checkin.
git-svn-id: svn://10.0.0.236/trunk@89856 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-20 00:39:02 +00:00
nelsonb%netscape.com
c603a294b4 Reinterpret the READ and WRITE poll flags depending on the state of the
socket and the SSL handshake.  Rename the badly named "connected" flag.
Bugzilla bugs 56924, 56926, 66706.
Modified Files:
    ssl3con.c sslauth.c sslcon.c ssldef.c sslgathr.c sslimpl.h
    sslsecur.c sslsock.c


git-svn-id: svn://10.0.0.236/trunk@89723 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-16 23:26:06 +00:00
relyea%netscape.com
acc35e34b4 bug 70992 patches to build 4.2 BSD
git-svn-id: svn://10.0.0.236/trunk@89517 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 19:02:05 +00:00
nelsonb%netscape.com
f48a3d214e Modify ssl_FindSocket() to set error PR_BAD_DESCRIPTOR_ERROR when it
cannot find the SSL layer on the specified PRFileDesc. Ensure all
callers detect when ssl_FindSocket returns NULL and handle it properly.
Bug 68241. Reviewed by jgmyers and relyea.
Modified Files:
 	prelib.c sslauth.c sslsecur.c sslsock.c


git-svn-id: svn://10.0.0.236/trunk@86651 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 02:11:31 +00:00
nelsonb%netscape.com
e00b59a1ac Make SSL API consistent in using SECStatus as return value for functions
that return only values in that enumeration.  Bug 68097. R&A = relyea.
Modified Files:
 	lib/ssl/ssl.h lib/ssl/sslauth.c lib/ssl/sslsecur.c
 	lib/ssl/sslsnce.c lib/ssl/sslsock.c cmd/selfserv/selfserv.c
 	cmd/strsclnt/strsclnt.c


git-svn-id: svn://10.0.0.236/trunk@86642 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-09 00:32:14 +00:00
wtc%netscape.com
0000a2f04f Need to include "prthread.h" for the PRThread type.
git-svn-id: svn://10.0.0.236/trunk@86554 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-07 17:50:43 +00:00
nelsonb%netscape.com
db6ff863fa When half-duplex applications (e.g. one thread per socket, doing alternate
reading and writing) call PR_Send and PR_Recv with a non-infinite timeout
value, use that value for both underlying read and write operations.
Fixes bug 67402.  Reviewed by Wan-Teh.


git-svn-id: svn://10.0.0.236/trunk@86433 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-07 02:06:05 +00:00
nelsonb%netscape.com
870eb23c89 Coalesce the final Finished message in the SSL handshake and the first
record of application data into a single write, when possible, to avoid
TCP's "Nagle" delays.  Fixes bug 67898.  r&a: wtc.  Modified Files:
	ssl3con.c sslimpl.h sslsecur.c sslsock.c


git-svn-id: svn://10.0.0.236/trunk@86398 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-07 00:34:56 +00:00
wtc%netscape.com
9e6c133c84 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


git-svn-id: svn://10.0.0.236/trunk@86029 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 01:49:57 +00:00
wtc%netscape.com
ac46fb12e3 Bugzilla bug #62855: added stubs for the SSL session cache functions so
that selfserv can link without unresolved symbols on OS/2.


git-svn-id: svn://10.0.0.236/trunk@85903 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 23:43:47 +00:00
wtc%netscape.com
50931f27c7 Bugzilla bug #66367: rename the internal NSS functions that we have to
export from the NSS shared library.  Reviewed by Bob Relyea.
Modified Files:
	nss/lib/certdb/certdb.c nss/lib/certdb/pcertdb.c
	nss/lib/nss/Makefile nss/lib/nss/manifest.mn
	nss/lib/nss/nss.def nss/lib/pk11wrap/pk11skey.c
	nss/lib/pkcs12/p12d.c nss/lib/pkcs12/p12e.c
	nss/lib/pkcs12/p12local.c nss/lib/pkcs7/certread.c
	nss/lib/pkcs7/p7decode.c nss/lib/pkcs7/p7encode.c
	nss/lib/smime/cmsutil.c nss/lib/softoken/secpkcs5.c
	nss/lib/ssl/ssl3con.c nss/lib/ssl/sslcon.c
	nss/lib/ssl/sslnonce.c nss/lib/ssl/sslsnce.c
	nss/lib/util/nsslocks.c
Added Files:
	nss/lib/nss/nssrenam.h


git-svn-id: svn://10.0.0.236/trunk@85774 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 21:02:28 +00:00
relyea%netscape.com
41b2d202eb Bug 65902 Add OSF/1 to the OS's that can restrict symbols in shared libraries
git-svn-id: svn://10.0.0.236/trunk@85146 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-19 07:50:58 +00:00
wtc%netscape.com
4ffe6b4b35 Add library version info to the NSS, S/MIME, and SSL shared libraries.
Define the NSS version macros and add NSS_VersionCheck in nss.h.
Add linker option to record internal name of shared libraries.
Add Windows resource files.  Add rcs and sccs id strings that can be
retrieved with 'ident' and 'what'.
Modified Files:
	coreconf/HP-UX.mk coreconf/OSF1.mk coreconf/SunOS5.mk
        coreconf/WIN954.0.mk coreconf/WINNT4.0.mk coreconf/WINNT5.0.mk
	coreconf/rules.mk nss/lib/nss/config.mk
	nss/lib/nss/manifest.mn nss/lib/nss/nss.h
	nss/lib/nss/nssinit.c nss/lib/smime/config.mk
	nss/lib/smime/manifest.mn nss/lib/ssl/config.mk
	nss/lib/ssl/manifest.mn
Added Files:
	nss/lib/nss/nss.rc nss/lib/nss/nssver.c nss/lib/smime/smime.rc
	nss/lib/smime/smimever.c nss/lib/ssl/ssl.rc
	nss/lib/ssl/sslver.c


git-svn-id: svn://10.0.0.236/trunk@85089 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-18 20:29:10 +00:00