Hex Artifact Content

Artifact 782bd8abaa2d74230a07dff37fd2d6f7a07161ad:


0000: 32 30 30 30 2d 30 39 2d 30 37 20 20 4a 65 66 66  2000-09-07  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 49 4f 2e 63 20 28 54 6c 73 5f 43  * tlsIO.c (Tls_C
0040: 68 61 6e 6e 65 6c 54 79 70 65 29 3a 20 73 65 74  hannelType): set
0050: 20 74 79 70 65 4e 61 6d 65 20 66 69 65 6c 64 20   typeName field 
0060: 6f 66 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 20  of channel type 
0070: 74 6f 0a 09 22 74 6c 73 22 20 28 74 68 69 73 20  to.."tls" (this 
0080: 67 6f 74 20 6c 6f 73 74 20 69 6e 20 6d 6f 76 65  got lost in move
0090: 20 74 6f 20 64 79 6e 61 6d 69 63 20 76 65 72 73   to dynamic vers
00a0: 69 6f 6e 20 63 6f 6d 70 61 74 61 62 69 6c 69 74  ion compatabilit
00b0: 79 0a 09 63 68 65 63 6b 69 6e 67 29 2e 0a 0a 32  y..checking)...2
00c0: 30 30 30 2d 30 38 2d 32 33 20 20 4a 65 66 66 20  000-08-23  Jeff 
00d0: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63  Hobbs  <hobbs@sc
00e0: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 54  riptics.com>...T
00f0: 4c 53 20 31 2e 34 20 52 45 4c 45 41 53 45 44 0a  LS 1.4 RELEASED.
0100: 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69 6e 20  ..* Makefile.in 
0110: 28 64 69 73 74 29 3a 20 63 72 65 61 74 65 20 64  (dist): create d
0120: 69 73 74 20 74 61 72 67 65 74 20 66 6f 72 20 61  ist target for a
0130: 72 63 68 69 76 65 20 64 69 73 74 72 69 62 75 74  rchive distribut
0140: 69 6f 6e 73 0a 0a 09 2a 20 74 65 73 74 73 2f 74  ions...* tests/t
0150: 6c 73 49 4f 2e 74 65 73 74 20 28 74 6c 73 49 4f  lsIO.test (tlsIO
0160: 2d 38 2e 31 29 3a 20 61 64 64 65 64 20 61 20 64  -8.1): added a d
0170: 65 6c 61 79 20 6f 6e 20 74 68 65 20 61 63 63 65  elay on the acce
0180: 70 74 20 63 6c 6f 73 65 0a 09 74 6f 20 6d 61 6b  pt close..to mak
0190: 65 20 74 68 65 20 74 65 73 74 20 77 6f 72 6b 20  e the test work 
01a0: 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 6f 6e 20  with OpenSSL on 
01b0: 57 69 6e 64 6f 77 73 20 28 64 6f 65 73 6e 27 74  Windows (doesn't
01c0: 20 61 66 66 65 63 74 0a 09 6f 74 68 65 72 20 62   affect..other b
01d0: 75 69 6c 64 73 29 2e 0a 0a 09 2a 20 74 6c 73 2e  uilds)....* tls.
01e0: 68 74 6d 3a 20 75 70 64 61 74 65 64 20 77 69 74  htm: updated wit
01f0: 68 20 6e 6f 74 65 73 20 66 6f 72 20 31 2e 34 2e  h notes for 1.4.
0200: 0a 0a 32 30 30 30 2d 30 38 2d 32 31 20 20 4a 65  ..2000-08-21  Je
0210: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
0220: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
0230: 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e  ..* tests/tlsIO.
0240: 74 65 73 74 3a 20 72 65 71 75 69 72 65 20 61 74  test: require at
0250: 20 6c 65 61 73 74 20 74 6c 73 31 2e 34 20 69 6e   least tls1.4 in
0260: 20 74 65 73 74 20 73 75 69 74 65 2e 0a 0a 32 30   test suite...20
0270: 30 30 2d 30 38 2d 31 38 20 20 4a 65 66 66 20 48  00-08-18  Jeff H
0280: 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72  obbs  <hobbs@scr
0290: 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20  iptics.com>...* 
02a0: 74 6c 73 2e 63 20 28 54 6c 73 5f 49 6e 69 74 29  tls.c (Tls_Init)
02b0: 3a 20 61 64 64 65 64 20 63 61 6c 6c 20 74 6f 20  : added call to 
02c0: 52 41 4e 44 5f 73 65 65 64 20 74 6f 20 73 65 65  RAND_seed to see
02d0: 64 20 74 68 65 20 53 53 4c 20 72 61 6e 64 6f 6d  d the SSL random
02e0: 0a 09 6e 75 6d 62 65 72 20 67 65 6e 65 72 61 74  ..number generat
02f0: 6f 72 2e 20 20 57 69 74 68 6f 75 74 20 74 68 69  or.  Without thi
0300: 73 2c 20 4f 70 65 6e 53 53 4c 20 30 2e 39 2e 35  s, OpenSSL 0.9.5
0310: 20 63 68 6f 6b 65 73 2c 20 61 6e 64 20 69 6e 20   chokes, and in 
0320: 61 6e 79 0a 09 63 61 73 65 20 69 74 20 69 73 20  any..case it is 
0330: 61 20 62 69 67 20 73 65 63 75 72 69 74 79 20 68  a big security h
0340: 6f 6c 65 20 74 6f 20 64 6f 20 77 69 74 68 6f 75  ole to do withou
0350: 74 20 69 74 2e 0a 0a 09 2a 20 63 6f 6e 66 69 67  t it....* config
0360: 75 72 65 2e 69 6e 20 28 4f 50 45 4e 53 53 4c 29  ure.in (OPENSSL)
0370: 3a 20 61 64 64 65 64 20 4e 4f 5f 49 44 45 41 20  : added NO_IDEA 
0380: 61 6e 64 20 4e 4f 5f 52 43 35 20 64 65 66 69 6e  and NO_RC5 defin
0390: 65 73 20 62 79 0a 09 64 65 66 61 75 6c 74 20 77  es by..default w
03a0: 68 65 6e 20 63 6f 6d 70 69 6c 69 6e 67 20 77 69  hen compiling wi
03b0: 74 68 20 4f 70 65 6e 53 53 4c 2e 0a 0a 09 2a 20  th OpenSSL....* 
03c0: 74 6c 73 49 6e 74 2e 68 3a 20 61 64 64 65 64 20  tlsInt.h: added 
03d0: 65 72 72 2e 68 20 69 6e 63 6c 75 64 65 0a 0a 09  err.h include...
03e0: 2a 20 74 6c 73 42 49 4f 2e 63 3a 0a 09 2a 20 74  * tlsBIO.c:..* t
03f0: 6c 73 49 4f 2e 63 3a 20 63 6f 72 72 65 63 74 65  lsIO.c: correcte
0400: 64 20 70 65 64 61 6e 74 69 63 20 63 61 73 74 20  d pedantic cast 
0410: 65 72 72 6f 72 73 2e 0a 0a 32 30 30 30 2d 30 38  errors...2000-08
0420: 2d 31 36 20 20 4a 65 66 66 20 48 6f 62 62 73 20  -16  Jeff Hobbs 
0430: 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74 69 63   <hobbs@scriptic
0440: 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 65 73 74 73  s.com>...* tests
0450: 2f 63 69 70 68 65 72 73 2e 74 65 73 74 3a 20 69  /ciphers.test: i
0460: 6d 70 72 6f 76 65 64 20 61 62 69 6c 69 74 79 20  mproved ability 
0470: 74 6f 20 63 68 61 6e 67 65 20 63 6f 6e 73 74 72  to change constr
0480: 61 69 6e 74 0a 09 73 65 74 74 69 6e 67 20 66 6f  aint..setting fo
0490: 72 20 77 68 65 74 68 65 72 20 75 73 65 72 20 63  r whether user c
04a0: 6f 6d 70 69 6c 65 64 20 61 67 61 69 6e 73 74 20  ompiled against 
04b0: 52 53 41 20 6f 72 20 4f 70 65 6e 53 53 4c 20 6c  RSA or OpenSSL l
04c0: 69 62 73 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20 28  ibs....* tls.c (
04d0: 54 6c 73 5f 49 6e 69 74 29 3a 20 63 6f 72 72 65  Tls_Init): corre
04e0: 63 74 65 64 20 69 6e 74 65 72 70 72 65 74 61 74  cted interpretat
04f0: 69 6f 6e 20 6f 66 20 76 65 72 73 69 6f 6e 20 6e  ion of version n
0500: 75 6d 62 65 72 0a 09 28 70 61 74 63 68 6c 65 76  umber..(patchlev
0510: 65 6c 20 61 6e 64 20 72 65 6c 65 61 73 65 2f 73  el and release/s
0520: 65 72 69 61 6c 20 77 65 72 65 20 73 77 61 70 70  erial were swapp
0530: 65 64 29 2e 0a 0a 32 30 30 30 2d 30 38 2d 31 35  ed)...2000-08-15
0540: 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68    Jeff Hobbs  <h
0550: 6f 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63  obbs@scriptics.c
0560: 6f 6d 3e 0a 0a 09 2a 20 52 45 41 44 4d 45 2e 74  om>...* README.t
0570: 78 74 3a 20 61 64 64 65 64 20 6e 6f 74 65 73 20  xt: added notes 
0580: 61 62 6f 75 74 20 6e 65 65 64 20 74 6f 20 75 73  about need to us
0590: 65 20 38 2e 32 2e 30 2b 2e 0a 0a 09 2a 20 74 6c  e 8.2.0+....* tl
05a0: 73 49 6e 74 2e 68 3a 0a 09 2a 20 74 6c 73 2e 63  sInt.h:..* tls.c
05b0: 3a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 63 6f  :..* tlsIO.c: co
05c0: 72 72 65 63 74 65 64 20 73 74 72 75 63 74 75 72  rrected structur
05d0: 65 20 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e  e initialization
05e0: 20 74 6f 20 77 6f 72 6b 20 77 68 65 6e 0a 09 63   to work when..c
05f0: 6f 6d 70 69 6c 69 6e 67 20 77 69 74 68 20 38 2e  ompiling with 8.
0600: 32 2e 20 20 4e 6f 77 20 63 6f 6d 70 69 6c 65 73  2.  Now compiles
0610: 20 77 69 74 68 20 38 2e 32 2b 20 61 6e 64 20 74   with 8.2+ and t
0620: 65 73 74 65 64 20 74 6f 20 77 6f 72 6b 0a 09 77  ested to work..w
0630: 69 74 68 20 38 2e 32 2b 20 61 6e 64 20 64 79 6e  ith 8.2+ and dyn
0640: 61 6d 69 63 61 6c 6c 79 20 61 64 6a 75 73 74 20  amically adjust 
0650: 74 6f 20 74 68 65 20 76 65 72 73 69 6f 6e 20 6f  to the version o
0660: 66 20 54 63 6c 20 69 74 20 77 61 73 0a 09 6c 6f  f Tcl it was..lo
0670: 61 64 65 64 20 69 6e 74 6f 2e 20 20 54 4c 53 20  aded into.  TLS 
0680: 77 69 6c 6c 20 66 61 69 6c 20 74 68 65 20 74 65  will fail the te
0690: 73 74 20 73 75 69 74 65 20 77 69 74 68 20 54 63  st suite with Tc
06a0: 6c 20 38 2e 32 2d 38 2e 33 2e 31 2e 0a 0a 09 2a  l 8.2-8.3.1....*
06b0: 20 74 65 73 74 73 2f 61 6c 6c 2e 74 63 6c 3a 20   tests/all.tcl: 
06c0: 61 64 64 65 64 20 63 61 74 63 68 20 61 72 6f 75  added catch arou
06d0: 6e 64 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 6e 6f  nd ::tcltest::no
06e0: 72 6d 61 6c 69 7a 65 50 61 74 68 0a 09 62 65 63  rmalizePath..bec
06f0: 61 75 73 65 20 69 74 20 64 6f 65 73 6e 27 74 20  ause it doesn't 
0700: 65 78 69 73 74 20 69 6e 20 70 72 65 2d 38 2e 33  exist in pre-8.3
0710: 20 74 63 6c 74 65 73 74 2e 0a 0a 09 2a 20 74 65   tcltest....* te
0720: 73 74 73 2f 73 69 6d 70 6c 65 43 6c 69 65 6e 74  sts/simpleClient
0730: 2e 74 63 6c 3a 20 0a 09 2a 20 74 65 73 74 73 2f  .tcl: ..* tests/
0740: 73 69 6d 70 6c 65 53 65 72 76 65 72 2e 74 63 6c  simpleServer.tcl
0750: 3a 20 61 64 64 65 64 20 73 69 6d 70 6c 65 20 63  : added simple c
0760: 6c 69 65 6e 74 2f 73 65 72 76 65 72 20 74 65 73  lient/server tes
0770: 74 20 73 63 72 69 70 74 73 0a 09 74 68 61 74 20  t scripts..that 
0780: 75 73 65 20 74 65 73 74 20 63 65 72 74 73 20 61  use test certs a
0790: 6e 64 20 63 61 6e 20 64 6f 20 73 69 6d 70 6c 65  nd can do simple
07a0: 20 73 74 72 65 73 73 20 74 65 73 74 73 2e 0a 0a   stress tests...
07b0: 32 30 30 30 2d 30 38 2d 31 34 20 20 4a 65 66 66  2000-08-14  Jeff
07c0: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
07d0: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
07e0: 2a 20 74 6c 73 49 6e 74 2e 68 3a 0a 09 2a 20 74  * tlsInt.h:..* t
07f0: 6c 73 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73 42 49  lsIO.c:..* tlsBI
0800: 4f 2e 63 3a 0a 09 2a 20 74 6c 73 2e 63 3a 20 63  O.c:..* tls.c: c
0810: 68 61 6e 67 65 64 20 61 72 6f 75 6e 64 20 74 6f  hanged around to
0820: 20 6f 6e 6c 79 20 77 6f 72 6b 69 6e 67 20 77 69   only working wi
0830: 74 68 20 38 2e 32 2e 30 2b 20 28 38 2e 33 2e 32  th 8.2.0+ (8.3.2
0840: 2b 0a 09 70 72 65 66 65 72 72 65 64 29 2c 20 77  +..preferred), w
0850: 69 74 68 20 72 75 6e 74 69 6d 65 20 63 68 65 63  ith runtime chec
0860: 6b 73 20 66 6f 72 20 70 72 65 2d 20 61 6e 64 20  ks for pre- and 
0870: 70 6f 73 74 2d 69 6f 2d 72 65 77 72 69 74 65 2e  post-io-rewrite.
0880: 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 54 6c 73 5f  ...* tls.c (Tls_
0890: 49 6e 69 74 29 3a 20 63 68 61 6e 67 65 64 20 69  Init): changed i
08a0: 74 20 74 6f 20 72 65 71 75 69 72 65 20 38 2e 33  t to require 8.3
08b0: 2e 32 20 77 68 65 6e 20 54 63 6c 5f 49 6e 69 74  .2 when Tcl_Init
08c0: 53 74 75 62 73 0a 09 77 61 73 20 63 61 6c 6c 65  Stubs..was calle
08d0: 64 20 62 65 63 61 75 73 65 20 77 65 20 64 6f 6e  d because we don
08e0: 27 74 20 77 61 6e 74 20 70 65 6f 70 6c 65 20 75  't want people u
08f0: 73 69 6e 67 20 54 4c 53 20 77 69 74 68 20 74 68  sing TLS with th
0900: 65 0a 09 6f 72 69 67 69 6e 61 6c 20 73 74 61 63  e..original stac
0910: 6b 65 64 20 63 68 61 6e 6e 65 6c 20 69 6d 70 6c  ked channel impl
0920: 65 6d 65 6e 74 61 74 69 6f 6e 2e 0a 0a 32 30 30  ementation...200
0930: 30 2d 30 37 2d 32 36 20 20 4a 65 66 66 20 48 6f  0-07-26  Jeff Ho
0940: 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69  bbs  <hobbs@scri
0950: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 6d  ptics.com>...* m
0960: 65 72 67 65 64 20 61 6c 6c 20 63 68 61 6e 67 65  erged all change
0970: 73 20 66 72 6f 6d 20 74 6c 73 2d 31 2d 33 2d 69  s from tls-1-3-i
0980: 6f 2d 72 65 77 72 69 74 65 20 62 61 63 6b 20 69  o-rewrite back i
0990: 6e 74 6f 20 6d 61 69 6e 20 62 72 61 6e 63 68 0a  nto main branch.
09a0: 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e  ..* tests/tlsIO.
09b0: 74 65 73 74 3a 20 75 70 64 61 74 65 64 20 63 6f  test: updated co
09c0: 6d 6d 65 6e 74 73 2c 20 66 69 78 65 64 20 61 20  mments, fixed a 
09d0: 70 63 43 72 61 73 68 20 63 61 73 65 20 74 68 61  pcCrash case tha
09e0: 74 0a 09 77 61 73 20 64 75 65 20 74 6f 20 64 65  t..was due to de
09f0: 62 75 67 20 61 73 73 65 72 74 69 6f 6e 20 69 6e  bug assertion in
0a00: 20 57 69 6e 64 6f 77 73 20 53 53 4c 2e 0a 0a 09   Windows SSL....
0a10: 2a 20 74 6c 73 2e 63 20 28 49 6d 70 6f 72 74 4f  * tls.c (ImportO
0a20: 62 6a 43 6d 64 29 3a 20 72 65 6d 6f 76 65 64 20  bjCmd): removed 
0a30: 75 6e 6e 65 63 65 73 73 61 72 79 20 75 73 65 20  unnecessary use 
0a40: 6f 66 20 27 62 69 6f 27 20 61 72 67 2e 0a 09 28  of 'bio' arg...(
0a50: 54 6c 73 5f 49 6e 69 74 29 3a 20 63 68 65 63 6b  Tls_Init): check
0a60: 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 6f 66   return value of
0a70: 20 53 53 4c 5f 6c 69 62 72 61 72 79 5f 69 6e 69   SSL_library_ini
0a80: 74 2e 20 20 41 6c 73 6f 20 6c 6f 74 73 20 6f 66  t.  Also lots of
0a90: 0a 09 77 68 69 74 65 73 70 61 63 65 20 63 6c 65  ..whitespace cle
0aa0: 61 6e 75 70 20 28 6d 6f 72 65 20 6c 69 6b 65 20  anup (more like 
0ab0: 54 63 6c 20 45 6e 67 20 73 74 79 6c 65 20 67 75  Tcl Eng style gu
0ac0: 69 64 65 29 2c 20 62 75 74 20 6e 6f 74 20 61 6c  ide), but not al
0ad0: 6c 0a 09 63 6f 64 65 20 77 61 73 20 63 6c 65 61  l..code was clea
0ae0: 6e 65 64 20 75 70 2e 0a 0a 09 2a 20 74 6c 73 42  ned up....* tlsB
0af0: 49 4f 2e 63 3a 20 6d 69 6e 6f 72 20 77 68 69 74  IO.c: minor whit
0b00: 65 73 70 61 63 65 20 63 6c 65 61 6e 75 70 0a 0a  espace cleanup..
0b10: 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 6d 69 6e 6f  .* tlsIO.c: mino
0b20: 72 20 77 68 69 74 65 73 70 61 63 65 20 63 6c 65  r whitespace cle
0b30: 61 6e 75 70 2e 0a 09 28 54 6c 73 49 6e 70 75 74  anup...(TlsInput
0b40: 50 72 6f 63 2c 20 54 6c 73 4f 75 74 70 75 74 50  Proc, TlsOutputP
0b50: 72 6f 63 29 3a 20 41 64 64 65 64 20 45 52 52 5f  roc): Added ERR_
0b60: 63 6c 65 61 72 5f 65 72 72 6f 72 20 62 65 66 6f  clear_error befo
0b70: 72 65 20 63 61 6c 6c 73 0a 09 74 6f 20 42 49 4f  re calls..to BIO
0b80: 5f 72 65 61 64 20 6f 72 20 42 49 4f 5f 77 72 69  _read or BIO_wri
0b90: 74 65 2c 20 62 65 63 61 75 73 65 20 77 65 20 63  te, because we c
0ba0: 6f 75 6c 64 20 6f 74 68 65 72 77 69 73 65 20 65  ould otherwise e
0bb0: 6e 64 20 75 70 0a 09 70 75 6c 6c 69 6e 67 20 61  nd up..pulling a
0bc0: 6e 20 65 72 72 6f 72 20 6f 66 66 20 74 68 65 20  n error off the 
0bd0: 73 74 61 63 6b 20 74 68 61 74 20 64 69 64 6e 27  stack that didn'
0be0: 74 20 62 65 6c 6f 6e 67 20 74 6f 20 75 73 2e 20  t belong to us. 
0bf0: 20 41 6c 73 6f 0a 09 63 6c 65 61 6e 75 70 20 75   Also..cleanup u
0c00: 70 20 65 78 63 65 73 73 69 76 65 20 75 73 65 20  p excessive use 
0c10: 6f 66 20 67 6f 74 6f 73 2e 0a 0a 32 30 30 30 2d  of gotos...2000-
0c20: 30 37 2d 32 30 20 20 4a 65 66 66 20 48 6f 62 62  07-20  Jeff Hobb
0c30: 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74  s  <hobbs@script
0c40: 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 65 73  ics.com>...* tes
0c50: 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a 20 63  ts/tlsIO.test: c
0c60: 6f 72 72 65 63 74 65 64 20 76 61 72 69 6f 75 73  orrected various
0c70: 20 74 65 73 74 73 20 74 6f 20 62 65 20 63 6f 72   tests to be cor
0c80: 72 65 63 74 20 66 6f 72 20 54 4c 53 0a 09 73 74  rect for TLS..st
0c90: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 73 20 28  acked channels (
0ca0: 61 73 20 6f 70 70 6f 73 65 64 20 74 6f 20 74 68  as opposed to th
0cb0: 65 20 73 74 61 6e 64 61 72 64 20 73 6f 63 6b 65  e standard socke
0cc0: 74 73 20 74 68 65 20 74 65 73 74 0a 09 73 75 69  ts the test..sui
0cd0: 74 65 20 77 61 73 20 61 64 6f 70 74 65 64 20 66  te was adopted f
0ce0: 72 6f 6d 29 2e 20 20 4b 65 79 20 64 69 66 66 65  rom).  Key diffe
0cf0: 72 65 6e 63 65 73 20 61 72 65 20 74 68 61 74 20  rences are that 
0d00: 54 4c 53 20 63 61 6e 6e 6f 74 0a 09 6f 70 65 72  TLS cannot..oper
0d10: 61 74 65 20 69 6e 20 6f 6e 65 20 70 72 6f 63 65  ate in one proce
0d20: 73 73 20 77 69 74 68 6f 75 74 20 61 6c 6c 20 63  ss without all c
0d30: 68 61 6e 6e 65 6c 73 20 62 65 69 6e 67 20 6e 6f  hannels being no
0d40: 6e 2d 62 6c 6f 63 6b 69 6e 67 2c 20 6f 72 0a 09  n-blocking, or..
0d50: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 69  the handshake wi
0d60: 6c 6c 20 62 6c 6f 63 6b 2c 20 61 6e 64 20 68 61  ll block, and ha
0d70: 6e 64 73 68 61 6b 69 6e 67 20 6d 75 73 74 20 62  ndshaking must b
0d80: 65 20 66 6f 72 63 65 64 20 69 6e 20 73 6f 6d 65  e forced in some
0d90: 0a 09 63 61 73 65 73 2e 20 20 41 6c 73 6f 2c 20  ..cases.  Also, 
0da0: 68 61 6e 64 73 68 61 6b 65 73 20 64 6f 6e 27 74  handshakes don't
0db0: 20 73 65 65 6d 20 74 6f 20 63 6f 6d 70 6c 65 74   seem to complet
0dc0: 65 20 75 6e 6c 65 73 73 20 74 68 65 20 63 6c 69  e unless the cli
0dd0: 65 6e 74 0a 09 68 61 73 20 70 6c 61 63 65 64 20  ent..has placed 
0de0: 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 62 79 74  at least one byt
0df0: 65 20 66 6f 72 20 74 68 65 20 73 65 72 76 65 72  e for the server
0e00: 20 74 6f 20 72 65 61 64 20 69 6e 20 74 68 65 20   to read in the 
0e10: 63 68 61 6e 6e 65 6c 2e 0a 0a 09 2a 20 74 65 73  channel....* tes
0e20: 74 73 2f 72 65 6d 6f 74 65 2e 74 63 6c 3a 20 63  ts/remote.tcl: c
0e30: 6f 72 72 65 63 74 65 64 20 74 68 65 20 66 69 6e  orrected the fin
0e40: 64 69 6e 67 20 6f 66 20 74 65 73 74 73 20 63 65  ding of tests ce
0e50: 72 74 69 66 69 63 61 74 65 73 0a 0a 09 2a 20 74  rtificates...* t
0e60: 6c 73 49 4f 2e 63 20 28 54 6c 73 43 6c 6f 73 65  lsIO.c (TlsClose
0e70: 50 72 6f 63 29 3a 20 72 65 6d 6f 76 65 64 20 64  Proc): removed d
0e80: 65 6c 65 74 69 6e 67 20 6f 66 20 74 69 6d 65 72  eleting of timer
0e90: 20 68 61 6e 64 6c 65 72 20 61 73 0a 09 74 68 61   handler as..tha
0ea0: 74 20 69 73 20 68 61 6e 64 6c 65 64 20 62 79 20  t is handled by 
0eb0: 54 6c 73 5f 43 6c 65 61 6e 2e 0a 0a 09 2a 20 74  Tls_Clean....* t
0ec0: 6c 73 2e 74 63 6c 20 28 74 6c 73 3a 3a 5f 61 63  ls.tcl (tls::_ac
0ed0: 63 65 70 74 29 3a 20 63 6f 72 72 65 63 74 65 64  cept): corrected
0ee0: 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 5f 61   the internal _a
0ef0: 63 63 65 70 74 20 74 6f 0a 09 74 72 69 63 6b 6c  ccept to..trickl
0f00: 65 20 63 61 6c 6c 62 61 63 6b 20 65 72 72 6f 72  e callback error
0f10: 73 20 74 6f 20 74 68 65 20 75 73 65 72 2e 0a 0a  s to the user...
0f20: 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69 6e 3a 20  .* Makefile.in: 
0f30: 6d 61 64 65 20 74 68 65 20 69 6e 73 74 61 6c 6c  made the install
0f40: 2d 62 69 6e 61 72 69 65 73 20 74 61 72 67 65 74  -binaries target
0f50: 20 72 65 67 65 6e 65 72 61 74 65 20 74 68 65 0a   regenerate the.
0f60: 09 70 6b 67 49 6e 64 65 78 2e 74 63 6c 20 63 6f  .pkgIndex.tcl co
0f70: 72 72 65 63 74 6c 79 2e 20 20 54 68 65 20 74 65  rrectly.  The te
0f80: 73 74 20 74 61 72 67 65 74 20 70 72 6f 62 61 62  st target probab
0f90: 6c 79 20 73 68 6f 75 6c 64 6e 27 74 20 73 63 72  ly shouldn't scr
0fa0: 65 77 0a 09 69 74 20 75 70 2c 20 62 75 74 20 74  ew..it up, but t
0fb0: 68 69 73 20 69 73 20 74 6f 20 62 65 20 6f 6e 20  his is to be on 
0fc0: 74 68 65 20 73 61 66 65 20 73 69 64 65 2e 0a 0a  the safe side...
0fd0: 32 30 30 30 2d 30 37 2d 31 37 20 20 4a 65 66 66  2000-07-17  Jeff
0fe0: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
0ff0: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
1000: 2a 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69  * pkgIndex.tcl.i
1010: 6e 3a 0a 09 2a 20 63 6f 6e 66 69 67 75 72 65 2e  n:..* configure.
1020: 69 6e 3a 20 75 70 64 61 74 65 64 20 76 65 72 73  in: updated vers
1030: 69 6f 6e 20 74 6f 20 31 2e 34 0a 0a 32 30 30 30  ion to 1.4..2000
1040: 2d 30 37 2d 31 33 20 20 4a 65 66 66 20 48 6f 62  -07-13  Jeff Hob
1050: 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 70  bs  <hobbs@scrip
1060: 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 65  tics.com>...* te
1070: 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a 20  sts/tlsIO.test: 
1080: 65 6e 61 62 6c 65 64 20 74 65 73 74 73 20 32 2e  enabled tests 2.
1090: 31 30 2c 20 37 2e 5b 31 32 34 35 5d 20 28 74 68  10, 7.[1245] (th
10a0: 65 72 65 20 69 73 20 6e 6f 20 33 29 2c 0a 09 77  ere is no 3),..w
10b0: 68 69 63 68 20 6e 6f 77 20 70 61 73 73 2e 20 20  hich now pass.  
10c0: 41 64 64 65 64 20 73 6f 6d 65 20 63 6f 6d 6d 65  Added some comme
10d0: 6e 74 73 20 74 6f 20 6f 74 68 65 72 20 66 61 69  nts to other fai
10e0: 6c 69 6e 67 20 74 65 73 74 73 2e 0a 0a 32 30 30  ling tests...200
10f0: 30 2d 30 37 2d 31 31 20 20 4a 65 66 66 20 48 6f  0-07-11  Jeff Ho
1100: 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69  bbs  <hobbs@scri
1110: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74  ptics.com>...* t
1120: 6c 73 49 4f 2e 63 3a 20 63 68 61 6e 67 65 64 20  lsIO.c: changed 
1130: 61 6c 6c 20 74 68 65 20 63 68 61 6e 6e 65 6c 20  all the channel 
1140: 70 72 6f 63 73 20 74 6f 20 73 74 61 72 74 20 77  procs to start w
1150: 69 74 68 20 54 6c 73 2a 20 66 6f 72 0a 09 62 65  ith Tls* for..be
1160: 74 74 65 72 20 70 61 72 69 74 79 20 77 68 65 6e  tter parity when
1170: 20 63 6f 6d 70 61 72 69 6e 67 20 77 69 74 68 20   comparing with 
1180: 54 72 61 6e 73 66 6f 72 6d 20 63 68 61 6e 6e 65  Transform channe
1190: 6c 20 70 72 6f 63 73 2e 0a 09 52 65 77 72 6f 74  l procs...Rewrot
11a0: 65 20 54 6c 73 57 61 74 63 68 50 72 6f 63 2c 20  e TlsWatchProc, 
11b0: 61 64 64 65 64 20 54 6c 73 4e 6f 74 69 66 79 50  added TlsNotifyP
11c0: 72 6f 63 20 61 63 63 6f 72 64 69 6e 67 20 74 6f  roc according to
11d0: 20 74 68 65 20 6e 65 77 0a 09 63 68 61 6e 6e 65   the new..channe
11e0: 6c 20 64 65 73 69 67 6e 2c 20 77 68 69 63 68 20  l design, which 
11f0: 61 6c 73 6f 20 6c 65 61 76 65 73 20 54 6c 73 43  also leaves TlsC
1200: 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 72 20 75 6e  hannelHandler un
1210: 75 73 65 64 2e 0a 0a 09 2a 20 74 6c 73 42 49 4f  used....* tlsBIO
1220: 2e 63 20 28 42 69 6f 43 74 72 6c 29 3a 20 63 68  .c (BioCtrl): ch
1230: 61 6e 67 65 64 20 42 49 4f 5f 43 54 52 4c 5f 46  anged BIO_CTRL_F
1240: 4c 55 53 48 20 63 61 73 65 20 74 6f 20 75 73 65  LUSH case to use
1250: 0a 09 54 63 6c 5f 57 72 69 74 65 52 61 77 20 69  ..Tcl_WriteRaw i
1260: 6e 73 74 65 61 64 20 6f 66 20 54 63 6c 5f 46 6c  nstead of Tcl_Fl
1270: 75 73 68 20 28 74 6f 20 6f 70 65 72 61 74 65 20  ush (to operate 
1280: 6f 6e 20 63 6f 72 72 65 63 74 20 63 68 61 6e 6e  on correct chann
1290: 65 6c 0a 09 69 6e 20 74 68 65 20 73 74 61 63 6b  el..in the stack
12a0: 20 69 6e 73 74 65 61 64 20 6f 66 20 73 74 61 72   instead of star
12b0: 74 69 6e 67 20 61 74 20 74 68 65 20 74 6f 70 20  ting at the top 
12c0: 61 67 61 69 6e 29 2e 20 20 57 6f 75 6c 64 0a 09  again).  Would..
12d0: 6f 74 68 65 72 77 69 73 65 20 63 61 75 73 65 20  otherwise cause 
12e0: 61 20 72 65 63 75 72 73 69 76 65 20 73 74 61 63  a recursive stac
12f0: 6b 20 62 6f 6d 62 20 77 68 65 6e 20 69 6d 70 6c  k bomb when impl
1300: 69 63 69 74 20 68 61 6e 64 73 68 61 6b 69 6e 67  icit handshaking
1310: 0a 09 74 6f 6f 6b 20 65 66 66 65 63 74 2e 0a 0a  ..took effect...
1320: 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74  .* tests/tlsIO.t
1330: 65 73 74 3a 20 72 65 6d 6f 76 65 64 20 63 68 61  est: removed cha
1340: 6e 67 65 73 20 6d 61 64 65 20 74 6f 20 74 65 73  nges made to tes
1350: 74 20 73 75 69 74 65 20 28 61 6c 6c 20 74 65 73  t suite (all tes
1360: 74 73 0a 09 74 68 61 74 20 72 61 6e 20 62 65 66  ts..that ran bef
1370: 6f 72 65 20 6e 6f 77 20 70 61 73 73 20 63 6f 72  ore now pass cor
1380: 72 65 63 74 6c 79 29 2c 20 61 6e 64 20 63 68 61  rectly), and cha
1390: 6e 67 65 64 20 73 6f 6d 65 20 61 63 63 65 70 74  nged some accept
13a0: 20 70 72 6f 63 0a 09 61 72 67 73 20 74 6f 20 72   proc..args to r
13b0: 65 66 6c 65 63 74 20 74 68 61 74 20 61 20 73 6f  eflect that a so
13c0: 63 6b 20 69 73 20 61 6e 20 61 72 67 2c 20 6e 6f  ck is an arg, no
13d0: 74 20 61 20 66 69 6c 65 2e 0a 0a 32 30 30 30 2d  t a file...2000-
13e0: 30 37 2d 31 30 20 20 4a 65 66 66 20 48 6f 62 62  07-10  Jeff Hobb
13f0: 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74  s  <hobbs@script
1400: 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73  ics.com>...* tls
1410: 42 49 4f 2e 63 20 28 42 69 6f 57 72 69 74 65 2c  BIO.c (BioWrite,
1420: 20 42 69 6f 52 65 61 64 29 3a 20 63 68 61 6e 67   BioRead): chang
1430: 65 64 20 54 63 6c 5f 52 65 61 64 2f 57 72 69 74  ed Tcl_Read/Writ
1440: 65 20 74 6f 0a 09 54 63 6c 5f 52 65 61 64 52 61  e to..Tcl_ReadRa
1450: 77 2f 54 63 6c 57 72 69 74 65 52 61 77 2e 0a 0a  w/TclWriteRaw...
1460: 09 2a 20 74 6c 73 2e 63 3a 20 61 64 64 65 64 20  .* tls.c: added 
1470: 75 73 65 20 6f 66 20 54 63 6c 5f 47 65 74 54 6f  use of Tcl_GetTo
1480: 70 43 68 61 6e 6e 65 6c 20 61 66 74 65 72 20 54  pChannel after T
1490: 63 6c 5f 47 65 74 43 68 61 6e 6e 65 6c 20 61 6e  cl_GetChannel an
14a0: 64 0a 09 67 6f 74 20 72 65 74 75 72 6e 20 76 61  d..got return va
14b0: 6c 75 65 20 66 72 6f 6d 20 54 63 6c 5f 53 74 61  lue from Tcl_Sta
14c0: 63 6b 43 68 61 6e 6e 65 6c 2e 0a 0a 09 2a 20 74  ckChannel....* t
14d0: 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a  ests/tlsIO.test:
14e0: 20 61 64 64 65 64 20 73 6f 6d 65 20 68 61 6e 64   added some hand
14f0: 73 68 61 6b 69 6e 67 20 74 68 61 74 20 73 68 6f  shaking that sho
1500: 75 6c 64 6e 27 74 20 62 65 0a 09 6e 65 63 65 73  uldn't be..neces
1510: 73 61 72 79 2c 20 62 75 74 20 77 65 20 63 72 61  sary, but we cra
1520: 73 68 20 6f 74 68 65 72 77 69 73 65 20 28 6e 65  sh otherwise (ne
1530: 65 64 73 20 6d 6f 72 65 20 74 65 73 74 69 6e 67  eds more testing
1540: 29 2e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20  )....* tlsIO.c: 
1550: 61 64 64 65 64 20 73 75 70 70 6f 72 74 20 66 6f  added support fo
1560: 72 20 22 63 6f 72 72 65 63 74 65 64 22 20 73 74  r "corrected" st
1570: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 73 2e 20  acked channels. 
1580: 20 41 6c 6c 0a 09 74 68 65 20 61 62 6f 76 65 20   All..the above 
1590: 63 68 61 6e 6e 65 6c 73 20 61 72 65 20 69 6e 20  channels are in 
15a0: 54 43 4c 5f 43 48 41 4e 4e 45 4c 5f 56 45 52 53  TCL_CHANNEL_VERS
15b0: 49 4f 4e 5f 32 20 23 69 66 64 65 66 73 2e 0a 0a  ION_2 #ifdefs...
15c0: 32 30 30 30 2d 30 36 2d 30 35 20 20 53 63 6f 74  2000-06-05  Scot
15d0: 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73 74 61 6e  t Stanton  <stan
15e0: 74 6f 6e 40 61 6a 75 62 61 73 6f 6c 75 74 69 6f  ton@ajubasolutio
15f0: 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 4d 61 6b 65  ns.com>...* Make
1600: 66 69 6c 65 2e 69 6e 3a 20 46 69 78 65 64 20 62  file.in: Fixed b
1610: 72 6f 6b 65 6e 20 74 65 73 74 20 74 61 72 67 65  roken test targe
1620: 74 2e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a  t....* tlsInt.h:
1630: 20 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 6c 65 61   ..* tls.c: Clea
1640: 6e 65 64 20 75 70 20 64 65 63 6c 61 72 61 74 69  ned up declarati
1650: 6f 6e 73 20 6f 66 20 54 6c 73 5f 43 6c 65 61 6e  ons of Tls_Clean
1660: 20 74 6f 20 61 76 6f 69 64 20 65 72 72 6f 72 73   to avoid errors
1670: 20 6f 6e 0a 09 57 69 6e 64 6f 77 73 20 28 6c 69   on..Windows (li
1680: 6e 74 29 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 35  nt)...2000-06-05
1690: 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20 3c 77    Brent Welch <w
16a0: 65 6c 63 68 40 61 6a 75 62 61 73 6f 6c 75 74 69  elch@ajubasoluti
16b0: 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73  ons.com>...* tls
16c0: 2e 63 2c 20 74 6c 73 49 4f 2e 63 3a 20 20 53 70  .c, tlsIO.c:  Sp
16d0: 6c 69 74 20 54 6c 73 5f 46 72 65 65 20 69 6e 74  lit Tls_Free int
16e0: 6f 20 54 6c 73 5f 43 6c 65 61 6e 2c 20 77 68 69  o Tls_Clean, whi
16f0: 63 68 20 64 6f 65 73 0a 09 74 68 65 20 53 53 4c  ch does..the SSL
1700: 20 63 6c 65 61 6e 75 70 2c 20 61 6e 64 20 74 68   cleanup, and th
1710: 65 20 54 63 6c 5f 46 72 65 65 20 63 61 6c 6c 2e  e Tcl_Free call.
1720: 20 20 49 74 20 69 73 20 69 6d 70 6f 72 74 61 6e    It is importan
1730: 74 20 74 6f 20 73 68 75 74 64 6f 77 6e 0a 09 74  t to shutdown..t
1740: 68 65 20 53 53 4c 20 73 74 61 74 65 20 22 73 79  he SSL state "sy
1750: 6e 63 68 72 6f 6e 6f 75 73 6c 79 22 20 64 75 72  nchronously" dur
1760: 69 6e 67 20 61 20 73 74 61 63 6b 65 64 20 66 6c  ing a stacked fl
1770: 75 73 68 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 31  ush...2000-06-01
1780: 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20    Scott Stanton 
1790: 20 3c 73 74 61 6e 74 6f 6e 40 61 6a 75 62 61 73   <stanton@ajubas
17a0: 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09  olutions.com>...
17b0: 2a 20 74 6c 73 49 4f 2e 63 3a 20 52 65 73 74 6f  * tlsIO.c: Resto
17c0: 72 65 64 20 63 61 6c 6c 20 74 6f 20 54 63 6c 5f  red call to Tcl_
17d0: 4e 6f 74 69 66 79 43 68 61 6e 6e 65 6c 20 66 72  NotifyChannel fr
17e0: 6f 6d 20 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65  om ChannelHandle
17f0: 72 0a 09 74 6f 20 65 6e 73 75 72 65 20 74 68 61  r..to ensure tha
1800: 74 20 65 76 65 6e 74 73 20 70 72 6f 70 61 67 61  t events propaga
1810: 74 65 20 66 72 6f 6d 20 74 68 65 20 6c 6f 77 65  te from the lowe
1820: 72 20 64 72 69 76 65 72 2e 20 20 54 68 69 73 20  r driver.  This 
1830: 6d 61 79 0a 09 72 65 73 75 6c 74 20 69 6e 20 61  may..result in a
1840: 6e 20 69 6e 66 69 6e 69 74 65 20 6c 6f 6f 70 20  n infinite loop 
1850: 69 6e 20 73 6f 6d 65 20 63 61 73 65 73 2c 20 73  in some cases, s
1860: 6f 20 74 68 69 73 20 69 73 20 6e 6f 74 20 61 20  o this is not a 
1870: 74 6f 74 61 6c 0a 09 66 69 78 2e 20 20 54 68 69  total..fix.  Thi
1880: 73 20 6d 61 79 20 62 65 20 73 75 66 66 69 63 69  s may be suffici
1890: 65 6e 74 20 66 6f 72 20 6e 6f 77 2c 20 68 6f 77  ent for now, how
18a0: 65 76 65 72 2e 20 5b 42 75 67 3a 20 35 36 32 33  ever. [Bug: 5623
18b0: 5d 0a 0a 32 30 30 30 2d 30 36 2d 30 31 20 20 53  ]..2000-06-01  S
18c0: 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73  cott Stanton  <s
18d0: 74 61 6e 74 6f 6e 40 73 63 72 69 70 74 69 63 73  tanton@scriptics
18e0: 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e  .com>...* tlsIO.
18f0: 63 3a 20 52 65 73 74 6f 72 65 20 74 68 65 20 70  c: Restore the p
1900: 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 2e  revious version.
1910: 20 20 46 69 78 65 64 20 74 68 65 20 43 6c 6f 73    Fixed the Clos
1920: 65 50 72 6f 63 20 73 6f 0a 09 69 74 20 75 6e 72  eProc so..it unr
1930: 65 67 69 73 74 65 72 73 20 74 68 65 20 63 68 61  egisters the cha
1940: 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 6f 6e 20  nnel handler on 
1950: 74 68 65 20 73 75 70 65 72 63 65 64 65 64 20 63  the superceded c
1960: 68 61 6e 6e 65 6c 0a 09 69 6e 73 74 65 61 64 20  hannel..instead 
1970: 6f 66 20 74 68 65 20 75 70 70 65 72 20 63 68 61  of the upper cha
1980: 6e 6e 65 6c 2e 20 41 6c 73 6f 20 72 65 6d 6f 76  nnel. Also remov
1990: 65 64 20 74 68 65 20 63 61 6c 6c 20 74 6f 0a 09  ed the call to..
19a0: 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65  Tcl_NotifyChanne
19b0: 6c 20 69 6e 20 74 68 65 20 43 68 61 6e 6e 65 6c  l in the Channel
19c0: 48 61 6e 64 6c 65 72 20 62 65 63 61 75 73 65 20  Handler because 
19d0: 74 68 69 73 20 77 69 6c 6c 20 72 65 73 75 6c 74  this will result
19e0: 0a 09 69 6e 20 61 6e 20 69 6e 66 69 6e 69 74 65  ..in an infinite
19f0: 20 6c 6f 6f 70 20 69 66 20 64 61 74 61 20 69 73   loop if data is
1a00: 20 65 76 65 72 20 62 75 66 66 65 72 65 64 20 69   ever buffered i
1a10: 6e 20 74 68 65 20 42 49 4f 0a 09 73 74 72 75 63  n the BIO..struc
1a20: 74 75 72 65 2e 20 5b 42 75 67 3a 20 35 36 32 33  ture. [Bug: 5623
1a30: 5d 0a 0a 32 30 30 30 2d 30 35 2d 33 31 20 20 42  ]..2000-05-31  B
1a40: 72 65 6e 74 20 57 65 6c 63 68 20 3c 77 65 6c 63  rent Welch <welc
1a50: 68 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e  h@scriptics.com>
1a60: 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 68 61 6e  ...* tls.c: Chan
1a70: 67 65 20 74 68 65 20 43 68 61 6e 6e 65 6c 48 61  ge the ChannelHa
1a80: 6e 64 6c 65 72 20 74 6f 20 62 65 20 72 65 67 69  ndler to be regi
1a90: 73 74 65 72 65 64 20 6f 6e 20 74 68 65 20 6d 61  stered on the ma
1aa0: 69 6e 0a 09 63 68 61 6e 6e 65 6c 20 61 73 20 6f  in..channel as o
1ab0: 70 70 73 65 64 20 74 6f 20 74 68 65 20 22 70 61  ppsed to the "pa
1ac0: 72 65 6e 74 22 2c 20 6f 72 20 73 75 70 65 72 63  rent", or superc
1ad0: 65 65 64 65 64 2c 20 63 68 61 6e 6e 65 6c 2e 20  eeded, channel. 
1ae0: 20 54 68 69 73 0a 09 69 73 20 62 65 63 61 75 73   This..is becaus
1af0: 65 20 74 68 65 20 73 6f 63 6b 65 74 20 64 72 69  e the socket dri
1b00: 76 65 72 20 6e 6f 74 69 66 69 65 73 20 74 68 65  ver notifies the
1b10: 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 2c 20 61   main channel, a
1b20: 6e 64 20 74 68 65 72 65 0a 09 61 72 65 20 74 69  nd there..are ti
1b30: 6d 65 73 20 77 69 74 68 20 74 68 65 20 6d 61 69  mes with the mai
1b40: 6e 20 63 68 61 6e 6e 65 6c 20 67 65 74 73 20 63  n channel gets c
1b50: 6c 6f 73 65 64 2c 20 62 75 74 20 74 68 65 20 73  losed, but the s
1b60: 75 70 65 72 63 65 64 65 64 0a 09 6f 6e 65 20 69  uperceded..one i
1b70: 73 20 6e 6f 74 20 79 65 74 20 63 6c 6f 73 65 64  s not yet closed
1b80: 2e 20 20 49 66 20 74 68 65 20 63 68 61 6e 6e 65  .  If the channe
1b90: 6c 20 68 61 6e 64 6c 65 72 20 67 65 74 73 20 74  l handler gets t
1ba0: 72 69 67 67 65 72 65 64 20 69 6e 0a 09 74 68 69  riggered in..thi
1bb0: 73 20 68 61 6c 66 2d 6f 70 65 6e 20 73 74 61 74  s half-open stat
1bc0: 65 20 69 74 20 69 73 20 61 73 73 6f 63 69 61 74  e it is associat
1bd0: 65 64 20 77 69 74 68 20 74 68 65 20 73 75 70 65  ed with the supe
1be0: 72 63 65 65 64 65 64 0a 09 63 68 61 6e 6e 65 64  rceeded..channed
1bf0: 6c 2c 20 62 75 74 20 75 73 65 73 20 69 74 73 20  l, but uses its 
1c00: 70 72 69 76 61 74 65 20 70 6f 69 6e 74 65 72 20  private pointer 
1c10: 74 6f 20 74 68 65 20 6d 61 69 6e 20 63 68 61 6e  to the main chan
1c20: 6e 65 6c 2c 20 77 68 69 63 68 0a 09 69 73 20 6d  nel, which..is m
1c30: 6f 73 74 6c 79 20 64 65 73 74 72 6f 79 65 64 2e  ostly destroyed.
1c40: 20 20 45 6c 69 6d 69 6e 61 74 65 64 20 74 68 65    Eliminated the
1c50: 20 72 65 64 75 6e 64 61 6e 74 20 63 61 6c 6c 20   redundant call 
1c60: 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43 68  to..Tcl_NotifyCh
1c70: 61 6e 6e 65 6c 20 66 72 6f 6d 20 54 6c 73 57 61  annel from TlsWa
1c80: 74 63 68 50 72 6f 63 2e 20 5b 42 75 67 3a 20 35  tchProc. [Bug: 5
1c90: 36 32 33 5d 0a                                   623].