54 Commits

Author SHA1 Message Date
wtc%google.com
e4d4cb3f24 Bug 838769: back out the previous checkin. tests/memleak/memleak.sh runs
strsclnt with SSL2 enabled, so I need to fix that first.
Modified Files:
	ssl3con.c sslcon.c


git-svn-id: svn://10.0.0.236/trunk@264747 18797224-902f-48f8-a5cc-f745e15eee43
2013-02-16 15:09:14 +00:00
wtc%google.com
a02af31053 Bug 838769: Disable the ECC cipher suites if we cannot send extensions,
even if we support all the currently specified curves
(NSS_ECC_MORE_THAN_SUITE_B is set). r=agl,rrelyea.
Modified Files:
	ssl3con.c sslcon.c


git-svn-id: svn://10.0.0.236/trunk@264744 18797224-902f-48f8-a5cc-f745e15eee43
2013-02-15 20:27:53 +00:00
kaie%kuix.de
491e83be6b Bug 770057 - Fix remaining crashes when caching is off, contributed by Eric Rescorla, r=rrelyea
git-svn-id: svn://10.0.0.236/trunk@264036 18797224-902f-48f8-a5cc-f745e15eee43
2012-07-17 14:43:11 +00:00
wtc%google.com
7ecfde73d0 Bug 764649: Always use the PORT_ZNew macro to create sslSessionID objects.
r=emaldona.
Modified Files:
	sslcon.c sslsnce.c


git-svn-id: svn://10.0.0.236/trunk@263947 18797224-902f-48f8-a5cc-f745e15eee43
2012-06-14 19:04:59 +00:00
gerv%gerv.net
f465fa7d7e Bug 716563 - update license to MPL 2. r=rrelyea.
git-svn-id: svn://10.0.0.236/trunk@263750 18797224-902f-48f8-a5cc-f745e15eee43
2012-04-25 14:50:19 +00:00
wtc%google.com
39e8820abe Bug 681065: Implement DTLS (Datagram TLS) 1.0. The patch is contributed by
Eric Rescorla <ekr@rtfm.com>.  r=wtc.
Modified Files:
	SSLerrs.h derive.c manifest.mn ssl.def ssl.h ssl3con.c
	ssl3gthr.c ssl3prot.h sslcon.c ssldef.c sslerr.h sslgathr.c
	sslimpl.h sslproto.h sslsecur.c sslsock.c sslt.h
Added Files:
	dtls1con.c


git-svn-id: svn://10.0.0.236/trunk@263637 18797224-902f-48f8-a5cc-f745e15eee43
2012-04-04 03:37:07 +00:00
wtc%google.com
ca681fddad Bug 571722: merge with the "Implement SSL Version Range API [v5]" patch by
Brian Smith <bsmith@mozilla.com>.  Comment changes only.  Export
SSL_VersionRangeGetDefault, SSL_VersionRangeGetSupported, and
SSL_VersionRangeSetDefault.  r=wtc.
Modified Files:
	ssl.def ssl.h ssl3con.c sslcon.c sslimpl.h sslsock.c


git-svn-id: svn://10.0.0.236/trunk@263579 18797224-902f-48f8-a5cc-f745e15eee43
2012-03-18 00:31:20 +00:00
wtc%google.com
c40d150f71 Bug 571722: Implement SSL Version Range API. The patch is written by
Brian Smith <bsmith@mozilla.com>.  r=wtc.
Modified Files:
	SSLerrs.h ssl.def ssl.h ssl3con.c sslcon.c sslerr.h sslgathr.c
	sslimpl.h sslproto.h sslsock.c sslt.h


git-svn-id: svn://10.0.0.236/trunk@263554 18797224-902f-48f8-a5cc-f745e15eee43
2012-03-11 04:32:35 +00:00
wtc%google.com
e67e96fa34 Bug 728919: Fix clang warning about equality comparison with extraneous
parentheses.  The patch is contributed by Nico Weber <thakis@chromium.org>.
r=wtc.


git-svn-id: svn://10.0.0.236/trunk@263505 18797224-902f-48f8-a5cc-f745e15eee43
2012-03-01 01:58:22 +00:00
bsmith%mozilla.com
9b720db9f7 Bug 700516: Remove SSL2 support for SSL_RestartHandshakeAfterServerCert and SSL_RestartHandshakeAfterCertReq, r=rrelyea
git-svn-id: svn://10.0.0.236/trunk@263089 18797224-902f-48f8-a5cc-f745e15eee43
2011-11-19 21:58:21 +00:00
kaie%kuix.de
51ddd562f1 Fix Tinderbox bustage, backout all patches from 2011-11-11
git-svn-id: svn://10.0.0.236/trunk@263077 18797224-902f-48f8-a5cc-f745e15eee43
2011-11-16 19:12:36 +00:00
bsmith%mozilla.com
4778bbc800 Bug 700516: Remove SSL2 support for SSL_RestartHandshakeAfterServerCert and SSL_RestartHandshakeAfterCertReq, r=rrelyea
git-svn-id: svn://10.0.0.236/trunk@263067 18797224-902f-48f8-a5cc-f745e15eee43
2011-11-11 19:06:52 +00:00
kaie%kuix.de
2d50bc73fe Bug 673115 - Add function to obtain version of NSS at runtime, r=wtc, r=rrelyea
git-svn-id: svn://10.0.0.236/trunk@262560 18797224-902f-48f8-a5cc-f745e15eee43
2011-08-01 07:08:10 +00:00
wtc%google.com
dc58ba1b0e Bug 588698: Add assertions to discover and enforce current locking order.
Based on patch contributed by Adam Langley of Google <agl@chromium.org>.
r=agl,nelson.
Modified Files:
	notes.txt ssl3con.c sslcon.c sslimpl.h sslsecur.c


git-svn-id: svn://10.0.0.236/trunk@261113 18797224-902f-48f8-a5cc-f745e15eee43
2010-08-28 00:56:10 +00:00
nelson%bolyard.com
25cae7d289 Bug 506041: Correct misspellings in source code comments
Patch contributed by Michael Kohler <michaelkohler@live.com>, r=nelson


git-svn-id: svn://10.0.0.236/trunk@260229 18797224-902f-48f8-a5cc-f745e15eee43
2010-04-25 23:37:40 +00:00
wtc%google.com
94ac5cd996 Bug 537356: Don't add SCSV to ss->cipherSpecs (for SSL 2.0), to eliminate
the doubt that SCSV could be negotiated by mistake.  r=nelson,rrelyea.
Modified Files:
	sslcon.c sslimpl.h


git-svn-id: svn://10.0.0.236/trunk@259596 18797224-902f-48f8-a5cc-f745e15eee43
2010-02-04 03:08:45 +00:00
wtc%google.com
e33fb104bb Bug 537356: Send SCSV in SSLv2-compatible client hellos. r=nelson.
git-svn-id: svn://10.0.0.236/trunk@259513 18797224-902f-48f8-a5cc-f745e15eee43
2010-01-30 03:48:10 +00:00
wtc%google.com
e8653a0f01 Bug 522580: Add the NSS_SecureMemcmp function that performs a constant-time
compare of two memory regions, and use it in libSSL for comparing secret
data.  The patch is contributed by Adam Langley <agl@chromium.org> of
Google.  r=wtc,nelson.
Modified Files:
	lib/ssl/ssl3con.c lib/ssl/sslcon.c lib/ssl/sslgathr.c
	lib/util/nssutil.def lib/util/secport.c lib/util/secport.h


git-svn-id: svn://10.0.0.236/trunk@258699 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-16 17:45:36 +00:00
nelson%bolyard.com
d049b9bded Bug 481216: Fix specific spelling errors in NSS & NSPR, r=timeless
git-svn-id: svn://10.0.0.236/trunk@256449 18797224-902f-48f8-a5cc-f745e15eee43
2009-03-04 21:57:28 +00:00
nelson%bolyard.com
e14af33a7a Improve checking of received SSL2 records.
Bug 364319, bug 364323. r=rrelyea, wtchang


git-svn-id: svn://10.0.0.236/trunk@217670 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-03 05:32:33 +00:00
wtchang%redhat.com
8f2df656bf Bugzilla Bug 359484: made the fix for bug 341707 work for the SSL2 client
hello case. r=nelsonb,alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@215245 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:09:54 +00:00
nelson%bolyard.com
3c8ae7422c Correct ifdefs so that non-ECC builds will continue to build correctly.
r=wtchang  bug 341707.


git-svn-id: svn://10.0.0.236/trunk@203201 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-20 00:17:23 +00:00
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
nelson%bolyard.com
3eda74cd5d Fix bug 337104 and bug 337105. Don't crash if we run out of memory
in ssl2_ConstructCipherSpecs().  r=Alexei.Volkov  Coverity 442 & 443.


git-svn-id: svn://10.0.0.236/trunk@199429 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-07 17:53:19 +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
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
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
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
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
jpierre%netscape.com
5f94baad22 Fix for 202348 - check cert & key pointers returned by client auth application callback, to fix crash . r=nelsonb
git-svn-id: svn://10.0.0.236/trunk@141286 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-17 02:04:24 +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
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
relyea%netscape.com
9791b95d47 1) NT need the err= defines, use macros to set it appropriately (or not).
2) restore missing sec = function


git-svn-id: svn://10.0.0.236/trunk@109960 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-07 02:30:53 +00:00
relyea%netscape.com
dd1d27c432 Clean up compilier warnings on Solaris and Linux, most particularly:
1) Implicit declaration of function.
2) Possibly unitialized variables.

These warnings have indicated some real problems in the code, so many changes
are not just to silence the warnings, but to fix the problems. Others were
inocuous, but the warnings were silenced to reduce the noise.


git-svn-id: svn://10.0.0.236/trunk@109938 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-07 01:36:25 +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
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
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
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
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
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
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
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
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