Hex Artifact Content

Artifact b74181207e950dfe0751e5cb1fb4a22059d57943:


0000: 32 30 30 33 2d 31 32 2d 31 35 20 20 44 61 6e 20  2003-12-15  Dan 
0010: 52 61 7a 7a 65 6c 6c 09 3c 72 65 73 65 61 72 63  Razzell.<researc
0020: 68 40 73 74 61 72 66 69 73 68 73 79 73 74 65 6d  h@starfishsystem
0030: 73 2e 63 61 3e 0a 0a 09 2a 20 70 6b 67 49 6e 64  s.ca>...* pkgInd
0040: 65 78 2e 74 63 6c 2e 69 6e 3a 0a 09 2a 20 74 6c  ex.tcl.in:..* tl
0050: 73 2e 68 74 6d 3a 0a 09 2a 20 74 65 73 74 73 2f  s.htm:..* tests/
0060: 74 6c 73 49 4f 2e 74 65 73 74 3a 20 75 70 64 61  tlsIO.test: upda
0070: 74 65 64 20 76 65 72 73 69 6f 6e 20 74 6f 20 31  ted version to 1
0080: 2e 35 2e 0a 0a 32 30 30 33 2d 31 30 2d 30 37 20  .5...2003-10-07 
0090: 20 44 61 6e 20 52 61 7a 7a 65 6c 6c 09 3c 72 65   Dan Razzell.<re
00a0: 73 65 61 72 63 68 40 73 74 61 72 66 69 73 68 73  search@starfishs
00b0: 79 73 74 65 6d 73 2e 63 61 3e 0a 0a 09 2a 20 74  ystems.ca>...* t
00c0: 65 73 74 73 2f 63 69 70 68 65 72 73 2e 74 65 73  ests/ciphers.tes
00d0: 74 3a 20 75 70 64 61 74 65 64 20 6c 69 73 74 20  t: updated list 
00e0: 6f 66 20 74 65 73 74 65 64 20 63 69 70 68 65 72  of tested cipher
00f0: 73 20 74 6f 20 63 6f 72 72 65 73 70 6f 6e 64 0a  s to correspond.
0100: 09 2a 20 77 69 74 68 20 74 68 6f 73 65 20 61 76  .* with those av
0110: 61 69 6c 61 62 6c 65 20 66 72 6f 6d 20 4f 70 65  ailable from Ope
0120: 6e 53 53 4c 2e 20 5b 52 65 71 75 65 73 74 20 23  nSSL. [Request #
0130: 38 31 31 39 38 31 5d 0a 0a 32 30 30 33 2d 31 30  811981]..2003-10
0140: 2d 30 37 20 20 44 61 6e 20 52 61 7a 7a 65 6c 6c  -07  Dan Razzell
0150: 20 3c 72 65 73 65 61 72 63 68 40 73 74 61 72 66   <research@starf
0160: 69 73 68 73 79 73 74 65 6d 73 2e 63 61 3e 0a 0a  ishsystems.ca>..
0170: 09 2a 20 74 6c 73 2e 63 3a 20 61 64 64 65 64 20  .* tls.c: added 
0180: 43 4f 4e 53 54 20 77 69 74 68 20 69 6e 74 65 6e  CONST with inten
0190: 74 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 6f  t similar to tho
01a0: 73 65 20 66 72 6f 6d 20 32 30 30 32 2d 30 32 2d  se from 2002-02-
01b0: 30 34 2e 0a 09 5b 52 65 71 75 65 73 74 20 23 38  04...[Request #8
01c0: 31 31 39 31 31 5d 0a 0a 32 30 30 33 2d 30 37 2d  11911]..2003-07-
01d0: 30 37 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20  07  Jeff Hobbs  
01e0: 3c 6a 65 66 66 68 40 41 63 74 69 76 65 53 74 61  <jeffh@ActiveSta
01f0: 74 65 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 2e  te.com>...* tls.
0200: 63 20 28 54 6c 73 5f 49 6e 69 74 29 3a 20 20 20  c (Tls_Init):   
0210: 61 64 64 65 64 20 74 6c 73 3a 3a 6d 69 73 63 20  added tls::misc 
0220: 63 6f 6d 6d 61 6e 64 20 70 72 6f 76 69 64 65 64  command provided
0230: 20 62 79 0a 09 2a 20 74 6c 73 58 35 30 39 2e 63   by..* tlsX509.c
0240: 3a 20 20 20 20 20 20 20 20 20 20 57 6f 6a 63 69  :          Wojci
0250: 65 63 68 20 4b 6f 63 6a 61 6e 20 28 77 6f 6a 63  ech Kocjan (wojc
0260: 69 65 63 68 20 6b 6f 63 6a 61 6e 2e 6f 72 67 29  iech kocjan.org)
0270: 0a 09 2a 20 74 65 73 74 73 2f 6b 65 79 74 65 73  ..* tests/keytes
0280: 74 31 2e 74 63 6c 3a 20 74 6f 20 65 78 70 6f 73  t1.tcl: to expos
0290: 65 20 6d 6f 72 65 20 6c 6f 77 2d 6c 65 76 65 6c  e more low-level
02a0: 20 53 53 4c 20 63 6f 6d 6d 61 6e 64 73 0a 09 2a   SSL commands..*
02b0: 20 74 65 73 74 73 2f 6b 65 79 74 65 73 74 32 2e   tests/keytest2.
02c0: 74 63 6c 3a 0a 0a 32 30 30 33 2d 30 35 2d 31 35  tcl:..2003-05-15
02d0: 20 20 44 61 6e 20 52 61 7a 7a 65 6c 6c 09 3c 72    Dan Razzell.<r
02e0: 65 73 65 61 72 63 68 40 73 74 61 72 66 69 73 68  esearch@starfish
02f0: 73 79 73 74 65 6d 73 2e 63 61 3e 20 0a 0a 09 2a  systems.ca> ...*
0300: 20 74 6c 73 2e 74 63 6c 3a 0a 09 2a 20 74 6c 73   tls.tcl:..* tls
0310: 49 6e 74 2e 68 3a 0a 09 2a 20 74 6c 73 2e 63 3a  Int.h:..* tls.c:
0320: 20 61 64 64 20 73 75 70 70 6f 72 74 20 66 6f 72   add support for
0330: 20 62 69 6e 64 69 6e 67 20 61 20 70 61 73 73 77   binding a passw
0340: 6f 72 64 20 63 61 6c 6c 62 61 63 6b 20 74 6f 20  ord callback to 
0350: 74 68 65 20 73 6f 63 6b 65 74 2e 0a 09 4e 6f 77  the socket...Now
0360: 20 65 61 63 68 20 73 6f 63 6b 65 74 20 63 61 6e   each socket can
0370: 20 68 61 76 65 20 69 74 73 20 6f 77 6e 20 63 6f   have its own co
0380: 6d 6d 61 6e 64 20 61 6e 64 20 70 61 73 73 77 6f  mmand and passwo
0390: 72 64 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e 73  rd callbacks ins
03a0: 74 65 61 64 0a 09 6f 66 20 62 65 69 6e 67 20 66  tead..of being f
03b0: 6f 72 63 65 64 20 74 6f 20 68 61 76 65 20 61 6c  orced to have al
03c0: 6c 20 70 61 73 73 77 6f 72 64 20 6d 61 6e 61 67  l password manag
03d0: 65 6d 65 6e 74 20 70 61 73 73 20 74 68 72 6f 75  ement pass throu
03e0: 67 68 20 61 20 63 6f 6d 6d 6f 6e 0a 09 70 72 6f  gh a common..pro
03f0: 63 65 64 75 72 65 2e 20 20 54 68 65 20 63 6f 6d  cedure.  The com
0400: 6d 6f 6e 20 70 61 73 73 77 6f 72 64 20 70 72 6f  mon password pro
0410: 63 65 64 75 72 65 20 69 73 20 72 65 74 61 69 6e  cedure is retain
0420: 65 64 20 66 6f 72 20 63 6f 6d 70 61 74 69 62 69  ed for compatibi
0430: 6c 69 74 79 0a 09 62 75 74 20 69 74 73 20 75 73  lity..but its us
0440: 65 20 73 68 6f 75 6c 64 20 62 65 20 44 45 50 52  e should be DEPR
0450: 45 43 41 54 45 44 2e 0a 09 41 64 64 20 76 65 72  ECATED...Add ver
0460: 73 69 6f 6e 20 63 6f 6d 6d 61 6e 64 20 74 6f 20  sion command to 
0470: 72 65 74 75 72 6e 20 4f 70 65 6e 53 53 4c 20 76  return OpenSSL v
0480: 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 0a 09  ersion string...
0490: 52 65 6d 6f 76 65 20 75 6e 73 74 61 62 6c 65 20  Remove unstable 
04a0: 77 6f 72 6b 61 72 6f 75 6e 64 73 20 6e 65 65 64  workarounds need
04b0: 65 64 20 66 6f 72 20 76 65 72 69 66 79 20 69 6e  ed for verify in
04c0: 20 6f 62 73 6f 6c 65 74 65 20 76 65 72 73 69 6f   obsolete versio
04d0: 6e 73 20 6f 66 0a 09 4f 70 65 6e 53 53 4c 2e 0a  ns of..OpenSSL..
04e0: 09 46 69 78 20 6d 65 6d 6f 72 79 20 6c 65 61 6b  .Fix memory leak
04f0: 2e 20 5b 52 65 71 75 65 73 74 20 23 36 34 30 36  . [Request #6406
0500: 36 30 5d 0a 09 4d 6f 72 65 20 63 61 73 74 73 20  60]..More casts 
0510: 74 6f 20 65 6c 69 6d 69 6e 61 74 65 20 63 6f 6d  to eliminate com
0520: 70 69 6c 65 72 20 77 61 72 6e 69 6e 67 73 2e 0a  piler warnings..
0530: 0a 09 2a 20 74 6c 73 2e 68 74 6d 3a 20 64 6f 63  ..* tls.htm: doc
0540: 75 6d 65 6e 74 20 70 61 73 73 77 6f 72 64 20 63  ument password c
0550: 61 6c 6c 62 61 63 6b 2e 0a 09 43 6f 72 72 65 63  allback...Correc
0560: 74 20 74 65 63 68 6e 69 63 61 6c 20 61 6e 64 20  t technical and 
0570: 74 79 70 6f 67 72 61 70 68 69 63 20 65 72 72 6f  typographic erro
0580: 72 73 2e 0a 0a 09 2a 20 52 45 41 44 4d 45 2e 74  rs....* README.t
0590: 78 74 3a 20 69 64 65 6e 74 69 66 79 20 76 65 72  xt: identify ver
05a0: 73 69 6f 6e 73 20 6f 66 20 4f 70 65 6e 53 53 4c  sions of OpenSSL
05b0: 20 77 68 69 63 68 20 66 69 78 20 6b 6e 6f 77 6e   which fix known
05c0: 20 70 72 6f 62 6c 65 6d 73 2e 0a 09 47 65 6e 65   problems...Gene
05d0: 72 61 6c 20 77 61 72 6e 69 6e 67 20 6f 66 20 73  ral warning of s
05e0: 65 63 75 72 69 74 79 20 70 72 6f 62 6c 65 6d 73  ecurity problems
05f0: 20 69 6e 20 6f 6c 64 65 72 20 76 65 72 73 69 6f   in older versio
0600: 6e 73 20 6f 66 20 4f 70 65 6e 53 53 4c 2e 0a 0a  ns of OpenSSL...
0610: 32 30 30 32 2d 30 32 2d 30 34 20 20 4a 65 66 66  2002-02-04  Jeff
0620: 20 48 6f 62 62 73 20 20 3c 6a 65 66 66 68 40 41   Hobbs  <jeffh@A
0630: 63 74 69 76 65 53 74 61 74 65 2e 63 6f 6d 3e 0a  ctiveState.com>.
0640: 0a 09 2a 20 74 6c 73 2e 68 74 6d 3a 0a 09 2a 20  ..* tls.htm:..* 
0650: 74 6c 73 2e 63 3a 20 61 64 64 65 64 20 73 75 70  tls.c: added sup
0660: 70 6f 72 74 20 66 6f 72 20 6c 6f 63 61 6c 20 63  port for local c
0670: 65 72 74 69 66 69 63 61 74 65 20 73 74 61 74 75  ertificate statu
0680: 73 20 63 68 65 63 6b 2c 20 61 73 20 77 65 6c 6c  s check, as well
0690: 0a 09 61 73 20 72 65 74 75 72 6e 69 6e 67 20 74  ..as returning t
06a0: 68 65 20 23 20 6f 66 20 62 69 74 73 20 69 6e 20  he # of bits in 
06b0: 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e  the session key.
06c0: 20 5b 50 61 74 63 68 20 23 35 30 35 36 39 38 5d   [Patch #505698]
06d0: 20 28 72 6f 73 65 29 0a 0a 09 2a 20 74 6c 73 2e   (rose)...* tls.
06e0: 63 3a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 0a 09  c:..* tlsIO.c:..
06f0: 2a 20 74 6c 73 42 49 4f 2e 63 3a 20 61 64 64 65  * tlsBIO.c: adde
0700: 64 20 43 4f 4e 53 54 73 20 74 6f 20 73 61 74 69  d CONSTs to sati
0710: 73 66 79 20 54 63 6c 20 38 2e 34 20 73 6f 75 72  sfy Tcl 8.4 sour
0720: 63 65 73 2e 20 20 54 68 69 73 20 6d 61 79 0a 09  ces.  This may..
0730: 67 69 76 65 20 77 61 72 6e 69 6e 67 73 20 77 68  give warnings wh
0740: 65 6e 20 63 6f 6d 70 69 6c 65 64 20 61 67 61 69  en compiled agai
0750: 6e 73 74 20 38 2e 33 2c 20 62 75 74 20 74 68 65  nst 8.3, but the
0760: 79 20 63 61 6e 20 62 65 20 69 67 6e 6f 72 65 64  y can be ignored
0770: 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 73 69 6d 70  ....* tests/simp
0780: 6c 65 43 6c 69 65 6e 74 2e 74 63 6c 3a 0a 09 2a  leClient.tcl:..*
0790: 20 74 65 73 74 73 2f 73 69 6d 70 6c 65 53 65 72   tests/simpleSer
07a0: 76 65 72 2e 74 63 6c 3a 20 70 6f 69 6e 74 20 74  ver.tcl: point t
07b0: 6f 20 75 70 64 61 74 65 64 20 63 6c 69 65 6e 74  o updated client
07c0: 2f 73 65 72 76 65 72 20 6b 65 79 20 66 69 6c 65  /server key file
07d0: 73 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73  s....* tests/tls
07e0: 49 4f 2e 74 65 73 74 3a 0a 09 2a 20 74 65 73 74  IO.test:..* test
07f0: 73 2f 63 69 70 68 65 72 73 2e 74 65 73 74 3a 20  s/ciphers.test: 
0800: 75 70 64 61 74 65 64 20 74 6f 20 6c 6f 61 64 20  updated to load 
0810: 74 6c 73 20 66 72 6f 6d 20 62 75 69 6c 64 20 64  tls from build d
0820: 69 72 2e 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65  ir....* Makefile
0830: 2e 69 6e 3a 20 72 65 6d 6f 76 65 64 20 73 74 72  .in: removed str
0840: 6e 63 61 73 65 63 6d 70 20 66 72 6f 6d 20 64 65  ncasecmp from de
0850: 66 61 75 6c 74 20 6f 62 6a 65 63 74 20 73 65 74  fault object set
0860: 2e 20 20 54 68 69 73 0a 09 69 73 20 6f 6e 6c 79  .  This..is only
0870: 20 6e 65 65 64 65 64 20 6f 6e 20 74 68 65 20 4d   needed on the M
0880: 61 63 2c 20 61 6e 64 20 54 63 6c 20 73 74 75 62  ac, and Tcl stub
0890: 73 20 70 72 6f 76 69 64 65 73 20 69 74 2e 0a 0a  s provides it...
08a0: 09 2a 20 63 6f 6e 66 69 67 75 72 65 3a 20 72 65  .* configure: re
08b0: 67 65 6e 27 65 64 2e 0a 09 2a 20 63 6f 6e 66 69  gen'ed...* confi
08c0: 67 75 72 65 2e 69 6e 3a 20 75 70 64 61 74 65 64  gure.in: updated
08d0: 20 74 6f 20 31 2e 35 2e 30 20 66 6f 72 20 6e 65   to 1.5.0 for ne
08e0: 78 74 20 72 65 6c 65 61 73 65 2e 0a 09 43 68 61  xt release...Cha
08f0: 6e 67 65 64 20 64 65 66 61 75 6c 74 20 6f 70 65  nged default ope
0900: 6e 73 73 6c 20 6c 6f 63 61 74 69 6f 6e 20 74 6f  nssl location to
0910: 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 73 73 6c 20   /usr/local/ssl 
0920: 28 74 68 69 73 20 69 73 20 77 68 65 72 65 0a 09  (this is where..
0930: 6f 70 65 6e 73 73 6c 20 30 2e 39 2e 36 63 20 69  openssl 0.9.6c i
0940: 6e 73 74 61 6c 6c 73 20 62 79 20 64 65 66 61 75  nstalls by defau
0950: 6c 74 29 2e 0a 09 43 68 61 6e 67 65 64 20 74 6f  lt)...Changed to
0960: 20 75 73 65 20 70 75 62 6c 69 63 20 54 63 6c 20   use public Tcl 
0970: 68 65 61 64 65 72 73 20 28 70 72 69 76 61 74 65  headers (private
0980: 20 6e 6f 74 20 6e 65 65 64 65 64 29 2e 0a 0a 32   not needed)...2
0990: 30 30 31 2d 30 36 2d 32 31 20 20 4a 65 66 66 20  001-06-21  Jeff 
09a0: 48 6f 62 62 73 20 20 3c 6a 65 66 66 68 40 41 63  Hobbs  <jeffh@Ac
09b0: 74 69 76 65 53 74 61 74 65 2e 63 6f 6d 3e 0a 0a  tiveState.com>..
09c0: 09 54 4c 53 20 31 2e 34 2e 31 20 52 45 4c 45 41  .TLS 1.4.1 RELEA
09d0: 53 45 0a 0a 09 2a 20 63 6f 6e 66 69 67 75 72 65  SE...* configure
09e0: 3a 20 61 64 64 65 64 20 63 6f 6e 66 69 67 75 72  : added configur
09f0: 65 20 74 6f 20 43 56 53 0a 09 2a 20 63 6f 6e 66  e to CVS..* conf
0a00: 69 67 75 72 65 2e 69 6e 3a 20 6d 6f 76 65 64 20  igure.in: moved 
0a10: 74 6f 20 70 61 74 63 68 6c 65 76 65 6c 20 31 2e  to patchlevel 1.
0a20: 34 2e 31 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65  4.1...* Makefile
0a30: 2e 69 6e 3a 20 63 6f 72 72 65 63 74 65 64 20 27  .in: corrected '
0a40: 64 69 73 74 27 20 74 61 72 67 65 74 0a 0a 09 2a  dist' target...*
0a50: 20 74 65 73 74 73 2f 63 65 72 74 73 2f 66 69 6c   tests/certs/fil
0a60: 65 2e 73 72 6c 3a 0a 09 2a 20 74 65 73 74 73 2f  e.srl:..* tests/
0a70: 63 65 72 74 73 2f 63 61 2e 70 65 6d 3a 0a 09 2a  certs/ca.pem:..*
0a80: 20 74 65 73 74 73 2f 63 65 72 74 73 2f 63 6c 69   tests/certs/cli
0a90: 65 6e 74 2e 6b 65 79 3a 0a 09 2a 20 74 65 73 74  ent.key:..* test
0aa0: 73 2f 63 65 72 74 73 2f 63 6c 69 65 6e 74 2e 70  s/certs/client.p
0ab0: 65 6d 3a 0a 09 2a 20 74 65 73 74 73 2f 63 65 72  em:..* tests/cer
0ac0: 74 73 2f 63 6c 69 65 6e 74 2e 72 65 71 3a 0a 09  ts/client.req:..
0ad0: 2a 20 74 65 73 74 73 2f 63 65 72 74 73 2f 70 72  * tests/certs/pr
0ae0: 69 76 6b 65 79 2e 70 65 6d 3a 0a 09 2a 20 74 65  ivkey.pem:..* te
0af0: 73 74 73 2f 63 65 72 74 73 2f 73 65 72 76 65 72  sts/certs/server
0b00: 2e 6b 65 79 3a 0a 09 2a 20 74 65 73 74 73 2f 63  .key:..* tests/c
0b10: 65 72 74 73 2f 73 65 72 76 65 72 2e 70 65 6d 3a  erts/server.pem:
0b20: 0a 09 2a 20 74 65 73 74 73 2f 63 65 72 74 73 2f  ..* tests/certs/
0b30: 73 65 72 76 65 72 2e 72 65 71 3a 0a 09 2a 20 74  server.req:..* t
0b40: 65 73 74 73 2f 63 65 72 74 73 2f 63 61 63 65 72  ests/certs/cacer
0b50: 74 2e 70 65 6d 3a 20 72 65 70 6c 61 63 65 64 20  t.pem: replaced 
0b60: 62 79 20 6e 65 77 20 63 61 2e 70 65 6d 0a 09 2a  by new ca.pem..*
0b70: 20 74 65 73 74 73 2f 63 65 72 74 73 2f 73 6b 65   tests/certs/ske
0b80: 79 2e 70 65 6d 3a 20 72 65 70 6c 61 63 65 64 20  y.pem: replaced 
0b90: 62 79 20 6e 65 77 20 73 65 72 76 65 72 2e 6b 65  by new server.ke
0ba0: 79 0a 09 2a 20 74 65 73 74 73 2f 63 65 72 74 73  y..* tests/certs
0bb0: 2f 63 6b 65 79 2e 70 65 6d 3a 20 72 65 70 6c 61  /ckey.pem: repla
0bc0: 63 65 64 20 62 79 20 6e 65 77 20 63 6c 69 65 6e  ced by new clien
0bd0: 74 2e 6b 65 79 0a 09 2a 20 74 65 73 74 73 2f 63  t.key..* tests/c
0be0: 65 72 74 73 2f 52 45 41 44 4d 45 2e 74 78 74 3a  erts/README.txt:
0bf0: 20 6e 65 77 20 73 65 74 20 6f 66 20 74 65 73 74   new set of test
0c00: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 77 69   certificates wi
0c10: 74 68 20 73 6f 6d 65 0a 09 52 45 41 44 4d 45 20  th some..README 
0c20: 69 6e 66 6f 20 6f 6e 20 74 68 65 69 72 20 67 65  info on their ge
0c30: 6e 65 72 61 74 69 6f 6e 2e 0a 0a 09 2a 20 74 65  neration....* te
0c40: 73 74 73 2f 63 69 70 68 65 72 73 2e 74 65 73 74  sts/ciphers.test
0c50: 3a 20 75 70 64 61 74 65 64 20 63 69 70 68 65 72  : updated cipher
0c60: 73 20 65 78 70 65 63 74 65 64 20 77 69 74 68 20  s expected with 
0c70: 64 65 66 61 75 6c 74 0a 09 6f 70 65 6e 73 73 6c  default..openssl
0c80: 20 62 75 69 6c 64 2e 0a 0a 09 2a 20 74 65 73 74   build....* test
0c90: 73 2f 74 63 6c 49 4f 2e 74 65 73 74 3a 20 75 70  s/tclIO.test: up
0ca0: 64 61 74 65 64 20 74 6f 20 75 73 65 20 6e 65 77  dated to use new
0cb0: 20 6e 61 6d 65 73 20 66 6f 72 20 63 65 72 74 73   names for certs
0cc0: 2f 6b 65 79 73 2e 0a 0a 32 30 30 31 2d 30 33 2d  /keys...2001-03-
0cd0: 31 34 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20  14  Jeff Hobbs  
0ce0: 3c 6a 65 66 66 68 40 67 69 6d 6c 65 74 2e 61 63  <jeffh@gimlet.ac
0cf0: 74 69 76 65 73 74 61 74 65 2e 63 6f 6d 3e 0a 0a  tivestate.com>..
0d00: 09 2a 20 74 6c 73 2e 63 20 28 54 6c 73 5f 49 6e  .* tls.c (Tls_In
0d10: 69 74 29 3a 20 61 64 64 20 64 6f 2f 77 68 69 6c  it): add do/whil
0d20: 65 20 66 6f 72 20 72 61 6e 64 6f 6d 20 6e 75 6d  e for random num
0d30: 62 65 72 20 69 6e 69 74 69 61 6c 69 7a 61 74 69  ber initializati
0d40: 6f 6e 0a 09 74 6f 20 77 6f 72 6b 20 61 72 6f 75  on..to work arou
0d50: 6e 64 20 73 6f 6d 65 20 4f 53 65 73 20 71 75 69  nd some OSes qui
0d60: 72 6b 73 2e 20 20 28 52 61 6c 70 68 2e 42 69 6c  rks.  (Ralph.Bil
0d70: 6c 65 73 40 74 65 6c 74 65 63 68 2e 63 6f 6d 2e  les@teltech.com.
0d80: 61 75 29 0a 0a 32 30 30 30 2d 30 39 2d 30 37 20  au)..2000-09-07 
0d90: 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f   Jeff Hobbs  <ho
0da0: 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f  bbs@scriptics.co
0db0: 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 20 28  m>...* tlsIO.c (
0dc0: 54 6c 73 5f 43 68 61 6e 6e 65 6c 54 79 70 65 29  Tls_ChannelType)
0dd0: 3a 20 73 65 74 20 74 79 70 65 4e 61 6d 65 20 66  : set typeName f
0de0: 69 65 6c 64 20 6f 66 20 63 68 61 6e 6e 65 6c 20  ield of channel 
0df0: 74 79 70 65 20 74 6f 0a 09 22 74 6c 73 22 20 28  type to.."tls" (
0e00: 74 68 69 73 20 67 6f 74 20 6c 6f 73 74 20 69 6e  this got lost in
0e10: 20 6d 6f 76 65 20 74 6f 20 64 79 6e 61 6d 69 63   move to dynamic
0e20: 20 76 65 72 73 69 6f 6e 20 63 6f 6d 70 61 74 61   version compata
0e30: 62 69 6c 69 74 79 0a 09 63 68 65 63 6b 69 6e 67  bility..checking
0e40: 29 2e 0a 0a 32 30 30 30 2d 30 38 2d 32 33 20 20  )...2000-08-23  
0e50: 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62  Jeff Hobbs  <hob
0e60: 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d  bs@scriptics.com
0e70: 3e 0a 0a 09 54 4c 53 20 31 2e 34 20 52 45 4c 45  >...TLS 1.4 RELE
0e80: 41 53 45 44 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c  ASED...* Makefil
0e90: 65 2e 69 6e 20 28 64 69 73 74 29 3a 20 63 72 65  e.in (dist): cre
0ea0: 61 74 65 20 64 69 73 74 20 74 61 72 67 65 74 20  ate dist target 
0eb0: 66 6f 72 20 61 72 63 68 69 76 65 20 64 69 73 74  for archive dist
0ec0: 72 69 62 75 74 69 6f 6e 73 0a 0a 09 2a 20 74 65  ributions...* te
0ed0: 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 20 28  sts/tlsIO.test (
0ee0: 74 6c 73 49 4f 2d 38 2e 31 29 3a 20 61 64 64 65  tlsIO-8.1): adde
0ef0: 64 20 61 20 64 65 6c 61 79 20 6f 6e 20 74 68 65  d a delay on the
0f00: 20 61 63 63 65 70 74 20 63 6c 6f 73 65 0a 09 74   accept close..t
0f10: 6f 20 6d 61 6b 65 20 74 68 65 20 74 65 73 74 20  o make the test 
0f20: 77 6f 72 6b 20 77 69 74 68 20 4f 70 65 6e 53 53  work with OpenSS
0f30: 4c 20 6f 6e 20 57 69 6e 64 6f 77 73 20 28 64 6f  L on Windows (do
0f40: 65 73 6e 27 74 20 61 66 66 65 63 74 0a 09 6f 74  esn't affect..ot
0f50: 68 65 72 20 62 75 69 6c 64 73 29 2e 0a 0a 09 2a  her builds)....*
0f60: 20 74 6c 73 2e 68 74 6d 3a 20 75 70 64 61 74 65   tls.htm: update
0f70: 64 20 77 69 74 68 20 6e 6f 74 65 73 20 66 6f 72  d with notes for
0f80: 20 31 2e 34 2e 0a 0a 32 30 30 30 2d 30 38 2d 32   1.4...2000-08-2
0f90: 31 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c  1  Jeff Hobbs  <
0fa0: 68 6f 62 62 73 40 73 63 72 69 70 74 69 63 73 2e  hobbs@scriptics.
0fb0: 63 6f 6d 3e 0a 0a 09 2a 20 74 65 73 74 73 2f 74  com>...* tests/t
0fc0: 6c 73 49 4f 2e 74 65 73 74 3a 20 72 65 71 75 69  lsIO.test: requi
0fd0: 72 65 20 61 74 20 6c 65 61 73 74 20 74 6c 73 31  re at least tls1
0fe0: 2e 34 20 69 6e 20 74 65 73 74 20 73 75 69 74 65  .4 in test suite
0ff0: 2e 0a 0a 32 30 30 30 2d 30 38 2d 31 38 20 20 4a  ...2000-08-18  J
1000: 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62  eff Hobbs  <hobb
1010: 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e  s@scriptics.com>
1020: 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 54 6c 73 5f  ...* tls.c (Tls_
1030: 49 6e 69 74 29 3a 20 61 64 64 65 64 20 63 61 6c  Init): added cal
1040: 6c 20 74 6f 20 52 41 4e 44 5f 73 65 65 64 20 74  l to RAND_seed t
1050: 6f 20 73 65 65 64 20 74 68 65 20 53 53 4c 20 72  o seed the SSL r
1060: 61 6e 64 6f 6d 0a 09 6e 75 6d 62 65 72 20 67 65  andom..number ge
1070: 6e 65 72 61 74 6f 72 2e 20 20 57 69 74 68 6f 75  nerator.  Withou
1080: 74 20 74 68 69 73 2c 20 4f 70 65 6e 53 53 4c 20  t this, OpenSSL 
1090: 30 2e 39 2e 35 20 63 68 6f 6b 65 73 2c 20 61 6e  0.9.5 chokes, an
10a0: 64 20 69 6e 20 61 6e 79 0a 09 63 61 73 65 20 69  d in any..case i
10b0: 74 20 69 73 20 61 20 62 69 67 20 73 65 63 75 72  t is a big secur
10c0: 69 74 79 20 68 6f 6c 65 20 74 6f 20 64 6f 20 77  ity hole to do w
10d0: 69 74 68 6f 75 74 20 69 74 2e 0a 0a 09 2a 20 63  ithout it....* c
10e0: 6f 6e 66 69 67 75 72 65 2e 69 6e 20 28 4f 50 45  onfigure.in (OPE
10f0: 4e 53 53 4c 29 3a 20 61 64 64 65 64 20 4e 4f 5f  NSSL): added NO_
1100: 49 44 45 41 20 61 6e 64 20 4e 4f 5f 52 43 35 20  IDEA and NO_RC5 
1110: 64 65 66 69 6e 65 73 20 62 79 0a 09 64 65 66 61  defines by..defa
1120: 75 6c 74 20 77 68 65 6e 20 63 6f 6d 70 69 6c 69  ult when compili
1130: 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e  ng with OpenSSL.
1140: 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a 20 61  ...* tlsInt.h: a
1150: 64 64 65 64 20 65 72 72 2e 68 20 69 6e 63 6c 75  dded err.h inclu
1160: 64 65 0a 0a 09 2a 20 74 6c 73 42 49 4f 2e 63 3a  de...* tlsBIO.c:
1170: 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 63 6f 72  ..* tlsIO.c: cor
1180: 72 65 63 74 65 64 20 70 65 64 61 6e 74 69 63 20  rected pedantic 
1190: 63 61 73 74 20 65 72 72 6f 72 73 2e 0a 0a 32 30  cast errors...20
11a0: 30 30 2d 30 38 2d 31 36 20 20 4a 65 66 66 20 48  00-08-16  Jeff H
11b0: 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72  obbs  <hobbs@scr
11c0: 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20  iptics.com>...* 
11d0: 74 65 73 74 73 2f 63 69 70 68 65 72 73 2e 74 65  tests/ciphers.te
11e0: 73 74 3a 20 69 6d 70 72 6f 76 65 64 20 61 62 69  st: improved abi
11f0: 6c 69 74 79 20 74 6f 20 63 68 61 6e 67 65 20 63  lity to change c
1200: 6f 6e 73 74 72 61 69 6e 74 0a 09 73 65 74 74 69  onstraint..setti
1210: 6e 67 20 66 6f 72 20 77 68 65 74 68 65 72 20 75  ng for whether u
1220: 73 65 72 20 63 6f 6d 70 69 6c 65 64 20 61 67 61  ser compiled aga
1230: 69 6e 73 74 20 52 53 41 20 6f 72 20 4f 70 65 6e  inst RSA or Open
1240: 53 53 4c 20 6c 69 62 73 2e 0a 0a 09 2a 20 74 6c  SSL libs....* tl
1250: 73 2e 63 20 28 54 6c 73 5f 49 6e 69 74 29 3a 20  s.c (Tls_Init): 
1260: 63 6f 72 72 65 63 74 65 64 20 69 6e 74 65 72 70  corrected interp
1270: 72 65 74 61 74 69 6f 6e 20 6f 66 20 76 65 72 73  retation of vers
1280: 69 6f 6e 20 6e 75 6d 62 65 72 0a 09 28 70 61 74  ion number..(pat
1290: 63 68 6c 65 76 65 6c 20 61 6e 64 20 72 65 6c 65  chlevel and rele
12a0: 61 73 65 2f 73 65 72 69 61 6c 20 77 65 72 65 20  ase/serial were 
12b0: 73 77 61 70 70 65 64 29 2e 0a 0a 32 30 30 30 2d  swapped)...2000-
12c0: 30 38 2d 31 35 20 20 4a 65 66 66 20 48 6f 62 62  08-15  Jeff Hobb
12d0: 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74  s  <hobbs@script
12e0: 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 52 45 41  ics.com>...* REA
12f0: 44 4d 45 2e 74 78 74 3a 20 61 64 64 65 64 20 6e  DME.txt: added n
1300: 6f 74 65 73 20 61 62 6f 75 74 20 6e 65 65 64 20  otes about need 
1310: 74 6f 20 75 73 65 20 38 2e 32 2e 30 2b 2e 0a 0a  to use 8.2.0+...
1320: 09 2a 20 74 6c 73 49 6e 74 2e 68 3a 0a 09 2a 20  .* tlsInt.h:..* 
1330: 74 6c 73 2e 63 3a 0a 09 2a 20 74 6c 73 49 4f 2e  tls.c:..* tlsIO.
1340: 63 3a 20 63 6f 72 72 65 63 74 65 64 20 73 74 72  c: corrected str
1350: 75 63 74 75 72 65 20 69 6e 69 74 69 61 6c 69 7a  ucture initializ
1360: 61 74 69 6f 6e 20 74 6f 20 77 6f 72 6b 20 77 68  ation to work wh
1370: 65 6e 0a 09 63 6f 6d 70 69 6c 69 6e 67 20 77 69  en..compiling wi
1380: 74 68 20 38 2e 32 2e 20 20 4e 6f 77 20 63 6f 6d  th 8.2.  Now com
1390: 70 69 6c 65 73 20 77 69 74 68 20 38 2e 32 2b 20  piles with 8.2+ 
13a0: 61 6e 64 20 74 65 73 74 65 64 20 74 6f 20 77 6f  and tested to wo
13b0: 72 6b 0a 09 77 69 74 68 20 38 2e 32 2b 20 61 6e  rk..with 8.2+ an
13c0: 64 20 64 79 6e 61 6d 69 63 61 6c 6c 79 20 61 64  d dynamically ad
13d0: 6a 75 73 74 20 74 6f 20 74 68 65 20 76 65 72 73  just to the vers
13e0: 69 6f 6e 20 6f 66 20 54 63 6c 20 69 74 20 77 61  ion of Tcl it wa
13f0: 73 0a 09 6c 6f 61 64 65 64 20 69 6e 74 6f 2e 20  s..loaded into. 
1400: 20 54 4c 53 20 77 69 6c 6c 20 66 61 69 6c 20 74   TLS will fail t
1410: 68 65 20 74 65 73 74 20 73 75 69 74 65 20 77 69  he test suite wi
1420: 74 68 20 54 63 6c 20 38 2e 32 2d 38 2e 33 2e 31  th Tcl 8.2-8.3.1
1430: 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 61 6c 6c 2e  ....* tests/all.
1440: 74 63 6c 3a 20 61 64 64 65 64 20 63 61 74 63 68  tcl: added catch
1450: 20 61 72 6f 75 6e 64 20 3a 3a 74 63 6c 74 65 73   around ::tcltes
1460: 74 3a 3a 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68  t::normalizePath
1470: 0a 09 62 65 63 61 75 73 65 20 69 74 20 64 6f 65  ..because it doe
1480: 73 6e 27 74 20 65 78 69 73 74 20 69 6e 20 70 72  sn't exist in pr
1490: 65 2d 38 2e 33 20 74 63 6c 74 65 73 74 2e 0a 0a  e-8.3 tcltest...
14a0: 09 2a 20 74 65 73 74 73 2f 73 69 6d 70 6c 65 43  .* tests/simpleC
14b0: 6c 69 65 6e 74 2e 74 63 6c 3a 20 0a 09 2a 20 74  lient.tcl: ..* t
14c0: 65 73 74 73 2f 73 69 6d 70 6c 65 53 65 72 76 65  ests/simpleServe
14d0: 72 2e 74 63 6c 3a 20 61 64 64 65 64 20 73 69 6d  r.tcl: added sim
14e0: 70 6c 65 20 63 6c 69 65 6e 74 2f 73 65 72 76 65  ple client/serve
14f0: 72 20 74 65 73 74 20 73 63 72 69 70 74 73 0a 09  r test scripts..
1500: 74 68 61 74 20 75 73 65 20 74 65 73 74 20 63 65  that use test ce
1510: 72 74 73 20 61 6e 64 20 63 61 6e 20 64 6f 20 73  rts and can do s
1520: 69 6d 70 6c 65 20 73 74 72 65 73 73 20 74 65 73  imple stress tes
1530: 74 73 2e 0a 0a 32 30 30 30 2d 30 38 2d 31 34 20  ts...2000-08-14 
1540: 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f   Jeff Hobbs  <ho
1550: 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f  bbs@scriptics.co
1560: 6d 3e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a  m>...* tlsInt.h:
1570: 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 0a 09 2a 20  ..* tlsIO.c:..* 
1580: 74 6c 73 42 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73  tlsBIO.c:..* tls
1590: 2e 63 3a 20 63 68 61 6e 67 65 64 20 61 72 6f 75  .c: changed arou
15a0: 6e 64 20 74 6f 20 6f 6e 6c 79 20 77 6f 72 6b 69  nd to only worki
15b0: 6e 67 20 77 69 74 68 20 38 2e 32 2e 30 2b 20 28  ng with 8.2.0+ (
15c0: 38 2e 33 2e 32 2b 0a 09 70 72 65 66 65 72 72 65  8.3.2+..preferre
15d0: 64 29 2c 20 77 69 74 68 20 72 75 6e 74 69 6d 65  d), with runtime
15e0: 20 63 68 65 63 6b 73 20 66 6f 72 20 70 72 65 2d   checks for pre-
15f0: 20 61 6e 64 20 70 6f 73 74 2d 69 6f 2d 72 65 77   and post-io-rew
1600: 72 69 74 65 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20  rite....* tls.c 
1610: 28 54 6c 73 5f 49 6e 69 74 29 3a 20 63 68 61 6e  (Tls_Init): chan
1620: 67 65 64 20 69 74 20 74 6f 20 72 65 71 75 69 72  ged it to requir
1630: 65 20 38 2e 33 2e 32 20 77 68 65 6e 20 54 63 6c  e 8.3.2 when Tcl
1640: 5f 49 6e 69 74 53 74 75 62 73 0a 09 77 61 73 20  _InitStubs..was 
1650: 63 61 6c 6c 65 64 20 62 65 63 61 75 73 65 20 77  called because w
1660: 65 20 64 6f 6e 27 74 20 77 61 6e 74 20 70 65 6f  e don't want peo
1670: 70 6c 65 20 75 73 69 6e 67 20 54 4c 53 20 77 69  ple using TLS wi
1680: 74 68 20 74 68 65 0a 09 6f 72 69 67 69 6e 61 6c  th the..original
1690: 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c   stacked channel
16a0: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2e   implementation.
16b0: 0a 0a 32 30 30 30 2d 30 37 2d 32 36 20 20 4a 65  ..2000-07-26  Je
16c0: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
16d0: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
16e0: 0a 09 2a 20 6d 65 72 67 65 64 20 61 6c 6c 20 63  ..* merged all c
16f0: 68 61 6e 67 65 73 20 66 72 6f 6d 20 74 6c 73 2d  hanges from tls-
1700: 31 2d 33 2d 69 6f 2d 72 65 77 72 69 74 65 20 62  1-3-io-rewrite b
1710: 61 63 6b 20 69 6e 74 6f 20 6d 61 69 6e 20 62 72  ack into main br
1720: 61 6e 63 68 0a 0a 09 2a 20 74 65 73 74 73 2f 74  anch...* tests/t
1730: 6c 73 49 4f 2e 74 65 73 74 3a 20 75 70 64 61 74  lsIO.test: updat
1740: 65 64 20 63 6f 6d 6d 65 6e 74 73 2c 20 66 69 78  ed comments, fix
1750: 65 64 20 61 20 70 63 43 72 61 73 68 20 63 61 73  ed a pcCrash cas
1760: 65 20 74 68 61 74 0a 09 77 61 73 20 64 75 65 20  e that..was due 
1770: 74 6f 20 64 65 62 75 67 20 61 73 73 65 72 74 69  to debug asserti
1780: 6f 6e 20 69 6e 20 57 69 6e 64 6f 77 73 20 53 53  on in Windows SS
1790: 4c 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 49 6d  L....* tls.c (Im
17a0: 70 6f 72 74 4f 62 6a 43 6d 64 29 3a 20 72 65 6d  portObjCmd): rem
17b0: 6f 76 65 64 20 75 6e 6e 65 63 65 73 73 61 72 79  oved unnecessary
17c0: 20 75 73 65 20 6f 66 20 27 62 69 6f 27 20 61 72   use of 'bio' ar
17d0: 67 2e 0a 09 28 54 6c 73 5f 49 6e 69 74 29 3a 20  g...(Tls_Init): 
17e0: 63 68 65 63 6b 20 72 65 74 75 72 6e 20 76 61 6c  check return val
17f0: 75 65 20 6f 66 20 53 53 4c 5f 6c 69 62 72 61 72  ue of SSL_librar
1800: 79 5f 69 6e 69 74 2e 20 20 41 6c 73 6f 20 6c 6f  y_init.  Also lo
1810: 74 73 20 6f 66 0a 09 77 68 69 74 65 73 70 61 63  ts of..whitespac
1820: 65 20 63 6c 65 61 6e 75 70 20 28 6d 6f 72 65 20  e cleanup (more 
1830: 6c 69 6b 65 20 54 63 6c 20 45 6e 67 20 73 74 79  like Tcl Eng sty
1840: 6c 65 20 67 75 69 64 65 29 2c 20 62 75 74 20 6e  le guide), but n
1850: 6f 74 20 61 6c 6c 0a 09 63 6f 64 65 20 77 61 73  ot all..code was
1860: 20 63 6c 65 61 6e 65 64 20 75 70 2e 0a 0a 09 2a   cleaned up....*
1870: 20 74 6c 73 42 49 4f 2e 63 3a 20 6d 69 6e 6f 72   tlsBIO.c: minor
1880: 20 77 68 69 74 65 73 70 61 63 65 20 63 6c 65 61   whitespace clea
1890: 6e 75 70 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a  nup...* tlsIO.c:
18a0: 20 6d 69 6e 6f 72 20 77 68 69 74 65 73 70 61 63   minor whitespac
18b0: 65 20 63 6c 65 61 6e 75 70 2e 0a 09 28 54 6c 73  e cleanup...(Tls
18c0: 49 6e 70 75 74 50 72 6f 63 2c 20 54 6c 73 4f 75  InputProc, TlsOu
18d0: 74 70 75 74 50 72 6f 63 29 3a 20 41 64 64 65 64  tputProc): Added
18e0: 20 45 52 52 5f 63 6c 65 61 72 5f 65 72 72 6f 72   ERR_clear_error
18f0: 20 62 65 66 6f 72 65 20 63 61 6c 6c 73 0a 09 74   before calls..t
1900: 6f 20 42 49 4f 5f 72 65 61 64 20 6f 72 20 42 49  o BIO_read or BI
1910: 4f 5f 77 72 69 74 65 2c 20 62 65 63 61 75 73 65  O_write, because
1920: 20 77 65 20 63 6f 75 6c 64 20 6f 74 68 65 72 77   we could otherw
1930: 69 73 65 20 65 6e 64 20 75 70 0a 09 70 75 6c 6c  ise end up..pull
1940: 69 6e 67 20 61 6e 20 65 72 72 6f 72 20 6f 66 66  ing an error off
1950: 20 74 68 65 20 73 74 61 63 6b 20 74 68 61 74 20   the stack that 
1960: 64 69 64 6e 27 74 20 62 65 6c 6f 6e 67 20 74 6f  didn't belong to
1970: 20 75 73 2e 20 20 41 6c 73 6f 0a 09 63 6c 65 61   us.  Also..clea
1980: 6e 75 70 20 75 70 20 65 78 63 65 73 73 69 76 65  nup up excessive
1990: 20 75 73 65 20 6f 66 20 67 6f 74 6f 73 2e 0a 0a   use of gotos...
19a0: 32 30 30 30 2d 30 37 2d 32 30 20 20 4a 65 66 66  2000-07-20  Jeff
19b0: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
19c0: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
19d0: 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65  * tests/tlsIO.te
19e0: 73 74 3a 20 63 6f 72 72 65 63 74 65 64 20 76 61  st: corrected va
19f0: 72 69 6f 75 73 20 74 65 73 74 73 20 74 6f 20 62  rious tests to b
1a00: 65 20 63 6f 72 72 65 63 74 20 66 6f 72 20 54 4c  e correct for TL
1a10: 53 0a 09 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  S..stacked chann
1a20: 65 6c 73 20 28 61 73 20 6f 70 70 6f 73 65 64 20  els (as opposed 
1a30: 74 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 20  to the standard 
1a40: 73 6f 63 6b 65 74 73 20 74 68 65 20 74 65 73 74  sockets the test
1a50: 0a 09 73 75 69 74 65 20 77 61 73 20 61 64 6f 70  ..suite was adop
1a60: 74 65 64 20 66 72 6f 6d 29 2e 20 20 4b 65 79 20  ted from).  Key 
1a70: 64 69 66 66 65 72 65 6e 63 65 73 20 61 72 65 20  differences are 
1a80: 74 68 61 74 20 54 4c 53 20 63 61 6e 6e 6f 74 0a  that TLS cannot.
1a90: 09 6f 70 65 72 61 74 65 20 69 6e 20 6f 6e 65 20  .operate in one 
1aa0: 70 72 6f 63 65 73 73 20 77 69 74 68 6f 75 74 20  process without 
1ab0: 61 6c 6c 20 63 68 61 6e 6e 65 6c 73 20 62 65 69  all channels bei
1ac0: 6e 67 20 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 2c  ng non-blocking,
1ad0: 20 6f 72 0a 09 74 68 65 20 68 61 6e 64 73 68 61   or..the handsha
1ae0: 6b 65 20 77 69 6c 6c 20 62 6c 6f 63 6b 2c 20 61  ke will block, a
1af0: 6e 64 20 68 61 6e 64 73 68 61 6b 69 6e 67 20 6d  nd handshaking m
1b00: 75 73 74 20 62 65 20 66 6f 72 63 65 64 20 69 6e  ust be forced in
1b10: 20 73 6f 6d 65 0a 09 63 61 73 65 73 2e 20 20 41   some..cases.  A
1b20: 6c 73 6f 2c 20 68 61 6e 64 73 68 61 6b 65 73 20  lso, handshakes 
1b30: 64 6f 6e 27 74 20 73 65 65 6d 20 74 6f 20 63 6f  don't seem to co
1b40: 6d 70 6c 65 74 65 20 75 6e 6c 65 73 73 20 74 68  mplete unless th
1b50: 65 20 63 6c 69 65 6e 74 0a 09 68 61 73 20 70 6c  e client..has pl
1b60: 61 63 65 64 20 61 74 20 6c 65 61 73 74 20 6f 6e  aced at least on
1b70: 65 20 62 79 74 65 20 66 6f 72 20 74 68 65 20 73  e byte for the s
1b80: 65 72 76 65 72 20 74 6f 20 72 65 61 64 20 69 6e  erver to read in
1b90: 20 74 68 65 20 63 68 61 6e 6e 65 6c 2e 0a 0a 09   the channel....
1ba0: 2a 20 74 65 73 74 73 2f 72 65 6d 6f 74 65 2e 74  * tests/remote.t
1bb0: 63 6c 3a 20 63 6f 72 72 65 63 74 65 64 20 74 68  cl: corrected th
1bc0: 65 20 66 69 6e 64 69 6e 67 20 6f 66 20 74 65 73  e finding of tes
1bd0: 74 73 20 63 65 72 74 69 66 69 63 61 74 65 73 0a  ts certificates.
1be0: 0a 09 2a 20 74 6c 73 49 4f 2e 63 20 28 54 6c 73  ..* tlsIO.c (Tls
1bf0: 43 6c 6f 73 65 50 72 6f 63 29 3a 20 72 65 6d 6f  CloseProc): remo
1c00: 76 65 64 20 64 65 6c 65 74 69 6e 67 20 6f 66 20  ved deleting of 
1c10: 74 69 6d 65 72 20 68 61 6e 64 6c 65 72 20 61 73  timer handler as
1c20: 0a 09 74 68 61 74 20 69 73 20 68 61 6e 64 6c 65  ..that is handle
1c30: 64 20 62 79 20 54 6c 73 5f 43 6c 65 61 6e 2e 0a  d by Tls_Clean..
1c40: 0a 09 2a 20 74 6c 73 2e 74 63 6c 20 28 74 6c 73  ..* tls.tcl (tls
1c50: 3a 3a 5f 61 63 63 65 70 74 29 3a 20 63 6f 72 72  ::_accept): corr
1c60: 65 63 74 65 64 20 74 68 65 20 69 6e 74 65 72 6e  ected the intern
1c70: 61 6c 20 5f 61 63 63 65 70 74 20 74 6f 0a 09 74  al _accept to..t
1c80: 72 69 63 6b 6c 65 20 63 61 6c 6c 62 61 63 6b 20  rickle callback 
1c90: 65 72 72 6f 72 73 20 74 6f 20 74 68 65 20 75 73  errors to the us
1ca0: 65 72 2e 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65  er....* Makefile
1cb0: 2e 69 6e 3a 20 6d 61 64 65 20 74 68 65 20 69 6e  .in: made the in
1cc0: 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 74  stall-binaries t
1cd0: 61 72 67 65 74 20 72 65 67 65 6e 65 72 61 74 65  arget regenerate
1ce0: 20 74 68 65 0a 09 70 6b 67 49 6e 64 65 78 2e 74   the..pkgIndex.t
1cf0: 63 6c 20 63 6f 72 72 65 63 74 6c 79 2e 20 20 54  cl correctly.  T
1d00: 68 65 20 74 65 73 74 20 74 61 72 67 65 74 20 70  he test target p
1d10: 72 6f 62 61 62 6c 79 20 73 68 6f 75 6c 64 6e 27  robably shouldn'
1d20: 74 20 73 63 72 65 77 0a 09 69 74 20 75 70 2c 20  t screw..it up, 
1d30: 62 75 74 20 74 68 69 73 20 69 73 20 74 6f 20 62  but this is to b
1d40: 65 20 6f 6e 20 74 68 65 20 73 61 66 65 20 73 69  e on the safe si
1d50: 64 65 2e 0a 0a 32 30 30 30 2d 30 37 2d 31 37 20  de...2000-07-17 
1d60: 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f   Jeff Hobbs  <ho
1d70: 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f  bbs@scriptics.co
1d80: 6d 3e 0a 0a 09 2a 20 70 6b 67 49 6e 64 65 78 2e  m>...* pkgIndex.
1d90: 74 63 6c 2e 69 6e 3a 0a 09 2a 20 63 6f 6e 66 69  tcl.in:..* confi
1da0: 67 75 72 65 2e 69 6e 3a 20 75 70 64 61 74 65 64  gure.in: updated
1db0: 20 76 65 72 73 69 6f 6e 20 74 6f 20 31 2e 34 0a   version to 1.4.
1dc0: 0a 32 30 30 30 2d 30 37 2d 31 33 20 20 4a 65 66  .2000-07-13  Jef
1dd0: 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40  f Hobbs  <hobbs@
1de0: 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a  scriptics.com>..
1df0: 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74  .* tests/tlsIO.t
1e00: 65 73 74 3a 20 65 6e 61 62 6c 65 64 20 74 65 73  est: enabled tes
1e10: 74 73 20 32 2e 31 30 2c 20 37 2e 5b 31 32 34 35  ts 2.10, 7.[1245
1e20: 5d 20 28 74 68 65 72 65 20 69 73 20 6e 6f 20 33  ] (there is no 3
1e30: 29 2c 0a 09 77 68 69 63 68 20 6e 6f 77 20 70 61  ),..which now pa
1e40: 73 73 2e 20 20 41 64 64 65 64 20 73 6f 6d 65 20  ss.  Added some 
1e50: 63 6f 6d 6d 65 6e 74 73 20 74 6f 20 6f 74 68 65  comments to othe
1e60: 72 20 66 61 69 6c 69 6e 67 20 74 65 73 74 73 2e  r failing tests.
1e70: 0a 0a 32 30 30 30 2d 30 37 2d 31 31 20 20 4a 65  ..2000-07-11  Je
1e80: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
1e90: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
1ea0: 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 63 68 61  ..* tlsIO.c: cha
1eb0: 6e 67 65 64 20 61 6c 6c 20 74 68 65 20 63 68 61  nged all the cha
1ec0: 6e 6e 65 6c 20 70 72 6f 63 73 20 74 6f 20 73 74  nnel procs to st
1ed0: 61 72 74 20 77 69 74 68 20 54 6c 73 2a 20 66 6f  art with Tls* fo
1ee0: 72 0a 09 62 65 74 74 65 72 20 70 61 72 69 74 79  r..better parity
1ef0: 20 77 68 65 6e 20 63 6f 6d 70 61 72 69 6e 67 20   when comparing 
1f00: 77 69 74 68 20 54 72 61 6e 73 66 6f 72 6d 20 63  with Transform c
1f10: 68 61 6e 6e 65 6c 20 70 72 6f 63 73 2e 0a 09 52  hannel procs...R
1f20: 65 77 72 6f 74 65 20 54 6c 73 57 61 74 63 68 50  ewrote TlsWatchP
1f30: 72 6f 63 2c 20 61 64 64 65 64 20 54 6c 73 4e 6f  roc, added TlsNo
1f40: 74 69 66 79 50 72 6f 63 20 61 63 63 6f 72 64 69  tifyProc accordi
1f50: 6e 67 20 74 6f 20 74 68 65 20 6e 65 77 0a 09 63  ng to the new..c
1f60: 68 61 6e 6e 65 6c 20 64 65 73 69 67 6e 2c 20 77  hannel design, w
1f70: 68 69 63 68 20 61 6c 73 6f 20 6c 65 61 76 65 73  hich also leaves
1f80: 20 54 6c 73 43 68 61 6e 6e 65 6c 48 61 6e 64 6c   TlsChannelHandl
1f90: 65 72 20 75 6e 75 73 65 64 2e 0a 0a 09 2a 20 74  er unused....* t
1fa0: 6c 73 42 49 4f 2e 63 20 28 42 69 6f 43 74 72 6c  lsBIO.c (BioCtrl
1fb0: 29 3a 20 63 68 61 6e 67 65 64 20 42 49 4f 5f 43  ): changed BIO_C
1fc0: 54 52 4c 5f 46 4c 55 53 48 20 63 61 73 65 20 74  TRL_FLUSH case t
1fd0: 6f 20 75 73 65 0a 09 54 63 6c 5f 57 72 69 74 65  o use..Tcl_Write
1fe0: 52 61 77 20 69 6e 73 74 65 61 64 20 6f 66 20 54  Raw instead of T
1ff0: 63 6c 5f 46 6c 75 73 68 20 28 74 6f 20 6f 70 65  cl_Flush (to ope
2000: 72 61 74 65 20 6f 6e 20 63 6f 72 72 65 63 74 20  rate on correct 
2010: 63 68 61 6e 6e 65 6c 0a 09 69 6e 20 74 68 65 20  channel..in the 
2020: 73 74 61 63 6b 20 69 6e 73 74 65 61 64 20 6f 66  stack instead of
2030: 20 73 74 61 72 74 69 6e 67 20 61 74 20 74 68 65   starting at the
2040: 20 74 6f 70 20 61 67 61 69 6e 29 2e 20 20 57 6f   top again).  Wo
2050: 75 6c 64 0a 09 6f 74 68 65 72 77 69 73 65 20 63  uld..otherwise c
2060: 61 75 73 65 20 61 20 72 65 63 75 72 73 69 76 65  ause a recursive
2070: 20 73 74 61 63 6b 20 62 6f 6d 62 20 77 68 65 6e   stack bomb when
2080: 20 69 6d 70 6c 69 63 69 74 20 68 61 6e 64 73 68   implicit handsh
2090: 61 6b 69 6e 67 0a 09 74 6f 6f 6b 20 65 66 66 65  aking..took effe
20a0: 63 74 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c  ct....* tests/tl
20b0: 73 49 4f 2e 74 65 73 74 3a 20 72 65 6d 6f 76 65  sIO.test: remove
20c0: 64 20 63 68 61 6e 67 65 73 20 6d 61 64 65 20 74  d changes made t
20d0: 6f 20 74 65 73 74 20 73 75 69 74 65 20 28 61 6c  o test suite (al
20e0: 6c 20 74 65 73 74 73 0a 09 74 68 61 74 20 72 61  l tests..that ra
20f0: 6e 20 62 65 66 6f 72 65 20 6e 6f 77 20 70 61 73  n before now pas
2100: 73 20 63 6f 72 72 65 63 74 6c 79 29 2c 20 61 6e  s correctly), an
2110: 64 20 63 68 61 6e 67 65 64 20 73 6f 6d 65 20 61  d changed some a
2120: 63 63 65 70 74 20 70 72 6f 63 0a 09 61 72 67 73  ccept proc..args
2130: 20 74 6f 20 72 65 66 6c 65 63 74 20 74 68 61 74   to reflect that
2140: 20 61 20 73 6f 63 6b 20 69 73 20 61 6e 20 61 72   a sock is an ar
2150: 67 2c 20 6e 6f 74 20 61 20 66 69 6c 65 2e 0a 0a  g, not a file...
2160: 32 30 30 30 2d 30 37 2d 31 30 20 20 4a 65 66 66  2000-07-10  Jeff
2170: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
2180: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
2190: 2a 20 74 6c 73 42 49 4f 2e 63 20 28 42 69 6f 57  * tlsBIO.c (BioW
21a0: 72 69 74 65 2c 20 42 69 6f 52 65 61 64 29 3a 20  rite, BioRead): 
21b0: 63 68 61 6e 67 65 64 20 54 63 6c 5f 52 65 61 64  changed Tcl_Read
21c0: 2f 57 72 69 74 65 20 74 6f 0a 09 54 63 6c 5f 52  /Write to..Tcl_R
21d0: 65 61 64 52 61 77 2f 54 63 6c 57 72 69 74 65 52  eadRaw/TclWriteR
21e0: 61 77 2e 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 61  aw....* tls.c: a
21f0: 64 64 65 64 20 75 73 65 20 6f 66 20 54 63 6c 5f  dded use of Tcl_
2200: 47 65 74 54 6f 70 43 68 61 6e 6e 65 6c 20 61 66  GetTopChannel af
2210: 74 65 72 20 54 63 6c 5f 47 65 74 43 68 61 6e 6e  ter Tcl_GetChann
2220: 65 6c 20 61 6e 64 0a 09 67 6f 74 20 72 65 74 75  el and..got retu
2230: 72 6e 20 76 61 6c 75 65 20 66 72 6f 6d 20 54 63  rn value from Tc
2240: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 2e 0a  l_StackChannel..
2250: 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e  ..* tests/tlsIO.
2260: 74 65 73 74 3a 20 61 64 64 65 64 20 73 6f 6d 65  test: added some
2270: 20 68 61 6e 64 73 68 61 6b 69 6e 67 20 74 68 61   handshaking tha
2280: 74 20 73 68 6f 75 6c 64 6e 27 74 20 62 65 0a 09  t shouldn't be..
2290: 6e 65 63 65 73 73 61 72 79 2c 20 62 75 74 20 77  necessary, but w
22a0: 65 20 63 72 61 73 68 20 6f 74 68 65 72 77 69 73  e crash otherwis
22b0: 65 20 28 6e 65 65 64 73 20 6d 6f 72 65 20 74 65  e (needs more te
22c0: 73 74 69 6e 67 29 2e 0a 0a 09 2a 20 74 6c 73 49  sting)....* tlsI
22d0: 4f 2e 63 3a 20 61 64 64 65 64 20 73 75 70 70 6f  O.c: added suppo
22e0: 72 74 20 66 6f 72 20 22 63 6f 72 72 65 63 74 65  rt for "correcte
22f0: 64 22 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  d" stacked chann
2300: 65 6c 73 2e 20 20 41 6c 6c 0a 09 74 68 65 20 61  els.  All..the a
2310: 62 6f 76 65 20 63 68 61 6e 6e 65 6c 73 20 61 72  bove channels ar
2320: 65 20 69 6e 20 54 43 4c 5f 43 48 41 4e 4e 45 4c  e in TCL_CHANNEL
2330: 5f 56 45 52 53 49 4f 4e 5f 32 20 23 69 66 64 65  _VERSION_2 #ifde
2340: 66 73 2e 0a 0a 32 30 30 30 2d 30 36 2d 30 35 20  fs...2000-06-05 
2350: 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20   Scott Stanton  
2360: 3c 73 74 61 6e 74 6f 6e 40 61 6a 75 62 61 73 6f  <stanton@ajubaso
2370: 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a  lutions.com>...*
2380: 20 4d 61 6b 65 66 69 6c 65 2e 69 6e 3a 20 46 69   Makefile.in: Fi
2390: 78 65 64 20 62 72 6f 6b 65 6e 20 74 65 73 74 20  xed broken test 
23a0: 74 61 72 67 65 74 2e 0a 0a 09 2a 20 74 6c 73 49  target....* tlsI
23b0: 6e 74 2e 68 3a 20 0a 09 2a 20 74 6c 73 2e 63 3a  nt.h: ..* tls.c:
23c0: 20 43 6c 65 61 6e 65 64 20 75 70 20 64 65 63 6c   Cleaned up decl
23d0: 61 72 61 74 69 6f 6e 73 20 6f 66 20 54 6c 73 5f  arations of Tls_
23e0: 43 6c 65 61 6e 20 74 6f 20 61 76 6f 69 64 20 65  Clean to avoid e
23f0: 72 72 6f 72 73 20 6f 6e 0a 09 57 69 6e 64 6f 77  rrors on..Window
2400: 73 20 28 6c 69 6e 74 29 2e 0a 0a 32 30 30 30 2d  s (lint)...2000-
2410: 30 36 2d 30 35 20 20 42 72 65 6e 74 20 57 65 6c  06-05  Brent Wel
2420: 63 68 20 3c 77 65 6c 63 68 40 61 6a 75 62 61 73  ch <welch@ajubas
2430: 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09  olutions.com>...
2440: 2a 20 74 6c 73 2e 63 2c 20 74 6c 73 49 4f 2e 63  * tls.c, tlsIO.c
2450: 3a 20 20 53 70 6c 69 74 20 54 6c 73 5f 46 72 65  :  Split Tls_Fre
2460: 65 20 69 6e 74 6f 20 54 6c 73 5f 43 6c 65 61 6e  e into Tls_Clean
2470: 2c 20 77 68 69 63 68 20 64 6f 65 73 0a 09 74 68  , which does..th
2480: 65 20 53 53 4c 20 63 6c 65 61 6e 75 70 2c 20 61  e SSL cleanup, a
2490: 6e 64 20 74 68 65 20 54 63 6c 5f 46 72 65 65 20  nd the Tcl_Free 
24a0: 63 61 6c 6c 2e 20 20 49 74 20 69 73 20 69 6d 70  call.  It is imp
24b0: 6f 72 74 61 6e 74 20 74 6f 20 73 68 75 74 64 6f  ortant to shutdo
24c0: 77 6e 0a 09 74 68 65 20 53 53 4c 20 73 74 61 74  wn..the SSL stat
24d0: 65 20 22 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79  e "synchronously
24e0: 22 20 64 75 72 69 6e 67 20 61 20 73 74 61 63 6b  " during a stack
24f0: 65 64 20 66 6c 75 73 68 2e 0a 0a 32 30 30 30 2d  ed flush...2000-
2500: 30 36 2d 30 31 20 20 53 63 6f 74 74 20 53 74 61  06-01  Scott Sta
2510: 6e 74 6f 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 61  nton  <stanton@a
2520: 6a 75 62 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f  jubasolutions.co
2530: 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20  m>...* tlsIO.c: 
2540: 52 65 73 74 6f 72 65 64 20 63 61 6c 6c 20 74 6f  Restored call to
2550: 20 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e   Tcl_NotifyChann
2560: 65 6c 20 66 72 6f 6d 20 43 68 61 6e 6e 65 6c 48  el from ChannelH
2570: 61 6e 64 6c 65 72 0a 09 74 6f 20 65 6e 73 75 72  andler..to ensur
2580: 65 20 74 68 61 74 20 65 76 65 6e 74 73 20 70 72  e that events pr
2590: 6f 70 61 67 61 74 65 20 66 72 6f 6d 20 74 68 65  opagate from the
25a0: 20 6c 6f 77 65 72 20 64 72 69 76 65 72 2e 20 20   lower driver.  
25b0: 54 68 69 73 20 6d 61 79 0a 09 72 65 73 75 6c 74  This may..result
25c0: 20 69 6e 20 61 6e 20 69 6e 66 69 6e 69 74 65 20   in an infinite 
25d0: 6c 6f 6f 70 20 69 6e 20 73 6f 6d 65 20 63 61 73  loop in some cas
25e0: 65 73 2c 20 73 6f 20 74 68 69 73 20 69 73 20 6e  es, so this is n
25f0: 6f 74 20 61 20 74 6f 74 61 6c 0a 09 66 69 78 2e  ot a total..fix.
2600: 20 20 54 68 69 73 20 6d 61 79 20 62 65 20 73 75    This may be su
2610: 66 66 69 63 69 65 6e 74 20 66 6f 72 20 6e 6f 77  fficient for now
2620: 2c 20 68 6f 77 65 76 65 72 2e 20 5b 42 75 67 3a  , however. [Bug:
2630: 20 35 36 32 33 5d 0a 0a 32 30 30 30 2d 30 36 2d   5623]..2000-06-
2640: 30 31 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f  01  Scott Stanto
2650: 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 73 63 72 69  n  <stanton@scri
2660: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74  ptics.com>...* t
2670: 6c 73 49 4f 2e 63 3a 20 52 65 73 74 6f 72 65 20  lsIO.c: Restore 
2680: 74 68 65 20 70 72 65 76 69 6f 75 73 20 76 65 72  the previous ver
2690: 73 69 6f 6e 2e 20 20 46 69 78 65 64 20 74 68 65  sion.  Fixed the
26a0: 20 43 6c 6f 73 65 50 72 6f 63 20 73 6f 0a 09 69   CloseProc so..i
26b0: 74 20 75 6e 72 65 67 69 73 74 65 72 73 20 74 68  t unregisters th
26c0: 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65  e channel handle
26d0: 72 20 6f 6e 20 74 68 65 20 73 75 70 65 72 63 65  r on the superce
26e0: 64 65 64 20 63 68 61 6e 6e 65 6c 0a 09 69 6e 73  ded channel..ins
26f0: 74 65 61 64 20 6f 66 20 74 68 65 20 75 70 70 65  tead of the uppe
2700: 72 20 63 68 61 6e 6e 65 6c 2e 20 41 6c 73 6f 20  r channel. Also 
2710: 72 65 6d 6f 76 65 64 20 74 68 65 20 63 61 6c 6c  removed the call
2720: 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43   to..Tcl_NotifyC
2730: 68 61 6e 6e 65 6c 20 69 6e 20 74 68 65 20 43 68  hannel in the Ch
2740: 61 6e 6e 65 6c 48 61 6e 64 6c 65 72 20 62 65 63  annelHandler bec
2750: 61 75 73 65 20 74 68 69 73 20 77 69 6c 6c 20 72  ause this will r
2760: 65 73 75 6c 74 0a 09 69 6e 20 61 6e 20 69 6e 66  esult..in an inf
2770: 69 6e 69 74 65 20 6c 6f 6f 70 20 69 66 20 64 61  inite loop if da
2780: 74 61 20 69 73 20 65 76 65 72 20 62 75 66 66 65  ta is ever buffe
2790: 72 65 64 20 69 6e 20 74 68 65 20 42 49 4f 0a 09  red in the BIO..
27a0: 73 74 72 75 63 74 75 72 65 2e 20 5b 42 75 67 3a  structure. [Bug:
27b0: 20 35 36 32 33 5d 0a 0a 32 30 30 30 2d 30 35 2d   5623]..2000-05-
27c0: 33 31 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20  31  Brent Welch 
27d0: 3c 77 65 6c 63 68 40 73 63 72 69 70 74 69 63 73  <welch@scriptics
27e0: 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 2e 63 3a  .com>...* tls.c:
27f0: 20 43 68 61 6e 67 65 20 74 68 65 20 43 68 61 6e   Change the Chan
2800: 6e 65 6c 48 61 6e 64 6c 65 72 20 74 6f 20 62 65  nelHandler to be
2810: 20 72 65 67 69 73 74 65 72 65 64 20 6f 6e 20 74   registered on t
2820: 68 65 20 6d 61 69 6e 0a 09 63 68 61 6e 6e 65 6c  he main..channel
2830: 20 61 73 20 6f 70 70 73 65 64 20 74 6f 20 74 68   as oppsed to th
2840: 65 20 22 70 61 72 65 6e 74 22 2c 20 6f 72 20 73  e "parent", or s
2850: 75 70 65 72 63 65 65 64 65 64 2c 20 63 68 61 6e  uperceeded, chan
2860: 6e 65 6c 2e 20 20 54 68 69 73 0a 09 69 73 20 62  nel.  This..is b
2870: 65 63 61 75 73 65 20 74 68 65 20 73 6f 63 6b 65  ecause the socke
2880: 74 20 64 72 69 76 65 72 20 6e 6f 74 69 66 69 65  t driver notifie
2890: 73 20 74 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e  s the main chann
28a0: 65 6c 2c 20 61 6e 64 20 74 68 65 72 65 0a 09 61  el, and there..a
28b0: 72 65 20 74 69 6d 65 73 20 77 69 74 68 20 74 68  re times with th
28c0: 65 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 20 67  e main channel g
28d0: 65 74 73 20 63 6c 6f 73 65 64 2c 20 62 75 74 20  ets closed, but 
28e0: 74 68 65 20 73 75 70 65 72 63 65 64 65 64 0a 09  the superceded..
28f0: 6f 6e 65 20 69 73 20 6e 6f 74 20 79 65 74 20 63  one is not yet c
2900: 6c 6f 73 65 64 2e 20 20 49 66 20 74 68 65 20 63  losed.  If the c
2910: 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 67  hannel handler g
2920: 65 74 73 20 74 72 69 67 67 65 72 65 64 20 69 6e  ets triggered in
2930: 0a 09 74 68 69 73 20 68 61 6c 66 2d 6f 70 65 6e  ..this half-open
2940: 20 73 74 61 74 65 20 69 74 20 69 73 20 61 73 73   state it is ass
2950: 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65  ociated with the
2960: 20 73 75 70 65 72 63 65 65 64 65 64 0a 09 63 68   superceeded..ch
2970: 61 6e 6e 65 64 6c 2c 20 62 75 74 20 75 73 65 73  annedl, but uses
2980: 20 69 74 73 20 70 72 69 76 61 74 65 20 70 6f 69   its private poi
2990: 6e 74 65 72 20 74 6f 20 74 68 65 20 6d 61 69 6e  nter to the main
29a0: 20 63 68 61 6e 6e 65 6c 2c 20 77 68 69 63 68 0a   channel, which.
29b0: 09 69 73 20 6d 6f 73 74 6c 79 20 64 65 73 74 72  .is mostly destr
29c0: 6f 79 65 64 2e 20 20 45 6c 69 6d 69 6e 61 74 65  oyed.  Eliminate
29d0: 64 20 74 68 65 20 72 65 64 75 6e 64 61 6e 74 20  d the redundant 
29e0: 63 61 6c 6c 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74  call to..Tcl_Not
29f0: 69 66 79 43 68 61 6e 6e 65 6c 20 66 72 6f 6d 20  ifyChannel from 
2a00: 54 6c 73 57 61 74 63 68 50 72 6f 63 2e 20 5b 42  TlsWatchProc. [B
2a10: 75 67 3a 20 35 36 32 33 5d 0a                    ug: 5623].