Hex Artifact Content

Artifact b10c9495697bae079831952358c2196058b2a48f:


0000: 43 6f 70 79 72 69 67 68 74 20 28 43 29 20 31 39  Copyright (C) 19
0010: 39 37 2d 32 30 30 30 20 4d 61 74 74 20 4e 65 77  97-2000 Matt New
0020: 6d 61 6e 20 3c 6d 61 74 74 40 6e 6f 76 61 64 69  man <matt@novadi
0030: 67 6d 2e 63 6f 6d 3e 0a 54 4c 53 20 31 2e 34 20  gm.com>.TLS 1.4 
0040: 43 6f 70 79 72 69 67 68 74 20 28 43 29 20 32 30  Copyright (C) 20
0050: 30 30 20 41 6a 75 62 61 20 53 6f 6c 75 74 69 6f  00 Ajuba Solutio
0060: 6e 73 0a 0a 24 48 65 61 64 65 72 3a 20 2f 68 6f  ns..$Header: /ho
0070: 6d 65 2f 72 6b 65 65 6e 65 2f 74 6d 70 2f 63 76  me/rkeene/tmp/cv
0080: 73 32 66 6f 73 73 69 6c 2f 2e 2e 2f 74 63 6c 74  s2fossil/../tclt
0090: 6c 73 2f 74 6c 73 2f 74 6c 73 2f 52 45 41 44 4d  ls/tls/tls/READM
00a0: 45 2e 74 78 74 2c 76 20 31 2e 32 20 32 30 30 30  E.txt,v 1.2 2000
00b0: 2f 30 38 2f 31 35 20 31 38 3a 34 39 3a 30 37 20  /08/15 18:49:07 
00c0: 68 6f 62 62 73 20 45 78 70 20 24 0a 0a 54 4c 53  hobbs Exp $..TLS
00d0: 20 28 61 6b 61 20 53 53 4c 29 20 43 68 61 6e 6e   (aka SSL) Chann
00e0: 65 6c 20 2d 20 63 61 6e 20 62 65 20 6c 61 79 65  el - can be laye
00f0: 72 65 64 20 6f 6e 20 61 6e 79 20 62 69 2d 64 69  red on any bi-di
0100: 72 65 63 74 69 6f 6e 61 6c 20 54 63 6c 5f 43 68  rectional Tcl_Ch
0110: 61 6e 6e 65 6c 2e 0a 0a 42 6f 74 68 20 63 6c 69  annel...Both cli
0120: 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72 2d 73  ent and server-s
0130: 69 64 65 20 73 6f 63 6b 65 74 73 20 61 72 65 20  ide sockets are 
0140: 70 6f 73 73 69 62 6c 65 2c 20 61 6e 64 20 74 68  possible, and th
0150: 69 73 20 63 6f 64 65 20 73 68 6f 75 6c 64 20 77  is code should w
0160: 6f 72 6b 0a 6f 6e 20 61 6e 79 20 70 6c 61 74 66  ork.on any platf
0170: 6f 72 6d 20 61 73 20 69 74 20 75 73 65 73 20 61  orm as it uses a
0180: 20 67 65 6e 65 72 69 63 20 6d 65 63 68 61 6e 69   generic mechani
0190: 73 6d 20 66 6f 72 20 6c 61 79 65 72 69 6e 67 20  sm for layering 
01a0: 6f 6e 20 53 53 4c 20 61 6e 64 20 54 63 6c 2e 0a  on SSL and Tcl..
01b0: 0a 54 68 65 20 54 4c 53 20 31 2e 34 20 72 65 6c  .The TLS 1.4 rel
01c0: 65 61 73 65 20 72 65 71 75 69 72 65 73 20 54 63  ease requires Tc
01d0: 6c 20 38 2e 32 2e 30 2b 2c 20 77 69 74 68 20 38  l 8.2.0+, with 8
01e0: 2e 33 2e 32 2b 20 70 72 65 66 65 72 72 65 64 2e  .3.2+ preferred.
01f0: 20 20 54 68 65 0a 73 74 61 63 6b 65 64 20 63 68    The.stacked ch
0200: 61 6e 6e 65 6c 20 69 6d 70 6c 65 6d 65 6e 74 61  annel implementa
0210: 74 69 6f 6e 20 69 6e 20 54 63 6c 20 77 61 73 20  tion in Tcl was 
0220: 6f 72 69 67 69 6e 61 6c 6c 79 20 69 6e 74 72 6f  originally intro
0230: 64 75 63 65 64 20 69 6e 20 38 2e 32 2e 30 0a 28  duced in 8.2.0.(
0240: 70 72 65 76 69 6f 75 73 6c 79 20 74 68 65 20 54  previously the T
0250: 72 66 20 70 61 74 63 68 29 20 61 6e 64 20 72 65  rf patch) and re
0260: 77 72 69 74 74 65 6e 20 66 6f 72 20 38 2e 33 2e  written for 8.3.
0270: 32 2b 20 64 75 65 20 74 6f 20 69 6e 68 65 72 65  2+ due to inhere
0280: 6e 74 0a 6c 69 6d 69 74 61 74 69 6f 6e 73 20 69  nt.limitations i
0290: 6e 20 74 68 65 20 65 61 72 6c 69 65 72 20 69 6d  n the earlier im
02a0: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2e 20 20 54  plementation.  T
02b0: 4c 53 20 31 2e 34 20 73 68 6f 75 6c 64 20 63 6f  LS 1.4 should co
02c0: 6d 70 69 6c 65 20 77 69 74 68 0a 61 6e 79 20 73  mpile with.any s
02d0: 74 75 62 73 2d 63 61 70 61 62 6c 65 20 54 63 6c  tubs-capable Tcl
02e0: 20 69 6e 74 65 72 70 72 65 74 65 72 2c 20 62 75   interpreter, bu
02f0: 74 20 77 69 6c 6c 20 72 65 71 75 69 72 65 20 38  t will require 8
0300: 2e 32 2b 20 77 68 65 6e 20 6c 6f 61 64 65 64 2e  .2+ when loaded.
0310: 0a 54 68 65 72 65 20 61 72 65 20 6b 6e 6f 77 6e  .There are known
0320: 20 6c 69 6d 69 74 61 74 69 6f 6e 73 20 69 6e 20   limitations in 
0330: 74 68 65 20 38 2e 32 2e 30 2d 38 2e 33 2e 31 20  the 8.2.0-8.3.1 
0340: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 0a  stacked channel.
0350: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2c 20  implementation, 
0360: 73 6f 20 69 74 20 69 73 20 65 6e 63 6f 75 72 61  so it is encoura
0370: 67 65 64 20 74 68 61 74 20 70 65 6f 70 6c 65 20  ged that people 
0380: 75 73 65 20 54 4c 53 20 31 2e 34 2b 20 77 69 74  use TLS 1.4+ wit
0390: 68 20 61 6e 0a 38 2e 33 2e 32 2b 20 54 63 6c 20  h an.8.3.2+ Tcl 
03a0: 69 6e 74 65 72 70 72 65 74 65 72 2e 0a 0a 46 75  interpreter...Fu
03b0: 6c 6c 20 66 69 6c 65 76 65 6e 74 20 73 65 6d 61  ll filevent sema
03c0: 74 69 63 73 20 73 68 6f 75 6c 64 20 61 6c 73 6f  tics should also
03d0: 20 62 65 20 69 6e 74 61 63 74 20 2d 20 73 65 65   be intact - see
03e0: 20 74 65 73 74 73 20 64 69 72 65 63 74 6f 72 79   tests directory
03f0: 20 66 6f 72 0a 62 6c 6f 63 6b 69 6e 67 20 61 6e   for.blocking an
0400: 64 20 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 20 65  d non-blocking e
0410: 78 61 6d 70 6c 65 73 2e 0a 0a 54 68 69 73 20 77  xamples...This w
0420: 61 73 20 62 75 69 6c 74 20 28 61 6c 6d 6f 73 74  as built (almost
0430: 29 20 66 72 6f 6d 20 73 63 72 61 74 63 68 20 62  ) from scratch b
0440: 61 73 65 64 20 75 70 6f 6e 20 6f 62 73 65 72 76  ased upon observ
0450: 61 74 69 6f 6e 20 6f 66 20 4f 70 65 6e 53 53 4c  ation of OpenSSL
0460: 20 30 2e 39 2e 32 42 0a 0a 41 64 64 69 74 69 6f   0.9.2B..Additio
0470: 6e 20 63 72 65 64 69 74 20 69 73 20 64 75 65 20  n credit is due 
0480: 66 6f 72 20 41 6e 64 72 65 61 73 20 4b 75 70 72  for Andreas Kupr
0490: 69 65 73 20 28 61 2e 6b 75 70 72 69 65 73 40 77  ies (a.kupries@w
04a0: 65 73 74 65 6e 64 2e 63 6f 6d 29 2c 20 66 6f 72  estend.com), for
04b0: 0a 70 72 6f 76 69 64 69 6e 67 20 74 68 65 20 54  .providing the T
04c0: 63 6c 5f 52 65 70 6c 61 63 65 43 68 61 6e 6e 65  cl_ReplaceChanne
04d0: 6c 20 6d 65 63 68 61 6e 69 73 6d 20 61 6e 64 20  l mechanism and 
04e0: 77 6f 72 6b 69 6e 67 20 63 6c 6f 73 65 6c 79 20  working closely 
04f0: 77 69 74 68 20 6d 65 0a 74 6f 20 65 6e 68 61 6e  with me.to enhan
0500: 63 65 20 69 74 20 74 6f 20 73 75 70 70 6f 72 74  ce it to support
0510: 20 66 75 6c 6c 20 66 69 6c 65 65 76 65 6e 74 20   full fileevent 
0520: 73 65 6d 61 6e 74 69 63 73 2e 0a 0a 41 6c 73 6f  semantics...Also
0530: 20 77 6f 72 6b 20 64 6f 6e 65 20 62 79 20 74 68   work done by th
0540: 65 20 66 6f 6c 6c 6f 77 20 70 65 6f 70 6c 65 20  e follow people 
0550: 70 72 6f 76 69 64 65 64 20 74 68 65 20 69 6d 70  provided the imp
0560: 65 74 75 73 20 74 6f 20 64 6f 20 74 68 69 73 20  etus to do this 
0570: 22 72 69 67 68 74 22 3a 2d 0a 74 63 6c 53 53 4c  "right":-.tclSSL
0580: 20 28 43 6f 6c 69 6e 20 4d 63 43 6f 72 6d 61 63   (Colin McCormac
0590: 6b 2c 20 53 68 61 72 65 64 20 54 65 63 68 6e 6f  k, Shared Techno
05a0: 6c 6f 67 79 29 0a 53 53 4c 74 63 6c 20 28 50 65  logy).SSLtcl (Pe
05b0: 74 65 72 20 41 6e 74 6d 61 6e 29 0a 0a 54 68 69  ter Antman)..Thi
05c0: 73 20 63 6f 64 65 20 69 73 20 6c 69 63 65 6e 73  s code is licens
05d0: 65 64 20 75 6e 64 65 72 20 74 68 65 20 73 61 6d  ed under the sam
05e0: 65 20 74 65 72 6d 73 20 61 73 20 74 68 65 20 54  e terms as the T
05f0: 63 6c 20 43 6f 72 65 2e 0a 0a 49 20 77 6f 75 6c  cl Core...I woul
0600: 64 20 61 6c 73 6f 20 6c 69 6b 65 20 74 6f 20 61  d also like to a
0610: 63 6b 6e 6f 77 6c 65 64 67 65 20 74 68 65 20 69  cknowledge the i
0620: 6e 70 75 74 20 6f 66 20 4d 61 72 73 68 61 6c 6c  nput of Marshall
0630: 20 52 6f 73 65 2c 20 77 68 6f 20 63 6f 6e 76 69   Rose, who convi
0640: 6e 63 65 64 20 0a 6d 65 20 74 68 61 74 20 70 65  nced .me that pe
0650: 6f 70 6c 65 20 6e 65 65 64 20 74 6f 20 62 65 20  ople need to be 
0660: 61 62 6c 65 20 74 6f 20 73 77 69 74 63 68 2d 74  able to switch-t
0670: 6f 2d 65 6e 63 72 79 70 74 65 64 20 6d 6f 64 65  o-encrypted mode
0680: 20 70 61 72 74 20 77 61 79 0a 74 68 72 6f 75 67   part way.throug
0690: 68 20 61 20 63 6f 6e 76 65 72 73 61 74 69 6f 6e  h a conversation
06a0: 2e 0a 0a 41 6c 73 6f 20 49 20 77 6f 75 6c 64 20  ...Also I would 
06b0: 6c 69 6b 65 20 74 6f 20 61 63 6b 6e 6f 77 6c 65  like to acknowle
06c0: 64 67 65 20 74 68 65 20 6b 69 6e 64 20 73 75 70  dge the kind sup
06d0: 70 6f 72 74 20 6f 66 20 4e 6f 76 61 64 69 67 6d  port of Novadigm
06e0: 20 49 6e 63 2c 20 6d 79 0a 63 75 72 72 65 6e 74   Inc, my.current
06f0: 20 65 6d 70 6c 6f 79 65 72 2c 20 77 68 69 63 68   employer, which
0700: 20 6d 61 64 65 20 74 68 69 73 20 70 6f 73 73 69   made this possi
0710: 62 6c 65 2e 0a 0a 0a 4d 61 74 74 20 4e 65 77 6d  ble....Matt Newm
0720: 61 6e 0a                                         an.