Artifact
00d4c60b28be2cde5fb5c38b56b62f80bb0da365:
0000: 32 30 30 30 2d 30 38 2d 31 35 20 20 4a 65 66 66 2000-08-15 Jeff
0010: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 Hobbs <hobbs@s
0020: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 criptics.com>...
0030: 2a 20 74 65 73 74 73 2f 73 69 6d 70 6c 65 43 6c * tests/simpleCl
0040: 69 65 6e 74 2e 74 63 6c 3a 20 0a 09 2a 20 74 65 ient.tcl: ..* te
0050: 73 74 73 2f 73 69 6d 70 6c 65 53 65 72 76 65 72 sts/simpleServer
0060: 2e 74 63 6c 3a 20 61 64 64 65 64 20 73 69 6d 70 .tcl: added simp
0070: 6c 65 20 63 6c 69 65 6e 74 2f 73 65 72 76 65 72 le client/server
0080: 20 74 65 73 74 20 73 63 72 69 70 74 73 0a 09 74 test scripts..t
0090: 68 61 74 20 75 73 65 20 74 65 73 74 20 63 65 72 hat use test cer
00a0: 74 73 20 61 6e 64 20 63 61 6e 20 64 6f 20 73 69 ts and can do si
00b0: 6d 70 6c 65 20 73 74 72 65 73 73 20 74 65 73 74 mple stress test
00c0: 73 2e 0a 0a 32 30 30 30 2d 30 38 2d 31 34 20 20 s...2000-08-14
00d0: 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 Jeff Hobbs <hob
00e0: 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d bs@scriptics.com
00f0: 3e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a 0a >...* tlsInt.h:.
0100: 09 2a 20 74 6c 73 49 4f 2e 63 3a 0a 09 2a 20 74 .* tlsIO.c:..* t
0110: 6c 73 42 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73 2e lsBIO.c:..* tls.
0120: 63 3a 20 63 68 61 6e 67 65 64 20 61 72 6f 75 6e c: changed aroun
0130: 64 20 74 6f 20 6f 6e 6c 79 20 77 6f 72 6b 69 6e d to only workin
0140: 67 20 77 69 74 68 20 38 2e 32 2e 30 2b 20 28 38 g with 8.2.0+ (8
0150: 2e 33 2e 32 2b 0a 09 70 72 65 66 65 72 72 65 64 .3.2+..preferred
0160: 29 2c 20 77 69 74 68 20 72 75 6e 74 69 6d 65 20 ), with runtime
0170: 63 68 65 63 6b 73 20 66 6f 72 20 70 72 65 2d 20 checks for pre-
0180: 61 6e 64 20 70 6f 73 74 2d 69 6f 2d 72 65 77 72 and post-io-rewr
0190: 69 74 65 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 ite....* tls.c (
01a0: 54 6c 73 5f 49 6e 69 74 29 3a 20 63 68 61 6e 67 Tls_Init): chang
01b0: 65 64 20 69 74 20 74 6f 20 72 65 71 75 69 72 65 ed it to require
01c0: 20 38 2e 33 2e 32 20 77 68 65 6e 20 54 63 6c 5f 8.3.2 when Tcl_
01d0: 49 6e 69 74 53 74 75 62 73 0a 09 77 61 73 20 63 InitStubs..was c
01e0: 61 6c 6c 65 64 20 62 65 63 61 75 73 65 20 77 65 alled because we
01f0: 20 64 6f 6e 27 74 20 77 61 6e 74 20 70 65 6f 70 don't want peop
0200: 6c 65 20 75 73 69 6e 67 20 54 4c 53 20 77 69 74 le using TLS wit
0210: 68 20 74 68 65 0a 09 6f 72 69 67 69 6e 61 6c 20 h the..original
0220: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 stacked channel
0230: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2e 0a implementation..
0240: 0a 32 30 30 30 2d 30 37 2d 32 36 20 20 4a 65 66 .2000-07-26 Jef
0250: 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 f Hobbs <hobbs@
0260: 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a scriptics.com>..
0270: 09 2a 20 6d 65 72 67 65 64 20 61 6c 6c 20 63 68 .* merged all ch
0280: 61 6e 67 65 73 20 66 72 6f 6d 20 74 6c 73 2d 31 anges from tls-1
0290: 2d 33 2d 69 6f 2d 72 65 77 72 69 74 65 20 62 61 -3-io-rewrite ba
02a0: 63 6b 20 69 6e 74 6f 20 6d 61 69 6e 20 62 72 61 ck into main bra
02b0: 6e 63 68 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c nch...* tests/tl
02c0: 73 49 4f 2e 74 65 73 74 3a 20 75 70 64 61 74 65 sIO.test: update
02d0: 64 20 63 6f 6d 6d 65 6e 74 73 2c 20 66 69 78 65 d comments, fixe
02e0: 64 20 61 20 70 63 43 72 61 73 68 20 63 61 73 65 d a pcCrash case
02f0: 20 74 68 61 74 0a 09 77 61 73 20 64 75 65 20 74 that..was due t
0300: 6f 20 64 65 62 75 67 20 61 73 73 65 72 74 69 6f o debug assertio
0310: 6e 20 69 6e 20 57 69 6e 64 6f 77 73 20 53 53 4c n in Windows SSL
0320: 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 49 6d 70 ....* tls.c (Imp
0330: 6f 72 74 4f 62 6a 43 6d 64 29 3a 20 72 65 6d 6f ortObjCmd): remo
0340: 76 65 64 20 75 6e 6e 65 63 65 73 73 61 72 79 20 ved unnecessary
0350: 75 73 65 20 6f 66 20 27 62 69 6f 27 20 61 72 67 use of 'bio' arg
0360: 2e 0a 09 28 54 6c 73 5f 49 6e 69 74 29 3a 20 63 ...(Tls_Init): c
0370: 68 65 63 6b 20 72 65 74 75 72 6e 20 76 61 6c 75 heck return valu
0380: 65 20 6f 66 20 53 53 4c 5f 6c 69 62 72 61 72 79 e of SSL_library
0390: 5f 69 6e 69 74 2e 20 20 41 6c 73 6f 20 6c 6f 74 _init. Also lot
03a0: 73 20 6f 66 0a 09 77 68 69 74 65 73 70 61 63 65 s of..whitespace
03b0: 20 63 6c 65 61 6e 75 70 20 28 6d 6f 72 65 20 6c cleanup (more l
03c0: 69 6b 65 20 54 63 6c 20 45 6e 67 20 73 74 79 6c ike Tcl Eng styl
03d0: 65 20 67 75 69 64 65 29 2c 20 62 75 74 20 6e 6f e guide), but no
03e0: 74 20 61 6c 6c 0a 09 63 6f 64 65 20 77 61 73 20 t all..code was
03f0: 63 6c 65 61 6e 65 64 20 75 70 2e 0a 0a 09 2a 20 cleaned up....*
0400: 74 6c 73 42 49 4f 2e 63 3a 20 6d 69 6e 6f 72 20 tlsBIO.c: minor
0410: 77 68 69 74 65 73 70 61 63 65 20 63 6c 65 61 6e whitespace clean
0420: 75 70 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 up...* tlsIO.c:
0430: 6d 69 6e 6f 72 20 77 68 69 74 65 73 70 61 63 65 minor whitespace
0440: 20 63 6c 65 61 6e 75 70 2e 0a 09 28 54 6c 73 49 cleanup...(TlsI
0450: 6e 70 75 74 50 72 6f 63 2c 20 54 6c 73 4f 75 74 nputProc, TlsOut
0460: 70 75 74 50 72 6f 63 29 3a 20 41 64 64 65 64 20 putProc): Added
0470: 45 52 52 5f 63 6c 65 61 72 5f 65 72 72 6f 72 20 ERR_clear_error
0480: 62 65 66 6f 72 65 20 63 61 6c 6c 73 0a 09 74 6f before calls..to
0490: 20 42 49 4f 5f 72 65 61 64 20 6f 72 20 42 49 4f BIO_read or BIO
04a0: 5f 77 72 69 74 65 2c 20 62 65 63 61 75 73 65 20 _write, because
04b0: 77 65 20 63 6f 75 6c 64 20 6f 74 68 65 72 77 69 we could otherwi
04c0: 73 65 20 65 6e 64 20 75 70 0a 09 70 75 6c 6c 69 se end up..pulli
04d0: 6e 67 20 61 6e 20 65 72 72 6f 72 20 6f 66 66 20 ng an error off
04e0: 74 68 65 20 73 74 61 63 6b 20 74 68 61 74 20 64 the stack that d
04f0: 69 64 6e 27 74 20 62 65 6c 6f 6e 67 20 74 6f 20 idn't belong to
0500: 75 73 2e 20 20 41 6c 73 6f 0a 09 63 6c 65 61 6e us. Also..clean
0510: 75 70 20 75 70 20 65 78 63 65 73 73 69 76 65 20 up up excessive
0520: 75 73 65 20 6f 66 20 67 6f 74 6f 73 2e 0a 0a 32 use of gotos...2
0530: 30 30 30 2d 30 37 2d 32 30 20 20 4a 65 66 66 20 000-07-20 Jeff
0540: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 Hobbs <hobbs@sc
0550: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a riptics.com>...*
0560: 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 tests/tlsIO.tes
0570: 74 3a 20 63 6f 72 72 65 63 74 65 64 20 76 61 72 t: corrected var
0580: 69 6f 75 73 20 74 65 73 74 73 20 74 6f 20 62 65 ious tests to be
0590: 20 63 6f 72 72 65 63 74 20 66 6f 72 20 54 4c 53 correct for TLS
05a0: 0a 09 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 ..stacked channe
05b0: 6c 73 20 28 61 73 20 6f 70 70 6f 73 65 64 20 74 ls (as opposed t
05c0: 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 73 o the standard s
05d0: 6f 63 6b 65 74 73 20 74 68 65 20 74 65 73 74 0a ockets the test.
05e0: 09 73 75 69 74 65 20 77 61 73 20 61 64 6f 70 74 .suite was adopt
05f0: 65 64 20 66 72 6f 6d 29 2e 20 20 4b 65 79 20 64 ed from). Key d
0600: 69 66 66 65 72 65 6e 63 65 73 20 61 72 65 20 74 ifferences are t
0610: 68 61 74 20 54 4c 53 20 63 61 6e 6e 6f 74 0a 09 hat TLS cannot..
0620: 6f 70 65 72 61 74 65 20 69 6e 20 6f 6e 65 20 70 operate in one p
0630: 72 6f 63 65 73 73 20 77 69 74 68 6f 75 74 20 61 rocess without a
0640: 6c 6c 20 63 68 61 6e 6e 65 6c 73 20 62 65 69 6e ll channels bein
0650: 67 20 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 2c 20 g non-blocking,
0660: 6f 72 0a 09 74 68 65 20 68 61 6e 64 73 68 61 6b or..the handshak
0670: 65 20 77 69 6c 6c 20 62 6c 6f 63 6b 2c 20 61 6e e will block, an
0680: 64 20 68 61 6e 64 73 68 61 6b 69 6e 67 20 6d 75 d handshaking mu
0690: 73 74 20 62 65 20 66 6f 72 63 65 64 20 69 6e 20 st be forced in
06a0: 73 6f 6d 65 0a 09 63 61 73 65 73 2e 20 20 41 6c some..cases. Al
06b0: 73 6f 2c 20 68 61 6e 64 73 68 61 6b 65 73 20 64 so, handshakes d
06c0: 6f 6e 27 74 20 73 65 65 6d 20 74 6f 20 63 6f 6d on't seem to com
06d0: 70 6c 65 74 65 20 75 6e 6c 65 73 73 20 74 68 65 plete unless the
06e0: 20 63 6c 69 65 6e 74 0a 09 68 61 73 20 70 6c 61 client..has pla
06f0: 63 65 64 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 ced at least one
0700: 20 62 79 74 65 20 66 6f 72 20 74 68 65 20 73 65 byte for the se
0710: 72 76 65 72 20 74 6f 20 72 65 61 64 20 69 6e 20 rver to read in
0720: 74 68 65 20 63 68 61 6e 6e 65 6c 2e 0a 0a 09 2a the channel....*
0730: 20 74 65 73 74 73 2f 72 65 6d 6f 74 65 2e 74 63 tests/remote.tc
0740: 6c 3a 20 63 6f 72 72 65 63 74 65 64 20 74 68 65 l: corrected the
0750: 20 66 69 6e 64 69 6e 67 20 6f 66 20 74 65 73 74 finding of test
0760: 73 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 0a s certificates..
0770: 09 2a 20 74 6c 73 49 4f 2e 63 20 28 54 6c 73 43 .* tlsIO.c (TlsC
0780: 6c 6f 73 65 50 72 6f 63 29 3a 20 72 65 6d 6f 76 loseProc): remov
0790: 65 64 20 64 65 6c 65 74 69 6e 67 20 6f 66 20 74 ed deleting of t
07a0: 69 6d 65 72 20 68 61 6e 64 6c 65 72 20 61 73 0a imer handler as.
07b0: 09 74 68 61 74 20 69 73 20 68 61 6e 64 6c 65 64 .that is handled
07c0: 20 62 79 20 54 6c 73 5f 43 6c 65 61 6e 2e 0a 0a by Tls_Clean...
07d0: 09 2a 20 74 6c 73 2e 74 63 6c 20 28 74 6c 73 3a .* tls.tcl (tls:
07e0: 3a 5f 61 63 63 65 70 74 29 3a 20 63 6f 72 72 65 :_accept): corre
07f0: 63 74 65 64 20 74 68 65 20 69 6e 74 65 72 6e 61 cted the interna
0800: 6c 20 5f 61 63 63 65 70 74 20 74 6f 0a 09 74 72 l _accept to..tr
0810: 69 63 6b 6c 65 20 63 61 6c 6c 62 61 63 6b 20 65 ickle callback e
0820: 72 72 6f 72 73 20 74 6f 20 74 68 65 20 75 73 65 rrors to the use
0830: 72 2e 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e r....* Makefile.
0840: 69 6e 3a 20 6d 61 64 65 20 74 68 65 20 69 6e 73 in: made the ins
0850: 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 74 61 tall-binaries ta
0860: 72 67 65 74 20 72 65 67 65 6e 65 72 61 74 65 20 rget regenerate
0870: 74 68 65 0a 09 70 6b 67 49 6e 64 65 78 2e 74 63 the..pkgIndex.tc
0880: 6c 20 63 6f 72 72 65 63 74 6c 79 2e 20 20 54 68 l correctly. Th
0890: 65 20 74 65 73 74 20 74 61 72 67 65 74 20 70 72 e test target pr
08a0: 6f 62 61 62 6c 79 20 73 68 6f 75 6c 64 6e 27 74 obably shouldn't
08b0: 20 73 63 72 65 77 0a 09 69 74 20 75 70 2c 20 62 screw..it up, b
08c0: 75 74 20 74 68 69 73 20 69 73 20 74 6f 20 62 65 ut this is to be
08d0: 20 6f 6e 20 74 68 65 20 73 61 66 65 20 73 69 64 on the safe sid
08e0: 65 2e 0a 0a 32 30 30 30 2d 30 37 2d 31 37 20 20 e...2000-07-17
08f0: 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 Jeff Hobbs <hob
0900: 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d bs@scriptics.com
0910: 3e 0a 0a 09 2a 20 70 6b 67 49 6e 64 65 78 2e 74 >...* pkgIndex.t
0920: 63 6c 2e 69 6e 3a 0a 09 2a 20 63 6f 6e 66 69 67 cl.in:..* config
0930: 75 72 65 2e 69 6e 3a 20 75 70 64 61 74 65 64 20 ure.in: updated
0940: 76 65 72 73 69 6f 6e 20 74 6f 20 31 2e 34 0a 0a version to 1.4..
0950: 32 30 30 30 2d 30 37 2d 31 33 20 20 4a 65 66 66 2000-07-13 Jeff
0960: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 Hobbs <hobbs@s
0970: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 criptics.com>...
0980: 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 * tests/tlsIO.te
0990: 73 74 3a 20 65 6e 61 62 6c 65 64 20 74 65 73 74 st: enabled test
09a0: 73 20 32 2e 31 30 2c 20 37 2e 5b 31 32 34 35 5d s 2.10, 7.[1245]
09b0: 20 28 74 68 65 72 65 20 69 73 20 6e 6f 20 33 29 (there is no 3)
09c0: 2c 0a 09 77 68 69 63 68 20 6e 6f 77 20 70 61 73 ,..which now pas
09d0: 73 2e 20 20 41 64 64 65 64 20 73 6f 6d 65 20 63 s. Added some c
09e0: 6f 6d 6d 65 6e 74 73 20 74 6f 20 6f 74 68 65 72 omments to other
09f0: 20 66 61 69 6c 69 6e 67 20 74 65 73 74 73 2e 0a failing tests..
0a00: 0a 32 30 30 30 2d 30 37 2d 31 31 20 20 4a 65 66 .2000-07-11 Jef
0a10: 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 f Hobbs <hobbs@
0a20: 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a scriptics.com>..
0a30: 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 63 68 61 6e .* tlsIO.c: chan
0a40: 67 65 64 20 61 6c 6c 20 74 68 65 20 63 68 61 6e ged all the chan
0a50: 6e 65 6c 20 70 72 6f 63 73 20 74 6f 20 73 74 61 nel procs to sta
0a60: 72 74 20 77 69 74 68 20 54 6c 73 2a 20 66 6f 72 rt with Tls* for
0a70: 0a 09 62 65 74 74 65 72 20 70 61 72 69 74 79 20 ..better parity
0a80: 77 68 65 6e 20 63 6f 6d 70 61 72 69 6e 67 20 77 when comparing w
0a90: 69 74 68 20 54 72 61 6e 73 66 6f 72 6d 20 63 68 ith Transform ch
0aa0: 61 6e 6e 65 6c 20 70 72 6f 63 73 2e 0a 09 52 65 annel procs...Re
0ab0: 77 72 6f 74 65 20 54 6c 73 57 61 74 63 68 50 72 wrote TlsWatchPr
0ac0: 6f 63 2c 20 61 64 64 65 64 20 54 6c 73 4e 6f 74 oc, added TlsNot
0ad0: 69 66 79 50 72 6f 63 20 61 63 63 6f 72 64 69 6e ifyProc accordin
0ae0: 67 20 74 6f 20 74 68 65 20 6e 65 77 0a 09 63 68 g to the new..ch
0af0: 61 6e 6e 65 6c 20 64 65 73 69 67 6e 2c 20 77 68 annel design, wh
0b00: 69 63 68 20 61 6c 73 6f 20 6c 65 61 76 65 73 20 ich also leaves
0b10: 54 6c 73 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 TlsChannelHandle
0b20: 72 20 75 6e 75 73 65 64 2e 0a 0a 09 2a 20 74 6c r unused....* tl
0b30: 73 42 49 4f 2e 63 20 28 42 69 6f 43 74 72 6c 29 sBIO.c (BioCtrl)
0b40: 3a 20 63 68 61 6e 67 65 64 20 42 49 4f 5f 43 54 : changed BIO_CT
0b50: 52 4c 5f 46 4c 55 53 48 20 63 61 73 65 20 74 6f RL_FLUSH case to
0b60: 20 75 73 65 0a 09 54 63 6c 5f 57 72 69 74 65 52 use..Tcl_WriteR
0b70: 61 77 20 69 6e 73 74 65 61 64 20 6f 66 20 54 63 aw instead of Tc
0b80: 6c 5f 46 6c 75 73 68 20 28 74 6f 20 6f 70 65 72 l_Flush (to oper
0b90: 61 74 65 20 6f 6e 20 63 6f 72 72 65 63 74 20 63 ate on correct c
0ba0: 68 61 6e 6e 65 6c 0a 09 69 6e 20 74 68 65 20 73 hannel..in the s
0bb0: 74 61 63 6b 20 69 6e 73 74 65 61 64 20 6f 66 20 tack instead of
0bc0: 73 74 61 72 74 69 6e 67 20 61 74 20 74 68 65 20 starting at the
0bd0: 74 6f 70 20 61 67 61 69 6e 29 2e 20 20 57 6f 75 top again). Wou
0be0: 6c 64 0a 09 6f 74 68 65 72 77 69 73 65 20 63 61 ld..otherwise ca
0bf0: 75 73 65 20 61 20 72 65 63 75 72 73 69 76 65 20 use a recursive
0c00: 73 74 61 63 6b 20 62 6f 6d 62 20 77 68 65 6e 20 stack bomb when
0c10: 69 6d 70 6c 69 63 69 74 20 68 61 6e 64 73 68 61 implicit handsha
0c20: 6b 69 6e 67 0a 09 74 6f 6f 6b 20 65 66 66 65 63 king..took effec
0c30: 74 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 t....* tests/tls
0c40: 49 4f 2e 74 65 73 74 3a 20 72 65 6d 6f 76 65 64 IO.test: removed
0c50: 20 63 68 61 6e 67 65 73 20 6d 61 64 65 20 74 6f changes made to
0c60: 20 74 65 73 74 20 73 75 69 74 65 20 28 61 6c 6c test suite (all
0c70: 20 74 65 73 74 73 0a 09 74 68 61 74 20 72 61 6e tests..that ran
0c80: 20 62 65 66 6f 72 65 20 6e 6f 77 20 70 61 73 73 before now pass
0c90: 20 63 6f 72 72 65 63 74 6c 79 29 2c 20 61 6e 64 correctly), and
0ca0: 20 63 68 61 6e 67 65 64 20 73 6f 6d 65 20 61 63 changed some ac
0cb0: 63 65 70 74 20 70 72 6f 63 0a 09 61 72 67 73 20 cept proc..args
0cc0: 74 6f 20 72 65 66 6c 65 63 74 20 74 68 61 74 20 to reflect that
0cd0: 61 20 73 6f 63 6b 20 69 73 20 61 6e 20 61 72 67 a sock is an arg
0ce0: 2c 20 6e 6f 74 20 61 20 66 69 6c 65 2e 0a 0a 32 , not a file...2
0cf0: 30 30 30 2d 30 37 2d 31 30 20 20 4a 65 66 66 20 000-07-10 Jeff
0d00: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 Hobbs <hobbs@sc
0d10: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a riptics.com>...*
0d20: 20 74 6c 73 42 49 4f 2e 63 20 28 42 69 6f 57 72 tlsBIO.c (BioWr
0d30: 69 74 65 2c 20 42 69 6f 52 65 61 64 29 3a 20 63 ite, BioRead): c
0d40: 68 61 6e 67 65 64 20 54 63 6c 5f 52 65 61 64 2f hanged Tcl_Read/
0d50: 57 72 69 74 65 20 74 6f 0a 09 54 63 6c 5f 52 65 Write to..Tcl_Re
0d60: 61 64 52 61 77 2f 54 63 6c 57 72 69 74 65 52 61 adRaw/TclWriteRa
0d70: 77 2e 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 61 64 w....* tls.c: ad
0d80: 64 65 64 20 75 73 65 20 6f 66 20 54 63 6c 5f 47 ded use of Tcl_G
0d90: 65 74 54 6f 70 43 68 61 6e 6e 65 6c 20 61 66 74 etTopChannel aft
0da0: 65 72 20 54 63 6c 5f 47 65 74 43 68 61 6e 6e 65 er Tcl_GetChanne
0db0: 6c 20 61 6e 64 0a 09 67 6f 74 20 72 65 74 75 72 l and..got retur
0dc0: 6e 20 76 61 6c 75 65 20 66 72 6f 6d 20 54 63 6c n value from Tcl
0dd0: 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 2e 0a 0a _StackChannel...
0de0: 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 .* tests/tlsIO.t
0df0: 65 73 74 3a 20 61 64 64 65 64 20 73 6f 6d 65 20 est: added some
0e00: 68 61 6e 64 73 68 61 6b 69 6e 67 20 74 68 61 74 handshaking that
0e10: 20 73 68 6f 75 6c 64 6e 27 74 20 62 65 0a 09 6e shouldn't be..n
0e20: 65 63 65 73 73 61 72 79 2c 20 62 75 74 20 77 65 ecessary, but we
0e30: 20 63 72 61 73 68 20 6f 74 68 65 72 77 69 73 65 crash otherwise
0e40: 20 28 6e 65 65 64 73 20 6d 6f 72 65 20 74 65 73 (needs more tes
0e50: 74 69 6e 67 29 2e 0a 0a 09 2a 20 74 6c 73 49 4f ting)....* tlsIO
0e60: 2e 63 3a 20 61 64 64 65 64 20 73 75 70 70 6f 72 .c: added suppor
0e70: 74 20 66 6f 72 20 22 63 6f 72 72 65 63 74 65 64 t for "corrected
0e80: 22 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 " stacked channe
0e90: 6c 73 2e 20 20 41 6c 6c 0a 09 74 68 65 20 61 62 ls. All..the ab
0ea0: 6f 76 65 20 63 68 61 6e 6e 65 6c 73 20 61 72 65 ove channels are
0eb0: 20 69 6e 20 54 43 4c 5f 43 48 41 4e 4e 45 4c 5f in TCL_CHANNEL_
0ec0: 56 45 52 53 49 4f 4e 5f 32 20 23 69 66 64 65 66 VERSION_2 #ifdef
0ed0: 73 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 35 20 20 s...2000-06-05
0ee0: 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20 3c Scott Stanton <
0ef0: 73 74 61 6e 74 6f 6e 40 61 6a 75 62 61 73 6f 6c stanton@ajubasol
0f00: 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 utions.com>...*
0f10: 4d 61 6b 65 66 69 6c 65 2e 69 6e 3a 20 46 69 78 Makefile.in: Fix
0f20: 65 64 20 62 72 6f 6b 65 6e 20 74 65 73 74 20 74 ed broken test t
0f30: 61 72 67 65 74 2e 0a 0a 09 2a 20 74 6c 73 49 6e arget....* tlsIn
0f40: 74 2e 68 3a 20 0a 09 2a 20 74 6c 73 2e 63 3a 20 t.h: ..* tls.c:
0f50: 43 6c 65 61 6e 65 64 20 75 70 20 64 65 63 6c 61 Cleaned up decla
0f60: 72 61 74 69 6f 6e 73 20 6f 66 20 54 6c 73 5f 43 rations of Tls_C
0f70: 6c 65 61 6e 20 74 6f 20 61 76 6f 69 64 20 65 72 lean to avoid er
0f80: 72 6f 72 73 20 6f 6e 0a 09 57 69 6e 64 6f 77 73 rors on..Windows
0f90: 20 28 6c 69 6e 74 29 2e 0a 0a 32 30 30 30 2d 30 (lint)...2000-0
0fa0: 36 2d 30 35 20 20 42 72 65 6e 74 20 57 65 6c 63 6-05 Brent Welc
0fb0: 68 20 3c 77 65 6c 63 68 40 61 6a 75 62 61 73 6f h <welch@ajubaso
0fc0: 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a lutions.com>...*
0fd0: 20 74 6c 73 2e 63 2c 20 74 6c 73 49 4f 2e 63 3a tls.c, tlsIO.c:
0fe0: 20 20 53 70 6c 69 74 20 54 6c 73 5f 46 72 65 65 Split Tls_Free
0ff0: 20 69 6e 74 6f 20 54 6c 73 5f 43 6c 65 61 6e 2c into Tls_Clean,
1000: 20 77 68 69 63 68 20 64 6f 65 73 0a 09 74 68 65 which does..the
1010: 20 53 53 4c 20 63 6c 65 61 6e 75 70 2c 20 61 6e SSL cleanup, an
1020: 64 20 74 68 65 20 54 63 6c 5f 46 72 65 65 20 63 d the Tcl_Free c
1030: 61 6c 6c 2e 20 20 49 74 20 69 73 20 69 6d 70 6f all. It is impo
1040: 72 74 61 6e 74 20 74 6f 20 73 68 75 74 64 6f 77 rtant to shutdow
1050: 6e 0a 09 74 68 65 20 53 53 4c 20 73 74 61 74 65 n..the SSL state
1060: 20 22 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 22 "synchronously"
1070: 20 64 75 72 69 6e 67 20 61 20 73 74 61 63 6b 65 during a stacke
1080: 64 20 66 6c 75 73 68 2e 0a 0a 32 30 30 30 2d 30 d flush...2000-0
1090: 36 2d 30 31 20 20 53 63 6f 74 74 20 53 74 61 6e 6-01 Scott Stan
10a0: 74 6f 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 61 6a ton <stanton@aj
10b0: 75 62 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d ubasolutions.com
10c0: 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 52 >...* tlsIO.c: R
10d0: 65 73 74 6f 72 65 64 20 63 61 6c 6c 20 74 6f 20 estored call to
10e0: 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65 Tcl_NotifyChanne
10f0: 6c 20 66 72 6f 6d 20 43 68 61 6e 6e 65 6c 48 61 l from ChannelHa
1100: 6e 64 6c 65 72 0a 09 74 6f 20 65 6e 73 75 72 65 ndler..to ensure
1110: 20 74 68 61 74 20 65 76 65 6e 74 73 20 70 72 6f that events pro
1120: 70 61 67 61 74 65 20 66 72 6f 6d 20 74 68 65 20 pagate from the
1130: 6c 6f 77 65 72 20 64 72 69 76 65 72 2e 20 20 54 lower driver. T
1140: 68 69 73 20 6d 61 79 0a 09 72 65 73 75 6c 74 20 his may..result
1150: 69 6e 20 61 6e 20 69 6e 66 69 6e 69 74 65 20 6c in an infinite l
1160: 6f 6f 70 20 69 6e 20 73 6f 6d 65 20 63 61 73 65 oop in some case
1170: 73 2c 20 73 6f 20 74 68 69 73 20 69 73 20 6e 6f s, so this is no
1180: 74 20 61 20 74 6f 74 61 6c 0a 09 66 69 78 2e 20 t a total..fix.
1190: 20 54 68 69 73 20 6d 61 79 20 62 65 20 73 75 66 This may be suf
11a0: 66 69 63 69 65 6e 74 20 66 6f 72 20 6e 6f 77 2c ficient for now,
11b0: 20 68 6f 77 65 76 65 72 2e 20 5b 42 75 67 3a 20 however. [Bug:
11c0: 35 36 32 33 5d 0a 0a 32 30 30 30 2d 30 36 2d 30 5623]..2000-06-0
11d0: 31 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 1 Scott Stanton
11e0: 20 20 3c 73 74 61 6e 74 6f 6e 40 73 63 72 69 70 <stanton@scrip
11f0: 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c tics.com>...* tl
1200: 73 49 4f 2e 63 3a 20 52 65 73 74 6f 72 65 20 74 sIO.c: Restore t
1210: 68 65 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 he previous vers
1220: 69 6f 6e 2e 20 20 46 69 78 65 64 20 74 68 65 20 ion. Fixed the
1230: 43 6c 6f 73 65 50 72 6f 63 20 73 6f 0a 09 69 74 CloseProc so..it
1240: 20 75 6e 72 65 67 69 73 74 65 72 73 20 74 68 65 unregisters the
1250: 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 channel handler
1260: 20 6f 6e 20 74 68 65 20 73 75 70 65 72 63 65 64 on the superced
1270: 65 64 20 63 68 61 6e 6e 65 6c 0a 09 69 6e 73 74 ed channel..inst
1280: 65 61 64 20 6f 66 20 74 68 65 20 75 70 70 65 72 ead of the upper
1290: 20 63 68 61 6e 6e 65 6c 2e 20 41 6c 73 6f 20 72 channel. Also r
12a0: 65 6d 6f 76 65 64 20 74 68 65 20 63 61 6c 6c 20 emoved the call
12b0: 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43 68 to..Tcl_NotifyCh
12c0: 61 6e 6e 65 6c 20 69 6e 20 74 68 65 20 43 68 61 annel in the Cha
12d0: 6e 6e 65 6c 48 61 6e 64 6c 65 72 20 62 65 63 61 nnelHandler beca
12e0: 75 73 65 20 74 68 69 73 20 77 69 6c 6c 20 72 65 use this will re
12f0: 73 75 6c 74 0a 09 69 6e 20 61 6e 20 69 6e 66 69 sult..in an infi
1300: 6e 69 74 65 20 6c 6f 6f 70 20 69 66 20 64 61 74 nite loop if dat
1310: 61 20 69 73 20 65 76 65 72 20 62 75 66 66 65 72 a is ever buffer
1320: 65 64 20 69 6e 20 74 68 65 20 42 49 4f 0a 09 73 ed in the BIO..s
1330: 74 72 75 63 74 75 72 65 2e 20 5b 42 75 67 3a 20 tructure. [Bug:
1340: 35 36 32 33 5d 0a 0a 32 30 30 30 2d 30 35 2d 33 5623]..2000-05-3
1350: 31 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20 3c 1 Brent Welch <
1360: 77 65 6c 63 68 40 73 63 72 69 70 74 69 63 73 2e welch@scriptics.
1370: 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 com>...* tls.c:
1380: 43 68 61 6e 67 65 20 74 68 65 20 43 68 61 6e 6e Change the Chann
1390: 65 6c 48 61 6e 64 6c 65 72 20 74 6f 20 62 65 20 elHandler to be
13a0: 72 65 67 69 73 74 65 72 65 64 20 6f 6e 20 74 68 registered on th
13b0: 65 20 6d 61 69 6e 0a 09 63 68 61 6e 6e 65 6c 20 e main..channel
13c0: 61 73 20 6f 70 70 73 65 64 20 74 6f 20 74 68 65 as oppsed to the
13d0: 20 22 70 61 72 65 6e 74 22 2c 20 6f 72 20 73 75 "parent", or su
13e0: 70 65 72 63 65 65 64 65 64 2c 20 63 68 61 6e 6e perceeded, chann
13f0: 65 6c 2e 20 20 54 68 69 73 0a 09 69 73 20 62 65 el. This..is be
1400: 63 61 75 73 65 20 74 68 65 20 73 6f 63 6b 65 74 cause the socket
1410: 20 64 72 69 76 65 72 20 6e 6f 74 69 66 69 65 73 driver notifies
1420: 20 74 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e 65 the main channe
1430: 6c 2c 20 61 6e 64 20 74 68 65 72 65 0a 09 61 72 l, and there..ar
1440: 65 20 74 69 6d 65 73 20 77 69 74 68 20 74 68 65 e times with the
1450: 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 20 67 65 main channel ge
1460: 74 73 20 63 6c 6f 73 65 64 2c 20 62 75 74 20 74 ts closed, but t
1470: 68 65 20 73 75 70 65 72 63 65 64 65 64 0a 09 6f he superceded..o
1480: 6e 65 20 69 73 20 6e 6f 74 20 79 65 74 20 63 6c ne is not yet cl
1490: 6f 73 65 64 2e 20 20 49 66 20 74 68 65 20 63 68 osed. If the ch
14a0: 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 67 65 annel handler ge
14b0: 74 73 20 74 72 69 67 67 65 72 65 64 20 69 6e 0a ts triggered in.
14c0: 09 74 68 69 73 20 68 61 6c 66 2d 6f 70 65 6e 20 .this half-open
14d0: 73 74 61 74 65 20 69 74 20 69 73 20 61 73 73 6f state it is asso
14e0: 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 ciated with the
14f0: 73 75 70 65 72 63 65 65 64 65 64 0a 09 63 68 61 superceeded..cha
1500: 6e 6e 65 64 6c 2c 20 62 75 74 20 75 73 65 73 20 nnedl, but uses
1510: 69 74 73 20 70 72 69 76 61 74 65 20 70 6f 69 6e its private poin
1520: 74 65 72 20 74 6f 20 74 68 65 20 6d 61 69 6e 20 ter to the main
1530: 63 68 61 6e 6e 65 6c 2c 20 77 68 69 63 68 0a 09 channel, which..
1540: 69 73 20 6d 6f 73 74 6c 79 20 64 65 73 74 72 6f is mostly destro
1550: 79 65 64 2e 20 20 45 6c 69 6d 69 6e 61 74 65 64 yed. Eliminated
1560: 20 74 68 65 20 72 65 64 75 6e 64 61 6e 74 20 63 the redundant c
1570: 61 6c 6c 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 all to..Tcl_Noti
1580: 66 79 43 68 61 6e 6e 65 6c 20 66 72 6f 6d 20 54 fyChannel from T
1590: 6c 73 57 61 74 63 68 50 72 6f 63 2e 20 5b 42 75 lsWatchProc. [Bu
15a0: 67 3a 20 35 36 32 33 5d 0a g: 5623].