Hex Artifact Content

Artifact d1a7a7f0bffccedd8880b1ec47ec6acdc5eaee8c:


0000: 32 30 30 31 2d 30 36 2d 32 31 20 20 4a 65 66 66  2001-06-21  Jeff
0010: 20 48 6f 62 62 73 20 20 3c 6a 65 66 66 68 40 41   Hobbs  <jeffh@A
0020: 63 74 69 76 65 53 74 61 74 65 2e 63 6f 6d 3e 0a  ctiveState.com>.
0030: 0a 09 2a 20 63 6f 6e 66 69 67 75 72 65 3a 20 61  ..* configure: a
0040: 64 64 65 64 20 63 6f 6e 66 69 67 75 72 65 20 74  dded configure t
0050: 6f 20 43 56 53 0a 09 2a 20 63 6f 6e 66 69 67 75  o CVS..* configu
0060: 72 65 2e 69 6e 3a 20 6d 6f 76 65 64 20 74 6f 20  re.in: moved to 
0070: 70 61 74 63 68 6c 65 76 65 6c 20 31 2e 34 2e 31  patchlevel 1.4.1
0080: 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69 6e  ...* Makefile.in
0090: 3a 20 63 6f 72 72 65 63 74 65 64 20 27 64 69 73  : corrected 'dis
00a0: 74 27 20 74 61 72 67 65 74 0a 0a 09 2a 20 74 65  t' target...* te
00b0: 73 74 73 2f 63 65 72 74 73 2f 66 69 6c 65 2e 73  sts/certs/file.s
00c0: 72 6c 3a 0a 09 2a 20 74 65 73 74 73 2f 63 65 72  rl:..* tests/cer
00d0: 74 73 2f 63 61 2e 70 65 6d 3a 0a 09 2a 20 74 65  ts/ca.pem:..* te
00e0: 73 74 73 2f 63 65 72 74 73 2f 63 6c 69 65 6e 74  sts/certs/client
00f0: 2e 6b 65 79 3a 0a 09 2a 20 74 65 73 74 73 2f 63  .key:..* tests/c
0100: 65 72 74 73 2f 63 6c 69 65 6e 74 2e 70 65 6d 3a  erts/client.pem:
0110: 0a 09 2a 20 74 65 73 74 73 2f 63 65 72 74 73 2f  ..* tests/certs/
0120: 63 6c 69 65 6e 74 2e 72 65 71 3a 0a 09 2a 20 74  client.req:..* t
0130: 65 73 74 73 2f 63 65 72 74 73 2f 70 72 69 76 6b  ests/certs/privk
0140: 65 79 2e 70 65 6d 3a 0a 09 2a 20 74 65 73 74 73  ey.pem:..* tests
0150: 2f 63 65 72 74 73 2f 73 65 72 76 65 72 2e 6b 65  /certs/server.ke
0160: 79 3a 0a 09 2a 20 74 65 73 74 73 2f 63 65 72 74  y:..* tests/cert
0170: 73 2f 73 65 72 76 65 72 2e 70 65 6d 3a 0a 09 2a  s/server.pem:..*
0180: 20 74 65 73 74 73 2f 63 65 72 74 73 2f 73 65 72   tests/certs/ser
0190: 76 65 72 2e 72 65 71 3a 0a 09 2a 20 74 65 73 74  ver.req:..* test
01a0: 73 2f 63 65 72 74 73 2f 63 61 63 65 72 74 2e 70  s/certs/cacert.p
01b0: 65 6d 3a 20 72 65 70 6c 61 63 65 64 20 62 79 20  em: replaced by 
01c0: 6e 65 77 20 63 61 2e 70 65 6d 0a 09 2a 20 74 65  new ca.pem..* te
01d0: 73 74 73 2f 63 65 72 74 73 2f 73 6b 65 79 2e 70  sts/certs/skey.p
01e0: 65 6d 3a 20 72 65 70 6c 61 63 65 64 20 62 79 20  em: replaced by 
01f0: 6e 65 77 20 73 65 72 76 65 72 2e 6b 65 79 0a 09  new server.key..
0200: 2a 20 74 65 73 74 73 2f 63 65 72 74 73 2f 63 6b  * tests/certs/ck
0210: 65 79 2e 70 65 6d 3a 20 72 65 70 6c 61 63 65 64  ey.pem: replaced
0220: 20 62 79 20 6e 65 77 20 63 6c 69 65 6e 74 2e 6b   by new client.k
0230: 65 79 0a 09 2a 20 74 65 73 74 73 2f 63 65 72 74  ey..* tests/cert
0240: 73 2f 52 45 41 44 4d 45 2e 74 78 74 3a 20 6e 65  s/README.txt: ne
0250: 77 20 73 65 74 20 6f 66 20 74 65 73 74 20 63 65  w set of test ce
0260: 72 74 69 66 69 63 61 74 65 73 20 77 69 74 68 20  rtificates with 
0270: 73 6f 6d 65 0a 09 52 45 41 44 4d 45 20 69 6e 66  some..README inf
0280: 6f 20 6f 6e 20 74 68 65 69 72 20 67 65 6e 65 72  o on their gener
0290: 61 74 69 6f 6e 2e 0a 0a 09 2a 20 74 65 73 74 73  ation....* tests
02a0: 2f 63 69 70 68 65 72 73 2e 74 65 73 74 3a 20 75  /ciphers.test: u
02b0: 70 64 61 74 65 64 20 63 69 70 68 65 72 73 20 65  pdated ciphers e
02c0: 78 70 65 63 74 65 64 20 77 69 74 68 20 64 65 66  xpected with def
02d0: 61 75 6c 74 0a 09 6f 70 65 6e 73 73 6c 20 62 75  ault..openssl bu
02e0: 69 6c 64 2e 0a 0a 09 2a 20 74 65 73 74 73 2f 74  ild....* tests/t
02f0: 63 6c 49 4f 2e 74 65 73 74 3a 20 75 70 64 61 74  clIO.test: updat
0300: 65 64 20 74 6f 20 75 73 65 20 6e 65 77 20 6e 61  ed to use new na
0310: 6d 65 73 20 66 6f 72 20 63 65 72 74 73 2f 6b 65  mes for certs/ke
0320: 79 73 2e 0a 0a 32 30 30 31 2d 30 33 2d 31 34 20  ys...2001-03-14 
0330: 20 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 6a 65   Jeff Hobbs  <je
0340: 66 66 68 40 67 69 6d 6c 65 74 2e 61 63 74 69 76  ffh@gimlet.activ
0350: 65 73 74 61 74 65 2e 63 6f 6d 3e 0a 0a 09 2a 20  estate.com>...* 
0360: 74 6c 73 2e 63 20 28 54 6c 73 5f 49 6e 69 74 29  tls.c (Tls_Init)
0370: 3a 20 61 64 64 20 64 6f 2f 77 68 69 6c 65 20 66  : add do/while f
0380: 6f 72 20 72 61 6e 64 6f 6d 20 6e 75 6d 62 65 72  or random number
0390: 20 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 0a   initialization.
03a0: 09 74 6f 20 77 6f 72 6b 20 61 72 6f 75 6e 64 20  .to work around 
03b0: 73 6f 6d 65 20 4f 53 65 73 20 71 75 69 72 6b 73  some OSes quirks
03c0: 2e 20 20 28 52 61 6c 70 68 2e 42 69 6c 6c 65 73  .  (Ralph.Billes
03d0: 40 74 65 6c 74 65 63 68 2e 63 6f 6d 2e 61 75 29  @teltech.com.au)
03e0: 0a 0a 32 30 30 30 2d 30 39 2d 30 37 20 20 4a 65  ..2000-09-07  Je
03f0: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
0400: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
0410: 0a 09 2a 20 74 6c 73 49 4f 2e 63 20 28 54 6c 73  ..* tlsIO.c (Tls
0420: 5f 43 68 61 6e 6e 65 6c 54 79 70 65 29 3a 20 73  _ChannelType): s
0430: 65 74 20 74 79 70 65 4e 61 6d 65 20 66 69 65 6c  et typeName fiel
0440: 64 20 6f 66 20 63 68 61 6e 6e 65 6c 20 74 79 70  d of channel typ
0450: 65 20 74 6f 0a 09 22 74 6c 73 22 20 28 74 68 69  e to.."tls" (thi
0460: 73 20 67 6f 74 20 6c 6f 73 74 20 69 6e 20 6d 6f  s got lost in mo
0470: 76 65 20 74 6f 20 64 79 6e 61 6d 69 63 20 76 65  ve to dynamic ve
0480: 72 73 69 6f 6e 20 63 6f 6d 70 61 74 61 62 69 6c  rsion compatabil
0490: 69 74 79 0a 09 63 68 65 63 6b 69 6e 67 29 2e 0a  ity..checking)..
04a0: 0a 32 30 30 30 2d 30 38 2d 32 33 20 20 4a 65 66  .2000-08-23  Jef
04b0: 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40  f Hobbs  <hobbs@
04c0: 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a  scriptics.com>..
04d0: 09 54 4c 53 20 31 2e 34 20 52 45 4c 45 41 53 45  .TLS 1.4 RELEASE
04e0: 44 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69  D...* Makefile.i
04f0: 6e 20 28 64 69 73 74 29 3a 20 63 72 65 61 74 65  n (dist): create
0500: 20 64 69 73 74 20 74 61 72 67 65 74 20 66 6f 72   dist target for
0510: 20 61 72 63 68 69 76 65 20 64 69 73 74 72 69 62   archive distrib
0520: 75 74 69 6f 6e 73 0a 0a 09 2a 20 74 65 73 74 73  utions...* tests
0530: 2f 74 6c 73 49 4f 2e 74 65 73 74 20 28 74 6c 73  /tlsIO.test (tls
0540: 49 4f 2d 38 2e 31 29 3a 20 61 64 64 65 64 20 61  IO-8.1): added a
0550: 20 64 65 6c 61 79 20 6f 6e 20 74 68 65 20 61 63   delay on the ac
0560: 63 65 70 74 20 63 6c 6f 73 65 0a 09 74 6f 20 6d  cept close..to m
0570: 61 6b 65 20 74 68 65 20 74 65 73 74 20 77 6f 72  ake the test wor
0580: 6b 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 6f  k with OpenSSL o
0590: 6e 20 57 69 6e 64 6f 77 73 20 28 64 6f 65 73 6e  n Windows (doesn
05a0: 27 74 20 61 66 66 65 63 74 0a 09 6f 74 68 65 72  't affect..other
05b0: 20 62 75 69 6c 64 73 29 2e 0a 0a 09 2a 20 74 6c   builds)....* tl
05c0: 73 2e 68 74 6d 3a 20 75 70 64 61 74 65 64 20 77  s.htm: updated w
05d0: 69 74 68 20 6e 6f 74 65 73 20 66 6f 72 20 31 2e  ith notes for 1.
05e0: 34 2e 0a 0a 32 30 30 30 2d 30 38 2d 32 31 20 20  4...2000-08-21  
05f0: 4a 65 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62  Jeff Hobbs  <hob
0600: 62 73 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d  bs@scriptics.com
0610: 3e 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49  >...* tests/tlsI
0620: 4f 2e 74 65 73 74 3a 20 72 65 71 75 69 72 65 20  O.test: require 
0630: 61 74 20 6c 65 61 73 74 20 74 6c 73 31 2e 34 20  at least tls1.4 
0640: 69 6e 20 74 65 73 74 20 73 75 69 74 65 2e 0a 0a  in test suite...
0650: 32 30 30 30 2d 30 38 2d 31 38 20 20 4a 65 66 66  2000-08-18  Jeff
0660: 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73   Hobbs  <hobbs@s
0670: 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09  criptics.com>...
0680: 2a 20 74 6c 73 2e 63 20 28 54 6c 73 5f 49 6e 69  * tls.c (Tls_Ini
0690: 74 29 3a 20 61 64 64 65 64 20 63 61 6c 6c 20 74  t): added call t
06a0: 6f 20 52 41 4e 44 5f 73 65 65 64 20 74 6f 20 73  o RAND_seed to s
06b0: 65 65 64 20 74 68 65 20 53 53 4c 20 72 61 6e 64  eed the SSL rand
06c0: 6f 6d 0a 09 6e 75 6d 62 65 72 20 67 65 6e 65 72  om..number gener
06d0: 61 74 6f 72 2e 20 20 57 69 74 68 6f 75 74 20 74  ator.  Without t
06e0: 68 69 73 2c 20 4f 70 65 6e 53 53 4c 20 30 2e 39  his, OpenSSL 0.9
06f0: 2e 35 20 63 68 6f 6b 65 73 2c 20 61 6e 64 20 69  .5 chokes, and i
0700: 6e 20 61 6e 79 0a 09 63 61 73 65 20 69 74 20 69  n any..case it i
0710: 73 20 61 20 62 69 67 20 73 65 63 75 72 69 74 79  s a big security
0720: 20 68 6f 6c 65 20 74 6f 20 64 6f 20 77 69 74 68   hole to do with
0730: 6f 75 74 20 69 74 2e 0a 0a 09 2a 20 63 6f 6e 66  out it....* conf
0740: 69 67 75 72 65 2e 69 6e 20 28 4f 50 45 4e 53 53  igure.in (OPENSS
0750: 4c 29 3a 20 61 64 64 65 64 20 4e 4f 5f 49 44 45  L): added NO_IDE
0760: 41 20 61 6e 64 20 4e 4f 5f 52 43 35 20 64 65 66  A and NO_RC5 def
0770: 69 6e 65 73 20 62 79 0a 09 64 65 66 61 75 6c 74  ines by..default
0780: 20 77 68 65 6e 20 63 6f 6d 70 69 6c 69 6e 67 20   when compiling 
0790: 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 0a 0a 09  with OpenSSL....
07a0: 2a 20 74 6c 73 49 6e 74 2e 68 3a 20 61 64 64 65  * tlsInt.h: adde
07b0: 64 20 65 72 72 2e 68 20 69 6e 63 6c 75 64 65 0a  d err.h include.
07c0: 0a 09 2a 20 74 6c 73 42 49 4f 2e 63 3a 0a 09 2a  ..* tlsBIO.c:..*
07d0: 20 74 6c 73 49 4f 2e 63 3a 20 63 6f 72 72 65 63   tlsIO.c: correc
07e0: 74 65 64 20 70 65 64 61 6e 74 69 63 20 63 61 73  ted pedantic cas
07f0: 74 20 65 72 72 6f 72 73 2e 0a 0a 32 30 30 30 2d  t errors...2000-
0800: 30 38 2d 31 36 20 20 4a 65 66 66 20 48 6f 62 62  08-16  Jeff Hobb
0810: 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69 70 74  s  <hobbs@script
0820: 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 65 73  ics.com>...* tes
0830: 74 73 2f 63 69 70 68 65 72 73 2e 74 65 73 74 3a  ts/ciphers.test:
0840: 20 69 6d 70 72 6f 76 65 64 20 61 62 69 6c 69 74   improved abilit
0850: 79 20 74 6f 20 63 68 61 6e 67 65 20 63 6f 6e 73  y to change cons
0860: 74 72 61 69 6e 74 0a 09 73 65 74 74 69 6e 67 20  traint..setting 
0870: 66 6f 72 20 77 68 65 74 68 65 72 20 75 73 65 72  for whether user
0880: 20 63 6f 6d 70 69 6c 65 64 20 61 67 61 69 6e 73   compiled agains
0890: 74 20 52 53 41 20 6f 72 20 4f 70 65 6e 53 53 4c  t RSA or OpenSSL
08a0: 20 6c 69 62 73 2e 0a 0a 09 2a 20 74 6c 73 2e 63   libs....* tls.c
08b0: 20 28 54 6c 73 5f 49 6e 69 74 29 3a 20 63 6f 72   (Tls_Init): cor
08c0: 72 65 63 74 65 64 20 69 6e 74 65 72 70 72 65 74  rected interpret
08d0: 61 74 69 6f 6e 20 6f 66 20 76 65 72 73 69 6f 6e  ation of version
08e0: 20 6e 75 6d 62 65 72 0a 09 28 70 61 74 63 68 6c   number..(patchl
08f0: 65 76 65 6c 20 61 6e 64 20 72 65 6c 65 61 73 65  evel and release
0900: 2f 73 65 72 69 61 6c 20 77 65 72 65 20 73 77 61  /serial were swa
0910: 70 70 65 64 29 2e 0a 0a 32 30 30 30 2d 30 38 2d  pped)...2000-08-
0920: 31 35 20 20 4a 65 66 66 20 48 6f 62 62 73 20 20  15  Jeff Hobbs  
0930: 3c 68 6f 62 62 73 40 73 63 72 69 70 74 69 63 73  <hobbs@scriptics
0940: 2e 63 6f 6d 3e 0a 0a 09 2a 20 52 45 41 44 4d 45  .com>...* README
0950: 2e 74 78 74 3a 20 61 64 64 65 64 20 6e 6f 74 65  .txt: added note
0960: 73 20 61 62 6f 75 74 20 6e 65 65 64 20 74 6f 20  s about need to 
0970: 75 73 65 20 38 2e 32 2e 30 2b 2e 0a 0a 09 2a 20  use 8.2.0+....* 
0980: 74 6c 73 49 6e 74 2e 68 3a 0a 09 2a 20 74 6c 73  tlsInt.h:..* tls
0990: 2e 63 3a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20  .c:..* tlsIO.c: 
09a0: 63 6f 72 72 65 63 74 65 64 20 73 74 72 75 63 74  corrected struct
09b0: 75 72 65 20 69 6e 69 74 69 61 6c 69 7a 61 74 69  ure initializati
09c0: 6f 6e 20 74 6f 20 77 6f 72 6b 20 77 68 65 6e 0a  on to work when.
09d0: 09 63 6f 6d 70 69 6c 69 6e 67 20 77 69 74 68 20  .compiling with 
09e0: 38 2e 32 2e 20 20 4e 6f 77 20 63 6f 6d 70 69 6c  8.2.  Now compil
09f0: 65 73 20 77 69 74 68 20 38 2e 32 2b 20 61 6e 64  es with 8.2+ and
0a00: 20 74 65 73 74 65 64 20 74 6f 20 77 6f 72 6b 0a   tested to work.
0a10: 09 77 69 74 68 20 38 2e 32 2b 20 61 6e 64 20 64  .with 8.2+ and d
0a20: 79 6e 61 6d 69 63 61 6c 6c 79 20 61 64 6a 75 73  ynamically adjus
0a30: 74 20 74 6f 20 74 68 65 20 76 65 72 73 69 6f 6e  t to the version
0a40: 20 6f 66 20 54 63 6c 20 69 74 20 77 61 73 0a 09   of Tcl it was..
0a50: 6c 6f 61 64 65 64 20 69 6e 74 6f 2e 20 20 54 4c  loaded into.  TL
0a60: 53 20 77 69 6c 6c 20 66 61 69 6c 20 74 68 65 20  S will fail the 
0a70: 74 65 73 74 20 73 75 69 74 65 20 77 69 74 68 20  test suite with 
0a80: 54 63 6c 20 38 2e 32 2d 38 2e 33 2e 31 2e 0a 0a  Tcl 8.2-8.3.1...
0a90: 09 2a 20 74 65 73 74 73 2f 61 6c 6c 2e 74 63 6c  .* tests/all.tcl
0aa0: 3a 20 61 64 64 65 64 20 63 61 74 63 68 20 61 72  : added catch ar
0ab0: 6f 75 6e 64 20 3a 3a 74 63 6c 74 65 73 74 3a 3a  ound ::tcltest::
0ac0: 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 0a 09 62  normalizePath..b
0ad0: 65 63 61 75 73 65 20 69 74 20 64 6f 65 73 6e 27  ecause it doesn'
0ae0: 74 20 65 78 69 73 74 20 69 6e 20 70 72 65 2d 38  t exist in pre-8
0af0: 2e 33 20 74 63 6c 74 65 73 74 2e 0a 0a 09 2a 20  .3 tcltest....* 
0b00: 74 65 73 74 73 2f 73 69 6d 70 6c 65 43 6c 69 65  tests/simpleClie
0b10: 6e 74 2e 74 63 6c 3a 20 0a 09 2a 20 74 65 73 74  nt.tcl: ..* test
0b20: 73 2f 73 69 6d 70 6c 65 53 65 72 76 65 72 2e 74  s/simpleServer.t
0b30: 63 6c 3a 20 61 64 64 65 64 20 73 69 6d 70 6c 65  cl: added simple
0b40: 20 63 6c 69 65 6e 74 2f 73 65 72 76 65 72 20 74   client/server t
0b50: 65 73 74 20 73 63 72 69 70 74 73 0a 09 74 68 61  est scripts..tha
0b60: 74 20 75 73 65 20 74 65 73 74 20 63 65 72 74 73  t use test certs
0b70: 20 61 6e 64 20 63 61 6e 20 64 6f 20 73 69 6d 70   and can do simp
0b80: 6c 65 20 73 74 72 65 73 73 20 74 65 73 74 73 2e  le stress tests.
0b90: 0a 0a 32 30 30 30 2d 30 38 2d 31 34 20 20 4a 65  ..2000-08-14  Je
0ba0: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
0bb0: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
0bc0: 0a 09 2a 20 74 6c 73 49 6e 74 2e 68 3a 0a 09 2a  ..* tlsInt.h:..*
0bd0: 20 74 6c 73 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73   tlsIO.c:..* tls
0be0: 42 49 4f 2e 63 3a 0a 09 2a 20 74 6c 73 2e 63 3a  BIO.c:..* tls.c:
0bf0: 20 63 68 61 6e 67 65 64 20 61 72 6f 75 6e 64 20   changed around 
0c00: 74 6f 20 6f 6e 6c 79 20 77 6f 72 6b 69 6e 67 20  to only working 
0c10: 77 69 74 68 20 38 2e 32 2e 30 2b 20 28 38 2e 33  with 8.2.0+ (8.3
0c20: 2e 32 2b 0a 09 70 72 65 66 65 72 72 65 64 29 2c  .2+..preferred),
0c30: 20 77 69 74 68 20 72 75 6e 74 69 6d 65 20 63 68   with runtime ch
0c40: 65 63 6b 73 20 66 6f 72 20 70 72 65 2d 20 61 6e  ecks for pre- an
0c50: 64 20 70 6f 73 74 2d 69 6f 2d 72 65 77 72 69 74  d post-io-rewrit
0c60: 65 2e 0a 0a 09 2a 20 74 6c 73 2e 63 20 28 54 6c  e....* tls.c (Tl
0c70: 73 5f 49 6e 69 74 29 3a 20 63 68 61 6e 67 65 64  s_Init): changed
0c80: 20 69 74 20 74 6f 20 72 65 71 75 69 72 65 20 38   it to require 8
0c90: 2e 33 2e 32 20 77 68 65 6e 20 54 63 6c 5f 49 6e  .3.2 when Tcl_In
0ca0: 69 74 53 74 75 62 73 0a 09 77 61 73 20 63 61 6c  itStubs..was cal
0cb0: 6c 65 64 20 62 65 63 61 75 73 65 20 77 65 20 64  led because we d
0cc0: 6f 6e 27 74 20 77 61 6e 74 20 70 65 6f 70 6c 65  on't want people
0cd0: 20 75 73 69 6e 67 20 54 4c 53 20 77 69 74 68 20   using TLS with 
0ce0: 74 68 65 0a 09 6f 72 69 67 69 6e 61 6c 20 73 74  the..original st
0cf0: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 69 6d  acked channel im
0d00: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2e 0a 0a 32  plementation...2
0d10: 30 30 30 2d 30 37 2d 32 36 20 20 4a 65 66 66 20  000-07-26  Jeff 
0d20: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63  Hobbs  <hobbs@sc
0d30: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a  riptics.com>...*
0d40: 20 6d 65 72 67 65 64 20 61 6c 6c 20 63 68 61 6e   merged all chan
0d50: 67 65 73 20 66 72 6f 6d 20 74 6c 73 2d 31 2d 33  ges from tls-1-3
0d60: 2d 69 6f 2d 72 65 77 72 69 74 65 20 62 61 63 6b  -io-rewrite back
0d70: 20 69 6e 74 6f 20 6d 61 69 6e 20 62 72 61 6e 63   into main branc
0d80: 68 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49  h...* tests/tlsI
0d90: 4f 2e 74 65 73 74 3a 20 75 70 64 61 74 65 64 20  O.test: updated 
0da0: 63 6f 6d 6d 65 6e 74 73 2c 20 66 69 78 65 64 20  comments, fixed 
0db0: 61 20 70 63 43 72 61 73 68 20 63 61 73 65 20 74  a pcCrash case t
0dc0: 68 61 74 0a 09 77 61 73 20 64 75 65 20 74 6f 20  hat..was due to 
0dd0: 64 65 62 75 67 20 61 73 73 65 72 74 69 6f 6e 20  debug assertion 
0de0: 69 6e 20 57 69 6e 64 6f 77 73 20 53 53 4c 2e 0a  in Windows SSL..
0df0: 0a 09 2a 20 74 6c 73 2e 63 20 28 49 6d 70 6f 72  ..* tls.c (Impor
0e00: 74 4f 62 6a 43 6d 64 29 3a 20 72 65 6d 6f 76 65  tObjCmd): remove
0e10: 64 20 75 6e 6e 65 63 65 73 73 61 72 79 20 75 73  d unnecessary us
0e20: 65 20 6f 66 20 27 62 69 6f 27 20 61 72 67 2e 0a  e of 'bio' arg..
0e30: 09 28 54 6c 73 5f 49 6e 69 74 29 3a 20 63 68 65  .(Tls_Init): che
0e40: 63 6b 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20  ck return value 
0e50: 6f 66 20 53 53 4c 5f 6c 69 62 72 61 72 79 5f 69  of SSL_library_i
0e60: 6e 69 74 2e 20 20 41 6c 73 6f 20 6c 6f 74 73 20  nit.  Also lots 
0e70: 6f 66 0a 09 77 68 69 74 65 73 70 61 63 65 20 63  of..whitespace c
0e80: 6c 65 61 6e 75 70 20 28 6d 6f 72 65 20 6c 69 6b  leanup (more lik
0e90: 65 20 54 63 6c 20 45 6e 67 20 73 74 79 6c 65 20  e Tcl Eng style 
0ea0: 67 75 69 64 65 29 2c 20 62 75 74 20 6e 6f 74 20  guide), but not 
0eb0: 61 6c 6c 0a 09 63 6f 64 65 20 77 61 73 20 63 6c  all..code was cl
0ec0: 65 61 6e 65 64 20 75 70 2e 0a 0a 09 2a 20 74 6c  eaned up....* tl
0ed0: 73 42 49 4f 2e 63 3a 20 6d 69 6e 6f 72 20 77 68  sBIO.c: minor wh
0ee0: 69 74 65 73 70 61 63 65 20 63 6c 65 61 6e 75 70  itespace cleanup
0ef0: 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 6d 69  ...* tlsIO.c: mi
0f00: 6e 6f 72 20 77 68 69 74 65 73 70 61 63 65 20 63  nor whitespace c
0f10: 6c 65 61 6e 75 70 2e 0a 09 28 54 6c 73 49 6e 70  leanup...(TlsInp
0f20: 75 74 50 72 6f 63 2c 20 54 6c 73 4f 75 74 70 75  utProc, TlsOutpu
0f30: 74 50 72 6f 63 29 3a 20 41 64 64 65 64 20 45 52  tProc): Added ER
0f40: 52 5f 63 6c 65 61 72 5f 65 72 72 6f 72 20 62 65  R_clear_error be
0f50: 66 6f 72 65 20 63 61 6c 6c 73 0a 09 74 6f 20 42  fore calls..to B
0f60: 49 4f 5f 72 65 61 64 20 6f 72 20 42 49 4f 5f 77  IO_read or BIO_w
0f70: 72 69 74 65 2c 20 62 65 63 61 75 73 65 20 77 65  rite, because we
0f80: 20 63 6f 75 6c 64 20 6f 74 68 65 72 77 69 73 65   could otherwise
0f90: 20 65 6e 64 20 75 70 0a 09 70 75 6c 6c 69 6e 67   end up..pulling
0fa0: 20 61 6e 20 65 72 72 6f 72 20 6f 66 66 20 74 68   an error off th
0fb0: 65 20 73 74 61 63 6b 20 74 68 61 74 20 64 69 64  e stack that did
0fc0: 6e 27 74 20 62 65 6c 6f 6e 67 20 74 6f 20 75 73  n't belong to us
0fd0: 2e 20 20 41 6c 73 6f 0a 09 63 6c 65 61 6e 75 70  .  Also..cleanup
0fe0: 20 75 70 20 65 78 63 65 73 73 69 76 65 20 75 73   up excessive us
0ff0: 65 20 6f 66 20 67 6f 74 6f 73 2e 0a 0a 32 30 30  e of gotos...200
1000: 30 2d 30 37 2d 32 30 20 20 4a 65 66 66 20 48 6f  0-07-20  Jeff Ho
1010: 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69  bbs  <hobbs@scri
1020: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74  ptics.com>...* t
1030: 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74 3a  ests/tlsIO.test:
1040: 20 63 6f 72 72 65 63 74 65 64 20 76 61 72 69 6f   corrected vario
1050: 75 73 20 74 65 73 74 73 20 74 6f 20 62 65 20 63  us tests to be c
1060: 6f 72 72 65 63 74 20 66 6f 72 20 54 4c 53 0a 09  orrect for TLS..
1070: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 73  stacked channels
1080: 20 28 61 73 20 6f 70 70 6f 73 65 64 20 74 6f 20   (as opposed to 
1090: 74 68 65 20 73 74 61 6e 64 61 72 64 20 73 6f 63  the standard soc
10a0: 6b 65 74 73 20 74 68 65 20 74 65 73 74 0a 09 73  kets the test..s
10b0: 75 69 74 65 20 77 61 73 20 61 64 6f 70 74 65 64  uite was adopted
10c0: 20 66 72 6f 6d 29 2e 20 20 4b 65 79 20 64 69 66   from).  Key dif
10d0: 66 65 72 65 6e 63 65 73 20 61 72 65 20 74 68 61  ferences are tha
10e0: 74 20 54 4c 53 20 63 61 6e 6e 6f 74 0a 09 6f 70  t TLS cannot..op
10f0: 65 72 61 74 65 20 69 6e 20 6f 6e 65 20 70 72 6f  erate in one pro
1100: 63 65 73 73 20 77 69 74 68 6f 75 74 20 61 6c 6c  cess without all
1110: 20 63 68 61 6e 6e 65 6c 73 20 62 65 69 6e 67 20   channels being 
1120: 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 2c 20 6f 72  non-blocking, or
1130: 0a 09 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20  ..the handshake 
1140: 77 69 6c 6c 20 62 6c 6f 63 6b 2c 20 61 6e 64 20  will block, and 
1150: 68 61 6e 64 73 68 61 6b 69 6e 67 20 6d 75 73 74  handshaking must
1160: 20 62 65 20 66 6f 72 63 65 64 20 69 6e 20 73 6f   be forced in so
1170: 6d 65 0a 09 63 61 73 65 73 2e 20 20 41 6c 73 6f  me..cases.  Also
1180: 2c 20 68 61 6e 64 73 68 61 6b 65 73 20 64 6f 6e  , handshakes don
1190: 27 74 20 73 65 65 6d 20 74 6f 20 63 6f 6d 70 6c  't seem to compl
11a0: 65 74 65 20 75 6e 6c 65 73 73 20 74 68 65 20 63  ete unless the c
11b0: 6c 69 65 6e 74 0a 09 68 61 73 20 70 6c 61 63 65  lient..has place
11c0: 64 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 62  d at least one b
11d0: 79 74 65 20 66 6f 72 20 74 68 65 20 73 65 72 76  yte for the serv
11e0: 65 72 20 74 6f 20 72 65 61 64 20 69 6e 20 74 68  er to read in th
11f0: 65 20 63 68 61 6e 6e 65 6c 2e 0a 0a 09 2a 20 74  e channel....* t
1200: 65 73 74 73 2f 72 65 6d 6f 74 65 2e 74 63 6c 3a  ests/remote.tcl:
1210: 20 63 6f 72 72 65 63 74 65 64 20 74 68 65 20 66   corrected the f
1220: 69 6e 64 69 6e 67 20 6f 66 20 74 65 73 74 73 20  inding of tests 
1230: 63 65 72 74 69 66 69 63 61 74 65 73 0a 0a 09 2a  certificates...*
1240: 20 74 6c 73 49 4f 2e 63 20 28 54 6c 73 43 6c 6f   tlsIO.c (TlsClo
1250: 73 65 50 72 6f 63 29 3a 20 72 65 6d 6f 76 65 64  seProc): removed
1260: 20 64 65 6c 65 74 69 6e 67 20 6f 66 20 74 69 6d   deleting of tim
1270: 65 72 20 68 61 6e 64 6c 65 72 20 61 73 0a 09 74  er handler as..t
1280: 68 61 74 20 69 73 20 68 61 6e 64 6c 65 64 20 62  hat is handled b
1290: 79 20 54 6c 73 5f 43 6c 65 61 6e 2e 0a 0a 09 2a  y Tls_Clean....*
12a0: 20 74 6c 73 2e 74 63 6c 20 28 74 6c 73 3a 3a 5f   tls.tcl (tls::_
12b0: 61 63 63 65 70 74 29 3a 20 63 6f 72 72 65 63 74  accept): correct
12c0: 65 64 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20  ed the internal 
12d0: 5f 61 63 63 65 70 74 20 74 6f 0a 09 74 72 69 63  _accept to..tric
12e0: 6b 6c 65 20 63 61 6c 6c 62 61 63 6b 20 65 72 72  kle callback err
12f0: 6f 72 73 20 74 6f 20 74 68 65 20 75 73 65 72 2e  ors to the user.
1300: 0a 0a 09 2a 20 4d 61 6b 65 66 69 6c 65 2e 69 6e  ...* Makefile.in
1310: 3a 20 6d 61 64 65 20 74 68 65 20 69 6e 73 74 61  : made the insta
1320: 6c 6c 2d 62 69 6e 61 72 69 65 73 20 74 61 72 67  ll-binaries targ
1330: 65 74 20 72 65 67 65 6e 65 72 61 74 65 20 74 68  et regenerate th
1340: 65 0a 09 70 6b 67 49 6e 64 65 78 2e 74 63 6c 20  e..pkgIndex.tcl 
1350: 63 6f 72 72 65 63 74 6c 79 2e 20 20 54 68 65 20  correctly.  The 
1360: 74 65 73 74 20 74 61 72 67 65 74 20 70 72 6f 62  test target prob
1370: 61 62 6c 79 20 73 68 6f 75 6c 64 6e 27 74 20 73  ably shouldn't s
1380: 63 72 65 77 0a 09 69 74 20 75 70 2c 20 62 75 74  crew..it up, but
1390: 20 74 68 69 73 20 69 73 20 74 6f 20 62 65 20 6f   this is to be o
13a0: 6e 20 74 68 65 20 73 61 66 65 20 73 69 64 65 2e  n the safe side.
13b0: 0a 0a 32 30 30 30 2d 30 37 2d 31 37 20 20 4a 65  ..2000-07-17  Je
13c0: 66 66 20 48 6f 62 62 73 20 20 3c 68 6f 62 62 73  ff Hobbs  <hobbs
13d0: 40 73 63 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a  @scriptics.com>.
13e0: 0a 09 2a 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c  ..* pkgIndex.tcl
13f0: 2e 69 6e 3a 0a 09 2a 20 63 6f 6e 66 69 67 75 72  .in:..* configur
1400: 65 2e 69 6e 3a 20 75 70 64 61 74 65 64 20 76 65  e.in: updated ve
1410: 72 73 69 6f 6e 20 74 6f 20 31 2e 34 0a 0a 32 30  rsion to 1.4..20
1420: 30 30 2d 30 37 2d 31 33 20 20 4a 65 66 66 20 48  00-07-13  Jeff H
1430: 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72  obbs  <hobbs@scr
1440: 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20  iptics.com>...* 
1450: 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73 74  tests/tlsIO.test
1460: 3a 20 65 6e 61 62 6c 65 64 20 74 65 73 74 73 20  : enabled tests 
1470: 32 2e 31 30 2c 20 37 2e 5b 31 32 34 35 5d 20 28  2.10, 7.[1245] (
1480: 74 68 65 72 65 20 69 73 20 6e 6f 20 33 29 2c 0a  there is no 3),.
1490: 09 77 68 69 63 68 20 6e 6f 77 20 70 61 73 73 2e  .which now pass.
14a0: 20 20 41 64 64 65 64 20 73 6f 6d 65 20 63 6f 6d    Added some com
14b0: 6d 65 6e 74 73 20 74 6f 20 6f 74 68 65 72 20 66  ments to other f
14c0: 61 69 6c 69 6e 67 20 74 65 73 74 73 2e 0a 0a 32  ailing tests...2
14d0: 30 30 30 2d 30 37 2d 31 31 20 20 4a 65 66 66 20  000-07-11  Jeff 
14e0: 48 6f 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63  Hobbs  <hobbs@sc
14f0: 72 69 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a  riptics.com>...*
1500: 20 74 6c 73 49 4f 2e 63 3a 20 63 68 61 6e 67 65   tlsIO.c: change
1510: 64 20 61 6c 6c 20 74 68 65 20 63 68 61 6e 6e 65  d all the channe
1520: 6c 20 70 72 6f 63 73 20 74 6f 20 73 74 61 72 74  l procs to start
1530: 20 77 69 74 68 20 54 6c 73 2a 20 66 6f 72 0a 09   with Tls* for..
1540: 62 65 74 74 65 72 20 70 61 72 69 74 79 20 77 68  better parity wh
1550: 65 6e 20 63 6f 6d 70 61 72 69 6e 67 20 77 69 74  en comparing wit
1560: 68 20 54 72 61 6e 73 66 6f 72 6d 20 63 68 61 6e  h Transform chan
1570: 6e 65 6c 20 70 72 6f 63 73 2e 0a 09 52 65 77 72  nel procs...Rewr
1580: 6f 74 65 20 54 6c 73 57 61 74 63 68 50 72 6f 63  ote TlsWatchProc
1590: 2c 20 61 64 64 65 64 20 54 6c 73 4e 6f 74 69 66  , added TlsNotif
15a0: 79 50 72 6f 63 20 61 63 63 6f 72 64 69 6e 67 20  yProc according 
15b0: 74 6f 20 74 68 65 20 6e 65 77 0a 09 63 68 61 6e  to the new..chan
15c0: 6e 65 6c 20 64 65 73 69 67 6e 2c 20 77 68 69 63  nel design, whic
15d0: 68 20 61 6c 73 6f 20 6c 65 61 76 65 73 20 54 6c  h also leaves Tl
15e0: 73 43 68 61 6e 6e 65 6c 48 61 6e 64 6c 65 72 20  sChannelHandler 
15f0: 75 6e 75 73 65 64 2e 0a 0a 09 2a 20 74 6c 73 42  unused....* tlsB
1600: 49 4f 2e 63 20 28 42 69 6f 43 74 72 6c 29 3a 20  IO.c (BioCtrl): 
1610: 63 68 61 6e 67 65 64 20 42 49 4f 5f 43 54 52 4c  changed BIO_CTRL
1620: 5f 46 4c 55 53 48 20 63 61 73 65 20 74 6f 20 75  _FLUSH case to u
1630: 73 65 0a 09 54 63 6c 5f 57 72 69 74 65 52 61 77  se..Tcl_WriteRaw
1640: 20 69 6e 73 74 65 61 64 20 6f 66 20 54 63 6c 5f   instead of Tcl_
1650: 46 6c 75 73 68 20 28 74 6f 20 6f 70 65 72 61 74  Flush (to operat
1660: 65 20 6f 6e 20 63 6f 72 72 65 63 74 20 63 68 61  e on correct cha
1670: 6e 6e 65 6c 0a 09 69 6e 20 74 68 65 20 73 74 61  nnel..in the sta
1680: 63 6b 20 69 6e 73 74 65 61 64 20 6f 66 20 73 74  ck instead of st
1690: 61 72 74 69 6e 67 20 61 74 20 74 68 65 20 74 6f  arting at the to
16a0: 70 20 61 67 61 69 6e 29 2e 20 20 57 6f 75 6c 64  p again).  Would
16b0: 0a 09 6f 74 68 65 72 77 69 73 65 20 63 61 75 73  ..otherwise caus
16c0: 65 20 61 20 72 65 63 75 72 73 69 76 65 20 73 74  e a recursive st
16d0: 61 63 6b 20 62 6f 6d 62 20 77 68 65 6e 20 69 6d  ack bomb when im
16e0: 70 6c 69 63 69 74 20 68 61 6e 64 73 68 61 6b 69  plicit handshaki
16f0: 6e 67 0a 09 74 6f 6f 6b 20 65 66 66 65 63 74 2e  ng..took effect.
1700: 0a 0a 09 2a 20 74 65 73 74 73 2f 74 6c 73 49 4f  ...* tests/tlsIO
1710: 2e 74 65 73 74 3a 20 72 65 6d 6f 76 65 64 20 63  .test: removed c
1720: 68 61 6e 67 65 73 20 6d 61 64 65 20 74 6f 20 74  hanges made to t
1730: 65 73 74 20 73 75 69 74 65 20 28 61 6c 6c 20 74  est suite (all t
1740: 65 73 74 73 0a 09 74 68 61 74 20 72 61 6e 20 62  ests..that ran b
1750: 65 66 6f 72 65 20 6e 6f 77 20 70 61 73 73 20 63  efore now pass c
1760: 6f 72 72 65 63 74 6c 79 29 2c 20 61 6e 64 20 63  orrectly), and c
1770: 68 61 6e 67 65 64 20 73 6f 6d 65 20 61 63 63 65  hanged some acce
1780: 70 74 20 70 72 6f 63 0a 09 61 72 67 73 20 74 6f  pt proc..args to
1790: 20 72 65 66 6c 65 63 74 20 74 68 61 74 20 61 20   reflect that a 
17a0: 73 6f 63 6b 20 69 73 20 61 6e 20 61 72 67 2c 20  sock is an arg, 
17b0: 6e 6f 74 20 61 20 66 69 6c 65 2e 0a 0a 32 30 30  not a file...200
17c0: 30 2d 30 37 2d 31 30 20 20 4a 65 66 66 20 48 6f  0-07-10  Jeff Ho
17d0: 62 62 73 20 20 3c 68 6f 62 62 73 40 73 63 72 69  bbs  <hobbs@scri
17e0: 70 74 69 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74  ptics.com>...* t
17f0: 6c 73 42 49 4f 2e 63 20 28 42 69 6f 57 72 69 74  lsBIO.c (BioWrit
1800: 65 2c 20 42 69 6f 52 65 61 64 29 3a 20 63 68 61  e, BioRead): cha
1810: 6e 67 65 64 20 54 63 6c 5f 52 65 61 64 2f 57 72  nged Tcl_Read/Wr
1820: 69 74 65 20 74 6f 0a 09 54 63 6c 5f 52 65 61 64  ite to..Tcl_Read
1830: 52 61 77 2f 54 63 6c 57 72 69 74 65 52 61 77 2e  Raw/TclWriteRaw.
1840: 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 61 64 64 65  ...* tls.c: adde
1850: 64 20 75 73 65 20 6f 66 20 54 63 6c 5f 47 65 74  d use of Tcl_Get
1860: 54 6f 70 43 68 61 6e 6e 65 6c 20 61 66 74 65 72  TopChannel after
1870: 20 54 63 6c 5f 47 65 74 43 68 61 6e 6e 65 6c 20   Tcl_GetChannel 
1880: 61 6e 64 0a 09 67 6f 74 20 72 65 74 75 72 6e 20  and..got return 
1890: 76 61 6c 75 65 20 66 72 6f 6d 20 54 63 6c 5f 53  value from Tcl_S
18a0: 74 61 63 6b 43 68 61 6e 6e 65 6c 2e 0a 0a 09 2a  tackChannel....*
18b0: 20 74 65 73 74 73 2f 74 6c 73 49 4f 2e 74 65 73   tests/tlsIO.tes
18c0: 74 3a 20 61 64 64 65 64 20 73 6f 6d 65 20 68 61  t: added some ha
18d0: 6e 64 73 68 61 6b 69 6e 67 20 74 68 61 74 20 73  ndshaking that s
18e0: 68 6f 75 6c 64 6e 27 74 20 62 65 0a 09 6e 65 63  houldn't be..nec
18f0: 65 73 73 61 72 79 2c 20 62 75 74 20 77 65 20 63  essary, but we c
1900: 72 61 73 68 20 6f 74 68 65 72 77 69 73 65 20 28  rash otherwise (
1910: 6e 65 65 64 73 20 6d 6f 72 65 20 74 65 73 74 69  needs more testi
1920: 6e 67 29 2e 0a 0a 09 2a 20 74 6c 73 49 4f 2e 63  ng)....* tlsIO.c
1930: 3a 20 61 64 64 65 64 20 73 75 70 70 6f 72 74 20  : added support 
1940: 66 6f 72 20 22 63 6f 72 72 65 63 74 65 64 22 20  for "corrected" 
1950: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 73  stacked channels
1960: 2e 20 20 41 6c 6c 0a 09 74 68 65 20 61 62 6f 76  .  All..the abov
1970: 65 20 63 68 61 6e 6e 65 6c 73 20 61 72 65 20 69  e channels are i
1980: 6e 20 54 43 4c 5f 43 48 41 4e 4e 45 4c 5f 56 45  n TCL_CHANNEL_VE
1990: 52 53 49 4f 4e 5f 32 20 23 69 66 64 65 66 73 2e  RSION_2 #ifdefs.
19a0: 0a 0a 32 30 30 30 2d 30 36 2d 30 35 20 20 53 63  ..2000-06-05  Sc
19b0: 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20 3c 73 74  ott Stanton  <st
19c0: 61 6e 74 6f 6e 40 61 6a 75 62 61 73 6f 6c 75 74  anton@ajubasolut
19d0: 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 4d 61  ions.com>...* Ma
19e0: 6b 65 66 69 6c 65 2e 69 6e 3a 20 46 69 78 65 64  kefile.in: Fixed
19f0: 20 62 72 6f 6b 65 6e 20 74 65 73 74 20 74 61 72   broken test tar
1a00: 67 65 74 2e 0a 0a 09 2a 20 74 6c 73 49 6e 74 2e  get....* tlsInt.
1a10: 68 3a 20 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 6c  h: ..* tls.c: Cl
1a20: 65 61 6e 65 64 20 75 70 20 64 65 63 6c 61 72 61  eaned up declara
1a30: 74 69 6f 6e 73 20 6f 66 20 54 6c 73 5f 43 6c 65  tions of Tls_Cle
1a40: 61 6e 20 74 6f 20 61 76 6f 69 64 20 65 72 72 6f  an to avoid erro
1a50: 72 73 20 6f 6e 0a 09 57 69 6e 64 6f 77 73 20 28  rs on..Windows (
1a60: 6c 69 6e 74 29 2e 0a 0a 32 30 30 30 2d 30 36 2d  lint)...2000-06-
1a70: 30 35 20 20 42 72 65 6e 74 20 57 65 6c 63 68 20  05  Brent Welch 
1a80: 3c 77 65 6c 63 68 40 61 6a 75 62 61 73 6f 6c 75  <welch@ajubasolu
1a90: 74 69 6f 6e 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74  tions.com>...* t
1aa0: 6c 73 2e 63 2c 20 74 6c 73 49 4f 2e 63 3a 20 20  ls.c, tlsIO.c:  
1ab0: 53 70 6c 69 74 20 54 6c 73 5f 46 72 65 65 20 69  Split Tls_Free i
1ac0: 6e 74 6f 20 54 6c 73 5f 43 6c 65 61 6e 2c 20 77  nto Tls_Clean, w
1ad0: 68 69 63 68 20 64 6f 65 73 0a 09 74 68 65 20 53  hich does..the S
1ae0: 53 4c 20 63 6c 65 61 6e 75 70 2c 20 61 6e 64 20  SL cleanup, and 
1af0: 74 68 65 20 54 63 6c 5f 46 72 65 65 20 63 61 6c  the Tcl_Free cal
1b00: 6c 2e 20 20 49 74 20 69 73 20 69 6d 70 6f 72 74  l.  It is import
1b10: 61 6e 74 20 74 6f 20 73 68 75 74 64 6f 77 6e 0a  ant to shutdown.
1b20: 09 74 68 65 20 53 53 4c 20 73 74 61 74 65 20 22  .the SSL state "
1b30: 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 22 20 64  synchronously" d
1b40: 75 72 69 6e 67 20 61 20 73 74 61 63 6b 65 64 20  uring a stacked 
1b50: 66 6c 75 73 68 2e 0a 0a 32 30 30 30 2d 30 36 2d  flush...2000-06-
1b60: 30 31 20 20 53 63 6f 74 74 20 53 74 61 6e 74 6f  01  Scott Stanto
1b70: 6e 20 20 3c 73 74 61 6e 74 6f 6e 40 61 6a 75 62  n  <stanton@ajub
1b80: 61 73 6f 6c 75 74 69 6f 6e 73 2e 63 6f 6d 3e 0a  asolutions.com>.
1b90: 0a 09 2a 20 74 6c 73 49 4f 2e 63 3a 20 52 65 73  ..* tlsIO.c: Res
1ba0: 74 6f 72 65 64 20 63 61 6c 6c 20 74 6f 20 54 63  tored call to Tc
1bb0: 6c 5f 4e 6f 74 69 66 79 43 68 61 6e 6e 65 6c 20  l_NotifyChannel 
1bc0: 66 72 6f 6d 20 43 68 61 6e 6e 65 6c 48 61 6e 64  from ChannelHand
1bd0: 6c 65 72 0a 09 74 6f 20 65 6e 73 75 72 65 20 74  ler..to ensure t
1be0: 68 61 74 20 65 76 65 6e 74 73 20 70 72 6f 70 61  hat events propa
1bf0: 67 61 74 65 20 66 72 6f 6d 20 74 68 65 20 6c 6f  gate from the lo
1c00: 77 65 72 20 64 72 69 76 65 72 2e 20 20 54 68 69  wer driver.  Thi
1c10: 73 20 6d 61 79 0a 09 72 65 73 75 6c 74 20 69 6e  s may..result in
1c20: 20 61 6e 20 69 6e 66 69 6e 69 74 65 20 6c 6f 6f   an infinite loo
1c30: 70 20 69 6e 20 73 6f 6d 65 20 63 61 73 65 73 2c  p in some cases,
1c40: 20 73 6f 20 74 68 69 73 20 69 73 20 6e 6f 74 20   so this is not 
1c50: 61 20 74 6f 74 61 6c 0a 09 66 69 78 2e 20 20 54  a total..fix.  T
1c60: 68 69 73 20 6d 61 79 20 62 65 20 73 75 66 66 69  his may be suffi
1c70: 63 69 65 6e 74 20 66 6f 72 20 6e 6f 77 2c 20 68  cient for now, h
1c80: 6f 77 65 76 65 72 2e 20 5b 42 75 67 3a 20 35 36  owever. [Bug: 56
1c90: 32 33 5d 0a 0a 32 30 30 30 2d 30 36 2d 30 31 20  23]..2000-06-01 
1ca0: 20 53 63 6f 74 74 20 53 74 61 6e 74 6f 6e 20 20   Scott Stanton  
1cb0: 3c 73 74 61 6e 74 6f 6e 40 73 63 72 69 70 74 69  <stanton@scripti
1cc0: 63 73 2e 63 6f 6d 3e 0a 0a 09 2a 20 74 6c 73 49  cs.com>...* tlsI
1cd0: 4f 2e 63 3a 20 52 65 73 74 6f 72 65 20 74 68 65  O.c: Restore the
1ce0: 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f   previous versio
1cf0: 6e 2e 20 20 46 69 78 65 64 20 74 68 65 20 43 6c  n.  Fixed the Cl
1d00: 6f 73 65 50 72 6f 63 20 73 6f 0a 09 69 74 20 75  oseProc so..it u
1d10: 6e 72 65 67 69 73 74 65 72 73 20 74 68 65 20 63  nregisters the c
1d20: 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 72 20 6f  hannel handler o
1d30: 6e 20 74 68 65 20 73 75 70 65 72 63 65 64 65 64  n the superceded
1d40: 20 63 68 61 6e 6e 65 6c 0a 09 69 6e 73 74 65 61   channel..instea
1d50: 64 20 6f 66 20 74 68 65 20 75 70 70 65 72 20 63  d of the upper c
1d60: 68 61 6e 6e 65 6c 2e 20 41 6c 73 6f 20 72 65 6d  hannel. Also rem
1d70: 6f 76 65 64 20 74 68 65 20 63 61 6c 6c 20 74 6f  oved the call to
1d80: 0a 09 54 63 6c 5f 4e 6f 74 69 66 79 43 68 61 6e  ..Tcl_NotifyChan
1d90: 6e 65 6c 20 69 6e 20 74 68 65 20 43 68 61 6e 6e  nel in the Chann
1da0: 65 6c 48 61 6e 64 6c 65 72 20 62 65 63 61 75 73  elHandler becaus
1db0: 65 20 74 68 69 73 20 77 69 6c 6c 20 72 65 73 75  e this will resu
1dc0: 6c 74 0a 09 69 6e 20 61 6e 20 69 6e 66 69 6e 69  lt..in an infini
1dd0: 74 65 20 6c 6f 6f 70 20 69 66 20 64 61 74 61 20  te loop if data 
1de0: 69 73 20 65 76 65 72 20 62 75 66 66 65 72 65 64  is ever buffered
1df0: 20 69 6e 20 74 68 65 20 42 49 4f 0a 09 73 74 72   in the BIO..str
1e00: 75 63 74 75 72 65 2e 20 5b 42 75 67 3a 20 35 36  ucture. [Bug: 56
1e10: 32 33 5d 0a 0a 32 30 30 30 2d 30 35 2d 33 31 20  23]..2000-05-31 
1e20: 20 42 72 65 6e 74 20 57 65 6c 63 68 20 3c 77 65   Brent Welch <we
1e30: 6c 63 68 40 73 63 72 69 70 74 69 63 73 2e 63 6f  lch@scriptics.co
1e40: 6d 3e 0a 0a 09 2a 20 74 6c 73 2e 63 3a 20 43 68  m>...* tls.c: Ch
1e50: 61 6e 67 65 20 74 68 65 20 43 68 61 6e 6e 65 6c  ange the Channel
1e60: 48 61 6e 64 6c 65 72 20 74 6f 20 62 65 20 72 65  Handler to be re
1e70: 67 69 73 74 65 72 65 64 20 6f 6e 20 74 68 65 20  gistered on the 
1e80: 6d 61 69 6e 0a 09 63 68 61 6e 6e 65 6c 20 61 73  main..channel as
1e90: 20 6f 70 70 73 65 64 20 74 6f 20 74 68 65 20 22   oppsed to the "
1ea0: 70 61 72 65 6e 74 22 2c 20 6f 72 20 73 75 70 65  parent", or supe
1eb0: 72 63 65 65 64 65 64 2c 20 63 68 61 6e 6e 65 6c  rceeded, channel
1ec0: 2e 20 20 54 68 69 73 0a 09 69 73 20 62 65 63 61  .  This..is beca
1ed0: 75 73 65 20 74 68 65 20 73 6f 63 6b 65 74 20 64  use the socket d
1ee0: 72 69 76 65 72 20 6e 6f 74 69 66 69 65 73 20 74  river notifies t
1ef0: 68 65 20 6d 61 69 6e 20 63 68 61 6e 6e 65 6c 2c  he main channel,
1f00: 20 61 6e 64 20 74 68 65 72 65 0a 09 61 72 65 20   and there..are 
1f10: 74 69 6d 65 73 20 77 69 74 68 20 74 68 65 20 6d  times with the m
1f20: 61 69 6e 20 63 68 61 6e 6e 65 6c 20 67 65 74 73  ain channel gets
1f30: 20 63 6c 6f 73 65 64 2c 20 62 75 74 20 74 68 65   closed, but the
1f40: 20 73 75 70 65 72 63 65 64 65 64 0a 09 6f 6e 65   superceded..one
1f50: 20 69 73 20 6e 6f 74 20 79 65 74 20 63 6c 6f 73   is not yet clos
1f60: 65 64 2e 20 20 49 66 20 74 68 65 20 63 68 61 6e  ed.  If the chan
1f70: 6e 65 6c 20 68 61 6e 64 6c 65 72 20 67 65 74 73  nel handler gets
1f80: 20 74 72 69 67 67 65 72 65 64 20 69 6e 0a 09 74   triggered in..t
1f90: 68 69 73 20 68 61 6c 66 2d 6f 70 65 6e 20 73 74  his half-open st
1fa0: 61 74 65 20 69 74 20 69 73 20 61 73 73 6f 63 69  ate it is associ
1fb0: 61 74 65 64 20 77 69 74 68 20 74 68 65 20 73 75  ated with the su
1fc0: 70 65 72 63 65 65 64 65 64 0a 09 63 68 61 6e 6e  perceeded..chann
1fd0: 65 64 6c 2c 20 62 75 74 20 75 73 65 73 20 69 74  edl, but uses it
1fe0: 73 20 70 72 69 76 61 74 65 20 70 6f 69 6e 74 65  s private pointe
1ff0: 72 20 74 6f 20 74 68 65 20 6d 61 69 6e 20 63 68  r to the main ch
2000: 61 6e 6e 65 6c 2c 20 77 68 69 63 68 0a 09 69 73  annel, which..is
2010: 20 6d 6f 73 74 6c 79 20 64 65 73 74 72 6f 79 65   mostly destroye
2020: 64 2e 20 20 45 6c 69 6d 69 6e 61 74 65 64 20 74  d.  Eliminated t
2030: 68 65 20 72 65 64 75 6e 64 61 6e 74 20 63 61 6c  he redundant cal
2040: 6c 20 74 6f 0a 09 54 63 6c 5f 4e 6f 74 69 66 79  l to..Tcl_Notify
2050: 43 68 61 6e 6e 65 6c 20 66 72 6f 6d 20 54 6c 73  Channel from Tls
2060: 57 61 74 63 68 50 72 6f 63 2e 20 5b 42 75 67 3a  WatchProc. [Bug:
2070: 20 35 36 32 33 5d 0a                              5623].