Hex Artifact Content

Artifact 21496095773daf7b1bcd100cc2fcace845f7a0f8:


0000: 3c 21 64 6f 63 74 79 70 65 20 68 74 6d 6c 20 70  <!doctype html p
0010: 75 62 6c 69 63 20 22 2d 2f 2f 57 33 43 2f 2f 44  ublic "-//W3C//D
0020: 54 44 20 48 54 4d 4c 20 34 2e 30 20 54 72 61 6e  TD HTML 4.0 Tran
0030: 73 69 74 69 6f 6e 61 6c 2f 2f 45 4e 22 3e 20 0a  sitional//EN"> .
0040: 0a 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a  .<html>..<head>.
0050: 3c 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76  <meta http-equiv
0060: 3d 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a  ="Content-Type".
0070: 63 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74  content="text/ht
0080: 6d 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d  ml; charset=iso-
0090: 38 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e  8859-1">.<meta n
00a0: 61 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20  ame="Copyright" 
00b0: 63 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61  content="1999 Ma
00c0: 74 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34  tt Newman / 2004
00d0: 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d   Starfish System
00e0: 73 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28  s">.<title>TLS (
00f0: 53 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64  SSL) Tcl Command
0100: 73 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64  s</title>.</head
0110: 3e 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72  >..<body bgcolor
0120: 3d 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c  ="#FFFFFF">..<dl
0130: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65  >.    <dd><a hre
0140: 66 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f  f="#NAME">NAME</
0150: 61 3e 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20  a> <dl>.        
0160: 20 20 20 20 3c 64 64 3e 3c 73 74 72 6f 6e 67 3e      <dd><strong>
0170: 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62  tls</strong> - b
0180: 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e  inding to <stron
0190: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e  g>OpenSSL</stron
01a0: 67 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  g>.             
01b0: 20 20 20 74 6f 6f 6c 6b 69 74 2e 3c 2f 64 64 3e     toolkit.</dd>
01c0: 0a 20 20 20 20 20 20 20 20 3c 2f 64 6c 3e 0a 20  .        </dl>. 
01d0: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64     </dd>.    <dd
01e0: 3e 3c 61 20 68 72 65 66 3d 22 23 53 59 4e 4f 50  ><a href="#SYNOP
01f0: 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61  SIS">SYNOPSIS</a
0200: 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e  > </dd>.    <dd>
0210: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 20 20 20  <dl>.           
0220: 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20   <dd><b>package 
0230: 72 65 71 75 69 72 65 20 54 63 6c 20 3c 2f 62 3e  require Tcl </b>
0240: 3c 65 6d 3e 3f 38 2e 34 3f 3c 2f 65 6d 3e 3c 2f  <em>?8.4?</em></
0250: 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20  dd>.            
0260: 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72  <dd><b>package r
0270: 65 71 75 69 72 65 20 74 6c 73 20 3c 2f 62 3e 3c  equire tls </b><
0280: 65 6d 3e 3f 31 2e 36 3f 3c 2f 65 6d 3e 3c 2f 64  em>?1.6?</em></d
0290: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c  d>.            <
02a0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20  dt>&nbsp;</dt>. 
02b0: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c             <dd><
02c0: 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e  b>tls::init </b>
02d0: 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e  <i>?options?</i>
02e0: 20 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20   </dd>.         
02f0: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73     <dd><b>tls::s
0300: 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f  ocket </b><em>?o
0310: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72  ptions? host por
0320: 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20  t</em></dd>.    
0330: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74          <dd><b>t
0340: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65  ls::socket</b><e
0350: 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d  m> ?-server comm
0360: 61 6e 64 3f 0a 20 20 20 20 20 20 20 20 20 20 20  and?.           
0370: 20 20 20 20 20 3f 6f 70 74 69 6f 6e 73 3f 20 70       ?options? p
0380: 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20  ort</em></dd>.  
0390: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62            <dd><b
03a0: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c  >tls::handshake<
03b0: 2f 62 3e 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c  /b><em> channel<
03c0: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  /em></dd>.      
03d0: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73        <dd><b>tls
03e0: 3a 3a 73 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d  ::status </b><em
03f0: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65  >?-local? channe
0400: 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20  l</em></dd>.    
0410: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74          <dd><b>t
0420: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 3c 65  ls::import</b><e
0430: 6d 3e 20 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69  m> channel ?opti
0440: 6f 6e 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20  ons?</em></dd>. 
0450: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c             <dd><
0460: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c  b>tls::unimport<
0470: 2f 62 3e 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c  /b><em> channel<
0480: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  /em></dd>.      
0490: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73        <dd><b>tls
04a0: 3a 3a 63 69 70 68 65 72 73 20 3c 2f 62 3e 3c 65  ::ciphers </b><e
04b0: 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62  m>protocol ?verb
04c0: 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20  ose?</em></dd>. 
04d0: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c             <dd><
04e0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f  b>tls::version</
04f0: 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  b></dd>.        
0500: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a  </dl>.    </dd>.
0510: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d      <dd><a href=
0520: 22 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d  "#COMMANDS">COMM
0530: 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20  ANDS</a></dd>.  
0540: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23    <dd><a href="#
0550: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53  CALLBACK OPTIONS
0560: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f  ">CALLBACK OPTIO
0570: 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20  NS</a></dd>.    
0580: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54  <dd><a href="#HT
0590: 54 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54  TPS EXAMPLE">HTT
05a0: 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f  PS EXAMPLE</a></
05b0: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68  dd>.    <dd><a h
05c0: 72 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e  ref="#SEE ALSO">
05d0: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52  SPECIAL CONSIDER
05e0: 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a  ATIONS</a></dd>.
05f0: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d      <dd><a href=
0600: 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20  "#SEE ALSO">SEE 
0610: 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f  ALSO</a></dd>.</
0620: 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c  dl>..<hr>..<h3><
0630: 61 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41  a name="NAME">NA
0640: 4d 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e  ME</a></h3>..<p>
0650: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72  <strong>tls</str
0660: 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74  ong> - binding t
0670: 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53  o <strong>OpenSS
0680: 4c 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b  L</strong>.toolk
0690: 69 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20  it.</p>..<h3><a 
06a0: 6e 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e  name="SYNOPSIS">
06b0: 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33  SYNOPSIS</a></h3
06c0: 3e 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65  >..<p><b>package
06d0: 20 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 34   require Tcl 8.4
06e0: 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b  </b><br>.<b>pack
06f0: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 20  age require tls 
0700: 31 2e 36 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 3e  1.6</b><br>.<br>
0710: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0720: 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e  init"><b>tls::in
0730: 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f  it </b><i>?optio
0740: 6e 73 3f 3c 2f 69 3e 3c 62 72 3e 0a 3c 2f 61 3e  ns?</i><br>.</a>
0750: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73  <a href="#tls::s
0760: 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73  ocket"><b>tls::s
0770: 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f  ocket </b><em>?o
0780: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 0a 70 6f 72  ptions? host.por
0790: 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62 3e 74 6c  t</em><br>.<b>tl
07a0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d  s::socket</b><em
07b0: 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61  > ?-server comma
07c0: 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f  nd? ?options? po
07d0: 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e  rt</em><br>.</a>
07e0: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73  <a href="#tls::s
07f0: 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73  tatus"><b>tls::s
0800: 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d 3e 3f 2d  tatus </b><em>?-
0810: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f  local? channel</
0820: 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c 61 20 68  em><br>.</a><a h
0830: 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64 73  ref="#tls::hands
0840: 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61  hake"><b>tls::ha
0850: 6e 64 73 68 61 6b 65 3c 2f 62 3e 3c 65 6d 3e 20  ndshake</b><em> 
0860: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e  channel</em></a>
0870: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65  <br>.<br>.<a hre
0880: 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22  f="#tls::import"
0890: 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20  ><b>tls::import 
08a0: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f  </b><i>channel ?
08b0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e  options?</i></a>
08c0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
08d0: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62  ls::unimport"><b
08e0: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c  >tls::unimport <
08f0: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69  /b><i>channel</i
0900: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  ></a><br>.<a hre
0910: 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73  f="#tls::ciphers
0920: 20 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f   protocol ?verbo
0930: 73 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  se?"><strong>tls
0940: 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e  ::ciphers</stron
0950: 67 3e 0a 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20  g>.<em>protocol 
0960: 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f  ?verbose?</em></
0970: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
0980: 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c  #tls::version"><
0990: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f  b>tls::version</
09a0: 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33  b></a>.</p>..<h3
09b0: 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49  ><a name="DESCRI
09c0: 50 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49  PTION">DESCRIPTI
09d0: 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e  ON</a></h3>..<p>
09e0: 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70  This extension p
09f0: 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 69  rovides a generi
0a00: 63 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a  c binding to <a.
0a10: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77  href="http://www
0a20: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f  .openssl.org/">O
0a30: 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c  penSSL</a>, util
0a40: 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e  izing the.<stron
0a50: 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e  g>Tcl_StackChann
0a60: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20  el</strong>.API 
0a70: 66 6f 72 20 54 63 6c 20 38 2e 32 20 61 6e 64 20  for Tcl 8.2 and 
0a80: 68 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b  higher. The sock
0a90: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74  ets behave exact
0aa0: 6c 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63  ly the same.as c
0ab0: 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20  hannels created 
0ac0: 75 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c  using Tcl's buil
0ad0: 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63  t-in <strong>soc
0ae0: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d  ket</strong>.com
0af0: 6d 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 69  mand with additi
0b00: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72  onal options for
0b10: 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65   controlling the
0b20: 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 54 6f   SSL session..To
0b30: 20 75 73 65 20 54 4c 53 20 77 69 74 68 20 61 6e   use TLS with an
0b40: 20 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e   earlier version
0b50: 20 6f 66 20 54 63 6c 20 74 68 61 6e 20 38 2e 34   of Tcl than 8.4
0b60: 2c 20 70 6c 65 61 73 65 20 6f 62 74 61 69 6e 0a  , please obtain.
0b70: 54 4c 53 20 31 2e 33 2e 0a 3c 2f 70 3e 0a 0a 3c  TLS 1.3..</p>..<
0b80: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d  h3><a name="COMM
0b90: 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f  ANDS">COMMANDS</
0ba0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69  a></h3>..<p>Typi
0bb0: 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20  cally one would 
0bc0: 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e  use the <strong>
0bd0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74  tls::socket </st
0be0: 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69  rong>command.whi
0bf0: 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70  ch provides comp
0c00: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 74  atibility with t
0c10: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73  he native Tcl <s
0c20: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74  trong>socket</st
0c30: 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49  rong>.command. I
0c40: 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c 73 74  n such cases <st
0c50: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  rong>tls::import
0c60: 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64  </strong> should
0c70: 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72   not be.used dir
0c80: 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e  ectly.</p>..<dl>
0c90: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
0ca0: 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e  ="tls::init"><b>
0cb0: 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69  tls::init </b><i
0cc0: 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f  >?options?</i></
0cd0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
0ce0: 54 68 69 73 20 72 6f 75 74 69 6e 65 20 73 65 74  This routine set
0cf0: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70  s the default op
0d00: 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 73  tions used by <s
0d10: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65  trong>tls::socke
0d20: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20  t</strong>.     
0d30: 20 20 20 61 6e 64 20 69 73 20 3c 65 6d 3e 6f 70     and is <em>op
0d40: 74 69 6f 6e 61 6c 3c 2f 65 6d 3e 2e 20 49 66 20  tional</em>. If 
0d50: 79 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67  you call <strong
0d60: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74  >tls::import</st
0d70: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 64 69  rong>.        di
0d80: 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74  rectly this rout
0d90: 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63  ine has no effec
0da0: 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70  t. Any of the op
0db0: 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 68  tions.        th
0dc0: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  at <strong>tls::
0dd0: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20  socket</strong> 
0de0: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73  accepts can be s
0df0: 65 74 0a 20 20 20 20 20 20 20 20 75 73 69 6e 67  et.        using
0e00: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74   this command, t
0e10: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64  hough you should
0e20: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69   limit your opti
0e30: 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 6f 20 6f  ons.        to o
0e40: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20  nly TLS related 
0e50: 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  ones.</dd>.    <
0e60: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20  dt>&nbsp;</dt>. 
0e70: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
0e80: 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e  tls::socket"><b>
0e90: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e  tls::socket </b>
0ea0: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20  <em>?options?.  
0eb0: 20 20 20 20 20 20 68 6f 73 74 20 70 6f 72 74 3c        host port<
0ec0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
0ed0: 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f    <dt><b>tls::so
0ee0: 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73  cket</b><em> ?-s
0ef0: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f  erver command? ?
0f00: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65  options? port</e
0f10: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  m></dt>.    <dd>
0f20: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72  This is a helper
0f30: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75   function that u
0f40: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65  tilizes the unde
0f50: 72 6c 79 69 6e 67 0a 20 20 20 20 20 20 20 20 63  rlying.        c
0f60: 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67  ommands (<strong
0f70: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74  >tls::import</st
0f80: 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76  rong>). It behav
0f90: 65 73 0a 20 20 20 20 20 20 20 20 65 78 61 63 74  es.        exact
0fa0: 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 74  ly the same as t
0fb0: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73  he native Tcl <s
0fc0: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74  trong>socket</st
0fd0: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 63 6f  rong>.        co
0fe0: 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61  mmand except tha
0ff0: 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61  t the options ca
1000: 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66  n include any of
1010: 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 70 70   the.        app
1020: 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d  licable <a href=
1030: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c  "#tls::import"><
1040: 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72  strong>tls:impor
1050: 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20  t</strong></a>. 
1060: 20 20 20 20 20 20 20 6f 70 74 69 6f 6e 73 2e 3c         options.<
1070: 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62  /dd>.    <dt>&nb
1080: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74  sp;</dt>.    <dt
1090: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68  ><a name="tls::h
10a0: 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e  andshake"><stron
10b0: 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65  g>tls::handshake
10c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
10d0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  annel</em></a></
10e0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63  dt>.    <dd>Forc
10f0: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20  es handshake to 
1100: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20  take place, and 
1110: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 20 20 20  returns 0 if.   
1120: 20 20 20 20 20 68 61 6e 64 73 68 61 6b 65 20 69       handshake i
1130: 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72  s still in progr
1140: 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e  ess (non-blockin
1150: 67 29 2c 20 6f 72 20 31 20 69 66 0a 20 20 20 20  g), or 1 if.    
1160: 20 20 20 20 74 68 65 20 68 61 6e 64 73 68 61 6b      the handshak
1170: 65 20 77 61 73 20 73 75 63 63 65 73 73 66 75 6c  e was successful
1180: 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 61  . If the handsha
1190: 6b 65 20 66 61 69 6c 65 64 0a 20 20 20 20 20 20  ke failed.      
11a0: 20 20 74 68 69 73 20 72 6f 75 74 69 6e 65 20 77    this routine w
11b0: 69 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72 72  ill throw an err
11c0: 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74  or.</dd>.    <dt
11d0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20  >&nbsp;</dt>.   
11e0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c   <dt><a name="tl
11f0: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f  s::status"><stro
1200: 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f  ng>tls::status</
1210: 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e  strong>.    <em>
1220: 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c  ?-local? channel
1230: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20  </em></a></dt>. 
1240: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74     <dd>Returns t
1250: 68 65 20 63 75 72 72 65 6e 74 20 73 65 63 75 72  he current secur
1260: 69 74 79 20 73 74 61 74 75 73 20 6f 66 20 61 6e  ity status of an
1270: 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68   SSL channel. Th
1280: 65 0a 20 20 20 20 20 20 20 20 72 65 73 75 6c 74  e.        result
1290: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65   is a list of ke
12a0: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65  y-value pairs de
12b0: 73 63 72 69 62 69 6e 67 20 74 68 65 0a 20 20 20  scribing the.   
12c0: 20 20 20 20 20 63 6f 6e 6e 65 63 74 65 64 20 70       connected p
12d0: 65 65 72 2e 20 49 66 20 74 68 65 20 72 65 73 75  eer. If the resu
12e0: 6c 74 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c  lt is an empty l
12f0: 69 73 74 20 74 68 65 6e 20 74 68 65 0a 20 20 20  ist then the.   
1300: 20 20 20 20 20 53 53 4c 20 68 61 6e 64 73 68 61       SSL handsha
1310: 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63  ke has not yet c
1320: 6f 6d 70 6c 65 74 65 64 2e 0a 20 20 20 20 20 20  ompleted..      
1330: 20 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c    If <em>-local<
1340: 2f 65 6d 3e 20 69 73 20 67 69 76 65 6e 2c 20 74  /em> is given, t
1350: 68 65 6e 20 74 68 65 20 63 65 72 74 69 66 69 63  hen the certific
1360: 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a  ate information.
1370: 20 20 20 20 20 20 20 20 69 73 20 74 68 65 20 6f          is the o
1380: 6e 65 20 75 73 65 64 20 6c 6f 63 61 6c 6c 79 2e  ne used locally.
1390: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c  </dd>.</dl>..<bl
13a0: 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64  ockquote>.    <d
13b0: 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  l>.        <dt><
13c0: 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73  strong>issuer</s
13d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65  trong> <em>dn</e
13e0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
13f0: 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75  <dd>The distingu
1400: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20  ished name (DN) 
1410: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
1420: 74 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69  te.            i
1430: 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20  ssuer.</dd>.    
1440: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
1450: 73 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 3e  subject</strong>
1460: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74   <em>dn</em></dt
1470: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68  >.        <dd>Th
1480: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20  e distinguished 
1490: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65  name (DN) of the
14a0: 20 63 65 72 74 69 66 69 63 61 74 65 0a 20 20 20   certificate.   
14b0: 20 20 20 20 20 20 20 20 20 73 75 62 6a 65 63 74           subject
14c0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
14d0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65  dt><strong>notBe
14e0: 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  fore</strong> <e
14f0: 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>date</em></dt>
1500: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65  .        <dd>The
1510: 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20   begin date for 
1520: 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20  the validity of 
1530: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e  the certificate.
1540: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
1550: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74  t><strong>notAft
1560: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
1570: 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  date</em></dt>. 
1580: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 65         <dd>The e
1590: 78 70 69 72 79 20 64 61 74 65 20 66 6f 72 20 74  xpiry date for t
15a0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  he certificate.<
15b0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
15c0: 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c 3c  ><strong>serial<
15d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f  /strong> <em>n</
15e0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
15f0: 20 3c 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20   <dd>The serial 
1600: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65  number of the ce
1610: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a  rtificate.</dd>.
1620: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
1630: 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f  ong>cipher</stro
1640: 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f  ng> <em>cipher</
1650: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
1660: 20 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74   <dd>The current
1670: 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62   cipher in use b
1680: 65 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e  etween the clien
1690: 74 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 20  t and.          
16a0: 20 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c    server channel
16b0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  s.</dd>.        
16c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 62 69 74  <dt><strong>sbit
16d0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  s</strong> <em>n
16e0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
16f0: 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65     <dd>The numbe
1700: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66  r of bits used f
1710: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b  or the session k
1720: 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  ey.</dd>.    </d
1730: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
1740: 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c  ..<dl>.    <dt><
1750: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70  a name="tls::imp
1760: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70  ort"><b>tls::imp
1770: 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e  ort </b><i>chann
1780: 65 6c 0a 20 20 20 20 20 20 20 20 3f 6f 70 74 69  el.        ?opti
1790: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  ons?</i></a></dt
17a0: 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e  >.    <dd>SSL-en
17b0: 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 54  able a regular T
17c0: 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20  cl channel - it 
17d0: 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 20 20  need not be a.  
17e0: 20 20 20 20 20 20 73 6f 63 6b 65 74 2c 20 62 75        socket, bu
17f0: 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62  t must provide b
1800: 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c  i-directional fl
1810: 6f 77 2e 20 41 6c 73 6f 0a 20 20 20 20 20 20 20  ow. Also.       
1820: 20 73 65 74 74 69 6e 67 20 73 65 73 73 69 6f 6e   setting session
1830: 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20   parameters for 
1840: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f  SSL handshake.</
1850: 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c 6f 63  dd>.</dl>..<bloc
1860: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e  kquote>.    <dl>
1870: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
1880: 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72  rong>-cadir</str
1890: 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d  ong> <em>dir</em
18a0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
18b0: 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 64  dd>Provide the d
18c0: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e  irectory contain
18d0: 69 6e 67 20 74 68 65 20 43 41 20 63 65 72 74 69  ing the CA certi
18e0: 66 69 63 61 74 65 73 2e 3c 2f 64 64 3e 0a 20 20  ficates.</dd>.  
18f0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
1900: 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f  g>-cafile </stro
1910: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c  ng><em>filename<
1920: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
1930: 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68    <dd>Provide th
1940: 65 20 43 41 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a  e CA file.</dd>.
1950: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
1960: 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73  ong>-certfile</s
1970: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e  trong> <em>filen
1980: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ame</em></dt>.  
1990: 20 20 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64        <dd>Provid
19a0: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  e the certificat
19b0: 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 20  e to use.</dd>. 
19c0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
19d0: 6e 67 3e 2d 63 69 70 68 65 72 20 3c 2f 73 74 72  ng>-cipher </str
19e0: 6f 6e 67 3e 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ong><em>string</
19f0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
1a00: 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65   <dd>Provide the
1a10: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74   cipher suites t
1a20: 6f 20 75 73 65 2e 20 53 79 6e 74 61 78 20 69 73  o use. Syntax is
1a30: 20 61 73 20 70 65 72 0a 20 20 20 20 20 20 20 20   as per.        
1a40: 20 20 20 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64 64      OpenSSL.</dd
1a50: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
1a60: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  trong>-command</
1a70: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c  strong> <em>call
1a80: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  back</em></dt>. 
1a90: 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 73 70         <dd>If sp
1aa0: 65 63 69 66 69 65 64 2c 20 74 68 69 73 20 63 61  ecified, this ca
1ab0: 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69  llback will be i
1ac0: 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61  nvoked at severa
1ad0: 6c 20 70 6f 69 6e 74 73 0a 20 20 20 20 20 20 20  l points.       
1ae0: 20 20 20 20 20 64 75 72 69 6e 67 20 74 68 65 20       during the 
1af0: 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b  OpenSSL handshak
1b00: 65 2e 20 20 49 74 20 63 61 6e 20 70 61 73 73 20  e.  It can pass 
1b10: 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69  errors and traci
1b20: 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 69  ng.            i
1b30: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20  nformation, and 
1b40: 69 74 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c  it can allow Tcl
1b50: 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 66   scripts to perf
1b60: 6f 72 6d 0a 20 20 20 20 20 20 20 20 20 20 20 20  orm.            
1b70: 74 68 65 69 72 20 6f 77 6e 20 76 61 6c 69 64 61  their own valida
1b80: 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 65 72 74  tion of the cert
1b90: 69 66 69 63 61 74 65 20 69 6e 20 70 6c 61 63 65  ificate in place
1ba0: 20 6f 66 20 74 68 65 0a 20 20 20 20 20 20 20 20   of the.        
1bb0: 20 20 20 20 64 65 66 61 75 6c 74 20 76 61 6c 69      default vali
1bc0: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20  dation provided 
1bd0: 62 79 20 4f 70 65 6e 53 53 4c 2e 0a 20 20 20 20  by OpenSSL..    
1be0: 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 20 20          <br>.   
1bf0: 20 20 20 20 20 20 20 20 20 53 65 65 20 3c 61 20           See <a 
1c00: 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20  href="#CALLBACK 
1c10: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43  OPTIONS">CALLBAC
1c20: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 6f  K OPTIONS</a> fo
1c30: 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 75  r.            fu
1c40: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e  rther discussion
1c50: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
1c60: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61  dt><strong>-dhpa
1c70: 72 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65  rams </strong><e
1c80: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c  m>filename</em><
1c90: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
1ca0: 3e 50 72 6f 76 69 64 65 20 61 20 44 69 66 66 69  >Provide a Diffi
1cb0: 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d 65  e-Hellman parame
1cc0: 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a  ters file.</dd>.
1cd0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
1ce0: 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 74  ong>-keyfile</st
1cf0: 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61  rong> <em>filena
1d00: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  me</em></dt>.   
1d10: 20 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 65       <dd>Provide
1d20: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
1d30: 20 66 69 6c 65 2e 20 28 3c 73 74 72 6f 6e 67 3e   file. (<strong>
1d40: 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e  default</strong>
1d50: 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61  :.            va
1d60: 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69 6c 65  lue of -certfile
1d70: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  )</dd>.        <
1d80: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65  dt><strong>-mode
1d90: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  l</strong> <em>c
1da0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  hannel</em></dt>
1db0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 69  .        <dd>Thi
1dc0: 73 20 77 69 6c 6c 20 66 6f 72 63 65 20 74 68 69  s will force thi
1dd0: 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61  s channel to sha
1de0: 72 65 20 74 68 65 20 73 61 6d 65 20 3c 65 6d 3e  re the same <em>
1df0: 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c  <strong>SSL_CTX<
1e00: 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a 20 20  /strong></em>.  
1e10: 20 20 20 20 20 20 20 20 20 20 73 74 72 75 63 74            struct
1e20: 75 72 65 20 61 73 20 74 68 65 20 73 70 65 63 69  ure as the speci
1e30: 66 69 65 64 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  fied <em>channel
1e40: 3c 2f 65 6d 3e 2c 20 61 6e 64 0a 20 20 20 20 20  </em>, and.     
1e50: 20 20 20 20 20 20 20 74 68 65 72 65 66 6f 72 65         therefore
1e60: 20 73 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73   share callbacks
1e70: 20 65 74 63 2e 3c 2f 64 64 3e 0a 20 20 20 20 20   etc.</dd>.     
1e80: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d     <dt><strong>-
1e90: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67  password</strong
1ea0: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  > <em>callback</
1eb0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
1ec0: 20 3c 64 64 3e 49 66 20 73 75 70 70 6c 69 65 64   <dd>If supplied
1ed0: 2c 20 74 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  , this callback 
1ee0: 77 69 6c 6c 20 62 65 20 69 6e 76 6f 6b 65 64 20  will be invoked 
1ef0: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65  when OpenSSL nee
1f00: 64 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 74  ds.            t
1f10: 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77  o obtain a passw
1f20: 6f 72 64 2c 20 74 79 70 69 63 61 6c 6c 79 20 74  ord, typically t
1f30: 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69  o unlock the pri
1f40: 76 61 74 65 20 6b 65 79 20 6f 66 0a 09 20 20 20  vate key of..   
1f50: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a   a certificate..
1f60: 20 20 20 20 20 20 20 20 20 20 20 20 54 68 65 20              The 
1f70: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20  callback should 
1f80: 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20  return a string 
1f90: 77 68 69 63 68 20 72 65 70 72 65 73 65 6e 74 73  which represents
1fa0: 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 20   the.           
1fb0: 20 70 61 73 73 77 6f 72 64 20 74 6f 20 62 65 20   password to be 
1fc0: 75 73 65 64 2e 0a 20 20 20 20 20 20 20 20 20 20  used..          
1fd0: 20 20 3c 62 72 3e 0a 20 20 20 20 20 20 20 20 20    <br>.         
1fe0: 20 20 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22     See <a href="
1ff0: 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  #CALLBACK OPTION
2000: 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  S">CALLBACK OPTI
2010: 4f 4e 53 3c 2f 61 3e 20 66 6f 72 0a 20 20 20 20  ONS</a> for.    
2020: 20 20 20 20 20 20 20 20 66 75 72 74 68 65 72 20          further 
2030: 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e  discussion.</dd>
2040: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
2050: 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20 3c 2f  rong>-request </
2060: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c  strong><em>bool<
2070: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
2080: 20 20 3c 64 64 3e 52 65 71 75 65 73 74 20 61 20    <dd>Request a 
2090: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d  certificate from
20a0: 20 70 65 65 72 20 64 75 72 69 6e 67 20 53 53 4c   peer during SSL
20b0: 20 68 61 6e 64 73 68 61 6b 65 2e 0a 20 20 20 20   handshake..    
20c0: 20 20 20 20 20 20 20 20 28 3c 73 74 72 6f 6e 67          (<strong
20d0: 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67  >default</strong
20e0: 3e 3a 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e  >: <em>true</em>
20f0: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  )</dd>.        <
2100: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75  dt><strong>-requ
2110: 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ire</strong> <em
2120: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
2130: 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 71 75          <dd>Requ
2140: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74  ire a valid cert
2150: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65  ificate from pee
2160: 72 20 64 75 72 69 6e 67 20 53 53 4c 0a 20 20 20  r during SSL.   
2170: 20 20 20 20 20 20 20 20 20 68 61 6e 64 73 68 61           handsha
2180: 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73 20 73  ke. If this is s
2190: 65 74 20 74 6f 20 74 72 75 65 20 74 68 65 6e 20  et to true then 
21a0: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74  <strong>-request
21b0: 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20 20  </strong>.      
21c0: 20 20 20 20 20 20 6d 75 73 74 20 61 6c 73 6f 20        must also 
21d0: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20  be set to true. 
21e0: 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74  (<strong>default
21f0: 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 66  </strong>: <em>f
2200: 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  alse</em>)</dd>.
2210: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
2220: 6f 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72  ong>-server</str
2230: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65  ong> <em>bool</e
2240: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
2250: 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61 73  <dd>Handshake as
2260: 20 73 65 72 76 65 72 20 69 66 20 74 72 75 65 2c   server if true,
2270: 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65 20   else handshake 
2280: 61 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 63  as.            c
2290: 6c 69 65 6e 74 2e 28 3c 73 74 72 6f 6e 67 3e 64  lient.(<strong>d
22a0: 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a  efault</strong>:
22b0: 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29   <em>false</em>)
22c0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
22d0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65  t><strong>-serve
22e0: 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rname</strong> <
22f0: 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64 74  em>host</em></dt
2300: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4f 6e  >.        <dd>On
2310: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 66 20  ly available if 
2320: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72  the OpenSSL libr
2330: 61 72 79 20 74 68 65 20 70 61 63 6b 61 67 65 20  ary the package 
2340: 69 73 20 6c 69 6e 6b 65 64 0a 09 20 20 20 20 61  is linked..    a
2350: 67 61 69 6e 73 74 20 73 75 70 70 6f 72 74 73 20  gainst supports 
2360: 74 68 65 20 54 4c 53 20 68 6f 73 74 6e 61 6d 65  the TLS hostname
2370: 20 65 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 27   extension for '
2380: 53 65 72 76 65 72 20 4e 61 6d 65 0a 09 20 20 20  Server Name..   
2390: 20 49 6e 64 69 63 61 74 69 6f 6e 27 20 28 53 4e   Indication' (SN
23a0: 49 29 2e 20 55 73 65 20 74 6f 20 6e 61 6d 65 20  I). Use to name 
23b0: 74 68 65 20 6c 6f 67 69 63 61 6c 20 68 6f 73 74  the logical host
23c0: 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 0a   we are talking.
23d0: 09 20 20 20 20 74 6f 20 61 6e 64 20 65 78 70 65  .    to and expe
23e0: 63 74 69 6e 67 20 61 20 63 65 72 74 69 66 69 63  cting a certific
23f0: 61 74 65 20 66 6f 72 3c 2f 64 64 3e 0a 20 20 20  ate for</dd>.   
2400: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
2410: 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20  >-ssl2</strong> 
2420: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
2430: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45  t>.        <dd>E
2440: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c  nable use of SSL
2450: 20 76 32 2e 20 28 3c 73 74 72 6f 6e 67 3e 64 65   v2. (<strong>de
2460: 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20  fault</strong>: 
2470: 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 0a 20 20  <em>true</em>.  
2480: 20 20 20 20 20 20 20 20 20 20 75 6e 6c 65 73 73            unless
2490: 20 2d 44 4e 4f 5f 50 41 54 45 4e 54 53 20 77 61   -DNO_PATENTS wa
24a0: 73 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 62  s specified in b
24b0: 75 69 6c 64 29 3c 2f 64 64 3e 0a 20 20 20 20 20  uild)</dd>.     
24c0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d     <dt><strong>-
24d0: 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65  ssl3 </strong><e
24e0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
24f0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61  .        <dd>Ena
2500: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
2510: 33 2e 20 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61  3. (<strong>defa
2520: 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65  ult</strong>: <e
2530: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64  m>true</em>)</dd
2540: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 2d 3c  >.        <dt>-<
2550: 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f 73 74 72  strong>tls1</str
2560: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65  ong> <em>bool</e
2570: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
2580: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  <dd>Enable use o
2590: 66 20 54 4c 53 20 76 31 2e 20 28 3c 73 74 72 6f  f TLS v1. (<stro
25a0: 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f  ng>default</stro
25b0: 6e 67 3e 3a 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f  ng>: <em>false</
25c0: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f  em>)</dd>.    </
25d0: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65  dl>.</blockquote
25e0: 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e  >..<dl>.    <dt>
25f0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75 6e  <a name="tls::un
2600: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a  import"><b>tls::
2610: 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e  unimport </b><i>
2620: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
2630: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72 6f  /dt>.    <dd>Pro
2640: 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65 74  vided for symmet
2650: 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74 6c  ry to <strong>tl
2660: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
2670: 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20 75  g>, this.      u
2680: 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c 2d  nstacks the SSL-
2690: 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72 65  enabling of a re
26a0: 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65  gular Tcl channe
26b0: 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20 20  l.  An error.   
26c0: 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20     is thrown if 
26d0: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74  TLS is not the t
26e0: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  op stacked chann
26f0: 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 3c 2f  el type.</dd>.</
2700: 64 6c 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64  dl>..<dl>.    <d
2710: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
2720: 63 69 70 68 65 72 73 20 70 72 6f 74 6f 63 6f 6c  ciphers protocol
2730: 20 3f 76 65 72 62 6f 73 65 3f 22 3e 3c 73 74 72   ?verbose?"><str
2740: 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  ong>tls::ciphers
2750: 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20 20  </strong>.      
2760: 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f    <em>protocol ?
2770: 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 61  verbose?</em></a
2780: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52  ></dt>.    <dd>R
2790: 65 74 75 72 6e 73 20 6c 69 73 74 20 6f 66 20 73  eturns list of s
27a0: 75 70 70 6f 72 74 65 64 20 63 69 70 68 65 72 73  upported ciphers
27b0: 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 3c 65   based on the <e
27c0: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 0a  m>protocol</em>.
27d0: 20 20 20 20 20 20 20 20 79 6f 75 20 73 75 70 70          you supp
27e0: 6c 79 2c 20 77 68 69 63 68 20 6d 75 73 74 20 62  ly, which must b
27f0: 65 20 6f 6e 65 20 6f 66 20 3c 65 6d 3e 73 73 6c  e one of <em>ssl
2800: 32 2c 20 73 73 6c 33 2c 20 6f 72 20 74 6c 73 31  2, ssl3, or tls1
2810: 3c 2f 65 6d 3e 2e 0a 20 20 20 20 20 20 20 20 49  </em>..        I
2820: 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65  f <em>verbose</e
2830: 6d 3e 20 69 73 20 73 70 65 63 69 66 69 65 64 20  m> is specified 
2840: 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 20 76  as true then a v
2850: 65 72 62 6f 73 65 2c 0a 20 20 20 20 20 20 20 20  erbose,.        
2860: 73 65 6d 69 2d 68 75 6d 61 6e 20 72 65 61 64 61  semi-human reada
2870: 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74 75  ble list is retu
2880: 72 6e 65 64 20 70 72 6f 76 69 64 69 6e 67 20 61  rned providing a
2890: 64 64 69 74 69 6f 6e 61 6c 0a 20 20 20 20 20 20  dditional.      
28a0: 20 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e    information on
28b0: 20 74 68 65 20 6e 61 74 75 72 65 20 6f 66 20 74   the nature of t
28c0: 68 65 20 63 69 70 68 65 72 20 73 75 70 70 6f 72  he cipher suppor
28d0: 74 2e 20 49 6e 20 65 61 63 68 0a 20 20 20 20 20  t. In each.     
28e0: 20 20 20 63 61 73 65 20 74 68 65 20 72 65 73 75     case the resu
28f0: 6c 74 20 69 73 20 61 20 54 63 6c 20 6c 69 73 74  lt is a Tcl list
2900: 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64  .</dd>.</dl>..<d
2910: 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  l>.    <dt><a na
2920: 6d 65 3d 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e  me="tls::version
2930: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76  "><strong>tls::v
2940: 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c  ersion</strong><
2950: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  /a></dt>.    <dd
2960: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 76 65 72  >Returns the ver
2970: 73 69 6f 6e 20 73 74 72 69 6e 67 20 64 65 66 69  sion string defi
2980: 6e 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e 3c  ned by OpenSSL.<
2990: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e  /dd>.</dl>..<h3>
29a0: 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43  <a name="CALLBAC
29b0: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42  K OPTIONS">CALLB
29c0: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c  ACK OPTIONS</a><
29d0: 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64  /h3>..<p>.As ind
29e0: 69 63 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e  icated above, in
29f0: 64 69 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c  dividual channel
2a00: 73 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74  s can be given t
2a10: 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63  heir own callbac
2a20: 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74  ks.to handle int
2a30: 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73  ermediate proces
2a40: 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e  sing by the Open
2a50: 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69  SSL library, usi
2a60: 6e 67 20 74 68 65 0a 3c 65 6d 3e 2d 63 6f 6d 6d  ng the.<em>-comm
2a70: 61 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d  and</em> and <em
2a80: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20  >-password</em> 
2a90: 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74  options passed t
2aa0: 6f 20 65 69 74 68 65 72 20 6f 66 0a 3c 73 74 72  o either of.<str
2ab0: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  ong>tls::socket<
2ac0: 2f 73 74 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72  /strong> or <str
2ad0: 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c  ong>tls::import<
2ae0: 2f 73 74 72 6f 6e 67 3e 2e 0a 3c 2f 70 3e 0a 0a  /strong>..</p>..
2af0: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 64 6c  <blockquote>.<dl
2b00: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f  >..    <dt><stro
2b10: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72  ng>-command</str
2b20: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63  ong> <em>callbac
2b30: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  k</em></dt>.    
2b40: 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68  <dd>..Invokes th
2b50: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e  e specified <em>
2b60: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63  callback</em> sc
2b70: 72 69 70 74 20 61 74 0a 09 73 65 76 65 72 61 6c  ript at..several
2b80: 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74   points during t
2b90: 68 65 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73  he OpenSSL hands
2ba0: 68 61 6b 65 2e 0a 09 45 78 63 65 70 74 20 61 73  hake...Except as
2bb0: 20 69 6e 64 69 63 61 74 65 64 20 62 65 6c 6f 77   indicated below
2bc0: 2c 20 76 61 6c 75 65 73 20 72 65 74 75 72 6e 65  , values returne
2bd0: 64 20 66 72 6f 6d 20 74 68 65 0a 09 63 61 6c 6c  d from the..call
2be0: 62 61 63 6b 20 61 72 65 20 69 67 6e 6f 72 65 64  back are ignored
2bf0: 2e 0a 09 41 72 67 75 6d 65 6e 74 73 20 61 70 70  ...Arguments app
2c00: 65 6e 64 65 64 20 74 6f 20 74 68 65 20 73 63 72  ended to the scr
2c10: 69 70 74 20 75 70 6f 6e 20 63 61 6c 6c 62 61 63  ipt upon callbac
2c20: 6b 20 74 61 6b 65 20 6f 6e 65 20 6f 66 20 74 68  k take one of th
2c30: 65 0a 09 66 6f 6c 6c 6f 77 69 6e 67 20 66 6f 72  e..following for
2c40: 6d 73 3a 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e  ms:...<br>..<br>
2c50: 0a 0a 09 3c 64 6c 3e 0a 0a 3c 21 2d 2d 09 54 68  ...<dl>..<!--.Th
2c60: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
2c70: 61 63 6b 20 69 73 20 64 69 73 61 62 6c 65 64 2e  ack is disabled.
2c80: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
2c90: 6e 67 3e 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67  ng>error</strong
2ca0: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65  > <em>channel me
2cb0: 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74  ssage</em>..</dt
2cc0: 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c  >..<dd>..  The <
2cd0: 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20  em>message</em> 
2ce0: 61 72 67 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e  argument contain
2cf0: 73 20 61 6e 20 65 72 72 6f 72 20 6d 65 73 73 61  s an error messa
2d00: 67 65 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20  ge generated..  
2d10: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66  by the OpenSSL f
2d20: 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65  unction..  <code
2d30: 3e 45 52 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f  >ERR_reason_erro
2d40: 72 5f 73 74 72 69 6e 67 28 29 3c 2f 63 6f 64 65  r_string()</code
2d50: 3e 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e  >...</dd>...<br>
2d60: 0a 2d 2d 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  .-->...<dt>..  <
2d70: 73 74 72 6f 6e 67 3e 69 6e 66 6f 3c 2f 73 74 72  strong>info</str
2d80: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  ong> <em>channel
2d90: 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73   major minor mes
2da0: 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e  sage</em>..</dt>
2db0: 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66  ..<dd>..  This f
2dc0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
2dd0: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
2de0: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
2df0: 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f  on..  <code>SSL_
2e00: 43 54 58 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c  CTX_set_info_cal
2e10: 6c 62 61 63 6b 28 29 3c 2f 63 6f 64 65 3e 2e 0a  lback()</code>..
2e20: 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c  .  <br>..  The <
2e30: 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 6e  em>major</em> an
2e40: 64 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e  d <em>minor</em>
2e50: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 20 75   arguments are u
2e60: 73 65 64 20 74 6f 0a 09 20 20 72 65 70 72 65 73  sed to..  repres
2e70: 65 6e 74 20 74 68 65 20 73 74 61 74 65 20 69 6e  ent the state in
2e80: 66 6f 72 6d 61 74 69 6f 6e 20 62 69 74 6d 61 73  formation bitmas
2e90: 6b 2e 0a 09 20 20 3c 64 6c 3e 0a 09 20 20 3c 64  k...  <dl>..  <d
2ea0: 74 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65  t>Possible value
2eb0: 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72 3c  s for <em>major<
2ec0: 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64 74 3e 0a 09  /em> are:</dt>..
2ed0: 20 20 3c 64 64 3e 3c 63 6f 64 65 3e 68 61 6e 64    <dd><code>hand
2ee0: 73 68 61 6b 65 2c 20 61 6c 65 72 74 2c 20 63 6f  shake, alert, co
2ef0: 6e 6e 65 63 74 2c 20 61 63 63 65 70 74 3c 2f 63  nnect, accept</c
2f00: 6f 64 65 3e 2e 3c 2f 64 64 3e 0a 09 20 20 3c 64  ode>.</dd>..  <d
2f10: 74 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65  t>Possible value
2f20: 73 20 66 6f 72 20 3c 65 6d 3e 6d 69 6e 6f 72 3c  s for <em>minor<
2f30: 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64 74 3e 0a 09  /em> are:</dt>..
2f40: 20 20 3c 64 64 3e 3c 63 6f 64 65 3e 73 74 61 72    <dd><code>star
2f50: 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77  t, done, read, w
2f60: 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74  rite, loop, exit
2f70: 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 3e 0a 09 20  </code>.</dd>.. 
2f80: 20 3c 2f 64 6c 3e 0a 09 20 20 54 68 65 20 3c 65   </dl>..  The <e
2f90: 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61  m>message</em> a
2fa0: 72 67 75 6d 65 6e 74 20 69 73 20 61 20 64 65 73  rgument is a des
2fb0: 63 72 69 70 74 69 76 65 20 73 74 72 69 6e 67 20  criptive string 
2fc0: 77 68 69 63 68 20 6d 61 79 0a 09 20 20 62 65 20  which may..  be 
2fd0: 67 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72  generated either
2fe0: 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c   by..  <code>SSL
2ff0: 5f 73 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f  _state_string_lo
3000: 6e 67 28 29 3c 2f 63 6f 64 65 3e 20 6f 72 20 62  ng()</code> or b
3010: 79 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 61  y..  <code>SSL_a
3020: 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67  lert_desc_string
3030: 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 2c 0a  _long()</code>,.
3040: 09 20 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20  .  depending on 
3050: 63 6f 6e 74 65 78 74 2e 0a 09 3c 2f 64 64 3e 0a  context...</dd>.
3060: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20  ..<br>...<dt>.. 
3070: 20 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 3c   <strong>verify<
3080: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61  /strong> <em>cha
3090: 6e 6e 65 6c 20 64 65 70 74 68 20 63 65 72 74 20  nnel depth cert 
30a0: 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 65 6d  status error</em
30b0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09  >..</dt>..<dd>..
30c0: 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63    This form of c
30d0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
30e0: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ed by the OpenSS
30f0: 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63  L function..  <c
3100: 6f 64 65 3e 53 53 4c 5f 73 65 74 5f 76 65 72 69  ode>SSL_set_veri
3110: 66 79 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20  fy()</code>...  
3120: 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e  <br>..  The <em>
3130: 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d  depth</em> argum
3140: 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65  ent is an intege
3150: 72 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74  r representing t
3160: 68 65 0a 09 20 20 63 75 72 72 65 6e 74 20 64 65  he..  current de
3170: 70 74 68 20 6f 6e 20 74 68 65 20 63 65 72 74 69  pth on the certi
3180: 66 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 69  ficate chain, wi
3190: 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63  th..  <code>0</c
31a0: 6f 64 65 3e 20 61 73 20 74 68 65 20 73 75 62 6a  ode> as the subj
31b0: 65 63 74 20 63 65 72 74 69 66 69 63 61 74 65 20  ect certificate 
31c0: 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65  and higher value
31d0: 73 0a 09 20 20 64 65 6e 6f 74 69 6e 67 20 70 72  s..  denoting pr
31e0: 6f 67 72 65 73 73 69 76 65 6c 79 20 6d 6f 72 65  ogressively more
31f0: 20 69 6e 64 69 72 65 63 74 20 69 73 73 75 65 72   indirect issuer
3200: 20 63 65 72 74 69 66 69 63 61 74 65 73 2e 0a 09   certificates...
3210: 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65    <br>..  The <e
3220: 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75  m>cert</em> argu
3230: 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f  ment is a list o
3240: 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72  f key-value pair
3250: 73 20 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20  s similar..  to 
3260: 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62  those returned b
3270: 79 0a 09 20 20 3c 61 20 68 72 65 66 3d 22 23 74  y..  <a href="#t
3280: 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72  ls::status"><str
3290: 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c  ong>tls::status<
32a0: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 0a 09 20  /strong></a>... 
32b0: 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d   <br>..  The <em
32c0: 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67  >status</em> arg
32d0: 75 6d 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 65  ument is an inte
32e0: 67 65 72 20 72 65 70 72 65 73 65 6e 74 69 6e 67  ger representing
32f0: 20 74 68 65 0a 09 20 20 63 75 72 72 65 6e 74 20   the..  current 
3300: 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20  validity of the 
3310: 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09 20 20  certificate...  
3320: 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65  A value of <code
3330: 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20  >0</code> means 
3340: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
3350: 69 73 20 64 65 65 6d 65 64 20 69 6e 76 61 6c 69  is deemed invali
3360: 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66  d...  A value of
3370: 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20   <code>1</code> 
3380: 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 66  means the certif
3390: 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 20  icate is deemed 
33a0: 76 61 6c 69 64 2e 0a 09 20 20 3c 62 72 3e 0a 09  valid...  <br>..
33b0: 20 20 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72 3c    The <em>error<
33c0: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 73 75  /em> argument su
33d0: 70 70 6c 69 65 73 20 74 68 65 20 6d 65 73 73 61  pplies the messa
33e0: 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65  ge, if any, gene
33f0: 72 61 74 65 64 0a 09 20 20 62 79 0a 09 20 20 3c  rated..  by..  <
3400: 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f  code>X509_STORE_
3410: 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c  CTX_get_error()<
3420: 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a  /code>...  <br>.
3430: 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 63  .  <br>..  The c
3440: 61 6c 6c 62 61 63 6b 20 6d 61 79 20 6f 76 65 72  allback may over
3450: 72 69 64 65 20 6e 6f 72 6d 61 6c 20 76 61 6c 69  ride normal vali
3460: 64 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 69 6e  dation processin
3470: 67 20 62 79 20 65 78 70 6c 69 63 69 74 6c 79 0a  g by explicitly.
3480: 09 20 20 72 65 74 75 72 6e 69 6e 67 20 6f 6e 65  .  returning one
3490: 20 6f 66 20 74 68 65 20 61 62 6f 76 65 20 3c 65   of the above <e
34a0: 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 76 61  m>status</em> va
34b0: 6c 75 65 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c  lues...</dd>...<
34c0: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 0a  /dl>.    </dd>..
34d0: 20 20 20 20 3c 62 72 3e 0a 0a 20 20 20 20 3c 64      <br>..    <d
34e0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77  t><strong>-passw
34f0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ord</strong> <em
3500: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f  >callback</em></
3510: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e  dt>.    <dd>..In
3520: 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66  vokes the specif
3530: 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b  ied <em>callback
3540: 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 77 68 65  </em> script whe
3550: 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20  n OpenSSL needs 
3560: 74 6f 0a 09 6f 62 74 61 69 6e 20 61 20 70 61 73  to..obtain a pas
3570: 73 77 6f 72 64 2e 20 20 54 68 65 20 63 61 6c 6c  sword.  The call
3580: 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75  back should retu
3590: 72 6e 20 61 20 73 74 72 69 6e 67 20 77 68 69 63  rn a string whic
35a0: 68 0a 09 72 65 70 72 65 73 65 6e 74 73 20 74 68  h..represents th
35b0: 65 20 70 61 73 73 77 6f 72 64 20 74 6f 20 62 65  e password to be
35c0: 20 75 73 65 64 2e 0a 09 4e 6f 20 61 72 67 75 6d   used...No argum
35d0: 65 6e 74 73 20 61 72 65 20 61 70 70 65 6e 64 65  ents are appende
35e0: 64 20 74 6f 20 74 68 65 20 73 63 72 69 70 74 20  d to the script 
35f0: 75 70 6f 6e 20 63 61 6c 6c 62 61 63 6b 2e 0a 20  upon callback.. 
3600: 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c     </dd>.</dl>.<
3610: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 70  /blockquote>..<p
3620: 3e 0a 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c  >.Reference impl
3630: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74  ementations of t
3640: 68 65 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61  hese callbacks a
3650: 72 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 74  re provided in t
3660: 68 65 0a 64 69 73 74 72 69 62 75 74 69 6f 6e 20  he.distribution 
3670: 61 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  as <strong>tls::
3680: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67  callback</strong
3690: 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c  > and.<strong>tl
36a0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72  s::password</str
36b0: 6f 6e 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c  ong> respectivel
36c0: 79 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68  y.  Note that th
36d0: 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70  ese are.<em>samp
36e0: 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e  le</em> implemen
36f0: 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20 20 49  tations only.  I
3700: 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c 69 73 74  n a more realist
3710: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f  ic deployment.yo
3720: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20  u would specify 
3730: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63  your own callbac
3740: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63  k scripts on eac
3750: 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c 0a 75 73  h TLS channel.us
3760: 69 6e 67 20 74 68 65 20 3c 65 6d 3e 2d 63 6f 6d  ing the <em>-com
3770: 6d 61 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65  mand</em> and <e
3780: 6d 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e  m>-password</em>
3790: 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a   options..</p>..
37a0: 3c 70 3e 0a 54 68 65 20 64 65 66 61 75 6c 74 20  <p>.The default 
37b0: 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68  behavior when th
37c0: 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  e <em>-command</
37d0: 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f  em> option is no
37e0: 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66  t specified is f
37f0: 6f 72 0a 54 4c 53 20 74 6f 20 70 72 6f 63 65 73  or.TLS to proces
3800: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64  s the associated
3810: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63   library callbac
3820: 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 0a 54  ks internally..T
3830: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76  he default behav
3840: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d  ior when the <em
3850: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20  >-password</em> 
3860: 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70  option is not sp
3870: 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54  ecified is for.T
3880: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
3890: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
38a0: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62  rary callbacks b
38b0: 79 20 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20  y attempting to 
38c0: 63 61 6c 6c 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73  call.<strong>tls
38d0: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f  ::password</stro
38e0: 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 65  ng>..The differe
38f0: 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 73  nce between thes
3900: 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 73 20  e two behaviors 
3910: 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65  is a consequence
3920: 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a   of maintaining.
3930: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69  compatibility wi
3940: 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 6c 65  th earlier imple
3950: 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e  mentations..</p>
3960: 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e  ..<p>.The <stron
3970: 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74  g>tls::debug</st
3980: 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 70  rong> variable p
3990: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64  rovides some add
39a0: 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20  itional.control 
39b0: 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65 72  over these refer
39c0: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20  ence callbacks. 
39d0: 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a 65   Its value is ze
39e0: 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a 48  ro by default..H
39f0: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f  igher values pro
3a00: 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f  duce more diagno
3a10: 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e 64  stic output, and
3a20: 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65   will also force
3a30: 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74 68   the.verify meth
3a40: 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c  od in <strong>tl
3a50: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72  s::callback</str
3a60: 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20 74  ong> to accept t
3a70: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20  he.certificate, 
3a80: 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73 20  even when it is 
3a90: 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c  invalid..</p>..<
3aa0: 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20  p>.<em>.The use 
3ab0: 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 65  of the reference
3ac0: 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f   callbacks <stro
3ad0: 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b  ng>tls::callback
3ae0: 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73  </strong> and.<s
3af0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77  trong>tls::passw
3b00: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20  ord</strong> is 
3b10: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e  not recommended.
3b20: 20 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65    They may be re
3b30: 6d 6f 76 65 64 0a 66 72 6f 6d 20 66 75 74 75 72  moved.from futur
3b40: 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d  e releases..</em
3b50: 3e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e  >.</p>..<p>.<em>
3b60: 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20  .The use of the 
3b70: 76 61 72 69 61 62 6c 65 20 3c 73 74 72 6f 6e 67  variable <strong
3b80: 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72  >tls::debug</str
3b90: 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f  ong> is not reco
3ba0: 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20  mmended..It may 
3bb0: 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20  be removed from 
3bc0: 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e  future releases.
3bd0: 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33  .</em>.</p>..<h3
3be0: 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 20  ><a name="HTTPS 
3bf0: 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45  EXAMPLE">HTTPS E
3c00: 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a  XAMPLE</a></h3>.
3c10: 0a 3c 70 3e 54 68 69 73 20 65 78 61 6d 70 6c 65  .<p>This example
3c20: 20 75 73 65 73 20 61 20 73 61 6d 70 6c 65 20 73   uses a sample s
3c30: 65 72 76 65 72 2e 70 65 6d 20 70 72 6f 76 69 64  erver.pem provid
3c40: 65 64 20 77 69 74 68 20 74 68 65 20 54 4c 53 20  ed with the TLS 
3c50: 72 65 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65 73  release,.courtes
3c60: 79 20 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e 67  y of the <strong
3c70: 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67  >OpenSSL</strong
3c80: 3e 20 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a 0a  > project.</p>..
3c90: 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b  <pre><code>.pack
3ca0: 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74 70  age require http
3cb0: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  .package require
3cc0: 20 74 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67 69   tls..http::regi
3cd0: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b  ster https 443 [
3ce0: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b  list ::tls::sock
3cf0: 65 74 20 2d 72 65 71 75 69 72 65 20 31 20 2d 63  et -require 1 -c
3d00: 61 66 69 6c 65 20 2e 2f 73 65 72 76 65 72 2e 70  afile ./server.p
3d10: 65 6d 5d 0a 0a 73 65 74 20 74 6f 6b 20 5b 68 74  em]..set tok [ht
3d20: 74 70 3a 3a 67 65 74 75 72 6c 20 68 74 74 70 73  tp::geturl https
3d30: 3a 2f 2f 64 65 76 65 6c 6f 70 65 72 2e 6e 65 74  ://developer.net
3d40: 73 63 61 70 65 2e 63 6f 6d 2f 5d 0a 3c 2f 63 6f  scape.com/].</co
3d50: 64 65 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c  de></pre>..<h3><
3d60: 61 20 6e 61 6d 65 3d 22 53 50 45 43 49 41 4c 20  a name="SPECIAL 
3d70: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 3e  CONSIDERATIONS">
3d80: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52  SPECIAL CONSIDER
3d90: 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a  ATIONS</a></h3>.
3da0: 0a 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69  .<p>The capabili
3db0: 74 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63  ties of this pac
3dc0: 6b 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e  kage can vary en
3dd0: 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 0a 75  ormously based.u
3de0: 70 6f 6e 20 68 6f 77 20 79 6f 75 72 20 4f 70 65  pon how your Ope
3df0: 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73  nSSL library was
3e00: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20   configured and 
3e10: 62 75 69 6c 74 2e 20 41 74 20 74 68 65 0a 6d 6f  built. At the.mo
3e20: 73 74 20 6d 61 63 72 6f 2d 6c 65 76 65 6c 20 4f  st macro-level O
3e30: 70 65 6e 53 53 4c 20 73 75 70 70 6f 72 74 73 20  penSSL supports 
3e40: 61 20 26 71 75 6f 74 3b 6e 6f 20 70 61 74 65 6e  a &quot;no paten
3e50: 74 73 26 71 75 6f 74 3b 20 62 75 69 6c 64 2c 0a  ts&quot; build,.
3e60: 77 68 69 63 68 20 64 69 73 61 62 6c 65 73 20 52  which disables R
3e70: 53 41 2c 20 49 44 45 41 2c 20 52 43 28 32 2c 34  SA, IDEA, RC(2,4
3e80: 2c 35 29 20 61 6e 64 20 53 53 4c 32 20 2d 20 69  ,5) and SSL2 - i
3e90: 66 20 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 69  f your OpenSSL i
3ea0: 73 0a 63 6f 6e 66 69 67 75 72 65 64 20 74 68 69  s.configured thi
3eb0: 73 20 77 61 79 20 74 68 65 6e 20 79 6f 75 20 77  s way then you w
3ec0: 69 6c 6c 20 6e 65 65 64 20 74 6f 20 62 75 69 6c  ill need to buil
3ed0: 64 20 54 4c 53 20 77 69 74 68 20 74 68 65 0a 2d  d TLS with the.-
3ee0: 44 4e 4f 5f 50 41 54 45 4e 54 53 20 6f 70 74 69  DNO_PATENTS opti
3ef0: 6f 6e 20 2d 20 61 6e 64 20 74 68 65 20 72 65 73  on - and the res
3f00: 75 6c 74 61 6e 74 20 6d 6f 64 75 6c 65 20 77 69  ultant module wi
3f10: 6c 6c 20 66 75 6e 63 74 69 6f 6e 0a 63 6f 72 72  ll function.corr
3f20: 65 63 74 6c 79 20 61 6e 64 20 61 6c 73 6f 20 73  ectly and also s
3f30: 75 70 70 6f 72 74 20 41 44 48 20 63 65 72 74 69  upport ADH certi
3f40: 66 69 63 61 74 65 2d 6c 65 73 73 20 65 6e 63 72  ficate-less encr
3f50: 79 70 74 69 6f 6e 2c 0a 68 6f 77 65 76 65 72 20  yption,.however 
3f60: 79 6f 75 20 77 69 6c 6c 20 62 65 20 75 6e 61 62  you will be unab
3f70: 6c 65 20 74 6f 20 75 74 69 6c 69 7a 65 20 74 68  le to utilize th
3f80: 69 73 20 74 6f 20 73 70 65 61 6b 20 74 6f 20 6e  is to speak to n
3f90: 6f 72 6d 61 6c 20 57 65 62 0a 53 65 72 76 65 72  ormal Web.Server
3fa0: 73 2c 20 77 68 69 63 68 20 74 79 70 69 63 61 6c  s, which typical
3fb0: 6c 79 20 72 65 71 75 69 72 65 20 52 53 41 20 73  ly require RSA s
3fc0: 75 70 70 6f 72 74 2e 20 50 6c 65 61 73 65 20 73  upport. Please s
3fd0: 65 65 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70  ee <a.href="http
3fe0: 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f  ://www.openssl.o
3ff0: 72 67 2f 22 3e 68 74 74 70 3a 2f 2f 77 77 77 2e  rg/">http://www.
4000: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 3c 2f 61 3e  openssl.org/</a>
4010: 20 66 6f 72 0a 6d 6f 72 65 20 69 6e 66 6f 72 6d   for.more inform
4020: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 77 68 6f  ation on the who
4030: 6c 65 20 69 73 73 75 65 20 6f 66 20 70 61 74 65  le issue of pate
4040: 6e 74 73 20 61 6e 64 20 55 53 20 65 78 70 6f 72  nts and US expor
4050: 74 0a 72 65 73 74 72 69 63 74 69 6f 6e 73 2e 20  t.restrictions. 
4060: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  </p>..<h3><a nam
4070: 65 3d 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45  e="SEE ALSO">SEE
4080: 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a   ALSO</a></h3>..
4090: 3c 70 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65  <p><strong>socke
40a0: 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72  t</strong>, <str
40b0: 6f 6e 67 3e 66 69 6c 65 65 76 65 6e 74 2c 20 3c  ong>fileevent, <
40c0: 2f 73 74 72 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d  /strong><a.href=
40d0: 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e  "http://www.open
40e0: 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e  ssl.org/"><stron
40f0: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e  g>OpenSSL</stron
4100: 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e  g></a></p>..<hr>
4110: 0a 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68  ..<pre>.Copyrigh
4120: 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61  t &copy; 1999 Ma
4130: 74 74 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72  tt Newman..Copyr
4140: 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34  ight &copy; 2004
4150: 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d   Starfish System
4160: 73 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79  s..</pre>.</body
4170: 3e 0a 3c 2f 68 74 6d 6c 3e 0a                    >.</html>.