Artifact
5d17597cda2835f2ce96511cda69f397b3d4b13defa07227d9463a7d66add446:
0000: 2f 2a 0a 20 2a 20 54 4c 53 20 43 68 61 6e 6e 65 /*. * TLS Channe
0010: 6c 20 2d 20 54 68 69 73 20 65 78 74 65 6e 73 69 l - This extensi
0020: 6f 6e 20 70 72 6f 76 69 64 65 73 20 61 20 65 6e on provides a en
0030: 63 72 79 70 74 65 64 20 63 6f 6d 6d 75 6e 69 63 crypted communic
0040: 61 74 69 6f 6e 20 63 68 61 6e 6e 65 6c 0a 20 2a ation channel. *
0050: 20 75 73 69 6e 67 20 74 68 65 20 54 4c 53 20 6f using the TLS o
0060: 72 20 53 53 4c 20 70 72 6f 74 6f 63 6f 6c 73 2e r SSL protocols.
0070: 20 49 74 20 63 61 6e 20 62 65 20 6c 61 79 65 72 It can be layer
0080: 65 64 20 6f 6e 20 74 6f 70 20 6f 66 20 61 6e 79 ed on top of any
0090: 0a 20 2a 20 62 69 2d 64 69 72 65 63 74 69 6f 6e . * bi-direction
00a0: 61 6c 20 54 63 6c 5f 43 68 61 6e 6e 65 6c 2e 0a al Tcl_Channel..
00b0: 20 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 20 *. * Copyright
00c0: 28 43 29 20 31 39 39 37 2d 32 30 30 30 20 4d 61 (C) 1997-2000 Ma
00d0: 74 74 20 4e 65 77 6d 61 6e 20 3c 6d 61 74 74 40 tt Newman <matt@
00e0: 6e 6f 76 61 64 69 67 6d 2e 63 6f 6d 3e 0a 20 2a novadigm.com>. *
00f0: 0a 20 2a 20 41 64 64 69 74 69 6f 6e 20 63 72 65 . * Addition cre
0100: 64 69 74 20 69 73 20 64 75 65 20 66 6f 72 20 41 dit is due for A
0110: 6e 64 72 65 61 73 20 4b 75 70 72 69 65 73 20 28 ndreas Kupries (
0120: 61 2e 6b 75 70 72 69 65 73 40 77 65 73 74 65 6e a.kupries@westen
0130: 64 2e 63 6f 6d 29 2c 20 66 6f 72 0a 20 2a 20 70 d.com), for. * p
0140: 72 6f 76 69 64 69 6e 67 20 74 68 65 20 54 63 6c roviding the Tcl
0150: 5f 52 65 70 6c 61 63 65 43 68 61 6e 6e 65 6c 20 _ReplaceChannel
0160: 6d 65 63 68 61 6e 69 73 6d 20 61 6e 64 20 77 6f mechanism and wo
0170: 72 6b 69 6e 67 20 63 6c 6f 73 65 6c 79 20 77 69 rking closely wi
0180: 74 68 20 6d 65 0a 20 2a 20 74 6f 20 65 6e 68 61 th me. * to enha
0190: 6e 63 65 20 69 74 20 74 6f 20 73 75 70 70 6f 72 nce it to suppor
01a0: 74 20 66 75 6c 6c 20 66 69 6c 65 65 76 65 6e 74 t full fileevent
01b0: 20 73 65 6d 61 6e 74 69 63 73 2e 0a 20 2a 0a 20 semantics.. *.
01c0: 2a 20 41 6c 73 6f 20 77 6f 72 6b 20 64 6f 6e 65 * Also work done
01d0: 20 62 79 20 74 68 65 20 66 6f 6c 6c 6f 77 20 70 by the follow p
01e0: 65 6f 70 6c 65 20 70 72 6f 76 69 64 65 64 20 74 eople provided t
01f0: 68 65 20 69 6d 70 65 74 75 73 20 74 6f 20 64 6f he impetus to do
0200: 20 74 68 69 73 20 22 72 69 67 68 74 22 3a 2d 0a this "right":-.
0210: 20 2a 09 74 63 6c 53 53 4c 20 28 43 6f 6c 69 6e *.tclSSL (Colin
0220: 20 4d 63 43 6f 72 6d 61 63 6b 2c 20 53 68 61 72 McCormack, Shar
0230: 65 64 20 54 65 63 68 6e 6f 6c 6f 67 79 29 0a 20 ed Technology).
0240: 2a 09 53 53 4c 74 63 6c 20 28 50 65 74 65 72 20 *.SSLtcl (Peter
0250: 41 6e 74 6d 61 6e 29 0a 20 2a 0a 20 2a 2f 0a 0a Antman). *. */..
0260: 23 69 66 6e 64 65 66 20 5f 54 4c 53 5f 48 0a 23 #ifndef _TLS_H.#
0270: 64 65 66 69 6e 65 20 5f 54 4c 53 5f 48 0a 0a 23 define _TLS_H..#
0280: 69 6e 63 6c 75 64 65 20 3c 74 63 6c 2e 68 3e 0a include <tcl.h>.
0290: 0a 2f 2a 0a 20 2a 20 49 6e 69 74 69 61 6c 69 7a ./*. * Initializ
02a0: 61 74 69 6f 6e 20 72 6f 75 74 69 6e 65 73 20 2d ation routines -
02b0: 2d 20 6f 75 72 20 65 6e 74 69 72 65 20 70 75 62 - our entire pub
02c0: 6c 69 63 20 43 20 41 50 49 2e 0a 20 2a 2f 0a 44 lic C API.. */.D
02d0: 4c 4c 45 58 50 4f 52 54 20 69 6e 74 20 54 6c 73 LLEXPORT int Tls
02e0: 5f 49 6e 69 74 28 54 63 6c 5f 49 6e 74 65 72 70 _Init(Tcl_Interp
02f0: 20 2a 69 6e 74 65 72 70 29 3b 0a 44 4c 4c 45 58 *interp);.DLLEX
0300: 50 4f 52 54 20 69 6e 74 20 54 6c 73 5f 53 61 66 PORT int Tls_Saf
0310: 65 49 6e 69 74 28 54 63 6c 5f 49 6e 74 65 72 70 eInit(Tcl_Interp
0320: 20 2a 69 6e 74 65 72 70 29 3b 0a 0a 23 65 6e 64 *interp);..#end
0330: 69 66 20 2f 2a 20 5f 54 4c 53 5f 48 20 2a 2f 0a if /* _TLS_H */.