Artifact
ce26e28f058f6e6bc09e1bac80cd3d5582b6238ea2ceb134ad5b9403e8311de3:
0000: 4f 72 69 67 69 6e 61 6c 20 54 4c 53 20 43 6f 70 Original TLS Cop
0010: 79 72 69 67 68 74 20 28 43 29 20 31 39 39 37 2d yright (C) 1997-
0020: 32 30 30 30 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2000 Matt Newman
0030: 20 3c 6d 61 74 74 40 6e 6f 76 61 64 69 67 6d 2e <matt@novadigm.
0040: 63 6f 6d 3e 0a 54 4c 53 20 31 2e 34 2e 31 20 20 com>.TLS 1.4.1
0050: 20 20 43 6f 70 79 72 69 67 68 74 20 28 43 29 20 Copyright (C)
0060: 32 30 30 30 20 41 6a 75 62 61 20 53 6f 6c 75 74 2000 Ajuba Solut
0070: 69 6f 6e 73 0a 54 4c 53 20 31 2e 36 20 20 20 20 ions.TLS 1.6
0080: 20 20 43 6f 70 79 72 69 67 68 74 20 28 43 29 20 Copyright (C)
0090: 32 30 30 38 20 41 63 74 69 76 65 53 74 61 74 65 2008 ActiveState
00a0: 20 53 6f 66 74 77 61 72 65 20 49 6e 63 2e 0a 54 Software Inc..T
00b0: 4c 53 20 31 2e 37 20 20 20 20 20 20 43 6f 70 79 LS 1.7 Copy
00c0: 72 69 67 68 74 20 28 43 29 20 32 30 31 36 20 4d right (C) 2016 M
00d0: 61 74 74 20 4e 65 77 6d 61 6e 2c 20 41 6a 75 62 att Newman, Ajub
00e0: 61 20 53 6f 6c 75 74 69 6f 6e 73 2c 20 41 63 74 a Solutions, Act
00f0: 69 76 65 53 74 61 74 65 0a 20 20 20 20 20 20 20 iveState.
0100: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0110: 20 20 20 20 20 20 20 20 20 53 6f 66 74 77 61 72 Softwar
0120: 65 20 49 6e 63 2c 20 52 6f 79 20 4b 65 65 6e 65 e Inc, Roy Keene
0130: 20 3c 74 63 6c 74 6c 73 40 72 6b 65 65 6e 65 2e <tcltls@rkeene.
0140: 6f 72 67 3e 0a 0a 54 4c 53 20 28 61 6b 61 20 53 org>..TLS (aka S
0150: 53 4c 29 20 43 68 61 6e 6e 65 6c 20 2d 20 63 61 SL) Channel - ca
0160: 6e 20 62 65 20 6c 61 79 65 72 65 64 20 6f 6e 20 n be layered on
0170: 61 6e 79 20 62 69 2d 64 69 72 65 63 74 69 6f 6e any bi-direction
0180: 61 6c 20 54 63 6c 5f 43 68 61 6e 6e 65 6c 2e 0a al Tcl_Channel..
0190: 0a 42 6f 74 68 20 63 6c 69 65 6e 74 20 61 6e 64 .Both client and
01a0: 20 73 65 72 76 65 72 2d 73 69 64 65 20 73 6f 63 server-side soc
01b0: 6b 65 74 73 20 61 72 65 20 70 6f 73 73 69 62 6c kets are possibl
01c0: 65 2c 20 61 6e 64 20 74 68 69 73 20 63 6f 64 65 e, and this code
01d0: 20 73 68 6f 75 6c 64 20 77 6f 72 6b 0a 6f 6e 20 should work.on
01e0: 61 6e 79 20 70 6c 61 74 66 6f 72 6d 20 61 73 20 any platform as
01f0: 69 74 20 75 73 65 73 20 61 20 67 65 6e 65 72 69 it uses a generi
0200: 63 20 6d 65 63 68 61 6e 69 73 6d 20 66 6f 72 20 c mechanism for
0210: 6c 61 79 65 72 69 6e 67 20 6f 6e 20 53 53 4c 20 layering on SSL
0220: 61 6e 64 20 54 63 6c 2e 0a 0a 46 75 6c 6c 20 66 and Tcl...Full f
0230: 69 6c 65 76 65 6e 74 20 73 65 6d 61 74 69 63 73 ilevent sematics
0240: 20 73 68 6f 75 6c 64 20 61 6c 73 6f 20 62 65 20 should also be
0250: 69 6e 74 61 63 74 20 2d 20 73 65 65 20 74 65 73 intact - see tes
0260: 74 73 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 ts directory for
0270: 0a 62 6c 6f 63 6b 69 6e 67 20 61 6e 64 20 6e 6f .blocking and no
0280: 6e 2d 62 6c 6f 63 6b 69 6e 67 20 65 78 61 6d 70 n-blocking examp
0290: 6c 65 73 2e 0a 0a 54 68 65 20 63 75 72 72 65 6e les...The curren
02a0: 74 20 72 65 6c 65 61 73 65 20 69 73 20 54 4c 53 t release is TLS
02b0: 20 31 2e 37 2c 20 77 69 74 68 20 62 69 6e 61 72 1.7, with binar
02c0: 69 65 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 ies built agains
02d0: 74 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e 31 2e t OpenSSL 1.1.1.
02e0: 0a 46 6f 72 20 62 65 73 74 20 73 65 63 75 72 69 .For best securi
02f0: 74 79 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e 2c ty and function,
0300: 20 61 6c 77 61 79 73 20 63 6f 6d 70 69 6c 65 20 always compile
0310: 66 72 6f 6d 20 73 6f 75 72 63 65 20 77 69 74 68 from source with
0320: 20 74 68 65 20 6c 61 74 65 73 74 0a 6f 66 66 69 the latest.offi
0330: 63 69 61 6c 20 72 65 6c 65 61 73 65 20 6f 66 20 cial release of
0340: 4f 70 65 6e 53 53 4c 20 28 68 74 74 70 3a 2f 2f OpenSSL (http://
0350: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f www.openssl.org/
0360: 29 2e 0a 0a 54 4c 53 20 31 2e 37 20 61 6e 64 20 )...TLS 1.7 and
0370: 6e 65 77 65 72 20 72 65 71 75 69 72 65 20 54 63 newer require Tc
0380: 6c 20 38 2e 34 2e 30 2b 2c 20 6f 6c 64 65 72 20 l 8.4.0+, older
0390: 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 62 65 20 versions may be
03a0: 75 73 65 64 20 69 66 20 6f 6c 64 65 72 0a 76 65 used if older.ve
03b0: 72 73 69 6f 6e 73 20 6f 66 20 54 63 6c 20 6e 65 rsions of Tcl ne
03c0: 65 64 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 0a ed to be used...
03d0: 54 63 6c 54 4c 53 20 72 65 71 75 69 72 65 73 20 TclTLS requires
03e0: 4f 70 65 6e 53 53 4c 20 6f 72 20 4c 69 62 72 65 OpenSSL or Libre
03f0: 53 53 4c 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 SSL in order to
0400: 62 65 20 63 6f 6d 70 69 6c 65 64 20 61 6e 64 20 be compiled and
0410: 66 75 6e 63 74 69 6f 6e 2e 0a 0a 4e 6f 6e 2d 65 function...Non-e
0420: 78 63 6c 75 73 69 76 65 20 63 72 65 64 69 74 73 xclusive credits
0430: 20 66 6f 72 20 54 4c 53 20 61 72 65 3a 0a 20 20 for TLS are:.
0440: 20 4f 72 69 67 69 6e 61 6c 20 77 6f 72 6b 3a 20 Original work:
0450: 4d 61 74 74 20 4e 65 77 6d 61 6e 20 40 20 4e 6f Matt Newman @ No
0460: 76 61 64 69 67 6d 0a 20 20 20 55 70 64 61 74 65 vadigm. Update
0470: 73 3a 20 4a 65 66 66 20 48 6f 62 62 73 20 40 20 s: Jeff Hobbs @
0480: 41 63 74 69 76 65 53 74 61 74 65 0a 20 20 20 54 ActiveState. T
0490: 63 6c 20 43 68 61 6e 6e 65 6c 20 6d 65 63 68 61 cl Channel mecha
04a0: 6e 69 73 6d 3a 20 41 6e 64 72 65 61 73 20 4b 75 nism: Andreas Ku
04b0: 70 72 69 65 73 0a 20 20 20 49 6d 70 65 74 75 73 pries. Impetus
04c0: 2f 52 65 6c 61 74 65 64 20 77 6f 72 6b 3a 20 74 /Related work: t
04d0: 63 6c 53 53 4c 20 28 43 6f 6c 69 6e 20 4d 63 43 clSSL (Colin McC
04e0: 6f 72 6d 61 63 6b 2c 20 53 68 61 72 65 64 20 54 ormack, Shared T
04f0: 65 63 68 6e 6f 6c 6f 67 79 29 0a 20 20 20 20 20 echnology).
0500: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0510: 20 20 20 20 53 53 4c 74 63 6c 20 28 50 65 74 65 SSLtcl (Pete
0520: 72 20 41 6e 74 6d 61 6e 29 0a 0a 54 68 69 73 20 r Antman)..This
0530: 63 6f 64 65 20 69 73 20 6c 69 63 65 6e 73 65 64 code is licensed
0540: 20 75 6e 64 65 72 20 74 68 65 20 73 61 6d 65 20 under the same
0550: 74 65 72 6d 73 20 61 73 20 74 68 65 20 54 63 6c terms as the Tcl
0560: 20 43 6f 72 65 2e 0a Core..