Hex Artifact Content

Artifact c3268ac565aded559be69b42540066657e9f0eb0:


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 49 6e  ls/tls/tls/tlsIn
0080: 74 2e 68 2c 76 20 31 2e 32 20 32 30 30 30 2f 30  t.h,v 1.2 2000/0
0090: 31 2f 32 30 20 30 31 3a 35 32 3a 34 34 20 61 62  1/20 01:52:44 ab
00a0: 6f 72 72 20 45 78 70 20 24 0a 20 2a 0a 20 2a 20  orr Exp $. *. * 
00b0: 54 4c 53 20 28 61 6b 61 20 53 53 4c 29 20 43 68  TLS (aka SSL) Ch
00c0: 61 6e 6e 65 6c 20 2d 20 63 61 6e 20 62 65 20 6c  annel - can be l
00d0: 61 79 65 72 65 64 20 6f 6e 20 61 6e 79 20 62 69  ayered on any bi
00e0: 2d 64 69 72 65 63 74 69 6f 6e 61 6c 0a 20 2a 20  -directional. * 
00f0: 54 63 6c 5f 43 68 61 6e 6e 65 6c 20 28 4e 6f 74  Tcl_Channel (Not
0100: 65 3a 20 52 65 71 75 69 72 65 73 20 54 72 66 20  e: Requires Trf 
0110: 43 6f 72 65 20 50 61 74 63 68 29 0a 20 2a 0a 20  Core Patch). *. 
0120: 2a 20 54 68 69 73 20 77 61 73 20 62 75 69 6c 74  * This was built
0130: 20 66 72 6f 6d 20 73 63 72 61 74 63 68 20 62 61   from scratch ba
0140: 73 65 64 20 75 70 6f 6e 20 6f 62 73 65 72 76 61  sed upon observa
0150: 74 69 6f 6e 20 6f 66 20 4f 70 65 6e 53 53 4c 20  tion of OpenSSL 
0160: 30 2e 39 2e 32 42 0a 20 2a 0a 20 2a 20 41 64 64  0.9.2B. *. * Add
0170: 69 74 69 6f 6e 20 63 72 65 64 69 74 20 69 73 20  ition credit is 
0180: 64 75 65 20 66 6f 72 20 41 6e 64 72 65 61 73 20  due for Andreas 
0190: 4b 75 70 72 69 65 73 20 28 61 2e 6b 75 70 72 69  Kupries (a.kupri
01a0: 65 73 40 77 65 73 74 65 6e 64 2e 63 6f 6d 29 2c  es@westend.com),
01b0: 20 66 6f 72 0a 20 2a 20 70 72 6f 76 69 64 69 6e   for. * providin
01c0: 67 20 74 68 65 20 54 63 6c 5f 52 65 70 6c 61 63  g the Tcl_Replac
01d0: 65 43 68 61 6e 6e 65 6c 20 6d 65 63 68 61 6e 69  eChannel mechani
01e0: 73 6d 20 61 6e 64 20 77 6f 72 6b 69 6e 67 20 63  sm and working c
01f0: 6c 6f 73 65 6c 79 20 77 69 74 68 20 6d 65 0a 20  losely with me. 
0200: 2a 20 74 6f 20 65 6e 68 61 6e 63 65 20 69 74 20  * to enhance it 
0210: 74 6f 20 73 75 70 70 6f 72 74 20 66 75 6c 6c 20  to support full 
0220: 66 69 6c 65 65 76 65 6e 74 20 73 65 6d 61 6e 74  fileevent semant
0230: 69 63 73 2e 0a 20 2a 0a 20 2a 20 41 6c 73 6f 20  ics.. *. * Also 
0240: 77 6f 72 6b 20 64 6f 6e 65 20 62 79 20 74 68 65  work done by the
0250: 20 66 6f 6c 6c 6f 77 20 70 65 6f 70 6c 65 20 70   follow people p
0260: 72 6f 76 69 64 65 64 20 74 68 65 20 69 6d 70 65  rovided the impe
0270: 74 75 73 20 74 6f 20 64 6f 20 74 68 69 73 20 22  tus to do this "
0280: 72 69 67 68 74 22 3a 2d 0a 20 2a 09 74 63 6c 53  right":-. *.tclS
0290: 53 4c 20 28 43 6f 6c 69 6e 20 4d 63 43 6f 72 6d  SL (Colin McCorm
02a0: 61 63 6b 2c 20 53 68 61 72 65 64 20 54 65 63 68  ack, Shared Tech
02b0: 6e 6f 6c 6f 67 79 29 0a 20 2a 09 53 53 4c 74 63  nology). *.SSLtc
02c0: 6c 20 28 50 65 74 65 72 20 41 6e 74 6d 61 6e 29  l (Peter Antman)
02d0: 0a 20 2a 0a 20 2a 2f 0a 23 69 66 6e 64 65 66 20  . *. */.#ifndef 
02e0: 5f 54 53 4c 49 4e 54 5f 48 0a 23 64 65 66 69 6e  _TSLINT_H.#defin
02f0: 65 20 5f 54 4c 53 49 4e 54 5f 48 0a 0a 23 69 6e  e _TLSINT_H..#in
0300: 63 6c 75 64 65 20 22 74 6c 73 2e 68 22 0a 23 69  clude "tls.h".#i
0310: 6e 63 6c 75 64 65 20 3c 65 72 72 6e 6f 2e 68 3e  nclude <errno.h>
0320: 0a 0a 23 69 66 64 65 66 20 4e 4f 5f 50 41 54 45  ..#ifdef NO_PATE
0330: 4e 54 53 0a 23 64 65 66 69 6e 65 20 4e 4f 5f 49  NTS.#define NO_I
0340: 44 45 41 0a 23 64 65 66 69 6e 65 20 4e 4f 5f 52  DEA.#define NO_R
0350: 43 32 0a 23 64 65 66 69 6e 65 20 4e 4f 5f 52 43  C2.#define NO_RC
0360: 34 0a 23 64 65 66 69 6e 65 20 4e 4f 5f 52 43 35  4.#define NO_RC5
0370: 0a 23 64 65 66 69 6e 65 20 4e 4f 5f 52 53 41 0a  .#define NO_RSA.
0380: 23 64 65 66 69 6e 65 20 4e 4f 5f 53 53 4c 32 0a  #define NO_SSL2.
0390: 23 65 6e 64 69 66 0a 0a 23 69 6e 63 6c 75 64 65  #endif..#include
03a0: 20 3c 6f 70 65 6e 73 73 6c 2f 73 73 6c 2e 68 3e   <openssl/ssl.h>
03b0: 0a 0a 23 69 66 64 65 66 20 54 43 4c 5f 53 54 4f  ..#ifdef TCL_STO
03c0: 52 41 47 45 5f 43 4c 41 53 53 0a 23 20 75 6e 64  RAGE_CLASS.# und
03d0: 65 66 20 54 43 4c 5f 53 54 4f 52 41 47 45 5f 43  ef TCL_STORAGE_C
03e0: 4c 41 53 53 0a 23 65 6e 64 69 66 0a 23 69 66 64  LASS.#endif.#ifd
03f0: 65 66 20 42 55 49 4c 44 5f 74 6c 73 0a 23 20 64  ef BUILD_tls.# d
0400: 65 66 69 6e 65 20 54 43 4c 5f 53 54 4f 52 41 47  efine TCL_STORAG
0410: 45 5f 43 4c 41 53 53 20 44 4c 4c 45 58 50 4f 52  E_CLASS DLLEXPOR
0420: 54 0a 23 65 6c 73 65 0a 23 20 64 65 66 69 6e 65  T.#else.# define
0430: 20 54 43 4c 5f 53 54 4f 52 41 47 45 5f 43 4c 41   TCL_STORAGE_CLA
0440: 53 53 20 44 4c 4c 49 4d 50 4f 52 54 0a 23 65 6e  SS DLLIMPORT.#en
0450: 64 69 66 0a 20 0a 23 69 66 6e 64 65 66 20 45 43  dif. .#ifndef EC
0460: 4f 4e 4e 41 42 4f 52 54 45 44 0a 23 64 65 66 69  ONNABORTED.#defi
0470: 6e 65 20 45 43 4f 4e 4e 41 42 4f 52 54 45 44 09  ne ECONNABORTED.
0480: 31 33 30 09 2f 2a 20 53 6f 66 74 77 61 72 65 20  130./* Software 
0490: 63 61 75 73 65 64 20 63 6f 6e 6e 65 63 74 69 6f  caused connectio
04a0: 6e 20 61 62 6f 72 74 20 2a 2f 0a 23 65 6e 64 69  n abort */.#endi
04b0: 66 0a 23 69 66 6e 64 65 66 20 45 43 4f 4e 4e 52  f.#ifndef ECONNR
04c0: 45 53 45 54 0a 23 64 65 66 69 6e 65 20 45 43 4f  ESET.#define ECO
04d0: 4e 4e 52 45 53 45 54 09 31 33 31 09 2f 2a 20 43  NNRESET.131./* C
04e0: 6f 6e 6e 65 63 74 69 6f 6e 20 72 65 73 65 74 20  onnection reset 
04f0: 62 79 20 70 65 65 72 20 2a 2f 0a 23 65 6e 64 69  by peer */.#endi
0500: 66 0a 0a 23 69 66 64 65 66 20 44 45 42 55 47 0a  f..#ifdef DEBUG.
0510: 23 64 65 66 69 6e 65 20 64 70 72 69 6e 74 66 20  #define dprintf 
0520: 66 70 72 69 6e 74 66 0a 23 65 6c 73 65 0a 23 64  fprintf.#else.#d
0530: 65 66 69 6e 65 20 64 70 72 69 6e 74 66 20 69 66  efine dprintf if
0540: 20 28 30 29 20 66 70 72 69 6e 74 66 0a 23 65 6e   (0) fprintf.#en
0550: 64 69 66 0a 0a 23 64 65 66 69 6e 65 20 53 53 4c  dif..#define SSL
0560: 5f 45 52 52 4f 52 28 73 73 6c 2c 65 72 72 29 09  _ERROR(ssl,err).
0570: 5c 0a 09 20 20 20 20 28 28 63 68 61 72 2a 29 45  \..    ((char*)E
0580: 52 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f  RR_reason_error_
0590: 73 74 72 69 6e 67 28 53 53 4c 5f 67 65 74 5f 65  string(SSL_get_e
05a0: 72 72 6f 72 28 28 73 73 6c 29 2c 28 65 72 72 29  rror((ssl),(err)
05b0: 29 29 29 0a 2f 2a 0a 20 2a 20 4f 70 65 6e 53 53  )))./*. * OpenSS
05c0: 4c 20 42 49 4f 20 52 6f 75 74 69 6e 65 73 0a 20  L BIO Routines. 
05d0: 2a 2f 0a 23 64 65 66 69 6e 65 20 42 49 4f 5f 54  */.#define BIO_T
05e0: 59 50 45 5f 54 43 4c 09 28 31 39 7c 30 78 30 34  YPE_TCL.(19|0x04
05f0: 30 30 29 0a 0a 2f 2a 0a 20 2a 20 44 65 66 69 6e  00)../*. * Defin
0600: 65 73 20 66 6f 72 20 53 74 61 74 65 2e 66 6c 61  es for State.fla
0610: 67 73 0a 20 2a 2f 0a 23 64 65 66 69 6e 65 20 54  gs. */.#define T
0620: 4c 53 5f 54 43 4c 5f 41 53 59 4e 43 09 28 31 3c  LS_TCL_ASYNC.(1<
0630: 3c 30 29 09 2f 2a 20 6e 6f 6e 2d 62 6c 6f 63 6b  <0)./* non-block
0640: 69 6e 67 20 6d 6f 64 65 20 2a 2f 0a 23 64 65 66  ing mode */.#def
0650: 69 6e 65 20 54 4c 53 5f 54 43 4c 5f 53 45 52 56  ine TLS_TCL_SERV
0660: 45 52 09 28 31 3c 3c 31 29 09 2f 2a 20 53 65 72  ER.(1<<1)./* Ser
0670: 76 65 72 2d 53 69 64 65 20 2a 2f 0a 23 64 65 66  ver-Side */.#def
0680: 69 6e 65 20 54 4c 53 5f 54 43 4c 5f 49 4e 49 54  ine TLS_TCL_INIT
0690: 09 28 31 3c 3c 32 29 09 2f 2a 20 49 6e 69 74 69  .(1<<2)./* Initi
06a0: 61 6c 69 7a 69 6e 67 20 63 6f 6e 6e 65 63 74 69  alizing connecti
06b0: 6f 6e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 54 4c  on */.#define TL
06c0: 53 5f 54 43 4c 5f 44 45 42 55 47 09 28 31 3c 3c  S_TCL_DEBUG.(1<<
06d0: 33 29 09 2f 2a 20 53 68 6f 77 20 64 65 62 75 67  3)./* Show debug
06e0: 20 74 72 61 63 69 6e 67 20 2a 2f 0a 0a 23 64 65   tracing */..#de
06f0: 66 69 6e 65 20 54 4c 53 5f 54 43 4c 5f 44 45 4c  fine TLS_TCL_DEL
0700: 41 59 20 28 35 29 0a 0a 2f 2a 0a 20 2a 20 54 68  AY (5)../*. * Th
0710: 69 73 20 73 74 72 75 63 74 75 72 65 20 64 65 73  is structure des
0720: 63 72 69 62 65 73 20 74 68 65 20 70 65 72 2d 69  cribes the per-i
0730: 6e 73 74 61 6e 63 65 20 73 74 61 74 65 0a 20 2a  nstance state. *
0740: 20 6f 66 20 61 6e 20 73 73 6c 20 63 68 61 6e 6e   of an ssl chann
0750: 65 6c 2e 0a 20 2a 0a 20 2a 20 54 68 65 20 53 53  el.. *. * The SS
0760: 4c 20 70 72 6f 63 65 73 73 69 6e 67 20 63 6f 6e  L processing con
0770: 74 65 78 74 20 69 73 20 6d 61 69 6e 74 61 69 6e  text is maintain
0780: 65 64 20 68 65 72 65 2c 20 69 6e 20 74 68 65 20  ed here, in the 
0790: 43 6c 69 65 6e 74 44 61 74 61 0a 20 2a 2f 0a 74  ClientData. */.t
07a0: 79 70 65 64 65 66 20 73 74 72 75 63 74 20 53 74  ypedef struct St
07b0: 61 74 65 20 7b 0a 20 20 20 20 54 63 6c 5f 43 68  ate {.    Tcl_Ch
07c0: 61 6e 6e 65 6c 20 73 65 6c 66 3b 09 2f 2a 20 74  annel self;./* t
07d0: 68 69 73 20 73 6f 63 6b 65 74 20 63 68 61 6e 6e  his socket chann
07e0: 65 6c 20 2a 2f 0a 23 69 66 20 54 43 4c 5f 4d 41  el */.#if TCL_MA
07f0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 3d 20 38  JOR_VERSION == 8
0800: 20 26 26 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45   && TCL_MINOR_VE
0810: 52 53 49 4f 4e 20 3c 20 32 0a 20 20 20 20 54 63  RSION < 2.    Tc
0820: 6c 5f 43 68 61 6e 6e 65 6c 20 70 61 72 65 6e 74  l_Channel parent
0830: 3b 09 2f 2a 20 75 6e 64 65 72 6c 79 69 6e 67 20  ;./* underlying 
0840: 63 68 61 6e 6e 65 6c 20 2a 2f 0a 23 65 6e 64 69  channel */.#endi
0850: 66 0a 20 20 20 20 54 63 6c 5f 54 69 6d 65 72 54  f.    Tcl_TimerT
0860: 6f 6b 65 6e 20 74 69 6d 65 72 3b 0a 0a 20 20 20  oken timer;..   
0870: 20 69 6e 74 20 66 6c 61 67 73 3b 09 09 2f 2a 20   int flags;../* 
0880: 63 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 43  currently only C
0890: 48 41 4e 4e 45 4c 5f 41 53 59 4e 43 20 2a 2f 0a  HANNEL_ASYNC */.
08a0: 20 20 20 20 69 6e 74 20 77 61 74 63 68 4d 61 73      int watchMas
08b0: 6b 3b 09 2f 2a 20 63 75 72 72 65 6e 74 20 57 61  k;./* current Wa
08c0: 74 63 68 50 72 6f 63 20 6d 61 73 6b 20 2a 2f 0a  tchProc mask */.
08d0: 20 20 20 20 69 6e 74 20 6d 6f 64 65 3b 09 09 2f      int mode;../
08e0: 2a 20 63 75 72 72 65 6e 74 20 6d 6f 64 65 20 6f  * current mode o
08f0: 66 20 70 61 72 65 6e 74 20 63 68 61 6e 6e 65 6c  f parent channel
0900: 20 2a 2f 0a 0a 20 20 20 20 54 63 6c 5f 49 6e 74   */..    Tcl_Int
0910: 65 72 70 20 2a 69 6e 74 65 72 70 3b 09 2f 2a 20  erp *interp;./* 
0920: 69 6e 74 65 72 70 72 65 74 65 72 20 69 6e 20 77  interpreter in w
0930: 68 69 63 68 20 74 68 69 73 20 72 65 73 69 64 65  hich this reside
0940: 73 20 2a 2f 0a 20 20 20 20 54 63 6c 5f 4f 62 6a  s */.    Tcl_Obj
0950: 20 2a 63 61 6c 6c 62 61 63 6b 3b 09 2f 2a 20 73   *callback;./* s
0960: 63 72 69 70 74 20 63 61 6c 6c 65 64 20 66 6f 72  cript called for
0970: 20 74 72 61 63 69 6e 67 2c 20 76 65 72 69 66 79   tracing, verify
0980: 69 6e 67 20 61 6e 64 20 65 72 72 6f 72 73 20 2a  ing and errors *
0990: 2f 0a 0a 20 20 20 20 69 6e 74 20 76 66 6c 61 67  /..    int vflag
09a0: 73 3b 09 09 2f 2a 20 76 65 72 69 66 79 20 66 6c  s;../* verify fl
09b0: 61 67 73 20 2a 2f 0a 20 20 20 20 53 53 4c 20 2a  ags */.    SSL *
09c0: 73 73 6c 3b 09 09 2f 2a 20 53 74 72 75 63 74 20  ssl;../* Struct 
09d0: 66 6f 72 20 53 53 4c 20 70 72 6f 63 65 73 73 69  for SSL processi
09e0: 6e 67 20 2a 2f 0a 20 20 20 20 53 53 4c 5f 43 54  ng */.    SSL_CT
09f0: 58 20 2a 63 74 78 3b 09 2f 2a 20 53 53 4c 20 43  X *ctx;./* SSL C
0a00: 6f 6e 74 65 78 74 20 2a 2f 0a 20 20 20 20 42 49  ontext */.    BI
0a10: 4f 20 2a 62 69 6f 3b 09 09 2f 2a 20 53 74 72 75  O *bio;../* Stru
0a20: 63 74 20 66 6f 72 20 53 53 4c 20 70 72 6f 63 65  ct for SSL proce
0a30: 73 73 69 6e 67 20 2a 2f 0a 20 20 20 20 42 49 4f  ssing */.    BIO
0a40: 20 2a 70 5f 62 69 6f 3b 09 09 2f 2a 20 50 61 72   *p_bio;../* Par
0a50: 65 6e 74 20 42 49 4f 20 28 74 68 61 74 20 69 73  ent BIO (that is
0a60: 20 6c 61 79 65 72 65 64 20 6f 6e 20 54 63 6c 5f   layered on Tcl_
0a70: 43 68 61 6e 6e 65 6c 29 20 2a 2f 0a 0a 20 20 20  Channel) */..   
0a80: 20 63 68 61 72 20 2a 65 72 72 3b 0a 7d 20 53 74   char *err;.} St
0a90: 61 74 65 3b 0a 0a 2f 2a 0a 20 2a 20 46 6f 72 77  ate;../*. * Forw
0aa0: 61 72 64 20 64 65 63 6c 61 72 61 74 69 6f 6e 73  ard declarations
0ab0: 0a 20 2a 2f 0a 0a 45 58 54 45 52 4e 20 54 63 6c  . */..EXTERN Tcl
0ac0: 5f 43 68 61 6e 6e 65 6c 54 79 70 65 20 2a 54 6c  _ChannelType *Tl
0ad0: 73 5f 43 68 61 6e 6e 65 6c 54 79 70 65 20 5f 41  s_ChannelType _A
0ae0: 4e 53 49 5f 41 52 47 53 5f 28 28 76 6f 69 64 29  NSI_ARGS_((void)
0af0: 29 3b 0a 45 58 54 45 52 4e 20 54 63 6c 5f 43 68  );.EXTERN Tcl_Ch
0b00: 61 6e 6e 65 6c 09 54 6c 73 5f 47 65 74 50 61 72  annel.Tls_GetPar
0b10: 65 6e 74 20 5f 41 4e 53 49 5f 41 52 47 53 5f 28  ent _ANSI_ARGS_(
0b20: 28 53 74 61 74 65 20 2a 73 74 61 74 65 50 74 72  (State *statePtr
0b30: 29 29 3b 0a 0a 45 58 54 45 52 4e 20 54 63 6c 5f  ));..EXTERN Tcl_
0b40: 4f 62 6a 2a 09 09 54 6c 73 5f 4e 65 77 58 35 30  Obj*..Tls_NewX50
0b50: 39 4f 62 6a 20 5f 41 4e 53 49 5f 41 52 47 53 5f  9Obj _ANSI_ARGS_
0b60: 20 28 28 20 54 63 6c 5f 49 6e 74 65 72 70 20 2a   (( Tcl_Interp *
0b70: 69 6e 74 65 72 70 2c 20 58 35 30 39 20 2a 63 65  interp, X509 *ce
0b80: 72 74 29 29 3b 0a 45 58 54 45 52 4e 20 76 6f 69  rt));.EXTERN voi
0b90: 64 09 09 54 6c 73 5f 45 72 72 6f 72 20 5f 41 4e  d..Tls_Error _AN
0ba0: 53 49 5f 41 52 47 53 5f 20 28 28 53 74 61 74 65  SI_ARGS_ ((State
0bb0: 20 2a 73 74 61 74 65 50 74 72 2c 20 63 68 61 72   *statePtr, char
0bc0: 20 2a 6d 73 67 29 29 3b 0a 45 58 54 45 52 4e 20   *msg));.EXTERN 
0bd0: 76 6f 69 64 09 09 54 6c 73 5f 46 72 65 65 20 5f  void..Tls_Free _
0be0: 41 4e 53 49 5f 41 52 47 53 5f 20 28 28 63 68 61  ANSI_ARGS_ ((cha
0bf0: 72 20 2a 62 6c 6f 63 6b 50 74 72 29 29 3b 0a 45  r *blockPtr));.E
0c00: 58 54 45 52 4e 20 69 6e 74 09 09 54 6c 73 5f 57  XTERN int..Tls_W
0c10: 61 69 74 46 6f 72 43 6f 6e 6e 65 63 74 20 5f 41  aitForConnect _A
0c20: 4e 53 49 5f 41 52 47 53 5f 28 28 20 53 74 61 74  NSI_ARGS_(( Stat
0c30: 65 20 2a 73 74 61 74 65 50 74 72 2c 0a 09 09 09  e *statePtr,....
0c40: 09 09 09 09 69 6e 74 20 2a 65 72 72 6f 72 43 6f  ....int *errorCo
0c50: 64 65 50 74 72 29 29 3b 0a 0a 45 58 54 45 52 4e  dePtr));..EXTERN
0c60: 20 42 49 4f 5f 4d 45 54 48 4f 44 20 2a 09 42 49   BIO_METHOD *.BI
0c70: 4f 5f 73 5f 74 63 6c 20 5f 41 4e 53 49 5f 41 52  O_s_tcl _ANSI_AR
0c80: 47 53 5f 28 28 76 6f 69 64 29 29 3b 0a 45 58 54  GS_((void));.EXT
0c90: 45 52 4e 20 42 49 4f 20 2a 09 09 42 49 4f 5f 6e  ERN BIO *..BIO_n
0ca0: 65 77 5f 74 63 6c 20 5f 41 4e 53 49 5f 41 52 47  ew_tcl _ANSI_ARG
0cb0: 53 5f 28 28 53 74 61 74 65 2a 20 73 74 61 74 65  S_((State* state
0cc0: 50 74 72 2c 20 69 6e 74 20 66 6c 61 67 73 29 29  Ptr, int flags))
0cd0: 3b 0a 0a 23 65 6e 64 69 66 20 2f 2a 20 5f 54 4c  ;..#endif /* _TL
0ce0: 53 49 4e 54 5f 48 20 2a 2f 0a                    SINT_H */.