Artifact
1a708169edbaee1ca902375dd55977d4c3e57e2d:
0000: 32 30 30 30 2d 30 38 2d 31 38 20 20 4a 65 66 66 2000-08-18 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 6c 73 2e 63 20 28 54 6c 73 5f 49 6e 69 * tls.c (Tls_Ini
0040: 74 29 3a 20 61 64 64 65 64 20 63 61 6c 6c 20 74 t): added call t
0050: 6f 20 52 41 4e 44 5f 73 65 65 64 20 74 6f 20 73 o RAND_seed to s
0060: 65 65 64 20 74 68 65 20 53 53 4c 20 72 61 6e 64 eed the SSL rand
0070: 6f 6d 0a 09 6e 75 6d 62 65 72 20 67 65 6e 65 72 om..number gener
0080: 61 74 6f 72 2e 20 20 57 69 74 68 6f 75 74 20 74 ator. Without t
0090: 68 69 73 2c 20 4f 70 65 6e 53 53 4c 20 30 2e 39 his, OpenSSL 0.9
00a0: 2e 35 20 63 68 6f 6b 65 73 2c 20 61 6e 64 20 69 .5 chokes, and i
00b0: 6e 20 61 6e 79 0a 09 63 61 73 65 20 69 74 20 69 n any..case it i
00c0: 73 20 61 20 62 69 67 20 73 65 63 75 72 69 74 79 s a big security
00d0: 20 68 6f 6c 65 20 74 6f 20 64 6f 20 77 69 74 68 hole to do with
00e0: 6f 75 74 20 69 74 2e 0a 0a 09 2a 20 63 6f 6e 66 out it....* conf
00f0: 69 67 75 72 65 2e 69 6e 20 28 4f 50 45 4e 53 53 igure.in (OPENSS
0100: 4c 29 3a 20 61 64 64 65 64 20 4e 4f 5f 49 44 45 L): added NO_IDE
0110: 41 20 61 6e 64 20 4e 4f 5f 52 43 35 20 64 65 66 A and NO_RC5 def
0120: 69 6e 65 73 20 62 79 0a 09 64 65 66 61 75 6c 74 ines by..default
0130: 20 77 68 65 6e 20 63 6f 6d 70 69 6c 69 6e 67 20 when compiling
0140: 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 0a 0a 09 with OpenSSL....
0150: 2a 20 74 6c 73 49 6e 74 2e 68 3a 20 61 64 64 65 * tlsInt.h: adde
0160: 64 20 65 72 72 2e 68 20 69 6e 63 6c 75 64 65 0a d err.h include.
0170: 0a 09 2a 20 74 6c 73 42 49 4f 2e 63 3a 0a 09 2a ..* tlsBIO.c:..*
0180: 20 74 6c 73 49 4f 2e 63 3a 20 63 6f 72 72 65 63 tlsIO.c: correc
0190: 74 65 64 20 70 65 64 61 6e 74 69 63 20 63 61 73 ted pedantic cas
01a0: 74 20 65 72 72 6f 72 73 2e 0a 0a 32 30 30 30 2d t errors...2000-
01b0: 30 38 2d 31 36 20 20 4a 65 66 66 20 48 6f 62 62 08-16 Jeff Hobb
01c0: 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74 s <hobbs@script
01d0: 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 65 73 ics.com>...* tes
01e0: 74 73 2f 63 69 70 68 65 72 73 2e 74 65 73 74 3a ts/ciphers.test:
01f0: 20 69 6d 70 72 6f 76 65 64 20 61 62 69 6c 69 74 improved abilit
0200: 79 20 74 6f 20 63 68 61 6e 67 65 20 63 6f 6e 73 y to change cons
0210: 74 72 61 69 6e 74 0a 09 73 65 74 74 69 6e 67 20 traint..setting
0220: 66 6f 72 20 77 68 65 74 68 65 72 20 75 73 65 72 for whether user
0230: 20 63 6f 6d 70 69 6c 65 64 20 61 67 61 69 6e 73 compiled agains
0240: 74 20 52 53 41 20 6f 72 20 4f 70 65 6e 53 53 4c t RSA or OpenSSL
0250: 20 6c 69 62 73 2e 0a 0a 09 2a 20 74 6c 73 2e 63 libs....* tls.c
0260: 20 28 54 6c 73 5f 49 6e 69 74 29 3a 20 63 6f 72 (Tls_Init): cor
0270: 72 65 63 74 65 64 20 69 6e 74 65 72 70 72 65 74 rected interpret
0280: 61 74 69 6f 6e 20 6f 66 20 76 65 72 73 69 6f 6e ation of version
0290: 20 6e 75 6d 62 65 72 0a 09 28 70 61 74 63 68 6c number..(patchl
02a0: 65 76 65 6c 20 61 6e 64 20 72 65 6c 65 61 73 65 evel and release
02b0: 2f 73 65 72 69 61 6c 20 77 65 72 65 20 73 77 61 /serial were swa
02c0: 70 70 65 64 29 2e 0a 0a 32 30 30 30 2d 30 38 2d pped)...2000-08-
02d0: 31 35 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20 15 Jeff Hobbs
02e0: 3c 68 6f 62 62 73 40 73 63 72 69 70 74 69 63 73 <hobbs@scriptics
02f0: 2e 63 6f 6d 3e 0a 0a 09 2a 20 52 45 41 44 4d 45 .com>...* README
0300: 2e 74 78 74 3a 20 61 64 64 65 64 20 6e 6f 74 65 .txt: added note
0310: 73 20 61 62 6f 75 74 20 6e 65 65 64 20 74 6f 20 s about need to
0320: 75 73 65 20 38 2e 32 2e 30 2b 2e 0a 0a 09 2a 20 use 8.2.0+....*
0330: 74 6c 73 49 6e 74 2e 68 3a 0a 09 2a 20 74 6c 73 tlsInt.h:..* tls
0340: 2e 63 3a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 .c:..* tlsIO.c:
0350: 63 6f 72 72 65 63 74 65 64 20 73 74 72 75 63 74 corrected struct
0360: 75 72 65 20 69 6e 69 74 69 61 6c 69 7a 61 74 69 ure initializati
0370: 6f 6e 20 74 6f 20 77 6f 72 6b 20 77 68 65 6e 0a on to work when.
0380: 09 63 6f 6d 70 69 6c 69 6e 67 20 77 69 74 68 20 .compiling with
0390: 38 2e 32 2e 20 20 4e 6f 77 20 63 6f 6d 70 69 6c 8.2. Now compil
03a0: 65 73 20 77 69 74 68 20 38 2e 32 2b 20 61 6e 64 es with 8.2+ and
03b0: 20 74 65 73 74 65 64 20 74 6f 20 77 6f 72 6b 0a tested to work.
03c0: 09 77 69 74 68 20 38 2e 32 2b 20 61 6e 64 20 64 .with 8.2+ and d
03d0: 79 6e 61 6d 69 63 61 6c 6c 79 20 61 64 6a 75 73 ynamically adjus
03e0: 74 20 74 6f 20 74 68 65 20 76 65 72 73 69 6f 6e t to the version
03f0: 20 6f 66 20 54 63 6c 20 69 74 20 77 61 73 0a 09 of Tcl it was..
0400: 6c 6f 61 64 65 64 20 69 6e 74 6f 2e 20 20 54 4c loaded into. TL
0410: 53 20 77 69 6c 6c 20 66 61 69 6c 20 74 68 65 20 S will fail the
0420: 74 65 73 74 20 73 75 69 74 65 20 77 69 74 68 20 test suite with
0430: 54 63 6c 20 38 2e 32 2d 38 2e 33 2e 31 2e 0a 0a Tcl 8.2-8.3.1...
0440: 09 2a 20 74 65 73 74 73 2f 61 6c 6c 2e 74 63 6c .* tests/all.tcl
0450: 3a 20 61 64 64 65 64 20 63 61 74 63 68 20 61 72 : added catch ar
0460: 6f 75 6e 64 20 3a 3a 74 63 6c 74 65 73 74 3a 3a ound ::tcltest::
0470: 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 0a 09 62 normalizePath..b
0480: 65 63 61 75 73 65 20 69 74 20 64 6f 65 73 6e 27 ecause it doesn'
0490: 74 20 65 78 69 73 74 20 69 6e 20 70 72 65 2d 38 t exist in pre-8
04a0: 2e 33 20 74 63 6c 74 65 73 74 2e 0a 0a 09 2a 20 .3 tcltest....*
04b0: 74 65 73 74 73 2f 73 69 6d 70 6c 65 43 6c 69 65 tests/simpleClie
04c0: 6e 74 2e 74 63 6c 3a 20 0a 09 2a 20 74 65 73 74 nt.tcl: ..* test
04d0: 73 2f 73 69 6d 70 6c 65 53 65 72 76 65 72 2e 74 s/simpleServer.t
04e0: 63 6c 3a 20 61 64 64 65 64 20 73 69 6d 70 6c 65 cl: added simple
04f0: 20 63 6c 69 65 6e 74 2f 73 65 72 76 65 72 20 74 client/server t
0500: 65 73 74 20 73 63 72 69 70 74 73 0a 09 74 68 61 est scripts..tha
0510: 74 20 75 73 65 20 74 65 73 74 20 63 65 72 74 73 t use test certs
0520: 20 61 6e 64 20 63 61 6e 20 64 6f 20 73 69 6d 70 and can do simp
0530: 6c 65 20 73 74 72 65 73 73 20 74 65 73 74 73 2e le stress tests.
0540: 0a 0a 32 30 30 30 2d 30 38 2d 31 34 20 20 4a 65 ..2000-08-14 Je
0550: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 ff Hobbs <hobbs
0560: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a @scriptics.com>.
0570: 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a 0a 09 2a ..* tlsInt.h:..*
0580: 20 74 6c 73 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73 tlsIO.c:..* tls
0590: 42 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73 2e 63 3a BIO.c:..* tls.c:
05a0: 20 63 68 61 6e 67 65 64 20 61 72 6f 75 6e 64 20 changed around
05b0: 74 6f 20 6f 6e 6c 79 20 77 6f 72 6b 69 6e 67 20 to only working
05c0: 77 69 74 68 20 38 2e 32 2e 30 2b 20 28 38 2e 33 with 8.2.0+ (8.3
05d0: 2e 32 2b 0a 09 70 72 65 66 65 72 72 65 64 29 2c .2+..preferred),
05e0: 20 77 69 74 68 20 72 75 6e 74 69 6d 65 20 63 68 with runtime ch
05f0: 65 63 6b 73 20 66 6f 72 20 70 72 65 2d 20 61 6e ecks for pre- an
0600: 64 20 70 6f 73 74 2d 69 6f 2d 72 65 77 72 69 74 d post-io-rewrit
0610: 65 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 54 6c e....* tls.c (Tl
0620: 73 5f 49 6e 69 74 29 3a 20 63 68 61 6e 67 65 64 s_Init): changed
0630: 20 69 74 20 74 6f 20 72 65 71 75 69 72 65 20 38 it to require 8
0640: 2e 33 2e 32 20 77 68 65 6e 20 54 63 6c 5f 49 6e .3.2 when Tcl_In
0650: 69 74 53 74 75 62 73 0a 09 77 61 73 20 63 61 6c itStubs..was cal
0660: 6c 65 64 20 62 65 63 61 75 73 65 20 77 65 20 64 led because we d
0670: 6f 6e 27 74 20 77 61 6e 74 20 70 65 6f 70 6c 65 on't want people
0680: 20 75 73 69 6e 67 20 54 4c 53 20 77 69 74 68 20 using TLS with
0690: 74 68 65 0a 09 6f 72 69 67 69 6e 61 6c 20 73 74 the..original st
06a0: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 69 6d acked channel im
06b0: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2e 0a 0a 32 plementation...2
06c0: 30 30 30 2d 30 37 2d 32 36 20 20 4a 65 66 66 20 000-07-26 Jeff
06d0: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 Hobbs <hobbs@sc
06e0: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a riptics.com>...*
06f0: 20 6d 65 72 67 65 64 20 61 6c 6c 20 63 68 61 6e merged all chan
0700: 67 65 73 20 66 72 6f 6d 20 74 6c 73 2d 31 2d 33 ges from tls-1-3
0710: 2d 69 6f 2d 72 65 77 72 69 74 65 20 62 61 63 6b -io-rewrite back
0720: 20 69 6e 74 6f 20 6d 61 69 6e 20 62 72 61 6e 63 into main branc
0730: 68 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 h...* tests/tlsI
0740: 4f 2e 74 65 73 74 3a 20 75 70 64 61 74 65 64 20 O.test: updated
0750: 63 6f 6d 6d 65 6e 74 73 2c 20 66 69 78 65 64 20 comments, fixed
0760: 61 20 70 63 43 72 61 73 68 20 63 61 73 65 20 74 a pcCrash case t
0770: 68 61 74 0a 09 77 61 73 20 64 75 65 20 74 6f 20 hat..was due to
0780: 64 65 62 75 67 20 61 73 73 65 72 74 69 6f 6e 20 debug assertion
0790: 69 6e 20 57 69 6e 64 6f 77 73 20 53 53 4c 2e 0a in Windows SSL..
07a0: 0a 09 2a 20 74 6c 73 2e 63 20 28 49 6d 70 6f 72 ..* tls.c (Impor
07b0: 74 4f 62 6a 43 6d 64 29 3a 20 72 65 6d 6f 76 65 tObjCmd): remove
07c0: 64 20 75 6e 6e 65 63 65 73 73 61 72 79 20 75 73 d unnecessary us
07d0: 65 20 6f 66 20 27 62 69 6f 27 20 61 72 67 2e 0a e of 'bio' arg..
07e0: 09 28 54 6c 73 5f 49 6e 69 74 29 3a 20 63 68 65 .(Tls_Init): che
07f0: 63 6b 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 ck return value
0800: 6f 66 20 53 53 4c 5f 6c 69 62 72 61 72 79 5f 69 of SSL_library_i
0810: 6e 69 74 2e 20 20 41 6c 73 6f 20 6c 6f 74 73 20 nit. Also lots
0820: 6f 66 0a 09 77 68 69 74 65 73 70 61 63 65 20 63 of..whitespace c
0830: 6c 65 61 6e 75 70 20 28 6d 6f 72 65 20 6c 69 6b leanup (more lik
0840: 65 20 54 63 6c 20 45 6e 67 20 73 74 79 6c 65 20 e Tcl Eng style
0850: 67 75 69 64 65 29 2c 20 62 75 74 20 6e 6f 74 20 guide), but not
0860: 61 6c 6c 0a 09 63 6f 64 65 20 77 61 73 20 63 6c all..code was cl
0870: 65 61 6e 65 64 20 75 70 2e 0a 0a 09 2a 20 74 6c eaned up....* tl
0880: 73 42 49 4f 2e 63 3a 20 6d 69 6e 6f 72 20 77 68 sBIO.c: minor wh
0890: 69 74 65 73 70 61 63 65 20 63 6c 65 61 6e 75 70 itespace cleanup
08a0: 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 6d 69 ...* tlsIO.c: mi
08b0: 6e 6f 72 20 77 68 69 74 65 73 70 61 63 65 20 63 nor whitespace c
08c0: 6c 65 61 6e 75 70 2e 0a 09 28 54 6c 73 49 6e 70 leanup...(TlsInp
08d0: 75 74 50 72 6f 63 2c 20 54 6c 73 4f 75 74 70 75 utProc, TlsOutpu
08e0: 74 50 72 6f 63 29 3a 20 41 64 64 65 64 20 45 52 tProc): Added ER
08f0: 52 5f 63 6c 65 61 72 5f 65 72 72 6f 72 20 62 65 R_clear_error be
0900: 66 6f 72 65 20 63 61 6c 6c 73 0a 09 74 6f 20 42 fore calls..to B
0910: 49 4f 5f 72 65 61 64 20 6f 72 20 42 49 4f 5f 77 IO_read or BIO_w
0920: 72 69 74 65 2c 20 62 65 63 61 75 73 65 20 77 65 rite, because we
0930: 20 63 6f 75 6c 64 20 6f 74 68 65 72 77 69 73 65 could otherwise
0940: 20 65 6e 64 20 75 70 0a 09 70 75 6c 6c 69 6e 67 end up..pulling
0950: 20 61 6e 20 65 72 72 6f 72 20 6f 66 66 20 74 68 an error off th
0960: 65 20 73 74 61 63 6b 20 74 68 61 74 20 64 69 64 e stack that did
0970: 6e 27 74 20 62 65 6c 6f 6e 67 20 74 6f 20 75 73 n't belong to us
0980: 2e 20 20 41 6c 73 6f 0a 09 63 6c 65 61 6e 75 70 . Also..cleanup
0990: 20 75 70 20 65 78 63 65 73 73 69 76 65 20 75 73 up excessive us
09a0: 65 20 6f 66 20 67 6f 74 6f 73 2e 0a 0a 32 30 30 e of gotos...200
09b0: 30 2d 30 37 2d 32 30 20 20 4a 65 66 66 20 48 6f 0-07-20 Jeff Ho
09c0: 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 bbs <hobbs@scri
09d0: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 ptics.com>...* t
09e0: 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a ests/tlsIO.test:
09f0: 20 63 6f 72 72 65 63 74 65 64 20 76 61 72 69 6f corrected vario
0a00: 75 73 20 74 65 73 74 73 20 74 6f 20 62 65 20 63 us tests to be c
0a10: 6f 72 72 65 63 74 20 66 6f 72 20 54 4c 53 0a 09 orrect for TLS..
0a20: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 73 stacked channels
0a30: 20 28 61 73 20 6f 70 70 6f 73 65 64 20 74 6f 20 (as opposed to
0a40: 74 68 65 20 73 74 61 6e 64 61 72 64 20 73 6f 63 the standard soc
0a50: 6b 65 74 73 20 74 68 65 20 74 65 73 74 0a 09 73 kets the test..s
0a60: 75 69 74 65 20 77 61 73 20 61 64 6f 70 74 65 64 uite was adopted
0a70: 20 66 72 6f 6d 29 2e 20 20 4b 65 79 20 64 69 66 from). Key dif
0a80: 66 65 72 65 6e 63 65 73 20 61 72 65 20 74 68 61 ferences are tha
0a90: 74 20 54 4c 53 20 63 61 6e 6e 6f 74 0a 09 6f 70 t TLS cannot..op
0aa0: 65 72 61 74 65 20 69 6e 20 6f 6e 65 20 70 72 6f erate in one pro
0ab0: 63 65 73 73 20 77 69 74 68 6f 75 74 20 61 6c 6c cess without all
0ac0: 20 63 68 61 6e 6e 65 6c 73 20 62 65 69 6e 67 20 channels being
0ad0: 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 2c 20 6f 72 non-blocking, or
0ae0: 0a 09 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 ..the handshake
0af0: 77 69 6c 6c 20 62 6c 6f 63 6b 2c 20 61 6e 64 20 will block, and
0b00: 68 61 6e 64 73 68 61 6b 69 6e 67 20 6d 75 73 74 handshaking must
0b10: 20 62 65 20 66 6f 72 63 65 64 20 69 6e 20 73 6f be forced in so
0b20: 6d 65 0a 09 63 61 73 65 73 2e 20 20 41 6c 73 6f me..cases. Also
0b30: 2c 20 68 61 6e 64 73 68 61 6b 65 73 20 64 6f 6e , handshakes don
0b40: 27 74 20 73 65 65 6d 20 74 6f 20 63 6f 6d 70 6c 't seem to compl
0b50: 65 74 65 20 75 6e 6c 65 73 73 20 74 68 65 20 63 ete unless the c
0b60: 6c 69 65 6e 74 0a 09 68 61 73 20 70 6c 61 63 65 lient..has place
0b70: 64 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 62 d at least one b
0b80: 79 74 65 20 66 6f 72 20 74 68 65 20 73 65 72 76 yte for the serv
0b90: 65 72 20 74 6f 20 72 65 61 64 20 69 6e 20 74 68 er to read in th
0ba0: 65 20 63 68 61 6e 6e 65 6c 2e 0a 0a 09 2a 20 74 e channel....* t
0bb0: 65 73 74 73 2f 72 65 6d 6f 74 65 2e 74 63 6c 3a ests/remote.tcl:
0bc0: 20 63 6f 72 72 65 63 74 65 64 20 74 68 65 20 66 corrected the f
0bd0: 69 6e 64 69 6e 67 20 6f 66 20 74 65 73 74 73 20 inding of tests
0be0: 63 65 72 74 69 66 69 63 61 74 65 73 0a 0a 09 2a certificates...*
0bf0: 20 74 6c 73 49 4f 2e 63 20 28 54 6c 73 43 6c 6f tlsIO.c (TlsClo
0c00: 73 65 50 72 6f 63 29 3a 20 72 65 6d 6f 76 65 64 seProc): removed
0c10: 20 64 65 6c 65 74 69 6e 67 20 6f 66 20 74 69 6d deleting of tim
0c20: 65 72 20 68 61 6e 64 6c 65 72 20 61 73 0a 09 74 er handler as..t
0c30: 68 61 74 20 69 73 20 68 61 6e 64 6c 65 64 20 62 hat is handled b
0c40: 79 20 54 6c 73 5f 43 6c 65 61 6e 2e 0a 0a 09 2a y Tls_Clean....*
0c50: 20 74 6c 73 2e 74 63 6c 20 28 74 6c 73 3a 3a 5f tls.tcl (tls::_
0c60: 61 63 63 65 70 74 29 3a 20 63 6f 72 72 65 63 74 accept): correct
0c70: 65 64 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 ed the internal
0c80: 5f 61 63 63 65 70 74 20 74 6f 0a 09 74 72 69 63 _accept to..tric
0c90: 6b 6c 65 20 63 61 6c 6c 62 61 63 6b 20 65 72 72 kle callback err
0ca0: 6f 72 73 20 74 6f 20 74 68 65 20 75 73 65 72 2e ors to the user.
0cb0: 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69 6e ...* Makefile.in
0cc0: 3a 20 6d 61 64 65 20 74 68 65 20 69 6e 73 74 61 : made the insta
0cd0: 6c 6c 2d 62 69 6e 61 72 69 65 73 20 74 61 72 67 ll-binaries targ
0ce0: 65 74 20 72 65 67 65 6e 65 72 61 74 65 20 74 68 et regenerate th
0cf0: 65 0a 09 70 6b 67 49 6e 64 65 78 2e 74 63 6c 20 e..pkgIndex.tcl
0d00: 63 6f 72 72 65 63 74 6c 79 2e 20 20 54 68 65 20 correctly. The
0d10: 74 65 73 74 20 74 61 72 67 65 74 20 70 72 6f 62 test target prob
0d20: 61 62 6c 79 20 73 68 6f 75 6c 64 6e 27 74 20 73 ably shouldn't s
0d30: 63 72 65 77 0a 09 69 74 20 75 70 2c 20 62 75 74 crew..it up, but
0d40: 20 74 68 69 73 20 69 73 20 74 6f 20 62 65 20 6f this is to be o
0d50: 6e 20 74 68 65 20 73 61 66 65 20 73 69 64 65 2e n the safe side.
0d60: 0a 0a 32 30 30 30 2d 30 37 2d 31 37 20 20 4a 65 ..2000-07-17 Je
0d70: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 ff Hobbs <hobbs
0d80: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a @scriptics.com>.
0d90: 0a 09 2a 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c ..* pkgIndex.tcl
0da0: 2e 69 6e 3a 0a 09 2a 20 63 6f 6e 66 69 67 75 72 .in:..* configur
0db0: 65 2e 69 6e 3a 20 75 70 64 61 74 65 64 20 76 65 e.in: updated ve
0dc0: 72 73 69 6f 6e 20 74 6f 20 31 2e 34 0a 0a 32 30 rsion to 1.4..20
0dd0: 30 30 2d 30 37 2d 31 33 20 20 4a 65 66 66 20 48 00-07-13 Jeff H
0de0: 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 obbs <hobbs@scr
0df0: 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 iptics.com>...*
0e00: 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 tests/tlsIO.test
0e10: 3a 20 65 6e 61 62 6c 65 64 20 74 65 73 74 73 20 : enabled tests
0e20: 32 2e 31 30 2c 20 37 2e 5b 31 32 34 35 5d 20 28 2.10, 7.[1245] (
0e30: 74 68 65 72 65 20 69 73 20 6e 6f 20 33 29 2c 0a there is no 3),.
0e40: 09 77 68 69 63 68 20 6e 6f 77 20 70 61 73 73 2e .which now pass.
0e50: 20 20 41 64 64 65 64 20 73 6f 6d 65 20 63 6f 6d Added some com
0e60: 6d 65 6e 74 73 20 74 6f 20 6f 74 68 65 72 20 66 ments to other f
0e70: 61 69 6c 69 6e 67 20 74 65 73 74 73 2e 0a 0a 32 ailing tests...2
0e80: 30 30 30 2d 30 37 2d 31 31 20 20 4a 65 66 66 20 000-07-11 Jeff
0e90: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 Hobbs <hobbs@sc
0ea0: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a riptics.com>...*
0eb0: 20 74 6c 73 49 4f 2e 63 3a 20 63 68 61 6e 67 65 tlsIO.c: change
0ec0: 64 20 61 6c 6c 20 74 68 65 20 63 68 61 6e 6e 65 d all the channe
0ed0: 6c 20 70 72 6f 63 73 20 74 6f 20 73 74 61 72 74 l procs to start
0ee0: 20 77 69 74 68 20 54 6c 73 2a 20 66 6f 72 0a 09 with Tls* for..
0ef0: 62 65 74 74 65 72 20 70 61 72 69 74 79 20 77 68 better parity wh
0f00: 65 6e 20 63 6f 6d 70 61 72 69 6e 67 20 77 69 74 en comparing wit
0f10: 68 20 54 72 61 6e 73 66 6f 72 6d 20 63 68 61 6e h Transform chan
0f20: 6e 65 6c 20 70 72 6f 63 73 2e 0a 09 52 65 77 72 nel procs...Rewr
0f30: 6f 74 65 20 54 6c 73 57 61 74 63 68 50 72 6f 63 ote TlsWatchProc
0f40: 2c 20 61 64 64 65 64 20 54 6c 73 4e 6f 74 69 66 , added TlsNotif
0f50: 79 50 72 6f 63 20 61 63 63 6f 72 64 69 6e 67 20 yProc according
0f60: 74 6f 20 74 68 65 20 6e 65 77 0a 09 63 68 61 6e to the new..chan
0f70: 6e 65 6c 20 64 65 73 69 67 6e 2c 20 77 68 69 63 nel design, whic
0f80: 68 20 61 6c 73 6f 20 6c 65 61 76 65 73 20 54 6c h also leaves Tl
0f90: 73 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 72 20 sChannelHandler
0fa0: 75 6e 75 73 65 64 2e 0a 0a 09 2a 20 74 6c 73 42 unused....* tlsB
0fb0: 49 4f 2e 63 20 28 42 69 6f 43 74 72 6c 29 3a 20 IO.c (BioCtrl):
0fc0: 63 68 61 6e 67 65 64 20 42 49 4f 5f 43 54 52 4c changed BIO_CTRL
0fd0: 5f 46 4c 55 53 48 20 63 61 73 65 20 74 6f 20 75 _FLUSH case to u
0fe0: 73 65 0a 09 54 63 6c 5f 57 72 69 74 65 52 61 77 se..Tcl_WriteRaw
0ff0: 20 69 6e 73 74 65 61 64 20 6f 66 20 54 63 6c 5f instead of Tcl_
1000: 46 6c 75 73 68 20 28 74 6f 20 6f 70 65 72 61 74 Flush (to operat
1010: 65 20 6f 6e 20 63 6f 72 72 65 63 74 20 63 68 61 e on correct cha
1020: 6e 6e 65 6c 0a 09 69 6e 20 74 68 65 20 73 74 61 nnel..in the sta
1030: 63 6b 20 69 6e 73 74 65 61 64 20 6f 66 20 73 74 ck instead of st
1040: 61 72 74 69 6e 67 20 61 74 20 74 68 65 20 74 6f arting at the to
1050: 70 20 61 67 61 69 6e 29 2e 20 20 57 6f 75 6c 64 p again). Would
1060: 0a 09 6f 74 68 65 72 77 69 73 65 20 63 61 75 73 ..otherwise caus
1070: 65 20 61 20 72 65 63 75 72 73 69 76 65 20 73 74 e a recursive st
1080: 61 63 6b 20 62 6f 6d 62 20 77 68 65 6e 20 69 6d ack bomb when im
1090: 70 6c 69 63 69 74 20 68 61 6e 64 73 68 61 6b 69 plicit handshaki
10a0: 6e 67 0a 09 74 6f 6f 6b 20 65 66 66 65 63 74 2e ng..took effect.
10b0: 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f ...* tests/tlsIO
10c0: 2e 74 65 73 74 3a 20 72 65 6d 6f 76 65 64 20 63 .test: removed c
10d0: 68 61 6e 67 65 73 20 6d 61 64 65 20 74 6f 20 74 hanges made to t
10e0: 65 73 74 20 73 75 69 74 65 20 28 61 6c 6c 20 74 est suite (all t
10f0: 65 73 74 73 0a 09 74 68 61 74 20 72 61 6e 20 62 ests..that ran b
1100: 65 66 6f 72 65 20 6e 6f 77 20 70 61 73 73 20 63 efore now pass c
1110: 6f 72 72 65 63 74 6c 79 29 2c 20 61 6e 64 20 63 orrectly), and c
1120: 68 61 6e 67 65 64 20 73 6f 6d 65 20 61 63 63 65 hanged some acce
1130: 70 74 20 70 72 6f 63 0a 09 61 72 67 73 20 74 6f pt proc..args to
1140: 20 72 65 66 6c 65 63 74 20 74 68 61 74 20 61 20 reflect that a
1150: 73 6f 63 6b 20 69 73 20 61 6e 20 61 72 67 2c 20 sock is an arg,
1160: 6e 6f 74 20 61 20 66 69 6c 65 2e 0a 0a 32 30 30 not a file...200
1170: 30 2d 30 37 2d 31 30 20 20 4a 65 66 66 20 48 6f 0-07-10 Jeff Ho
1180: 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 bbs <hobbs@scri
1190: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 ptics.com>...* t
11a0: 6c 73 42 49 4f 2e 63 20 28 42 69 6f 57 72 69 74 lsBIO.c (BioWrit
11b0: 65 2c 20 42 69 6f 52 65 61 64 29 3a 20 63 68 61 e, BioRead): cha
11c0: 6e 67 65 64 20 54 63 6c 5f 52 65 61 64 2f 57 72 nged Tcl_Read/Wr
11d0: 69 74 65 20 74 6f 0a 09 54 63 6c 5f 52 65 61 64 ite to..Tcl_Read
11e0: 52 61 77 2f 54 63 6c 57 72 69 74 65 52 61 77 2e Raw/TclWriteRaw.
11f0: 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 61 64 64 65 ...* tls.c: adde
1200: 64 20 75 73 65 20 6f 66 20 54 63 6c 5f 47 65 74 d use of Tcl_Get
1210: 54 6f 70 43 68 61 6e 6e 65 6c 20 61 66 74 65 72 TopChannel after
1220: 20 54 63 6c 5f 47 65 74 43 68 61 6e 6e 65 6c 20 Tcl_GetChannel
1230: 61 6e 64 0a 09 67 6f 74 20 72 65 74 75 72 6e 20 and..got return
1240: 76 61 6c 75 65 20 66 72 6f 6d 20 54 63 6c 5f 53 value from Tcl_S
1250: 74 61 63 6b 43 68 61 6e 6e 65 6c 2e 0a 0a 09 2a tackChannel....*
1260: 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 tests/tlsIO.tes
1270: 74 3a 20 61 64 64 65 64 20 73 6f 6d 65 20 68 61 t: added some ha
1280: 6e 64 73 68 61 6b 69 6e 67 20 74 68 61 74 20 73 ndshaking that s
1290: 68 6f 75 6c 64 6e 27 74 20 62 65 0a 09 6e 65 63 houldn't be..nec
12a0: 65 73 73 61 72 79 2c 20 62 75 74 20 77 65 20 63 essary, but we c
12b0: 72 61 73 68 20 6f 74 68 65 72 77 69 73 65 20 28 rash otherwise (
12c0: 6e 65 65 64 73 20 6d 6f 72 65 20 74 65 73 74 69 needs more testi
12d0: 6e 67 29 2e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 ng)....* tlsIO.c
12e0: 3a 20 61 64 64 65 64 20 73 75 70 70 6f 72 74 20 : added support
12f0: 66 6f 72 20 22 63 6f 72 72 65 63 74 65 64 22 20 for "corrected"
1300: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 73 stacked channels
1310: 2e 20 20 41 6c 6c 0a 09 74 68 65 20 61 62 6f 76 . All..the abov
1320: 65 20 63 68 61 6e 6e 65 6c 73 20 61 72 65 20 69 e channels are i
1330: 6e 20 54 43 4c 5f 43 48 41 4e 4e 45 4c 5f 56 45 n TCL_CHANNEL_VE
1340: 52 53 49 4f 4e 5f 32 20 23 69 66 64 65 66 73 2e RSION_2 #ifdefs.
1350: 0a 0a 32 30 30 30 2d 30 36 2d 30 35 20 20 53 63 ..2000-06-05 Sc
1360: 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73 74 ott Stanton <st
1370: 61 6e 74 6f 6e 40 61 6a 75 62 61 73 6f 6c 75 74 anton@ajubasolut
1380: 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 4d 61 ions.com>...* Ma
1390: 6b 65 66 69 6c 65 2e 69 6e 3a 20 46 69 78 65 64 kefile.in: Fixed
13a0: 20 62 72 6f 6b 65 6e 20 74 65 73 74 20 74 61 72 broken test tar
13b0: 67 65 74 2e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e get....* tlsInt.
13c0: 68 3a 20 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 6c h: ..* tls.c: Cl
13d0: 65 61 6e 65 64 20 75 70 20 64 65 63 6c 61 72 61 eaned up declara
13e0: 74 69 6f 6e 73 20 6f 66 20 54 6c 73 5f 43 6c 65 tions of Tls_Cle
13f0: 61 6e 20 74 6f 20 61 76 6f 69 64 20 65 72 72 6f an to avoid erro
1400: 72 73 20 6f 6e 0a 09 57 69 6e 64 6f 77 73 20 28 rs on..Windows (
1410: 6c 69 6e 74 29 2e 0a 0a 32 30 30 30 2d 30 36 2d lint)...2000-06-
1420: 30 35 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20 05 Brent Welch
1430: 3c 77 65 6c 63 68 40 61 6a 75 62 61 73 6f 6c 75 <welch@ajubasolu
1440: 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 tions.com>...* t
1450: 6c 73 2e 63 2c 20 74 6c 73 49 4f 2e 63 3a 20 20 ls.c, tlsIO.c:
1460: 53 70 6c 69 74 20 54 6c 73 5f 46 72 65 65 20 69 Split Tls_Free i
1470: 6e 74 6f 20 54 6c 73 5f 43 6c 65 61 6e 2c 20 77 nto Tls_Clean, w
1480: 68 69 63 68 20 64 6f 65 73 0a 09 74 68 65 20 53 hich does..the S
1490: 53 4c 20 63 6c 65 61 6e 75 70 2c 20 61 6e 64 20 SL cleanup, and
14a0: 74 68 65 20 54 63 6c 5f 46 72 65 65 20 63 61 6c the Tcl_Free cal
14b0: 6c 2e 20 20 49 74 20 69 73 20 69 6d 70 6f 72 74 l. It is import
14c0: 61 6e 74 20 74 6f 20 73 68 75 74 64 6f 77 6e 0a ant to shutdown.
14d0: 09 74 68 65 20 53 53 4c 20 73 74 61 74 65 20 22 .the SSL state "
14e0: 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 22 20 64 synchronously" d
14f0: 75 72 69 6e 67 20 61 20 73 74 61 63 6b 65 64 20 uring a stacked
1500: 66 6c 75 73 68 2e 0a 0a 32 30 30 30 2d 30 36 2d flush...2000-06-
1510: 30 31 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 01 Scott Stanto
1520: 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 61 6a 75 62 n <stanton@ajub
1530: 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a asolutions.com>.
1540: 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 52 65 73 ..* tlsIO.c: Res
1550: 74 6f 72 65 64 20 63 61 6c 6c 20 74 6f 20 54 63 tored call to Tc
1560: 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65 6c 20 l_NotifyChannel
1570: 66 72 6f 6d 20 43 68 61 6e 6e 65 6c 48 61 6e 64 from ChannelHand
1580: 6c 65 72 0a 09 74 6f 20 65 6e 73 75 72 65 20 74 ler..to ensure t
1590: 68 61 74 20 65 76 65 6e 74 73 20 70 72 6f 70 61 hat events propa
15a0: 67 61 74 65 20 66 72 6f 6d 20 74 68 65 20 6c 6f gate from the lo
15b0: 77 65 72 20 64 72 69 76 65 72 2e 20 20 54 68 69 wer driver. Thi
15c0: 73 20 6d 61 79 0a 09 72 65 73 75 6c 74 20 69 6e s may..result in
15d0: 20 61 6e 20 69 6e 66 69 6e 69 74 65 20 6c 6f 6f an infinite loo
15e0: 70 20 69 6e 20 73 6f 6d 65 20 63 61 73 65 73 2c p in some cases,
15f0: 20 73 6f 20 74 68 69 73 20 69 73 20 6e 6f 74 20 so this is not
1600: 61 20 74 6f 74 61 6c 0a 09 66 69 78 2e 20 20 54 a total..fix. T
1610: 68 69 73 20 6d 61 79 20 62 65 20 73 75 66 66 69 his may be suffi
1620: 63 69 65 6e 74 20 66 6f 72 20 6e 6f 77 2c 20 68 cient for now, h
1630: 6f 77 65 76 65 72 2e 20 5b 42 75 67 3a 20 35 36 owever. [Bug: 56
1640: 32 33 5d 0a 0a 32 30 30 30 2d 30 36 2d 30 31 20 23]..2000-06-01
1650: 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20 Scott Stanton
1660: 3c 73 74 61 6e 74 6f 6e 40 73 63 72 69 70 74 69 <stanton@scripti
1670: 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49 cs.com>...* tlsI
1680: 4f 2e 63 3a 20 52 65 73 74 6f 72 65 20 74 68 65 O.c: Restore the
1690: 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f previous versio
16a0: 6e 2e 20 20 46 69 78 65 64 20 74 68 65 20 43 6c n. Fixed the Cl
16b0: 6f 73 65 50 72 6f 63 20 73 6f 0a 09 69 74 20 75 oseProc so..it u
16c0: 6e 72 65 67 69 73 74 65 72 73 20 74 68 65 20 63 nregisters the c
16d0: 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 6f hannel handler o
16e0: 6e 20 74 68 65 20 73 75 70 65 72 63 65 64 65 64 n the superceded
16f0: 20 63 68 61 6e 6e 65 6c 0a 09 69 6e 73 74 65 61 channel..instea
1700: 64 20 6f 66 20 74 68 65 20 75 70 70 65 72 20 63 d of the upper c
1710: 68 61 6e 6e 65 6c 2e 20 41 6c 73 6f 20 72 65 6d hannel. Also rem
1720: 6f 76 65 64 20 74 68 65 20 63 61 6c 6c 20 74 6f oved the call to
1730: 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e ..Tcl_NotifyChan
1740: 6e 65 6c 20 69 6e 20 74 68 65 20 43 68 61 6e 6e nel in the Chann
1750: 65 6c 48 61 6e 64 6c 65 72 20 62 65 63 61 75 73 elHandler becaus
1760: 65 20 74 68 69 73 20 77 69 6c 6c 20 72 65 73 75 e this will resu
1770: 6c 74 0a 09 69 6e 20 61 6e 20 69 6e 66 69 6e 69 lt..in an infini
1780: 74 65 20 6c 6f 6f 70 20 69 66 20 64 61 74 61 20 te loop if data
1790: 69 73 20 65 76 65 72 20 62 75 66 66 65 72 65 64 is ever buffered
17a0: 20 69 6e 20 74 68 65 20 42 49 4f 0a 09 73 74 72 in the BIO..str
17b0: 75 63 74 75 72 65 2e 20 5b 42 75 67 3a 20 35 36 ucture. [Bug: 56
17c0: 32 33 5d 0a 0a 32 30 30 30 2d 30 35 2d 33 31 20 23]..2000-05-31
17d0: 20 42 72 65 6e 74 20 57 65 6c 63 68 20 3c 77 65 Brent Welch <we
17e0: 6c 63 68 40 73 63 72 69 70 74 69 63 73 2e 63 6f [email protected]
17f0: 6d 3e 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 68 m>...* tls.c: Ch
1800: 61 6e 67 65 20 74 68 65 20 43 68 61 6e 6e 65 6c ange the Channel
1810: 48 61 6e 64 6c 65 72 20 74 6f 20 62 65 20 72 65 Handler to be re
1820: 67 69 73 74 65 72 65 64 20 6f 6e 20 74 68 65 20 gistered on the
1830: 6d 61 69 6e 0a 09 63 68 61 6e 6e 65 6c 20 61 73 main..channel as
1840: 20 6f 70 70 73 65 64 20 74 6f 20 74 68 65 20 22 oppsed to the "
1850: 70 61 72 65 6e 74 22 2c 20 6f 72 20 73 75 70 65 parent", or supe
1860: 72 63 65 65 64 65 64 2c 20 63 68 61 6e 6e 65 6c rceeded, channel
1870: 2e 20 20 54 68 69 73 0a 09 69 73 20 62 65 63 61 . This..is beca
1880: 75 73 65 20 74 68 65 20 73 6f 63 6b 65 74 20 64 use the socket d
1890: 72 69 76 65 72 20 6e 6f 74 69 66 69 65 73 20 74 river notifies t
18a0: 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 2c he main channel,
18b0: 20 61 6e 64 20 74 68 65 72 65 0a 09 61 72 65 20 and there..are
18c0: 74 69 6d 65 73 20 77 69 74 68 20 74 68 65 20 6d times with the m
18d0: 61 69 6e 20 63 68 61 6e 6e 65 6c 20 67 65 74 73 ain channel gets
18e0: 20 63 6c 6f 73 65 64 2c 20 62 75 74 20 74 68 65 closed, but the
18f0: 20 73 75 70 65 72 63 65 64 65 64 0a 09 6f 6e 65 superceded..one
1900: 20 69 73 20 6e 6f 74 20 79 65 74 20 63 6c 6f 73 is not yet clos
1910: 65 64 2e 20 20 49 66 20 74 68 65 20 63 68 61 6e ed. If the chan
1920: 6e 65 6c 20 68 61 6e 64 6c 65 72 20 67 65 74 73 nel handler gets
1930: 20 74 72 69 67 67 65 72 65 64 20 69 6e 0a 09 74 triggered in..t
1940: 68 69 73 20 68 61 6c 66 2d 6f 70 65 6e 20 73 74 his half-open st
1950: 61 74 65 20 69 74 20 69 73 20 61 73 73 6f 63 69 ate it is associ
1960: 61 74 65 64 20 77 69 74 68 20 74 68 65 20 73 75 ated with the su
1970: 70 65 72 63 65 65 64 65 64 0a 09 63 68 61 6e 6e perceeded..chann
1980: 65 64 6c 2c 20 62 75 74 20 75 73 65 73 20 69 74 edl, but uses it
1990: 73 20 70 72 69 76 61 74 65 20 70 6f 69 6e 74 65 s private pointe
19a0: 72 20 74 6f 20 74 68 65 20 6d 61 69 6e 20 63 68 r to the main ch
19b0: 61 6e 6e 65 6c 2c 20 77 68 69 63 68 0a 09 69 73 annel, which..is
19c0: 20 6d 6f 73 74 6c 79 20 64 65 73 74 72 6f 79 65 mostly destroye
19d0: 64 2e 20 20 45 6c 69 6d 69 6e 61 74 65 64 20 74 d. Eliminated t
19e0: 68 65 20 72 65 64 75 6e 64 61 6e 74 20 63 61 6c he redundant cal
19f0: 6c 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 l to..Tcl_Notify
1a00: 43 68 61 6e 6e 65 6c 20 66 72 6f 6d 20 54 6c 73 Channel from Tls
1a10: 57 61 74 63 68 50 72 6f 63 2e 20 5b 42 75 67 3a WatchProc. [Bug:
1a20: 20 35 36 32 33 5d 0a 5623].