101 Commits

Author SHA1 Message Date
nelson%bolyard.com
7069ddec51 Bug 373276 – Enhance SSL's Bypass feature to withstand failures. r=neil,alexei
git-svn-id: svn://10.0.0.236/trunk@225321 18797224-902f-48f8-a5cc-f745e15eee43
2007-05-01 03:54:58 +00:00
rrelyea%redhat.com
5e97cf8097 Add Camilla cipher suites TLS RFC4132 bug 361025
code supplied by okazaki@kick.gr.jp


git-svn-id: svn://10.0.0.236/trunk@221086 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-28 19:47:40 +00:00
wtchang%redhat.com
1cb5d3ccbb Bugzilla Bug 363073: verify that the peer's ephemeral public key is the
type we expect before using it.  r=nelsonb
Modified Files: ssl3con.c ssl3ecc.c


git-svn-id: svn://10.0.0.236/trunk@216773 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-08 22:37:29 +00:00
alexei.volkov.bugs%sun.com
5f7cf266e5 353888: klockwork IDs for ssl3con.c. r=nelson
git-svn-id: svn://10.0.0.236/trunk@213367 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-09 22:26:44 +00:00
nelson%bolyard.com
bf090012bf Also trace the DH(E) PMS. bug 349966. r=julien.pierre, wtchang
git-svn-id: svn://10.0.0.236/trunk@209074 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-02 18:53:54 +00:00
nelson%bolyard.com
5bc47a3fed re-enable SSLTRACE for keys and (pre)master secrets. Bug 349966. r=rrelyea
git-svn-id: svn://10.0.0.236/trunk@208358 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-24 22:10:03 +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
alexei.volkov.bugs%sun.com
b1e4bcb35a 341291: Coverity 689 - potential NULL ptr crash in ssl3_SendCertificate. r=nelson
git-svn-id: svn://10.0.0.236/trunk@202256 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-17 22:08:03 +00:00
wtchang%redhat.com
e82461ec07 Bugzilla Bug 338798: in C89, local struct variables can only be initialized
by constant expressions.  HP C compiler version B.11.11.08 generates
incorrect code silently if the initializers are non-constant expressions.
r=alexei.volkov,julien.pierre.
Modified files: cmd/crmftest/testcrmf.c lib/ssl/ssl3con.c


git-svn-id: svn://10.0.0.236/trunk@200976 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-26 23:32:19 +00:00
wtchang%redhat.com
9d60721908 Bugzilla bug 338599: added new function SECKEY_SignatureLen and use it
instead of SECKEY_PublicKeyStrength to get ECDSA signature lengths.
Removed the 'type' member from the VFYContextStr structure because that
info is in the 'key->keyType' field.  Set error codes when functions
fail (return 0). r=nelsonb.
Modified Files:
	cryptohi/keyhi.h cryptohi/seckey.c cryptohi/secvfy.c
	nss/nss.def ssl/ssl3con.c


git-svn-id: svn://10.0.0.236/trunk@198781 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-31 23:54:52 +00:00
nelson%bolyard.com
d41e92d455 Fix several Coverity bugs. Bug 336982. NULL ptr check after ptr deref'ed.
Bug 337080.  Dead code.  r=alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@197950 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-18 20:41:21 +00:00
alexei.volkov.bugs%sun.com
ea68cbd9e6 Patch contributed by jonsmirl@yahoo.com
[Bug 336932] Coverity 163, dead code in mozilla/security/nss/lib/ssl/ssl3con.c. r=nelson


git-svn-id: svn://10.0.0.236/trunk@196440 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-13 00:15:43 +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
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
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
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
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
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
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
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
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
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
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
jpierre%netscape.com
cabec54b89 Fix for 235874 - crash in PK11_DigestKey . r=wtc, nelsonb
git-svn-id: svn://10.0.0.236/trunk@153448 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-03 03:18:56 +00:00
jpierre%netscape.com
9af88d0f5a Rename PK11_PubDeriveExtended to PK11_PubDeriveWithKDF
git-svn-id: svn://10.0.0.236/trunk@151008 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-08 01:37:46 +00:00
wchang0222%aol.com
0fd2842063 Made wincx the last argument of PK11_PubDeriveExtended. r=relyea.
Modified Files: pk11func.h pk11skey.c ssl3con.c


git-svn-id: svn://10.0.0.236/trunk@150552 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-19 23:54:29 +00:00
nelsonb%netscape.com
478d713628 Grow handshake message buffer once per message, not once per each message
segment received.  Bugscape bug 53418.


git-svn-id: svn://10.0.0.236/trunk@148858 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-05 06:22:57 +00:00
nelsonb%netscape.com
517ef7b660 Remove one unnecessary transition from the SSL3 state machine.
Reduce the number of reallocations of the SSL3 handshake message buffer.
Bugscape bugs 53287 and 53337


git-svn-id: svn://10.0.0.236/trunk@148646 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-31 07:01:05 +00:00
nelsonb%netscape.com
68ca5e8448 When the SSL_NO_CACHE option is set on an SSL server socket, don't touch
the server session cache AT ALL.  Bug 222726


git-svn-id: svn://10.0.0.236/trunk@148119 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-19 01:55:50 +00:00
ian.mcgreer%sun.com
decc84df49 ECC code landing.
Contributed by Sheuling Chang, Stephen Fung, Vipul Gupta, Nils Gura,
and Douglas Stebila of Sun Labs


git-svn-id: svn://10.0.0.236/trunk@148060 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 13:45:42 +00:00
nelsonb%netscape.com
9911b56b4d Eliminate unnecessary copying of CA names in HandleCertRequest.
Bug 204686.


git-svn-id: svn://10.0.0.236/trunk@147660 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 02:24:01 +00:00
nelsonb%netscape.com
d544fa46d4 Detect Zero length certs and zero length CA names. Bug 204686.
Also, eliminate unnecessary copying of incoming certs.


git-svn-id: svn://10.0.0.236/trunk@147524 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-03 02:01:18 +00:00
nelsonb%netscape.com
e14edef9e3 Eliminate TCP connection reset errors that occur when server requires
client auth and SSL3 client doesn't authenticate.  The fix is to coalesce
the SSL3 no_certificate alert record with the following records (e.g.
client_key_exchange handshake, change_cipher_spec and finished handshake).
Fix bugs 207313 and 118668.


git-svn-id: svn://10.0.0.236/trunk@143124 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-30 23:22:39 +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
faa5b981f5 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


git-svn-id: svn://10.0.0.236/trunk@140430 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-29 00:18:30 +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