Hex Artifact Content

Artifact c9bfe5bf8210e0b42004bb1a3f4efed61466b839:


0000: 32 30 30 30 2d 30 37 2d 32 30 20 20 4a 65 66 66  2000-07-20  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 74 6c 73 49 4f 2e 74 65  * tests/tlsIO.te
0040: 73 74 3a 20 63 6f 72 72 65 63 74 65 64 20 76 61  st: corrected va
0050: 72 69 6f 75 73 20 74 65 73 74 73 20 74 6f 20 62  rious tests to b
0060: 65 20 63 6f 72 72 65 63 74 20 66 6f 72 20 54 4c  e correct for TL
0070: 53 0a 09 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  S..stacked chann
0080: 65 6c 73 20 28 61 73 20 6f 70 70 6f 73 65 64 20  els (as opposed 
0090: 74 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20  to the standard 
00a0: 73 6f 63 6b 65 74 73 20 74 68 65 20 74 65 73 74  sockets the test
00b0: 0a 09 73 75 69 74 65 20 77 61 73 20 61 64 6f 70  ..suite was adop
00c0: 74 65 64 20 66 72 6f 6d 29 2e 20 20 4b 65 79 20  ted from).  Key 
00d0: 64 69 66 66 65 72 65 6e 63 65 73 20 61 72 65 20  differences are 
00e0: 74 68 61 74 20 54 4c 53 20 63 61 6e 6e 6f 74 0a  that TLS cannot.
00f0: 09 6f 70 65 72 61 74 65 20 69 6e 20 6f 6e 65 20  .operate in one 
0100: 70 72 6f 63 65 73 73 20 77 69 74 68 6f 75 74 20  process without 
0110: 61 6c 6c 20 63 68 61 6e 6e 65 6c 73 20 62 65 69  all channels bei
0120: 6e 67 20 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 2c  ng non-blocking,
0130: 20 6f 72 0a 09 74 68 65 20 68 61 6e 64 73 68 61   or..the handsha
0140: 6b 65 20 77 69 6c 6c 20 62 6c 6f 63 6b 2c 20 61  ke will block, a
0150: 6e 64 20 68 61 6e 64 73 68 61 6b 69 6e 67 20 6d  nd handshaking m
0160: 75 73 74 20 62 65 20 66 6f 72 63 65 64 20 69 6e  ust be forced in
0170: 20 73 6f 6d 65 0a 09 63 61 73 65 73 2e 20 20 41   some..cases.  A
0180: 6c 73 6f 2c 20 68 61 6e 64 73 68 61 6b 65 73 20  lso, handshakes 
0190: 64 6f 6e 27 74 20 73 65 65 6d 20 74 6f 20 63 6f  don't seem to co
01a0: 6d 70 6c 65 74 65 20 75 6e 6c 65 73 73 20 74 68  mplete unless th
01b0: 65 20 63 6c 69 65 6e 74 0a 09 68 61 73 20 70 6c  e client..has pl
01c0: 61 63 65 64 20 61 74 20 6c 65 61 73 74 20 6f 6e  aced at least on
01d0: 65 20 62 79 74 65 20 66 6f 72 20 74 68 65 20 73  e byte for the s
01e0: 65 72 76 65 72 20 74 6f 20 72 65 61 64 20 69 6e  erver to read in
01f0: 20 74 68 65 20 63 68 61 6e 6e 65 6c 2e 0a 0a 09   the channel....
0200: 2a 20 74 65 73 74 73 2f 72 65 6d 6f 74 65 2e 74  * tests/remote.t
0210: 63 6c 3a 20 63 6f 72 72 65 63 74 65 64 20 74 68  cl: corrected th
0220: 65 20 66 69 6e 64 69 6e 67 20 6f 66 20 74 65 73  e finding of tes
0230: 74 73 20 63 65 72 74 69 66 69 63 61 74 65 73 0a  ts certificates.
0240: 0a 09 2a 20 74 6c 73 49 4f 2e 63 20 28 54 6c 73  ..* tlsIO.c (Tls
0250: 43 6c 6f 73 65 50 72 6f 63 29 3a 20 72 65 6d 6f  CloseProc): remo
0260: 76 65 64 20 64 65 6c 65 74 69 6e 67 20 6f 66 20  ved deleting of 
0270: 74 69 6d 65 72 20 68 61 6e 64 6c 65 72 20 61 73  timer handler as
0280: 0a 09 74 68 61 74 20 69 73 20 68 61 6e 64 6c 65  ..that is handle
0290: 64 20 62 79 20 54 6c 73 5f 43 6c 65 61 6e 2e 0a  d by Tls_Clean..
02a0: 0a 09 2a 20 74 6c 73 2e 74 63 6c 20 28 74 6c 73  ..* tls.tcl (tls
02b0: 3a 3a 5f 61 63 63 65 70 74 29 3a 20 63 6f 72 72  ::_accept): corr
02c0: 65 63 74 65 64 20 74 68 65 20 69 6e 74 65 72 6e  ected the intern
02d0: 61 6c 20 5f 61 63 63 65 70 74 20 74 6f 0a 09 74  al _accept to..t
02e0: 72 69 63 6b 6c 65 20 63 61 6c 6c 62 61 63 6b 20  rickle callback 
02f0: 65 72 72 6f 72 73 20 74 6f 20 74 68 65 20 75 73  errors to the us
0300: 65 72 2e 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65  er....* Makefile
0310: 2e 69 6e 3a 20 6d 61 64 65 20 74 68 65 20 69 6e  .in: made the in
0320: 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 74  stall-binaries t
0330: 61 72 67 65 74 20 72 65 67 65 6e 65 72 61 74 65  arget regenerate
0340: 20 74 68 65 0a 09 70 6b 67 49 6e 64 65 78 2e 74   the..pkgIndex.t
0350: 63 6c 20 63 6f 72 72 65 63 74 6c 79 2e 20 20 54  cl correctly.  T
0360: 68 65 20 74 65 73 74 20 74 61 72 67 65 74 20 70  he test target p
0370: 72 6f 62 61 62 6c 79 20 73 68 6f 75 6c 64 6e 27  robably shouldn'
0380: 74 20 73 63 72 65 77 0a 09 69 74 20 75 70 2c 20  t screw..it up, 
0390: 62 75 74 20 74 68 69 73 20 69 73 20 74 6f 20 62  but this is to b
03a0: 65 20 6f 6e 20 74 68 65 20 73 61 66 65 20 73 69  e on the safe si
03b0: 64 65 2e 0a 0a 32 30 30 30 2d 30 37 2d 31 37 20  de...2000-07-17 
03c0: 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f   Jeff Hobbs  <ho
03d0: 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f  bbs@scriptics.co
03e0: 6d 3e 0a 0a 09 2a 20 70 6b 67 49 6e 64 65 78 2e  m>...* pkgIndex.
03f0: 74 63 6c 2e 69 6e 3a 0a 09 2a 20 63 6f 6e 66 69  tcl.in:..* confi
0400: 67 75 72 65 2e 69 6e 3a 20 75 70 64 61 74 65 64  gure.in: updated
0410: 20 76 65 72 73 69 6f 6e 20 74 6f 20 31 2e 34 0a   version to 1.4.
0420: 0a 32 30 30 30 2d 30 37 2d 31 33 20 20 4a 65 66  .2000-07-13  Jef
0430: 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40  f Hobbs  <hobbs@
0440: 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a  scriptics.com>..
0450: 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74  .* tests/tlsIO.t
0460: 65 73 74 3a 20 65 6e 61 62 6c 65 64 20 74 65 73  est: enabled tes
0470: 74 73 20 32 2e 31 30 2c 20 37 2e 5b 31 32 34 35  ts 2.10, 7.[1245
0480: 5d 20 28 74 68 65 72 65 20 69 73 20 6e 6f 20 33  ] (there is no 3
0490: 29 2c 0a 09 77 68 69 63 68 20 6e 6f 77 20 70 61  ),..which now pa
04a0: 73 73 2e 20 20 41 64 64 65 64 20 73 6f 6d 65 20  ss.  Added some 
04b0: 63 6f 6d 6d 65 6e 74 73 20 74 6f 20 6f 74 68 65  comments to othe
04c0: 72 20 66 61 69 6c 69 6e 67 20 74 65 73 74 73 2e  r failing tests.
04d0: 0a 0a 32 30 30 30 2d 30 37 2d 31 31 20 20 4a 65  ..2000-07-11  Je
04e0: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
04f0: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
0500: 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 63 68 61  ..* tlsIO.c: cha
0510: 6e 67 65 64 20 61 6c 6c 20 74 68 65 20 63 68 61  nged all the cha
0520: 6e 6e 65 6c 20 70 72 6f 63 73 20 74 6f 20 73 74  nnel procs to st
0530: 61 72 74 20 77 69 74 68 20 54 6c 73 2a 20 66 6f  art with Tls* fo
0540: 72 0a 09 62 65 74 74 65 72 20 70 61 72 69 74 79  r..better parity
0550: 20 77 68 65 6e 20 63 6f 6d 70 61 72 69 6e 67 20   when comparing 
0560: 77 69 74 68 20 54 72 61 6e 73 66 6f 72 6d 20 63  with Transform c
0570: 68 61 6e 6e 65 6c 20 70 72 6f 63 73 2e 0a 09 52  hannel procs...R
0580: 65 77 72 6f 74 65 20 54 6c 73 57 61 74 63 68 50  ewrote TlsWatchP
0590: 72 6f 63 2c 20 61 64 64 65 64 20 54 6c 73 4e 6f  roc, added TlsNo
05a0: 74 69 66 79 50 72 6f 63 20 61 63 63 6f 72 64 69  tifyProc accordi
05b0: 6e 67 20 74 6f 20 74 68 65 20 6e 65 77 0a 09 63  ng to the new..c
05c0: 68 61 6e 6e 65 6c 20 64 65 73 69 67 6e 2c 20 77  hannel design, w
05d0: 68 69 63 68 20 61 6c 73 6f 20 6c 65 61 76 65 73  hich also leaves
05e0: 20 54 6c 73 43 68 61 6e 6e 65 6c 48 61 6e 64 6c   TlsChannelHandl
05f0: 65 72 20 75 6e 75 73 65 64 2e 0a 0a 09 2a 20 74  er unused....* t
0600: 6c 73 42 49 4f 2e 63 20 28 42 69 6f 43 74 72 6c  lsBIO.c (BioCtrl
0610: 29 3a 20 63 68 61 6e 67 65 64 20 42 49 4f 5f 43  ): changed BIO_C
0620: 54 52 4c 5f 46 4c 55 53 48 20 63 61 73 65 20 74  TRL_FLUSH case t
0630: 6f 20 75 73 65 0a 09 54 63 6c 5f 57 72 69 74 65  o use..Tcl_Write
0640: 52 61 77 20 69 6e 73 74 65 61 64 20 6f 66 20 54  Raw instead of T
0650: 63 6c 5f 46 6c 75 73 68 20 28 74 6f 20 6f 70 65  cl_Flush (to ope
0660: 72 61 74 65 20 6f 6e 20 63 6f 72 72 65 63 74 20  rate on correct 
0670: 63 68 61 6e 6e 65 6c 0a 09 69 6e 20 74 68 65 20  channel..in the 
0680: 73 74 61 63 6b 20 69 6e 73 74 65 61 64 20 6f 66  stack instead of
0690: 20 73 74 61 72 74 69 6e 67 20 61 74 20 74 68 65   starting at the
06a0: 20 74 6f 70 20 61 67 61 69 6e 29 2e 20 20 57 6f   top again).  Wo
06b0: 75 6c 64 0a 09 6f 74 68 65 72 77 69 73 65 20 63  uld..otherwise c
06c0: 61 75 73 65 20 61 20 72 65 63 75 72 73 69 76 65  ause a recursive
06d0: 20 73 74 61 63 6b 20 62 6f 6d 62 20 77 68 65 6e   stack bomb when
06e0: 20 69 6d 70 6c 69 63 69 74 20 68 61 6e 64 73 68   implicit handsh
06f0: 61 6b 69 6e 67 0a 09 74 6f 6f 6b 20 65 66 66 65  aking..took effe
0700: 63 74 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c  ct....* tests/tl
0710: 73 49 4f 2e 74 65 73 74 3a 20 72 65 6d 6f 76 65  sIO.test: remove
0720: 64 20 63 68 61 6e 67 65 73 20 6d 61 64 65 20 74  d changes made t
0730: 6f 20 74 65 73 74 20 73 75 69 74 65 20 28 61 6c  o test suite (al
0740: 6c 20 74 65 73 74 73 0a 09 74 68 61 74 20 72 61  l tests..that ra
0750: 6e 20 62 65 66 6f 72 65 20 6e 6f 77 20 70 61 73  n before now pas
0760: 73 20 63 6f 72 72 65 63 74 6c 79 29 2c 20 61 6e  s correctly), an
0770: 64 20 63 68 61 6e 67 65 64 20 73 6f 6d 65 20 61  d changed some a
0780: 63 63 65 70 74 20 70 72 6f 63 0a 09 61 72 67 73  ccept proc..args
0790: 20 74 6f 20 72 65 66 6c 65 63 74 20 74 68 61 74   to reflect that
07a0: 20 61 20 73 6f 63 6b 20 69 73 20 61 6e 20 61 72   a sock is an ar
07b0: 67 2c 20 6e 6f 74 20 61 20 66 69 6c 65 2e 0a 0a  g, not a file...
07c0: 32 30 30 30 2d 30 37 2d 31 30 20 20 4a 65 66 66  2000-07-10  Jeff
07d0: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
07e0: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
07f0: 2a 20 74 6c 73 42 49 4f 2e 63 20 28 42 69 6f 57  * tlsBIO.c (BioW
0800: 72 69 74 65 2c 20 42 69 6f 52 65 61 64 29 3a 20  rite, BioRead): 
0810: 63 68 61 6e 67 65 64 20 54 63 6c 5f 52 65 61 64  changed Tcl_Read
0820: 2f 57 72 69 74 65 20 74 6f 0a 09 54 63 6c 5f 52  /Write to..Tcl_R
0830: 65 61 64 52 61 77 2f 54 63 6c 57 72 69 74 65 52  eadRaw/TclWriteR
0840: 61 77 2e 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 61  aw....* tls.c: a
0850: 64 64 65 64 20 75 73 65 20 6f 66 20 54 63 6c 5f  dded use of Tcl_
0860: 47 65 74 54 6f 70 43 68 61 6e 6e 65 6c 20 61 66  GetTopChannel af
0870: 74 65 72 20 54 63 6c 5f 47 65 74 43 68 61 6e 6e  ter Tcl_GetChann
0880: 65 6c 20 61 6e 64 0a 09 67 6f 74 20 72 65 74 75  el and..got retu
0890: 72 6e 20 76 61 6c 75 65 20 66 72 6f 6d 20 54 63  rn value from Tc
08a0: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 2e 0a  l_StackChannel..
08b0: 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e  ..* tests/tlsIO.
08c0: 74 65 73 74 3a 20 61 64 64 65 64 20 73 6f 6d 65  test: added some
08d0: 20 68 61 6e 64 73 68 61 6b 69 6e 67 20 74 68 61   handshaking tha
08e0: 74 20 73 68 6f 75 6c 64 6e 27 74 20 62 65 0a 09  t shouldn't be..
08f0: 6e 65 63 65 73 73 61 72 79 2c 20 62 75 74 20 77  necessary, but w
0900: 65 20 63 72 61 73 68 20 6f 74 68 65 72 77 69 73  e crash otherwis
0910: 65 20 28 6e 65 65 64 73 20 6d 6f 72 65 20 74 65  e (needs more te
0920: 73 74 69 6e 67 29 2e 0a 0a 09 2a 20 74 6c 73 49  sting)....* tlsI
0930: 4f 2e 63 3a 20 61 64 64 65 64 20 73 75 70 70 6f  O.c: added suppo
0940: 72 74 20 66 6f 72 20 22 63 6f 72 72 65 63 74 65  rt for "correcte
0950: 64 22 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  d" stacked chann
0960: 65 6c 73 2e 20 20 41 6c 6c 0a 09 74 68 65 20 61  els.  All..the a
0970: 62 6f 76 65 20 63 68 61 6e 6e 65 6c 73 20 61 72  bove channels ar
0980: 65 20 69 6e 20 54 43 4c 5f 43 48 41 4e 4e 45 4c  e in TCL_CHANNEL
0990: 5f 56 45 52 53 49 4f 4e 5f 32 20 23 69 66 64 65  _VERSION_2 #ifde
09a0: 66 73 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 35 20  fs...2000-06-05 
09b0: 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20   Scott Stanton  
09c0: 3c 73 74 61 6e 74 6f 6e 40 61 6a 75 62 61 73 6f  <stanton@ajubaso
09d0: 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a  lutions.com>...*
09e0: 20 4d 61 6b 65 66 69 6c 65 2e 69 6e 3a 20 46 69   Makefile.in: Fi
09f0: 78 65 64 20 62 72 6f 6b 65 6e 20 74 65 73 74 20  xed broken test 
0a00: 74 61 72 67 65 74 2e 0a 0a 09 2a 20 74 6c 73 49  target....* tlsI
0a10: 6e 74 2e 68 3a 20 0a 09 2a 20 74 6c 73 2e 63 3a  nt.h: ..* tls.c:
0a20: 20 43 6c 65 61 6e 65 64 20 75 70 20 64 65 63 6c   Cleaned up decl
0a30: 61 72 61 74 69 6f 6e 73 20 6f 66 20 54 6c 73 5f  arations of Tls_
0a40: 43 6c 65 61 6e 20 74 6f 20 61 76 6f 69 64 20 65  Clean to avoid e
0a50: 72 72 6f 72 73 20 6f 6e 0a 09 57 69 6e 64 6f 77  rrors on..Window
0a60: 73 20 28 6c 69 6e 74 29 2e 0a 0a 32 30 30 30 2d  s (lint)...2000-
0a70: 30 36 2d 30 35 20 20 42 72 65 6e 74 20 57 65 6c  06-05  Brent Wel
0a80: 63 68 20 3c 77 65 6c 63 68 40 61 6a 75 62 61 73  ch <welch@ajubas
0a90: 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09  olutions.com>...
0aa0: 2a 20 74 6c 73 2e 63 2c 20 74 6c 73 49 4f 2e 63  * tls.c, tlsIO.c
0ab0: 3a 20 20 53 70 6c 69 74 20 54 6c 73 5f 46 72 65  :  Split Tls_Fre
0ac0: 65 20 69 6e 74 6f 20 54 6c 73 5f 43 6c 65 61 6e  e into Tls_Clean
0ad0: 2c 20 77 68 69 63 68 20 64 6f 65 73 0a 09 74 68  , which does..th
0ae0: 65 20 53 53 4c 20 63 6c 65 61 6e 75 70 2c 20 61  e SSL cleanup, a
0af0: 6e 64 20 74 68 65 20 54 63 6c 5f 46 72 65 65 20  nd the Tcl_Free 
0b00: 63 61 6c 6c 2e 20 20 49 74 20 69 73 20 69 6d 70  call.  It is imp
0b10: 6f 72 74 61 6e 74 20 74 6f 20 73 68 75 74 64 6f  ortant to shutdo
0b20: 77 6e 0a 09 74 68 65 20 53 53 4c 20 73 74 61 74  wn..the SSL stat
0b30: 65 20 22 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79  e "synchronously
0b40: 22 20 64 75 72 69 6e 67 20 61 20 73 74 61 63 6b  " during a stack
0b50: 65 64 20 66 6c 75 73 68 2e 0a 0a 32 30 30 30 2d  ed flush...2000-
0b60: 30 36 2d 30 31 20 20 53 63 6f 74 74 20 53 74 61  06-01  Scott Sta
0b70: 6e 74 6f 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 61  nton  <stanton@a
0b80: 6a 75 62 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f  jubasolutions.co
0b90: 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20  m>...* tlsIO.c: 
0ba0: 52 65 73 74 6f 72 65 64 20 63 61 6c 6c 20 74 6f  Restored call to
0bb0: 20 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e   Tcl_NotifyChann
0bc0: 65 6c 20 66 72 6f 6d 20 43 68 61 6e 6e 65 6c 48  el from ChannelH
0bd0: 61 6e 64 6c 65 72 0a 09 74 6f 20 65 6e 73 75 72  andler..to ensur
0be0: 65 20 74 68 61 74 20 65 76 65 6e 74 73 20 70 72  e that events pr
0bf0: 6f 70 61 67 61 74 65 20 66 72 6f 6d 20 74 68 65  opagate from the
0c00: 20 6c 6f 77 65 72 20 64 72 69 76 65 72 2e 20 20   lower driver.  
0c10: 54 68 69 73 20 6d 61 79 0a 09 72 65 73 75 6c 74  This may..result
0c20: 20 69 6e 20 61 6e 20 69 6e 66 69 6e 69 74 65 20   in an infinite 
0c30: 6c 6f 6f 70 20 69 6e 20 73 6f 6d 65 20 63 61 73  loop in some cas
0c40: 65 73 2c 20 73 6f 20 74 68 69 73 20 69 73 20 6e  es, so this is n
0c50: 6f 74 20 61 20 74 6f 74 61 6c 0a 09 66 69 78 2e  ot a total..fix.
0c60: 20 20 54 68 69 73 20 6d 61 79 20 62 65 20 73 75    This may be su
0c70: 66 66 69 63 69 65 6e 74 20 66 6f 72 20 6e 6f 77  fficient for now
0c80: 2c 20 68 6f 77 65 76 65 72 2e 20 5b 42 75 67 3a  , however. [Bug:
0c90: 20 35 36 32 33 5d 0a 0a 32 30 30 30 2d 30 36 2d   5623]..2000-06-
0ca0: 30 31 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f  01  Scott Stanto
0cb0: 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 73 63 72 69  n  <stanton@scri
0cc0: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74  ptics.com>...* t
0cd0: 6c 73 49 4f 2e 63 3a 20 52 65 73 74 6f 72 65 20  lsIO.c: Restore 
0ce0: 74 68 65 20 70 72 65 76 69 6f 75 73 20 76 65 72  the previous ver
0cf0: 73 69 6f 6e 2e 20 20 46 69 78 65 64 20 74 68 65  sion.  Fixed the
0d00: 20 43 6c 6f 73 65 50 72 6f 63 20 73 6f 0a 09 69   CloseProc so..i
0d10: 74 20 75 6e 72 65 67 69 73 74 65 72 73 20 74 68  t unregisters th
0d20: 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65  e channel handle
0d30: 72 20 6f 6e 20 74 68 65 20 73 75 70 65 72 63 65  r on the superce
0d40: 64 65 64 20 63 68 61 6e 6e 65 6c 0a 09 69 6e 73  ded channel..ins
0d50: 74 65 61 64 20 6f 66 20 74 68 65 20 75 70 70 65  tead of the uppe
0d60: 72 20 63 68 61 6e 6e 65 6c 2e 20 41 6c 73 6f 20  r channel. Also 
0d70: 72 65 6d 6f 76 65 64 20 74 68 65 20 63 61 6c 6c  removed the call
0d80: 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43   to..Tcl_NotifyC
0d90: 68 61 6e 6e 65 6c 20 69 6e 20 74 68 65 20 43 68  hannel in the Ch
0da0: 61 6e 6e 65 6c 48 61 6e 64 6c 65 72 20 62 65 63  annelHandler bec
0db0: 61 75 73 65 20 74 68 69 73 20 77 69 6c 6c 20 72  ause this will r
0dc0: 65 73 75 6c 74 0a 09 69 6e 20 61 6e 20 69 6e 66  esult..in an inf
0dd0: 69 6e 69 74 65 20 6c 6f 6f 70 20 69 66 20 64 61  inite loop if da
0de0: 74 61 20 69 73 20 65 76 65 72 20 62 75 66 66 65  ta is ever buffe
0df0: 72 65 64 20 69 6e 20 74 68 65 20 42 49 4f 0a 09  red in the BIO..
0e00: 73 74 72 75 63 74 75 72 65 2e 20 5b 42 75 67 3a  structure. [Bug:
0e10: 20 35 36 32 33 5d 0a 0a 32 30 30 30 2d 30 35 2d   5623]..2000-05-
0e20: 33 31 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20  31  Brent Welch 
0e30: 3c 77 65 6c 63 68 40 73 63 72 69 70 74 69 63 73  <welch@scriptics
0e40: 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 2e 63 3a  .com>...* tls.c:
0e50: 20 43 68 61 6e 67 65 20 74 68 65 20 43 68 61 6e   Change the Chan
0e60: 6e 65 6c 48 61 6e 64 6c 65 72 20 74 6f 20 62 65  nelHandler to be
0e70: 20 72 65 67 69 73 74 65 72 65 64 20 6f 6e 20 74   registered on t
0e80: 68 65 20 6d 61 69 6e 0a 09 63 68 61 6e 6e 65 6c  he main..channel
0e90: 20 61 73 20 6f 70 70 73 65 64 20 74 6f 20 74 68   as oppsed to th
0ea0: 65 20 22 70 61 72 65 6e 74 22 2c 20 6f 72 20 73  e "parent", or s
0eb0: 75 70 65 72 63 65 65 64 65 64 2c 20 63 68 61 6e  uperceeded, chan
0ec0: 6e 65 6c 2e 20 20 54 68 69 73 0a 09 69 73 20 62  nel.  This..is b
0ed0: 65 63 61 75 73 65 20 74 68 65 20 73 6f 63 6b 65  ecause the socke
0ee0: 74 20 64 72 69 76 65 72 20 6e 6f 74 69 66 69 65  t driver notifie
0ef0: 73 20 74 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e  s the main chann
0f00: 65 6c 2c 20 61 6e 64 20 74 68 65 72 65 0a 09 61  el, and there..a
0f10: 72 65 20 74 69 6d 65 73 20 77 69 74 68 20 74 68  re times with th
0f20: 65 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 20 67  e main channel g
0f30: 65 74 73 20 63 6c 6f 73 65 64 2c 20 62 75 74 20  ets closed, but 
0f40: 74 68 65 20 73 75 70 65 72 63 65 64 65 64 0a 09  the superceded..
0f50: 6f 6e 65 20 69 73 20 6e 6f 74 20 79 65 74 20 63  one is not yet c
0f60: 6c 6f 73 65 64 2e 20 20 49 66 20 74 68 65 20 63  losed.  If the c
0f70: 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 67  hannel handler g
0f80: 65 74 73 20 74 72 69 67 67 65 72 65 64 20 69 6e  ets triggered in
0f90: 0a 09 74 68 69 73 20 68 61 6c 66 2d 6f 70 65 6e  ..this half-open
0fa0: 20 73 74 61 74 65 20 69 74 20 69 73 20 61 73 73   state it is ass
0fb0: 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65  ociated with the
0fc0: 20 73 75 70 65 72 63 65 65 64 65 64 0a 09 63 68   superceeded..ch
0fd0: 61 6e 6e 65 64 6c 2c 20 62 75 74 20 75 73 65 73  annedl, but uses
0fe0: 20 69 74 73 20 70 72 69 76 61 74 65 20 70 6f 69   its private poi
0ff0: 6e 74 65 72 20 74 6f 20 74 68 65 20 6d 61 69 6e  nter to the main
1000: 20 63 68 61 6e 6e 65 6c 2c 20 77 68 69 63 68 0a   channel, which.
1010: 09 69 73 20 6d 6f 73 74 6c 79 20 64 65 73 74 72  .is mostly destr
1020: 6f 79 65 64 2e 20 20 45 6c 69 6d 69 6e 61 74 65  oyed.  Eliminate
1030: 64 20 74 68 65 20 72 65 64 75 6e 64 61 6e 74 20  d the redundant 
1040: 63 61 6c 6c 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74  call to..Tcl_Not
1050: 69 66 79 43 68 61 6e 6e 65 6c 20 66 72 6f 6d 20  ifyChannel from 
1060: 54 6c 73 57 61 74 63 68 50 72 6f 63 2e 20 5b 42  TlsWatchProc. [B
1070: 75 67 3a 20 35 36 32 33 5d 0a                    ug: 5623].