53 Commits

Author SHA1 Message Date
nelson%bolyard.com
505b7efaff Curve-limited clients must not negotiate ECC ciphersuites unless they send the supported curve extension. This means that when they are nogotiating SSL 3.0
and not TLS, they should not negotiate ECC ciphersuites at all.
Bug 341707.  r=rrelyea.


git-svn-id: svn://10.0.0.236/trunk@203068 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-19 01:42:58 +00:00
rrelyea%redhat.com
6d69aa1d29 bug 335748 ECC support for Mozilla. r=wtc
git-svn-id: svn://10.0.0.236/trunk@200694 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-23 17:01:38 +00:00
nelson%bolyard.com
0cfc8e8fb2 Bug 323350. sr=rrelyea. This patch makes 3 changes:
1) it adds a new ifdef which enables SSL to limit itself to the 3 Suite B
   curves.
2) it corrects the creation and parsing of the Supported Curve extension to
   conform with the lastest definition, by using 2 bytes to encode the list
   length,
3) it changes the algorithm that picks the curve for ECDHE to choose a curve
   that is at least as strong as the "weakest link", is mutually supported
   by client and server, and is the fastest for its size.


git-svn-id: svn://10.0.0.236/trunk@195173 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-23 00:17:18 +00:00
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
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
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
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
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
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
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
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
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
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
gerv%gerv.net
62b0f34e77 Bug 236613: change to MPL/LGPL/GPL tri-license. Restore Id: lines.
git-svn-id: svn://10.0.0.236/trunk@155606 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-27 23:04:40 +00:00
gerv%gerv.net
43cb9e1492 Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@155484 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-25 15:03:26 +00:00
nelsonb%netscape.com
6f48d14853 Add conditionally compiled code for NISCC testing of NSS's SSL library.
patch by Ian McGreer.  Bugscape bug 53322.


git-svn-id: svn://10.0.0.236/trunk@153596 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-05 23:28:57 +00:00
wtc%netscape.com
ede99124e6 Bug 199082: checked in Nelson's patch, which
a) changes selfserv to test the return value from NSS_Shutdown.
b) changes SECMOD_Shutdown to set the error code SEC_ERROR_BUSY before
   returning SECFailure.
c) Adds a new function SSL_ShutdownServerSessionIDCache to ssl.h.
d) Changes selfserv to call SSL_ShutdownServerSessionIDCache before calling
NSS_Shutdown.
Modified Files:
	cmd/selfserv/selfserv.c lib/pk11wrap/pk11util.c
	lib/ssl/ssl.def lib/ssl/ssl.h lib/ssl/ssl3con.c
	lib/ssl/sslimpl.h lib/ssl/sslsnce.c


git-svn-id: svn://10.0.0.236/trunk@140305 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-26 00:31:13 +00:00
nelsonb%netscape.com
db2f1140de 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


git-svn-id: svn://10.0.0.236/trunk@138574 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-27 01:31:38 +00:00
relyea%netscape.com
39cd897ff6 Bug 167756. Address Nelson's review comments. remove socket specific latency
in favor of a slot specific latency test (already done by pk11wrap code).


git-svn-id: svn://10.0.0.236/trunk@137837 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-15 01:21:25 +00:00
relyea%netscape.com
09be8d3cd2 Bug 167756. Clean up previous patch: add lastState field, and set the SSL Error on failure.
git-svn-id: svn://10.0.0.236/trunk@136911 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-23 22:02:37 +00:00
relyea%netscape.com
00bc37d763 Check for token removal before continuing SSL sessions which have client auth
with certs associated with that token. bug 167756.


git-svn-id: svn://10.0.0.236/trunk@136893 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-23 17:27:34 +00:00
nelsonb%netscape.com
827c334f1c Fix missing strings that cause crash in SSL_SecurityStatus(). Bug 178342.
git-svn-id: svn://10.0.0.236/trunk@132968 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-05 00:25:20 +00:00
nelsonb%netscape.com
a621affedc Support the TLS_RSA_WITH_NULL_SHA cipher suite. Bug 161529.
git-svn-id: svn://10.0.0.236/trunk@126906 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-09 21:53:17 +00:00
nelsonb%netscape.com
a36887f58a Make libSSL build for WinCE.
git-svn-id: svn://10.0.0.236/trunk@118061 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-04 00:14:12 +00:00
nelsonb%netscape.com
76f9a42d49 1. the sslSecurityInfo and sslGather structs are now part of the sslSocket
rather than being pointed to by the sslSocket.  This reduces the number
of malloc/free calls, and greatly reduces pointer fetches, and null
pointer checks.  sslGather and sslSecurityInfo are separately initialized.
2. SSL_ResetHandshake no longer deallocates and reallocates the sslSecurityInfo and all its subcomponents.
3. Many places that formerly did not check for memory allocation failures
now do check, and do the right thing when allocation failed.


git-svn-id: svn://10.0.0.236/trunk@115407 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-27 04:40:17 +00:00
wtc%netscape.com
52f5bfd019 Bugzilla bug 70217: ported NSS to BeOS. The patch is contributed by
Christopher Seawood <seawood@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@115206 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-22 04:23:30 +00:00
jpierre%netscape.com
87e28e9839 Fixes for OS/2 build
git-svn-id: svn://10.0.0.236/trunk@108772 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-22 00:46:48 +00:00
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
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
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
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
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
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
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
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
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
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
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
nelsonb%netscape.com
8eaac606a9 Add implementation of SSL_RSA_WITH_RC4_128_SHA SSL3 cipher suite,
which is not enabled by default.  Bug 59795.


git-svn-id: svn://10.0.0.236/trunk@84913 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-13 02:05:15 +00:00
nelsonb%netscape.com
b9b03fad76 Remove all vestiges of old pre-NSS socks client implementation from NSS.
Bug 51471.


git-svn-id: svn://10.0.0.236/trunk@84912 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-13 01:52:59 +00:00
nelsonb%netscape.com
dbd95a18a1 Changes to deal with exporting data from Windows DLLs.
SECHashObjects[] is no longer exported.
New function HASH_GetHashObject returns pointer to selected const object.
SSL statistics are now in a structure whose address is obtained via a
call to SSL_GetStatistics().
On NT, the new symbol NSS_USE_STATIC_LIBS must be declared in programs
that use the static SSL library.
Also, propagate "const" declaration for SECHashObjects.


git-svn-id: svn://10.0.0.236/trunk@84403 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-05 01:38:26 +00:00
larryh%netscape.com
18549422d1 Bugzilla: 64132. NSS lock instrumentation
git-svn-id: svn://10.0.0.236/trunk@84300 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-03 19:51:22 +00:00
jgmyers%netscape.com
ed7132b5a2 support IPv6 in ssl: bug 48657 r=nelsonb
git-svn-id: svn://10.0.0.236/trunk@78892 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-12 20:15:44 +00:00