Hex Artifact Content

Artifact da6f71ec7e4bbcd6e4852f28c33824a7f95e4ca9:


0000: 32 30 30 30 2d 30 38 2d 31 36 20 20 4a 65 66 66  2000-08-16  Jeff
0010: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
0020: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
0030: 2a 20 74 6c 73 2e 63 20 28 54 6c 73 5f 49 6e 69  * tls.c (Tls_Ini
0040: 74 29 3a 20 63 6f 72 72 65 63 74 65 64 20 69 6e  t): corrected in
0050: 74 65 72 70 72 65 74 61 74 69 6f 6e 20 6f 66 20  terpretation of 
0060: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 0a 09  version number..
0070: 28 70 61 74 63 68 6c 65 76 65 6c 20 61 6e 64 20  (patchlevel and 
0080: 72 65 6c 65 61 73 65 2f 73 65 72 69 61 6c 20 77  release/serial w
0090: 65 72 65 20 73 77 61 70 70 65 64 29 2e 0a 0a 32  ere swapped)...2
00a0: 30 30 30 2d 30 38 2d 31 35 20 20 4a 65 66 66 20  000-08-15  Jeff 
00b0: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63  Hobbs  <hobbs@sc
00c0: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a  riptics.com>...*
00d0: 20 52 45 41 44 4d 45 2e 74 78 74 3a 20 61 64 64   README.txt: add
00e0: 65 64 20 6e 6f 74 65 73 20 61 62 6f 75 74 20 6e  ed notes about n
00f0: 65 65 64 20 74 6f 20 75 73 65 20 38 2e 32 2e 30  eed to use 8.2.0
0100: 2b 2e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a  +....* tlsInt.h:
0110: 0a 09 2a 20 74 6c 73 2e 63 3a 0a 09 2a 20 74 6c  ..* tls.c:..* tl
0120: 73 49 4f 2e 63 3a 20 63 6f 72 72 65 63 74 65 64  sIO.c: corrected
0130: 20 73 74 72 75 63 74 75 72 65 20 69 6e 69 74 69   structure initi
0140: 61 6c 69 7a 61 74 69 6f 6e 20 74 6f 20 77 6f 72  alization to wor
0150: 6b 20 77 68 65 6e 0a 09 63 6f 6d 70 69 6c 69 6e  k when..compilin
0160: 67 20 77 69 74 68 20 38 2e 32 2e 20 20 4e 6f 77  g with 8.2.  Now
0170: 20 63 6f 6d 70 69 6c 65 73 20 77 69 74 68 20 38   compiles with 8
0180: 2e 32 2b 20 61 6e 64 20 74 65 73 74 65 64 20 74  .2+ and tested t
0190: 6f 20 77 6f 72 6b 0a 09 77 69 74 68 20 38 2e 32  o work..with 8.2
01a0: 2b 20 61 6e 64 20 64 79 6e 61 6d 69 63 61 6c 6c  + and dynamicall
01b0: 79 20 61 64 6a 75 73 74 20 74 6f 20 74 68 65 20  y adjust to the 
01c0: 76 65 72 73 69 6f 6e 20 6f 66 20 54 63 6c 20 69  version of Tcl i
01d0: 74 20 77 61 73 0a 09 6c 6f 61 64 65 64 20 69 6e  t was..loaded in
01e0: 74 6f 2e 20 20 54 4c 53 20 77 69 6c 6c 20 66 61  to.  TLS will fa
01f0: 69 6c 20 74 68 65 20 74 65 73 74 20 73 75 69 74  il the test suit
0200: 65 20 77 69 74 68 20 54 63 6c 20 38 2e 32 2d 38  e with Tcl 8.2-8
0210: 2e 33 2e 31 2e 0a 0a 09 2a 20 74 65 73 74 73 2f  .3.1....* tests/
0220: 61 6c 6c 2e 74 63 6c 3a 20 61 64 64 65 64 20 63  all.tcl: added c
0230: 61 74 63 68 20 61 72 6f 75 6e 64 20 3a 3a 74 63  atch around ::tc
0240: 6c 74 65 73 74 3a 3a 6e 6f 72 6d 61 6c 69 7a 65  ltest::normalize
0250: 50 61 74 68 0a 09 62 65 63 61 75 73 65 20 69 74  Path..because it
0260: 20 64 6f 65 73 6e 27 74 20 65 78 69 73 74 20 69   doesn't exist i
0270: 6e 20 70 72 65 2d 38 2e 33 20 74 63 6c 74 65 73  n pre-8.3 tcltes
0280: 74 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 73 69 6d  t....* tests/sim
0290: 70 6c 65 43 6c 69 65 6e 74 2e 74 63 6c 3a 20 0a  pleClient.tcl: .
02a0: 09 2a 20 74 65 73 74 73 2f 73 69 6d 70 6c 65 53  .* tests/simpleS
02b0: 65 72 76 65 72 2e 74 63 6c 3a 20 61 64 64 65 64  erver.tcl: added
02c0: 20 73 69 6d 70 6c 65 20 63 6c 69 65 6e 74 2f 73   simple client/s
02d0: 65 72 76 65 72 20 74 65 73 74 20 73 63 72 69 70  erver test scrip
02e0: 74 73 0a 09 74 68 61 74 20 75 73 65 20 74 65 73  ts..that use tes
02f0: 74 20 63 65 72 74 73 20 61 6e 64 20 63 61 6e 20  t certs and can 
0300: 64 6f 20 73 69 6d 70 6c 65 20 73 74 72 65 73 73  do simple stress
0310: 20 74 65 73 74 73 2e 0a 0a 32 30 30 30 2d 30 38   tests...2000-08
0320: 2d 31 34 20 20 4a 65 66 66 20 48 6f 62 62 73 20  -14  Jeff Hobbs 
0330: 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74 69 63   <hobbs@scriptic
0340: 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49 6e  s.com>...* tlsIn
0350: 74 2e 68 3a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a  t.h:..* tlsIO.c:
0360: 0a 09 2a 20 74 6c 73 42 49 4f 2e 63 3a 0a 09 2a  ..* tlsBIO.c:..*
0370: 20 74 6c 73 2e 63 3a 20 63 68 61 6e 67 65 64 20   tls.c: changed 
0380: 61 72 6f 75 6e 64 20 74 6f 20 6f 6e 6c 79 20 77  around to only w
0390: 6f 72 6b 69 6e 67 20 77 69 74 68 20 38 2e 32 2e  orking with 8.2.
03a0: 30 2b 20 28 38 2e 33 2e 32 2b 0a 09 70 72 65 66  0+ (8.3.2+..pref
03b0: 65 72 72 65 64 29 2c 20 77 69 74 68 20 72 75 6e  erred), with run
03c0: 74 69 6d 65 20 63 68 65 63 6b 73 20 66 6f 72 20  time checks for 
03d0: 70 72 65 2d 20 61 6e 64 20 70 6f 73 74 2d 69 6f  pre- and post-io
03e0: 2d 72 65 77 72 69 74 65 2e 0a 0a 09 2a 20 74 6c  -rewrite....* tl
03f0: 73 2e 63 20 28 54 6c 73 5f 49 6e 69 74 29 3a 20  s.c (Tls_Init): 
0400: 63 68 61 6e 67 65 64 20 69 74 20 74 6f 20 72 65  changed it to re
0410: 71 75 69 72 65 20 38 2e 33 2e 32 20 77 68 65 6e  quire 8.3.2 when
0420: 20 54 63 6c 5f 49 6e 69 74 53 74 75 62 73 0a 09   Tcl_InitStubs..
0430: 77 61 73 20 63 61 6c 6c 65 64 20 62 65 63 61 75  was called becau
0440: 73 65 20 77 65 20 64 6f 6e 27 74 20 77 61 6e 74  se we don't want
0450: 20 70 65 6f 70 6c 65 20 75 73 69 6e 67 20 54 4c   people using TL
0460: 53 20 77 69 74 68 20 74 68 65 0a 09 6f 72 69 67  S with the..orig
0470: 69 6e 61 6c 20 73 74 61 63 6b 65 64 20 63 68 61  inal stacked cha
0480: 6e 6e 65 6c 20 69 6d 70 6c 65 6d 65 6e 74 61 74  nnel implementat
0490: 69 6f 6e 2e 0a 0a 32 30 30 30 2d 30 37 2d 32 36  ion...2000-07-26
04a0: 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68    Jeff Hobbs  <h
04b0: 6f 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63  obbs@scriptics.c
04c0: 6f 6d 3e 0a 0a 09 2a 20 6d 65 72 67 65 64 20 61  om>...* merged a
04d0: 6c 6c 20 63 68 61 6e 67 65 73 20 66 72 6f 6d 20  ll changes from 
04e0: 74 6c 73 2d 31 2d 33 2d 69 6f 2d 72 65 77 72 69  tls-1-3-io-rewri
04f0: 74 65 20 62 61 63 6b 20 69 6e 74 6f 20 6d 61 69  te back into mai
0500: 6e 20 62 72 61 6e 63 68 0a 0a 09 2a 20 74 65 73  n branch...* tes
0510: 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a 20 75  ts/tlsIO.test: u
0520: 70 64 61 74 65 64 20 63 6f 6d 6d 65 6e 74 73 2c  pdated comments,
0530: 20 66 69 78 65 64 20 61 20 70 63 43 72 61 73 68   fixed a pcCrash
0540: 20 63 61 73 65 20 74 68 61 74 0a 09 77 61 73 20   case that..was 
0550: 64 75 65 20 74 6f 20 64 65 62 75 67 20 61 73 73  due to debug ass
0560: 65 72 74 69 6f 6e 20 69 6e 20 57 69 6e 64 6f 77  ertion in Window
0570: 73 20 53 53 4c 2e 0a 0a 09 2a 20 74 6c 73 2e 63  s SSL....* tls.c
0580: 20 28 49 6d 70 6f 72 74 4f 62 6a 43 6d 64 29 3a   (ImportObjCmd):
0590: 20 72 65 6d 6f 76 65 64 20 75 6e 6e 65 63 65 73   removed unneces
05a0: 73 61 72 79 20 75 73 65 20 6f 66 20 27 62 69 6f  sary use of 'bio
05b0: 27 20 61 72 67 2e 0a 09 28 54 6c 73 5f 49 6e 69  ' arg...(Tls_Ini
05c0: 74 29 3a 20 63 68 65 63 6b 20 72 65 74 75 72 6e  t): check return
05d0: 20 76 61 6c 75 65 20 6f 66 20 53 53 4c 5f 6c 69   value of SSL_li
05e0: 62 72 61 72 79 5f 69 6e 69 74 2e 20 20 41 6c 73  brary_init.  Als
05f0: 6f 20 6c 6f 74 73 20 6f 66 0a 09 77 68 69 74 65  o lots of..white
0600: 73 70 61 63 65 20 63 6c 65 61 6e 75 70 20 28 6d  space cleanup (m
0610: 6f 72 65 20 6c 69 6b 65 20 54 63 6c 20 45 6e 67  ore like Tcl Eng
0620: 20 73 74 79 6c 65 20 67 75 69 64 65 29 2c 20 62   style guide), b
0630: 75 74 20 6e 6f 74 20 61 6c 6c 0a 09 63 6f 64 65  ut not all..code
0640: 20 77 61 73 20 63 6c 65 61 6e 65 64 20 75 70 2e   was cleaned up.
0650: 0a 0a 09 2a 20 74 6c 73 42 49 4f 2e 63 3a 20 6d  ...* tlsBIO.c: m
0660: 69 6e 6f 72 20 77 68 69 74 65 73 70 61 63 65 20  inor whitespace 
0670: 63 6c 65 61 6e 75 70 0a 0a 09 2a 20 74 6c 73 49  cleanup...* tlsI
0680: 4f 2e 63 3a 20 6d 69 6e 6f 72 20 77 68 69 74 65  O.c: minor white
0690: 73 70 61 63 65 20 63 6c 65 61 6e 75 70 2e 0a 09  space cleanup...
06a0: 28 54 6c 73 49 6e 70 75 74 50 72 6f 63 2c 20 54  (TlsInputProc, T
06b0: 6c 73 4f 75 74 70 75 74 50 72 6f 63 29 3a 20 41  lsOutputProc): A
06c0: 64 64 65 64 20 45 52 52 5f 63 6c 65 61 72 5f 65  dded ERR_clear_e
06d0: 72 72 6f 72 20 62 65 66 6f 72 65 20 63 61 6c 6c  rror before call
06e0: 73 0a 09 74 6f 20 42 49 4f 5f 72 65 61 64 20 6f  s..to BIO_read o
06f0: 72 20 42 49 4f 5f 77 72 69 74 65 2c 20 62 65 63  r BIO_write, bec
0700: 61 75 73 65 20 77 65 20 63 6f 75 6c 64 20 6f 74  ause we could ot
0710: 68 65 72 77 69 73 65 20 65 6e 64 20 75 70 0a 09  herwise end up..
0720: 70 75 6c 6c 69 6e 67 20 61 6e 20 65 72 72 6f 72  pulling an error
0730: 20 6f 66 66 20 74 68 65 20 73 74 61 63 6b 20 74   off the stack t
0740: 68 61 74 20 64 69 64 6e 27 74 20 62 65 6c 6f 6e  hat didn't belon
0750: 67 20 74 6f 20 75 73 2e 20 20 41 6c 73 6f 0a 09  g to us.  Also..
0760: 63 6c 65 61 6e 75 70 20 75 70 20 65 78 63 65 73  cleanup up exces
0770: 73 69 76 65 20 75 73 65 20 6f 66 20 67 6f 74 6f  sive use of goto
0780: 73 2e 0a 0a 32 30 30 30 2d 30 37 2d 32 30 20 20  s...2000-07-20  
0790: 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62  Jeff Hobbs  <hob
07a0: 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d  bs@scriptics.com
07b0: 3e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49  >...* tests/tlsI
07c0: 4f 2e 74 65 73 74 3a 20 63 6f 72 72 65 63 74 65  O.test: correcte
07d0: 64 20 76 61 72 69 6f 75 73 20 74 65 73 74 73 20  d various tests 
07e0: 74 6f 20 62 65 20 63 6f 72 72 65 63 74 20 66 6f  to be correct fo
07f0: 72 20 54 4c 53 0a 09 73 74 61 63 6b 65 64 20 63  r TLS..stacked c
0800: 68 61 6e 6e 65 6c 73 20 28 61 73 20 6f 70 70 6f  hannels (as oppo
0810: 73 65 64 20 74 6f 20 74 68 65 20 73 74 61 6e 64  sed to the stand
0820: 61 72 64 20 73 6f 63 6b 65 74 73 20 74 68 65 20  ard sockets the 
0830: 74 65 73 74 0a 09 73 75 69 74 65 20 77 61 73 20  test..suite was 
0840: 61 64 6f 70 74 65 64 20 66 72 6f 6d 29 2e 20 20  adopted from).  
0850: 4b 65 79 20 64 69 66 66 65 72 65 6e 63 65 73 20  Key differences 
0860: 61 72 65 20 74 68 61 74 20 54 4c 53 20 63 61 6e  are that TLS can
0870: 6e 6f 74 0a 09 6f 70 65 72 61 74 65 20 69 6e 20  not..operate in 
0880: 6f 6e 65 20 70 72 6f 63 65 73 73 20 77 69 74 68  one process with
0890: 6f 75 74 20 61 6c 6c 20 63 68 61 6e 6e 65 6c 73  out all channels
08a0: 20 62 65 69 6e 67 20 6e 6f 6e 2d 62 6c 6f 63 6b   being non-block
08b0: 69 6e 67 2c 20 6f 72 0a 09 74 68 65 20 68 61 6e  ing, or..the han
08c0: 64 73 68 61 6b 65 20 77 69 6c 6c 20 62 6c 6f 63  dshake will bloc
08d0: 6b 2c 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 69  k, and handshaki
08e0: 6e 67 20 6d 75 73 74 20 62 65 20 66 6f 72 63 65  ng must be force
08f0: 64 20 69 6e 20 73 6f 6d 65 0a 09 63 61 73 65 73  d in some..cases
0900: 2e 20 20 41 6c 73 6f 2c 20 68 61 6e 64 73 68 61  .  Also, handsha
0910: 6b 65 73 20 64 6f 6e 27 74 20 73 65 65 6d 20 74  kes don't seem t
0920: 6f 20 63 6f 6d 70 6c 65 74 65 20 75 6e 6c 65 73  o complete unles
0930: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 09 68 61  s the client..ha
0940: 73 20 70 6c 61 63 65 64 20 61 74 20 6c 65 61 73  s placed at leas
0950: 74 20 6f 6e 65 20 62 79 74 65 20 66 6f 72 20 74  t one byte for t
0960: 68 65 20 73 65 72 76 65 72 20 74 6f 20 72 65 61  he server to rea
0970: 64 20 69 6e 20 74 68 65 20 63 68 61 6e 6e 65 6c  d in the channel
0980: 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 72 65 6d 6f  ....* tests/remo
0990: 74 65 2e 74 63 6c 3a 20 63 6f 72 72 65 63 74 65  te.tcl: correcte
09a0: 64 20 74 68 65 20 66 69 6e 64 69 6e 67 20 6f 66  d the finding of
09b0: 20 74 65 73 74 73 20 63 65 72 74 69 66 69 63 61   tests certifica
09c0: 74 65 73 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 20  tes...* tlsIO.c 
09d0: 28 54 6c 73 43 6c 6f 73 65 50 72 6f 63 29 3a 20  (TlsCloseProc): 
09e0: 72 65 6d 6f 76 65 64 20 64 65 6c 65 74 69 6e 67  removed deleting
09f0: 20 6f 66 20 74 69 6d 65 72 20 68 61 6e 64 6c 65   of timer handle
0a00: 72 20 61 73 0a 09 74 68 61 74 20 69 73 20 68 61  r as..that is ha
0a10: 6e 64 6c 65 64 20 62 79 20 54 6c 73 5f 43 6c 65  ndled by Tls_Cle
0a20: 61 6e 2e 0a 0a 09 2a 20 74 6c 73 2e 74 63 6c 20  an....* tls.tcl 
0a30: 28 74 6c 73 3a 3a 5f 61 63 63 65 70 74 29 3a 20  (tls::_accept): 
0a40: 63 6f 72 72 65 63 74 65 64 20 74 68 65 20 69 6e  corrected the in
0a50: 74 65 72 6e 61 6c 20 5f 61 63 63 65 70 74 20 74  ternal _accept t
0a60: 6f 0a 09 74 72 69 63 6b 6c 65 20 63 61 6c 6c 62  o..trickle callb
0a70: 61 63 6b 20 65 72 72 6f 72 73 20 74 6f 20 74 68  ack errors to th
0a80: 65 20 75 73 65 72 2e 0a 0a 09 2a 20 4d 61 6b 65  e user....* Make
0a90: 66 69 6c 65 2e 69 6e 3a 20 6d 61 64 65 20 74 68  file.in: made th
0aa0: 65 20 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69  e install-binari
0ab0: 65 73 20 74 61 72 67 65 74 20 72 65 67 65 6e 65  es target regene
0ac0: 72 61 74 65 20 74 68 65 0a 09 70 6b 67 49 6e 64  rate the..pkgInd
0ad0: 65 78 2e 74 63 6c 20 63 6f 72 72 65 63 74 6c 79  ex.tcl correctly
0ae0: 2e 20 20 54 68 65 20 74 65 73 74 20 74 61 72 67  .  The test targ
0af0: 65 74 20 70 72 6f 62 61 62 6c 79 20 73 68 6f 75  et probably shou
0b00: 6c 64 6e 27 74 20 73 63 72 65 77 0a 09 69 74 20  ldn't screw..it 
0b10: 75 70 2c 20 62 75 74 20 74 68 69 73 20 69 73 20  up, but this is 
0b20: 74 6f 20 62 65 20 6f 6e 20 74 68 65 20 73 61 66  to be on the saf
0b30: 65 20 73 69 64 65 2e 0a 0a 32 30 30 30 2d 30 37  e side...2000-07
0b40: 2d 31 37 20 20 4a 65 66 66 20 48 6f 62 62 73 20  -17  Jeff Hobbs 
0b50: 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74 69 63   <hobbs@scriptic
0b60: 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 70 6b 67 49 6e  s.com>...* pkgIn
0b70: 64 65 78 2e 74 63 6c 2e 69 6e 3a 0a 09 2a 20 63  dex.tcl.in:..* c
0b80: 6f 6e 66 69 67 75 72 65 2e 69 6e 3a 20 75 70 64  onfigure.in: upd
0b90: 61 74 65 64 20 76 65 72 73 69 6f 6e 20 74 6f 20  ated version to 
0ba0: 31 2e 34 0a 0a 32 30 30 30 2d 30 37 2d 31 33 20  1.4..2000-07-13 
0bb0: 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f   Jeff Hobbs  <ho
0bc0: 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f  bbs@scriptics.co
0bd0: 6d 3e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73  m>...* tests/tls
0be0: 49 4f 2e 74 65 73 74 3a 20 65 6e 61 62 6c 65 64  IO.test: enabled
0bf0: 20 74 65 73 74 73 20 32 2e 31 30 2c 20 37 2e 5b   tests 2.10, 7.[
0c00: 31 32 34 35 5d 20 28 74 68 65 72 65 20 69 73 20  1245] (there is 
0c10: 6e 6f 20 33 29 2c 0a 09 77 68 69 63 68 20 6e 6f  no 3),..which no
0c20: 77 20 70 61 73 73 2e 20 20 41 64 64 65 64 20 73  w pass.  Added s
0c30: 6f 6d 65 20 63 6f 6d 6d 65 6e 74 73 20 74 6f 20  ome comments to 
0c40: 6f 74 68 65 72 20 66 61 69 6c 69 6e 67 20 74 65  other failing te
0c50: 73 74 73 2e 0a 0a 32 30 30 30 2d 30 37 2d 31 31  sts...2000-07-11
0c60: 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68    Jeff Hobbs  <h
0c70: 6f 62 62 73 40 73 63 72 69 70 74 69 63 73 2e 63  obbs@scriptics.c
0c80: 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a  om>...* tlsIO.c:
0c90: 20 63 68 61 6e 67 65 64 20 61 6c 6c 20 74 68 65   changed all the
0ca0: 20 63 68 61 6e 6e 65 6c 20 70 72 6f 63 73 20 74   channel procs t
0cb0: 6f 20 73 74 61 72 74 20 77 69 74 68 20 54 6c 73  o start with Tls
0cc0: 2a 20 66 6f 72 0a 09 62 65 74 74 65 72 20 70 61  * for..better pa
0cd0: 72 69 74 79 20 77 68 65 6e 20 63 6f 6d 70 61 72  rity when compar
0ce0: 69 6e 67 20 77 69 74 68 20 54 72 61 6e 73 66 6f  ing with Transfo
0cf0: 72 6d 20 63 68 61 6e 6e 65 6c 20 70 72 6f 63 73  rm channel procs
0d00: 2e 0a 09 52 65 77 72 6f 74 65 20 54 6c 73 57 61  ...Rewrote TlsWa
0d10: 74 63 68 50 72 6f 63 2c 20 61 64 64 65 64 20 54  tchProc, added T
0d20: 6c 73 4e 6f 74 69 66 79 50 72 6f 63 20 61 63 63  lsNotifyProc acc
0d30: 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 6e 65  ording to the ne
0d40: 77 0a 09 63 68 61 6e 6e 65 6c 20 64 65 73 69 67  w..channel desig
0d50: 6e 2c 20 77 68 69 63 68 20 61 6c 73 6f 20 6c 65  n, which also le
0d60: 61 76 65 73 20 54 6c 73 43 68 61 6e 6e 65 6c 48  aves TlsChannelH
0d70: 61 6e 64 6c 65 72 20 75 6e 75 73 65 64 2e 0a 0a  andler unused...
0d80: 09 2a 20 74 6c 73 42 49 4f 2e 63 20 28 42 69 6f  .* tlsBIO.c (Bio
0d90: 43 74 72 6c 29 3a 20 63 68 61 6e 67 65 64 20 42  Ctrl): changed B
0da0: 49 4f 5f 43 54 52 4c 5f 46 4c 55 53 48 20 63 61  IO_CTRL_FLUSH ca
0db0: 73 65 20 74 6f 20 75 73 65 0a 09 54 63 6c 5f 57  se to use..Tcl_W
0dc0: 72 69 74 65 52 61 77 20 69 6e 73 74 65 61 64 20  riteRaw instead 
0dd0: 6f 66 20 54 63 6c 5f 46 6c 75 73 68 20 28 74 6f  of Tcl_Flush (to
0de0: 20 6f 70 65 72 61 74 65 20 6f 6e 20 63 6f 72 72   operate on corr
0df0: 65 63 74 20 63 68 61 6e 6e 65 6c 0a 09 69 6e 20  ect channel..in 
0e00: 74 68 65 20 73 74 61 63 6b 20 69 6e 73 74 65 61  the stack instea
0e10: 64 20 6f 66 20 73 74 61 72 74 69 6e 67 20 61 74  d of starting at
0e20: 20 74 68 65 20 74 6f 70 20 61 67 61 69 6e 29 2e   the top again).
0e30: 20 20 57 6f 75 6c 64 0a 09 6f 74 68 65 72 77 69    Would..otherwi
0e40: 73 65 20 63 61 75 73 65 20 61 20 72 65 63 75 72  se cause a recur
0e50: 73 69 76 65 20 73 74 61 63 6b 20 62 6f 6d 62 20  sive stack bomb 
0e60: 77 68 65 6e 20 69 6d 70 6c 69 63 69 74 20 68 61  when implicit ha
0e70: 6e 64 73 68 61 6b 69 6e 67 0a 09 74 6f 6f 6b 20  ndshaking..took 
0e80: 65 66 66 65 63 74 2e 0a 0a 09 2a 20 74 65 73 74  effect....* test
0e90: 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a 20 72 65  s/tlsIO.test: re
0ea0: 6d 6f 76 65 64 20 63 68 61 6e 67 65 73 20 6d 61  moved changes ma
0eb0: 64 65 20 74 6f 20 74 65 73 74 20 73 75 69 74 65  de to test suite
0ec0: 20 28 61 6c 6c 20 74 65 73 74 73 0a 09 74 68 61   (all tests..tha
0ed0: 74 20 72 61 6e 20 62 65 66 6f 72 65 20 6e 6f 77  t ran before now
0ee0: 20 70 61 73 73 20 63 6f 72 72 65 63 74 6c 79 29   pass correctly)
0ef0: 2c 20 61 6e 64 20 63 68 61 6e 67 65 64 20 73 6f  , and changed so
0f00: 6d 65 20 61 63 63 65 70 74 20 70 72 6f 63 0a 09  me accept proc..
0f10: 61 72 67 73 20 74 6f 20 72 65 66 6c 65 63 74 20  args to reflect 
0f20: 74 68 61 74 20 61 20 73 6f 63 6b 20 69 73 20 61  that a sock is a
0f30: 6e 20 61 72 67 2c 20 6e 6f 74 20 61 20 66 69 6c  n arg, not a fil
0f40: 65 2e 0a 0a 32 30 30 30 2d 30 37 2d 31 30 20 20  e...2000-07-10  
0f50: 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62  Jeff Hobbs  <hob
0f60: 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d  bs@scriptics.com
0f70: 3e 0a 0a 09 2a 20 74 6c 73 42 49 4f 2e 63 20 28  >...* tlsBIO.c (
0f80: 42 69 6f 57 72 69 74 65 2c 20 42 69 6f 52 65 61  BioWrite, BioRea
0f90: 64 29 3a 20 63 68 61 6e 67 65 64 20 54 63 6c 5f  d): changed Tcl_
0fa0: 52 65 61 64 2f 57 72 69 74 65 20 74 6f 0a 09 54  Read/Write to..T
0fb0: 63 6c 5f 52 65 61 64 52 61 77 2f 54 63 6c 57 72  cl_ReadRaw/TclWr
0fc0: 69 74 65 52 61 77 2e 0a 0a 09 2a 20 74 6c 73 2e  iteRaw....* tls.
0fd0: 63 3a 20 61 64 64 65 64 20 75 73 65 20 6f 66 20  c: added use of 
0fe0: 54 63 6c 5f 47 65 74 54 6f 70 43 68 61 6e 6e 65  Tcl_GetTopChanne
0ff0: 6c 20 61 66 74 65 72 20 54 63 6c 5f 47 65 74 43  l after Tcl_GetC
1000: 68 61 6e 6e 65 6c 20 61 6e 64 0a 09 67 6f 74 20  hannel and..got 
1010: 72 65 74 75 72 6e 20 76 61 6c 75 65 20 66 72 6f  return value fro
1020: 6d 20 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e  m Tcl_StackChann
1030: 65 6c 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c  el....* tests/tl
1040: 73 49 4f 2e 74 65 73 74 3a 20 61 64 64 65 64 20  sIO.test: added 
1050: 73 6f 6d 65 20 68 61 6e 64 73 68 61 6b 69 6e 67  some handshaking
1060: 20 74 68 61 74 20 73 68 6f 75 6c 64 6e 27 74 20   that shouldn't 
1070: 62 65 0a 09 6e 65 63 65 73 73 61 72 79 2c 20 62  be..necessary, b
1080: 75 74 20 77 65 20 63 72 61 73 68 20 6f 74 68 65  ut we crash othe
1090: 72 77 69 73 65 20 28 6e 65 65 64 73 20 6d 6f 72  rwise (needs mor
10a0: 65 20 74 65 73 74 69 6e 67 29 2e 0a 0a 09 2a 20  e testing)....* 
10b0: 74 6c 73 49 4f 2e 63 3a 20 61 64 64 65 64 20 73  tlsIO.c: added s
10c0: 75 70 70 6f 72 74 20 66 6f 72 20 22 63 6f 72 72  upport for "corr
10d0: 65 63 74 65 64 22 20 73 74 61 63 6b 65 64 20 63  ected" stacked c
10e0: 68 61 6e 6e 65 6c 73 2e 20 20 41 6c 6c 0a 09 74  hannels.  All..t
10f0: 68 65 20 61 62 6f 76 65 20 63 68 61 6e 6e 65 6c  he above channel
1100: 73 20 61 72 65 20 69 6e 20 54 43 4c 5f 43 48 41  s are in TCL_CHA
1110: 4e 4e 45 4c 5f 56 45 52 53 49 4f 4e 5f 32 20 23  NNEL_VERSION_2 #
1120: 69 66 64 65 66 73 2e 0a 0a 32 30 30 30 2d 30 36  ifdefs...2000-06
1130: 2d 30 35 20 20 53 63 6f 74 74 20 53 74 61 6e 74  -05  Scott Stant
1140: 6f 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 61 6a 75  on  <stanton@aju
1150: 62 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e  basolutions.com>
1160: 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69 6e  ...* Makefile.in
1170: 3a 20 46 69 78 65 64 20 62 72 6f 6b 65 6e 20 74  : Fixed broken t
1180: 65 73 74 20 74 61 72 67 65 74 2e 0a 0a 09 2a 20  est target....* 
1190: 74 6c 73 49 6e 74 2e 68 3a 20 0a 09 2a 20 74 6c  tlsInt.h: ..* tl
11a0: 73 2e 63 3a 20 43 6c 65 61 6e 65 64 20 75 70 20  s.c: Cleaned up 
11b0: 64 65 63 6c 61 72 61 74 69 6f 6e 73 20 6f 66 20  declarations of 
11c0: 54 6c 73 5f 43 6c 65 61 6e 20 74 6f 20 61 76 6f  Tls_Clean to avo
11d0: 69 64 20 65 72 72 6f 72 73 20 6f 6e 0a 09 57 69  id errors on..Wi
11e0: 6e 64 6f 77 73 20 28 6c 69 6e 74 29 2e 0a 0a 32  ndows (lint)...2
11f0: 30 30 30 2d 30 36 2d 30 35 20 20 42 72 65 6e 74  000-06-05  Brent
1200: 20 57 65 6c 63 68 20 3c 77 65 6c 63 68 40 61 6a   Welch <welch@aj
1210: 75 62 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d  ubasolutions.com
1220: 3e 0a 0a 09 2a 20 74 6c 73 2e 63 2c 20 74 6c 73  >...* tls.c, tls
1230: 49 4f 2e 63 3a 20 20 53 70 6c 69 74 20 54 6c 73  IO.c:  Split Tls
1240: 5f 46 72 65 65 20 69 6e 74 6f 20 54 6c 73 5f 43  _Free into Tls_C
1250: 6c 65 61 6e 2c 20 77 68 69 63 68 20 64 6f 65 73  lean, which does
1260: 0a 09 74 68 65 20 53 53 4c 20 63 6c 65 61 6e 75  ..the SSL cleanu
1270: 70 2c 20 61 6e 64 20 74 68 65 20 54 63 6c 5f 46  p, and the Tcl_F
1280: 72 65 65 20 63 61 6c 6c 2e 20 20 49 74 20 69 73  ree call.  It is
1290: 20 69 6d 70 6f 72 74 61 6e 74 20 74 6f 20 73 68   important to sh
12a0: 75 74 64 6f 77 6e 0a 09 74 68 65 20 53 53 4c 20  utdown..the SSL 
12b0: 73 74 61 74 65 20 22 73 79 6e 63 68 72 6f 6e 6f  state "synchrono
12c0: 75 73 6c 79 22 20 64 75 72 69 6e 67 20 61 20 73  usly" during a s
12d0: 74 61 63 6b 65 64 20 66 6c 75 73 68 2e 0a 0a 32  tacked flush...2
12e0: 30 30 30 2d 30 36 2d 30 31 20 20 53 63 6f 74 74  000-06-01  Scott
12f0: 20 53 74 61 6e 74 6f 6e 20 20 3c 73 74 61 6e 74   Stanton  <stant
1300: 6f 6e 40 61 6a 75 62 61 73 6f 6c 75 74 69 6f 6e  on@ajubasolution
1310: 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49 4f  s.com>...* tlsIO
1320: 2e 63 3a 20 52 65 73 74 6f 72 65 64 20 63 61 6c  .c: Restored cal
1330: 6c 20 74 6f 20 54 63 6c 5f 4e 6f 74 69 66 79 43  l to Tcl_NotifyC
1340: 68 61 6e 6e 65 6c 20 66 72 6f 6d 20 43 68 61 6e  hannel from Chan
1350: 6e 65 6c 48 61 6e 64 6c 65 72 0a 09 74 6f 20 65  nelHandler..to e
1360: 6e 73 75 72 65 20 74 68 61 74 20 65 76 65 6e 74  nsure that event
1370: 73 20 70 72 6f 70 61 67 61 74 65 20 66 72 6f 6d  s propagate from
1380: 20 74 68 65 20 6c 6f 77 65 72 20 64 72 69 76 65   the lower drive
1390: 72 2e 20 20 54 68 69 73 20 6d 61 79 0a 09 72 65  r.  This may..re
13a0: 73 75 6c 74 20 69 6e 20 61 6e 20 69 6e 66 69 6e  sult in an infin
13b0: 69 74 65 20 6c 6f 6f 70 20 69 6e 20 73 6f 6d 65  ite loop in some
13c0: 20 63 61 73 65 73 2c 20 73 6f 20 74 68 69 73 20   cases, so this 
13d0: 69 73 20 6e 6f 74 20 61 20 74 6f 74 61 6c 0a 09  is not a total..
13e0: 66 69 78 2e 20 20 54 68 69 73 20 6d 61 79 20 62  fix.  This may b
13f0: 65 20 73 75 66 66 69 63 69 65 6e 74 20 66 6f 72  e sufficient for
1400: 20 6e 6f 77 2c 20 68 6f 77 65 76 65 72 2e 20 5b   now, however. [
1410: 42 75 67 3a 20 35 36 32 33 5d 0a 0a 32 30 30 30  Bug: 5623]..2000
1420: 2d 30 36 2d 30 31 20 20 53 63 6f 74 74 20 53 74  -06-01  Scott St
1430: 61 6e 74 6f 6e 20 20 3c 73 74 61 6e 74 6f 6e 40  anton  <stanton@
1440: 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a  scriptics.com>..
1450: 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 52 65 73 74  .* tlsIO.c: Rest
1460: 6f 72 65 20 74 68 65 20 70 72 65 76 69 6f 75 73  ore the previous
1470: 20 76 65 72 73 69 6f 6e 2e 20 20 46 69 78 65 64   version.  Fixed
1480: 20 74 68 65 20 43 6c 6f 73 65 50 72 6f 63 20 73   the CloseProc s
1490: 6f 0a 09 69 74 20 75 6e 72 65 67 69 73 74 65 72  o..it unregister
14a0: 73 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61  s the channel ha
14b0: 6e 64 6c 65 72 20 6f 6e 20 74 68 65 20 73 75 70  ndler on the sup
14c0: 65 72 63 65 64 65 64 20 63 68 61 6e 6e 65 6c 0a  erceded channel.
14d0: 09 69 6e 73 74 65 61 64 20 6f 66 20 74 68 65 20  .instead of the 
14e0: 75 70 70 65 72 20 63 68 61 6e 6e 65 6c 2e 20 41  upper channel. A
14f0: 6c 73 6f 20 72 65 6d 6f 76 65 64 20 74 68 65 20  lso removed the 
1500: 63 61 6c 6c 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74  call to..Tcl_Not
1510: 69 66 79 43 68 61 6e 6e 65 6c 20 69 6e 20 74 68  ifyChannel in th
1520: 65 20 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 72  e ChannelHandler
1530: 20 62 65 63 61 75 73 65 20 74 68 69 73 20 77 69   because this wi
1540: 6c 6c 20 72 65 73 75 6c 74 0a 09 69 6e 20 61 6e  ll result..in an
1550: 20 69 6e 66 69 6e 69 74 65 20 6c 6f 6f 70 20 69   infinite loop i
1560: 66 20 64 61 74 61 20 69 73 20 65 76 65 72 20 62  f data is ever b
1570: 75 66 66 65 72 65 64 20 69 6e 20 74 68 65 20 42  uffered in the B
1580: 49 4f 0a 09 73 74 72 75 63 74 75 72 65 2e 20 5b  IO..structure. [
1590: 42 75 67 3a 20 35 36 32 33 5d 0a 0a 32 30 30 30  Bug: 5623]..2000
15a0: 2d 30 35 2d 33 31 20 20 42 72 65 6e 74 20 57 65  -05-31  Brent We
15b0: 6c 63 68 20 3c 77 65 6c 63 68 40 73 63 72 69 70  lch <welch@scrip
15c0: 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c  tics.com>...* tl
15d0: 73 2e 63 3a 20 43 68 61 6e 67 65 20 74 68 65 20  s.c: Change the 
15e0: 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 72 20 74  ChannelHandler t
15f0: 6f 20 62 65 20 72 65 67 69 73 74 65 72 65 64 20  o be registered 
1600: 6f 6e 20 74 68 65 20 6d 61 69 6e 0a 09 63 68 61  on the main..cha
1610: 6e 6e 65 6c 20 61 73 20 6f 70 70 73 65 64 20 74  nnel as oppsed t
1620: 6f 20 74 68 65 20 22 70 61 72 65 6e 74 22 2c 20  o the "parent", 
1630: 6f 72 20 73 75 70 65 72 63 65 65 64 65 64 2c 20  or superceeded, 
1640: 63 68 61 6e 6e 65 6c 2e 20 20 54 68 69 73 0a 09  channel.  This..
1650: 69 73 20 62 65 63 61 75 73 65 20 74 68 65 20 73  is because the s
1660: 6f 63 6b 65 74 20 64 72 69 76 65 72 20 6e 6f 74  ocket driver not
1670: 69 66 69 65 73 20 74 68 65 20 6d 61 69 6e 20 63  ifies the main c
1680: 68 61 6e 6e 65 6c 2c 20 61 6e 64 20 74 68 65 72  hannel, and ther
1690: 65 0a 09 61 72 65 20 74 69 6d 65 73 20 77 69 74  e..are times wit
16a0: 68 20 74 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e  h the main chann
16b0: 65 6c 20 67 65 74 73 20 63 6c 6f 73 65 64 2c 20  el gets closed, 
16c0: 62 75 74 20 74 68 65 20 73 75 70 65 72 63 65 64  but the superced
16d0: 65 64 0a 09 6f 6e 65 20 69 73 20 6e 6f 74 20 79  ed..one is not y
16e0: 65 74 20 63 6c 6f 73 65 64 2e 20 20 49 66 20 74  et closed.  If t
16f0: 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c  he channel handl
1700: 65 72 20 67 65 74 73 20 74 72 69 67 67 65 72 65  er gets triggere
1710: 64 20 69 6e 0a 09 74 68 69 73 20 68 61 6c 66 2d  d in..this half-
1720: 6f 70 65 6e 20 73 74 61 74 65 20 69 74 20 69 73  open state it is
1730: 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68   associated with
1740: 20 74 68 65 20 73 75 70 65 72 63 65 65 64 65 64   the superceeded
1750: 0a 09 63 68 61 6e 6e 65 64 6c 2c 20 62 75 74 20  ..channedl, but 
1760: 75 73 65 73 20 69 74 73 20 70 72 69 76 61 74 65  uses its private
1770: 20 70 6f 69 6e 74 65 72 20 74 6f 20 74 68 65 20   pointer to the 
1780: 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 2c 20 77 68  main channel, wh
1790: 69 63 68 0a 09 69 73 20 6d 6f 73 74 6c 79 20 64  ich..is mostly d
17a0: 65 73 74 72 6f 79 65 64 2e 20 20 45 6c 69 6d 69  estroyed.  Elimi
17b0: 6e 61 74 65 64 20 74 68 65 20 72 65 64 75 6e 64  nated the redund
17c0: 61 6e 74 20 63 61 6c 6c 20 74 6f 0a 09 54 63 6c  ant call to..Tcl
17d0: 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65 6c 20 66  _NotifyChannel f
17e0: 72 6f 6d 20 54 6c 73 57 61 74 63 68 50 72 6f 63  rom TlsWatchProc
17f0: 2e 20 5b 42 75 67 3a 20 35 36 32 33 5d 0a        . [Bug: 5623].