Artifact
cd26bc6332b821b8be77cfe54cba67a5eaac32ca:
0000: 32 30 30 30 2d 30 36 2d 30 35 20 20 53 63 6f 74 2000-06-05 Scot
0010: 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73 74 61 6e t Stanton <stan
0020: 74 6f 6e 40 61 6a 75 62 61 73 6f 6c 75 74 69 6f ton@ajubasolutio
0030: 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 4d 61 6b 65 ns.com>...* Make
0040: 66 69 6c 65 2e 69 6e 3a 20 46 69 78 65 64 20 62 file.in: Fixed b
0050: 72 6f 6b 65 6e 20 74 65 73 74 20 74 61 72 67 65 roken test targe
0060: 74 2e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a t....* tlsInt.h:
0070: 20 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 6c 65 61 ..* tls.c: Clea
0080: 6e 65 64 20 75 70 20 64 65 63 6c 61 72 61 74 69 ned up declarati
0090: 6f 6e 73 20 6f 66 20 54 6c 73 5f 43 6c 65 61 6e ons of Tls_Clean
00a0: 20 74 6f 20 61 76 6f 69 64 20 65 72 72 6f 72 73 to avoid errors
00b0: 20 6f 6e 0a 09 57 69 6e 64 6f 77 73 20 28 6c 69 on..Windows (li
00c0: 6e 74 29 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 35 nt)...2000-06-05
00d0: 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20 3c 77 Brent Welch <w
00e0: 65 6c 63 68 40 61 6a 75 62 61 73 6f 6c 75 74 69 elch@ajubasoluti
00f0: 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 ons.com>...* tls
0100: 2e 63 2c 20 74 6c 73 49 4f 2e 63 3a 20 20 53 70 .c, tlsIO.c: Sp
0110: 6c 69 74 20 54 6c 73 5f 46 72 65 65 20 69 6e 74 lit Tls_Free int
0120: 6f 20 54 6c 73 5f 43 6c 65 61 6e 2c 20 77 68 69 o Tls_Clean, whi
0130: 63 68 20 64 6f 65 73 0a 09 74 68 65 20 53 53 4c ch does..the SSL
0140: 20 63 6c 65 61 6e 75 70 2c 20 61 6e 64 20 74 68 cleanup, and th
0150: 65 20 54 63 6c 5f 46 72 65 65 20 63 61 6c 6c 2e e Tcl_Free call.
0160: 20 20 49 74 20 69 73 20 69 6d 70 6f 72 74 61 6e It is importan
0170: 74 20 74 6f 20 73 68 75 74 64 6f 77 6e 0a 09 74 t to shutdown..t
0180: 68 65 20 53 53 4c 20 73 74 61 74 65 20 22 73 79 he SSL state "sy
0190: 6e 63 68 72 6f 6e 6f 75 73 6c 79 22 20 64 75 72 nchronously" dur
01a0: 69 6e 67 20 61 20 73 74 61 63 6b 65 64 20 66 6c ing a stacked fl
01b0: 75 73 68 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 31 ush...2000-06-01
01c0: 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 Scott Stanton
01d0: 20 3c 73 74 61 6e 74 6f 6e 40 61 6a 75 62 61 73 <stanton@ajubas
01e0: 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 olutions.com>...
01f0: 2a 20 74 6c 73 49 4f 2e 63 3a 20 52 65 73 74 6f * tlsIO.c: Resto
0200: 72 65 64 20 63 61 6c 6c 20 74 6f 20 54 63 6c 5f red call to Tcl_
0210: 4e 6f 74 69 66 79 43 68 61 6e 6e 65 6c 20 66 72 NotifyChannel fr
0220: 6f 6d 20 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 om ChannelHandle
0230: 72 0a 09 74 6f 20 65 6e 73 75 72 65 20 74 68 61 r..to ensure tha
0240: 74 20 65 76 65 6e 74 73 20 70 72 6f 70 61 67 61 t events propaga
0250: 74 65 20 66 72 6f 6d 20 74 68 65 20 6c 6f 77 65 te from the lowe
0260: 72 20 64 72 69 76 65 72 2e 20 20 54 68 69 73 20 r driver. This
0270: 6d 61 79 0a 09 72 65 73 75 6c 74 20 69 6e 20 61 may..result in a
0280: 6e 20 69 6e 66 69 6e 69 74 65 20 6c 6f 6f 70 20 n infinite loop
0290: 69 6e 20 73 6f 6d 65 20 63 61 73 65 73 2c 20 73 in some cases, s
02a0: 6f 20 74 68 69 73 20 69 73 20 6e 6f 74 20 61 20 o this is not a
02b0: 74 6f 74 61 6c 0a 09 66 69 78 2e 20 20 54 68 69 total..fix. Thi
02c0: 73 20 6d 61 79 20 62 65 20 73 75 66 66 69 63 69 s may be suffici
02d0: 65 6e 74 20 66 6f 72 20 6e 6f 77 2c 20 68 6f 77 ent for now, how
02e0: 65 76 65 72 2e 20 5b 42 75 67 3a 20 35 36 32 33 ever. [Bug: 5623
02f0: 5d 0a 0a 32 30 30 30 2d 30 36 2d 30 31 20 20 53 ]..2000-06-01 S
0300: 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73 cott Stanton <s
0310: 74 61 6e 74 6f 6e 40 73 63 72 69 70 74 69 63 73 tanton@scriptics
0320: 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e .com>...* tlsIO.
0330: 63 3a 20 52 65 73 74 6f 72 65 20 74 68 65 20 70 c: Restore the p
0340: 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 2e revious version.
0350: 20 20 46 69 78 65 64 20 74 68 65 20 43 6c 6f 73 Fixed the Clos
0360: 65 50 72 6f 63 20 73 6f 0a 09 69 74 20 75 6e 72 eProc so..it unr
0370: 65 67 69 73 74 65 72 73 20 74 68 65 20 63 68 61 egisters the cha
0380: 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 6f 6e 20 nnel handler on
0390: 74 68 65 20 73 75 70 65 72 63 65 64 65 64 20 63 the superceded c
03a0: 68 61 6e 6e 65 6c 0a 09 69 6e 73 74 65 61 64 20 hannel..instead
03b0: 6f 66 20 74 68 65 20 75 70 70 65 72 20 63 68 61 of the upper cha
03c0: 6e 6e 65 6c 2e 20 41 6c 73 6f 20 72 65 6d 6f 76 nnel. Also remov
03d0: 65 64 20 74 68 65 20 63 61 6c 6c 20 74 6f 0a 09 ed the call to..
03e0: 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65 Tcl_NotifyChanne
03f0: 6c 20 69 6e 20 74 68 65 20 43 68 61 6e 6e 65 6c l in the Channel
0400: 48 61 6e 64 6c 65 72 20 62 65 63 61 75 73 65 20 Handler because
0410: 74 68 69 73 20 77 69 6c 6c 20 72 65 73 75 6c 74 this will result
0420: 0a 09 69 6e 20 61 6e 20 69 6e 66 69 6e 69 74 65 ..in an infinite
0430: 20 6c 6f 6f 70 20 69 66 20 64 61 74 61 20 69 73 loop if data is
0440: 20 65 76 65 72 20 62 75 66 66 65 72 65 64 20 69 ever buffered i
0450: 6e 20 74 68 65 20 42 49 4f 0a 09 73 74 72 75 63 n the BIO..struc
0460: 74 75 72 65 2e 20 5b 42 75 67 3a 20 35 36 32 33 ture. [Bug: 5623
0470: 5d 0a 0a 32 30 30 30 2d 30 35 2d 33 31 20 20 42 ]..2000-05-31 B
0480: 72 65 6e 74 20 57 65 6c 63 68 20 3c 77 65 6c 63 rent Welch <welc
0490: 68 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e h@scriptics.com>
04a0: 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 68 61 6e ...* tls.c: Chan
04b0: 67 65 20 74 68 65 20 43 68 61 6e 6e 65 6c 48 61 ge the ChannelHa
04c0: 6e 64 6c 65 72 20 74 6f 20 62 65 20 72 65 67 69 ndler to be regi
04d0: 73 74 65 72 65 64 20 6f 6e 20 74 68 65 20 6d 61 stered on the ma
04e0: 69 6e 0a 09 63 68 61 6e 6e 65 6c 20 61 73 20 6f in..channel as o
04f0: 70 70 73 65 64 20 74 6f 20 74 68 65 20 22 70 61 ppsed to the "pa
0500: 72 65 6e 74 22 2c 20 6f 72 20 73 75 70 65 72 63 rent", or superc
0510: 65 65 64 65 64 2c 20 63 68 61 6e 6e 65 6c 2e 20 eeded, channel.
0520: 20 54 68 69 73 0a 09 69 73 20 62 65 63 61 75 73 This..is becaus
0530: 65 20 74 68 65 20 73 6f 63 6b 65 74 20 64 72 69 e the socket dri
0540: 76 65 72 20 6e 6f 74 69 66 69 65 73 20 74 68 65 ver notifies the
0550: 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 2c 20 61 main channel, a
0560: 6e 64 20 74 68 65 72 65 0a 09 61 72 65 20 74 69 nd there..are ti
0570: 6d 65 73 20 77 69 74 68 20 74 68 65 20 6d 61 69 mes with the mai
0580: 6e 20 63 68 61 6e 6e 65 6c 20 67 65 74 73 20 63 n channel gets c
0590: 6c 6f 73 65 64 2c 20 62 75 74 20 74 68 65 20 73 losed, but the s
05a0: 75 70 65 72 63 65 64 65 64 0a 09 6f 6e 65 20 69 uperceded..one i
05b0: 73 20 6e 6f 74 20 79 65 74 20 63 6c 6f 73 65 64 s not yet closed
05c0: 2e 20 20 49 66 20 74 68 65 20 63 68 61 6e 6e 65 . If the channe
05d0: 6c 20 68 61 6e 64 6c 65 72 20 67 65 74 73 20 74 l handler gets t
05e0: 72 69 67 67 65 72 65 64 20 69 6e 0a 09 74 68 69 riggered in..thi
05f0: 73 20 68 61 6c 66 2d 6f 70 65 6e 20 73 74 61 74 s half-open stat
0600: 65 20 69 74 20 69 73 20 61 73 73 6f 63 69 61 74 e it is associat
0610: 65 64 20 77 69 74 68 20 74 68 65 20 73 75 70 65 ed with the supe
0620: 72 63 65 65 64 65 64 0a 09 63 68 61 6e 6e 65 64 rceeded..channed
0630: 6c 2c 20 62 75 74 20 75 73 65 73 20 69 74 73 20 l, but uses its
0640: 70 72 69 76 61 74 65 20 70 6f 69 6e 74 65 72 20 private pointer
0650: 74 6f 20 74 68 65 20 6d 61 69 6e 20 63 68 61 6e to the main chan
0660: 6e 65 6c 2c 20 77 68 69 63 68 0a 09 69 73 20 6d nel, which..is m
0670: 6f 73 74 6c 79 20 64 65 73 74 72 6f 79 65 64 2e ostly destroyed.
0680: 20 20 45 6c 69 6d 69 6e 61 74 65 64 20 74 68 65 Eliminated the
0690: 20 72 65 64 75 6e 64 61 6e 74 20 63 61 6c 6c 20 redundant call
06a0: 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43 68 to..Tcl_NotifyCh
06b0: 61 6e 6e 65 6c 20 66 72 6f 6d 20 54 6c 73 57 61 annel from TlsWa
06c0: 74 63 68 50 72 6f 63 2e 20 5b 42 75 67 3a 20 35 tchProc. [Bug: 5
06d0: 36 32 33 5d 0a 623].