Hex Artifact Content

Artifact dc96a1623e32f7cfdf116369dde5d5a6b5264514:


0000: 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 20  /*. * Copyright 
0010: 28 43 29 20 31 39 39 37 2d 32 30 30 30 20 4d 61  (C) 1997-2000 Ma
0020: 74 74 20 4e 65 77 6d 61 6e 20 3c 6d 61 74 74 40  tt Newman <matt@
0030: 6e 6f 76 61 64 69 67 6d 2e 63 6f 6d 3e 0a 20 2a  novadigm.com>. *
0040: 0a 20 2a 20 24 48 65 61 64 65 72 3a 20 2f 68 6f  . * $Header: /ho
0050: 6d 65 2f 72 6b 65 65 6e 65 2f 74 6d 70 2f 63 76  me/rkeene/tmp/cv
0060: 73 32 66 6f 73 73 69 6c 2f 2e 2e 2f 74 63 6c 74  s2fossil/../tclt
0070: 6c 73 2f 74 6c 73 2f 74 6c 73 2f 74 6c 73 2e 68  ls/tls/tls/tls.h
0080: 2c 76 20 31 2e 32 20 32 30 30 30 2f 30 31 2f 32  ,v 1.2 2000/01/2
0090: 30 20 30 31 3a 35 39 3a 33 38 20 61 62 6f 72 72  0 01:59:38 aborr
00a0: 20 45 78 70 20 24 0a 20 2a 0a 20 2a 20 54 4c 53   Exp $. *. * TLS
00b0: 20 28 61 6b 61 20 53 53 4c 29 20 43 68 61 6e 6e   (aka SSL) Chann
00c0: 65 6c 20 2d 20 63 61 6e 20 62 65 20 6c 61 79 65  el - can be laye
00d0: 72 65 64 20 6f 6e 20 61 6e 79 20 62 69 2d 64 69  red on any bi-di
00e0: 72 65 63 74 69 6f 6e 61 6c 0a 20 2a 20 54 63 6c  rectional. * Tcl
00f0: 5f 43 68 61 6e 6e 65 6c 20 28 4e 6f 74 65 3a 20  _Channel (Note: 
0100: 52 65 71 75 69 72 65 73 20 54 72 66 20 43 6f 72  Requires Trf Cor
0110: 65 20 50 61 74 63 68 29 0a 20 2a 0a 20 2a 20 54  e Patch). *. * T
0120: 68 69 73 20 77 61 73 20 62 75 69 6c 74 20 66 72  his was built fr
0130: 6f 6d 20 73 63 72 61 74 63 68 20 62 61 73 65 64  om scratch based
0140: 20 75 70 6f 6e 20 6f 62 73 65 72 76 61 74 69 6f   upon observatio
0150: 6e 20 6f 66 20 4f 70 65 6e 53 53 4c 20 30 2e 39  n of OpenSSL 0.9
0160: 2e 32 42 0a 20 2a 0a 20 2a 20 41 64 64 69 74 69  .2B. *. * Additi
0170: 6f 6e 20 63 72 65 64 69 74 20 69 73 20 64 75 65  on credit is due
0180: 20 66 6f 72 20 41 6e 64 72 65 61 73 20 4b 75 70   for Andreas Kup
0190: 72 69 65 73 20 28 61 2e 6b 75 70 72 69 65 73 40  ries (a.kupries@
01a0: 77 65 73 74 65 6e 64 2e 63 6f 6d 29 2c 20 66 6f  westend.com), fo
01b0: 72 0a 20 2a 20 70 72 6f 76 69 64 69 6e 67 20 74  r. * providing t
01c0: 68 65 20 54 63 6c 5f 52 65 70 6c 61 63 65 43 68  he Tcl_ReplaceCh
01d0: 61 6e 6e 65 6c 20 6d 65 63 68 61 6e 69 73 6d 20  annel mechanism 
01e0: 61 6e 64 20 77 6f 72 6b 69 6e 67 20 63 6c 6f 73  and working clos
01f0: 65 6c 79 20 77 69 74 68 20 6d 65 0a 20 2a 20 74  ely with me. * t
0200: 6f 20 65 6e 68 61 6e 63 65 20 69 74 20 74 6f 20  o enhance it to 
0210: 73 75 70 70 6f 72 74 20 66 75 6c 6c 20 66 69 6c  support full fil
0220: 65 65 76 65 6e 74 20 73 65 6d 61 6e 74 69 63 73  eevent semantics
0230: 2e 0a 20 2a 0a 20 2a 20 41 6c 73 6f 20 77 6f 72  .. *. * Also wor
0240: 6b 20 64 6f 6e 65 20 62 79 20 74 68 65 20 66 6f  k done by the fo
0250: 6c 6c 6f 77 20 70 65 6f 70 6c 65 20 70 72 6f 76  llow people prov
0260: 69 64 65 64 20 74 68 65 20 69 6d 70 65 74 75 73  ided the impetus
0270: 20 74 6f 20 64 6f 20 74 68 69 73 20 22 72 69 67   to do this "rig
0280: 68 74 22 3a 2d 0a 20 2a 09 74 63 6c 53 53 4c 20  ht":-. *.tclSSL 
0290: 28 43 6f 6c 69 6e 20 4d 63 43 6f 72 6d 61 63 6b  (Colin McCormack
02a0: 2c 20 53 68 61 72 65 64 20 54 65 63 68 6e 6f 6c  , Shared Technol
02b0: 6f 67 79 29 0a 20 2a 09 53 53 4c 74 63 6c 20 28  ogy). *.SSLtcl (
02c0: 50 65 74 65 72 20 41 6e 74 6d 61 6e 29 0a 20 2a  Peter Antman). *
02d0: 0a 20 2a 2f 0a 23 69 66 6e 64 65 66 20 5f 54 4c  . */.#ifndef _TL
02e0: 53 5f 48 0a 23 64 65 66 69 6e 65 20 5f 54 4c 53  S_H.#define _TLS
02f0: 5f 48 0a 0a 23 69 6e 63 6c 75 64 65 20 3c 74 63  _H..#include <tc
0300: 6c 2e 68 3e 09 2f 2a 20 49 6e 74 65 72 6e 61 6c  l.h>./* Internal
0310: 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 66 6f 72   definitions for
0320: 20 54 63 6c 2e 20 2a 2f 0a 0a 23 69 66 64 65 66   Tcl. */..#ifdef
0330: 20 54 43 4c 5f 53 54 4f 52 41 47 45 5f 43 4c 41   TCL_STORAGE_CLA
0340: 53 53 0a 23 20 75 6e 64 65 66 20 54 43 4c 5f 53  SS.# undef TCL_S
0350: 54 4f 52 41 47 45 5f 43 4c 41 53 53 0a 23 65 6e  TORAGE_CLASS.#en
0360: 64 69 66 0a 23 69 66 64 65 66 20 42 55 49 4c 44  dif.#ifdef BUILD
0370: 5f 74 6c 73 0a 23 20 64 65 66 69 6e 65 20 54 43  _tls.# define TC
0380: 4c 5f 53 54 4f 52 41 47 45 5f 43 4c 41 53 53 20  L_STORAGE_CLASS 
0390: 44 4c 4c 45 58 50 4f 52 54 0a 23 65 6c 73 65 0a  DLLEXPORT.#else.
03a0: 23 20 64 65 66 69 6e 65 20 54 43 4c 5f 53 54 4f  # define TCL_STO
03b0: 52 41 47 45 5f 43 4c 41 53 53 20 44 4c 4c 49 4d  RAGE_CLASS DLLIM
03c0: 50 4f 52 54 0a 23 65 6e 64 69 66 0a 0a 2f 2a 0a  PORT.#endif../*.
03d0: 20 2a 20 46 6f 72 77 61 72 64 20 64 65 63 6c 61   * Forward decla
03e0: 72 61 74 69 6f 6e 73 0a 20 2a 2f 0a 0a 45 58 54  rations. */..EXT
03f0: 45 52 4e 20 69 6e 74 20 54 6c 73 5f 49 6e 69 74  ERN int Tls_Init
0400: 20 5f 41 4e 53 49 5f 41 52 47 53 5f 20 28 28 54   _ANSI_ARGS_ ((T
0410: 63 6c 5f 49 6e 74 65 72 70 20 2a 29 29 3b 0a 45  cl_Interp *));.E
0420: 58 54 45 52 4e 20 69 6e 74 20 54 6c 73 5f 53 61  XTERN int Tls_Sa
0430: 66 65 49 6e 69 74 20 5f 41 4e 53 49 5f 41 52 47  feInit _ANSI_ARG
0440: 53 5f 20 28 28 54 63 6c 5f 49 6e 74 65 72 70 20  S_ ((Tcl_Interp 
0450: 2a 29 29 3b 0a 0a 23 65 6e 64 69 66 20 2f 2a 20  *));..#endif /* 
0460: 5f 54 4c 53 5f 48 20 2a 2f 0a                    _TLS_H */.