Hex Artifact Content

Artifact 98ee02664f17f321c590ac2ccedf20742c18b748:


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 41 75 74 68 6f 72 22 0a 63 6f 6e  ame="Author".con
00b0: 74 65 6e 74 3d 22 4d 61 74 74 20 4e 65 77 6d 61  tent="Matt Newma
00c0: 6e 20 26 6c 74 3b 6d 61 74 74 40 6e 6f 76 61 64  n &lt;matt@novad
00d0: 69 67 6d 2e 63 6f 6d 26 67 74 3b 22 3e 0a 3c 6d  igm.com&gt;">.<m
00e0: 65 74 61 20 6e 61 6d 65 3d 22 43 6f 70 79 72 69  eta name="Copyri
00f0: 67 68 74 22 20 63 6f 6e 74 65 6e 74 3d 22 31 39  ght" content="19
0100: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 22  99 Matt Newman."
0110: 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 53 53  >.<title>TLS (SS
0120: 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 73 3c  L) Tcl Commands<
0130: 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e 0a  /title>.</head>.
0140: 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 3d 22  .<body bgcolor="
0150: 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c 3e 0a  #FFFFFF">..<dl>.
0160: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d      <dd><a href=
0170: 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e  "#NAME">NAME</a>
0180: 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 20 20   <dl>.          
0190: 20 20 3c 64 64 3e 3c 73 74 72 6f 6e 67 3e 74 6c    <dd><strong>tl
01a0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62 69 6e  s</strong> - bin
01b0: 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e 67 3e  ding to <strong>
01c0: 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e  OpenSSL</strong>
01d0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
01e0: 20 74 6f 6f 6c 6b 69 74 2e 3c 2f 64 64 3e 0a 20   toolkit.</dd>. 
01f0: 20 20 20 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20         </dl>.   
0200: 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c   </dd>.    <dd><
0210: 61 20 68 72 65 66 3d 22 23 53 59 4e 4f 50 53 49  a href="#SYNOPSI
0220: 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 20  S">SYNOPSIS</a> 
0230: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 64  </dd>.    <dd><d
0240: 6c 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c  l>.            <
0250: 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65  dd><b>package re
0260: 71 75 69 72 65 20 54 63 6c 20 3c 2f 62 3e 3c 65  quire Tcl </b><e
0270: 6d 3e 3f 38 2e 32 3f 3c 2f 65 6d 3e 3c 2f 64 64  m>?8.2?</em></dd
0280: 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64  >.            <d
0290: 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71  d><b>package req
02a0: 75 69 72 65 20 74 6c 73 20 3c 2f 62 3e 3c 65 6d  uire tls </b><em
02b0: 3e 3f 31 2e 34 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e  >?1.4?</em></dd>
02c0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 74  .            <dt
02d0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20  >&nbsp;</dt>.   
02e0: 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e           <dd><b>
02f0: 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69  tls::init </b><i
0300: 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 20 3c  >?options?</i> <
0310: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20  /dd>.           
0320: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63   <dd><b>tls::soc
0330: 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f 70 74  ket </b><em>?opt
0340: 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 74 3c  ions? host port<
0350: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  /em></dd>.      
0360: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73        <dd><b>tls
0370: 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e  ::socket</b><em>
0380: 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e   ?-server comman
0390: 64 3f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  d?.             
03a0: 20 20 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72     ?options? por
03b0: 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20  t</em></dd>.    
03c0: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74          <dd><b>t
03d0: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62  ls::handshake</b
03e0: 3e 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65  ><em> channel</e
03f0: 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  m></dd>.        
0400: 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a      <dd><b>tls::
0410: 73 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d 3e 3f  status </b><em>?
0420: 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c  -local? channel<
0430: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  /em></dd>.      
0440: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73        <dd><b>tls
0450: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 3c 65 6d 3e  ::import</b><em>
0460: 20 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e   channel ?option
0470: 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20  s?</em></dd>.   
0480: 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e           <dd><b>
0490: 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 3c 2f 62  tls::ciphers </b
04a0: 3e 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76  ><em>protocol ?v
04b0: 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 64 64  erbose?</em></dd
04c0: 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64  >.            <d
04d0: 64 3e 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f  d><b>tls::versio
04e0: 6e 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20  n</b></dd>.     
04f0: 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64     </dl>.    </d
0500: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72  d>.    <dd><a hr
0510: 65 66 3d 22 23 43 4f 4d 4d 41 4e 44 53 22 3e 43  ef="#COMMANDS">C
0520: 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e  OMMANDS</a></dd>
0530: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66  .    <dd><a href
0540: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  ="#CALLBACK OPTI
0550: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
0560: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20  TIONS</a></dd>. 
0570: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22     <dd><a href="
0580: 23 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e  #HTTPS EXAMPLE">
0590: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61  HTTPS EXAMPLE</a
05a0: 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c  ></dd>.    <dd><
05b0: 61 20 68 72 65 66 3d 22 23 53 45 45 20 41 4c 53  a href="#SEE ALS
05c0: 4f 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 49  O">SPECIAL CONSI
05d0: 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64  DERATIONS</a></d
05e0: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72  d>.    <dd><a hr
05f0: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53  ef="#SEE ALSO">S
0600: 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e  EE ALSO</a></dd>
0610: 0a 3c 2f 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68  .</dl>..<hr>..<h
0620: 33 3e 3c 61 20 6e 61 6d 65 3d 22 4e 41 4d 45 22  3><a name="NAME"
0630: 3e 4e 41 4d 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  >NAME</a></h3>..
0640: 3c 70 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f  <p><strong>tls</
0650: 73 74 72 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e  strong> - bindin
0660: 67 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65  g to <strong>Ope
0670: 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f  nSSL</strong>.to
0680: 6f 6c 6b 69 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e  olkit.</p>..<h3>
0690: 3c 61 20 6e 61 6d 65 3d 22 53 59 4e 4f 50 53 49  <a name="SYNOPSI
06a0: 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c  S">SYNOPSIS</a><
06b0: 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b  /h3>..<p><b>pack
06c0: 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 20  age require Tcl 
06d0: 38 2e 32 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70  8.2</b><br>.<b>p
06e0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74  ackage require t
06f0: 6c 73 20 31 2e 34 3c 2f 62 3e 3c 62 72 3e 0a 3c  ls 1.4</b><br>.<
0700: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0710: 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a  s::init"><b>tls:
0720: 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70  :init </b><i>?op
0730: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 62 72 3e 0a 3c  tions?</i><br>.<
0740: 2f 61 3e 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  /a><a href="#tls
0750: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73  ::socket"><b>tls
0760: 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d  ::socket </b><em
0770: 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f 73 74 0a  >?options? host.
0780: 70 6f 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62  port</em><br>.<b
0790: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
07a0: 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f  <em> ?-server co
07b0: 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f  mmand? ?options?
07c0: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c   port</em><br>.<
07d0: 2f 61 3e 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  /a><a href="#tls
07e0: 3a 3a 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73  ::status"><b>tls
07f0: 3a 3a 73 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d  ::status </b><em
0800: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65  >?-local? channe
0810: 6c 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c  l</em><br>.</a><
0820: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61  a href="#tls::ha
0830: 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a  ndshake"><b>tls:
0840: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 3c 65  :handshake</b><e
0850: 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c  m> channel</em><
0860: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20  /a><br>.<br>.<a 
0870: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f  href="#tls::impo
0880: 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f  rt"><b>tls::impo
0890: 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65  rt </b><i>channe
08a0: 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c  l ?options?</i><
08b0: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
08c0: 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 70  "#tls::ciphers p
08d0: 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65  rotocol ?verbose
08e0: 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  ?"><strong>tls::
08f0: 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e  ciphers</strong>
0900: 0a 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76  .<em>protocol ?v
0910: 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 61 3e  erbose?</em></a>
0920: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
0930: 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e  ls::version"><b>
0940: 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e  tls::version</b>
0950: 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c  </a>.</p>..<h3><
0960: 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 54  a name="DESCRIPT
0970: 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f 4e  ION">DESCRIPTION
0980: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68  </a></h3>..<p>Th
0990: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f  is extension pro
09a0: 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 20  vides a generic 
09b0: 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68 72  binding to <a.hr
09c0: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f  ef="http://www.o
09d0: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65  penssl.org/">Ope
09e0: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a  nSSL</a>, utiliz
09f0: 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e  ing the.<strong>
0a00: 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c  Tcl_StackChannel
0a10: 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66 6f  </strong>.API fo
0a20: 72 20 54 63 6c 20 38 2e 32 20 61 6e 64 20 68 69  r Tcl 8.2 and hi
0a30: 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65 74  gher. The socket
0a40: 73 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79  s behave exactly
0a50: 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68 61   the same.as cha
0a60: 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73  nnels created us
0a70: 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74 2d  ing Tcl's built-
0a80: 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65  in <strong>socke
0a90: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61  t</strong>.comma
0aa0: 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e  nd with addition
0ab0: 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63  al options for c
0ac0: 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53  ontrolling the S
0ad0: 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 54 6f 20 75  SL session..To u
0ae0: 73 65 20 54 4c 53 20 77 69 74 68 20 61 6e 20 65  se TLS with an e
0af0: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 20 6f  arlier version o
0b00: 66 20 54 63 6c 20 74 68 61 6e 20 38 2e 32 2c 20  f Tcl than 8.2, 
0b10: 70 6c 65 61 73 65 20 6f 62 74 61 69 6e 0a 54 4c  please obtain.TL
0b20: 53 20 76 31 2e 33 2e 20 20 50 6c 65 61 73 65 20  S v1.3.  Please 
0b30: 6e 6f 74 65 20 74 68 61 74 20 74 68 65 72 65 20  note that there 
0b40: 61 72 65 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 61  are known limita
0b50: 74 69 6f 6e 73 20 77 69 74 68 20 74 68 65 0a 73  tions with the.s
0b60: 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 69  tacked channel i
0b70: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 70 72  mplementation pr
0b80: 69 6f 72 20 74 6f 20 38 2e 33 2e 32 2c 20 73 6f  ior to 8.3.2, so
0b90: 20 69 74 20 69 73 20 72 65 63 6f 6d 6d 65 6e 64   it is recommend
0ba0: 65 64 0a 74 68 61 74 20 54 4c 53 20 69 73 20 75  ed.that TLS is u
0bb0: 73 65 64 20 77 69 74 68 20 61 6e 20 38 2e 33 2e  sed with an 8.3.
0bc0: 32 2b 20 69 6e 74 65 72 70 72 65 74 65 72 2e 20  2+ interpreter. 
0bd0: 20 54 4c 53 20 76 31 2e 34 20 77 69 6c 6c 20 77   TLS v1.4 will w
0be0: 6f 72 6b 0a 77 69 74 68 20 38 2e 32 2b 2c 20 69  ork.with 8.2+, i
0bf0: 74 20 69 73 20 6a 75 73 74 20 6d 6f 72 65 20 73  t is just more s
0c00: 74 61 62 6c 65 20 77 69 74 68 20 38 2e 33 2e 32  table with 8.3.2
0c10: 2b 2e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20  +..</p>..<h3><a 
0c20: 6e 61 6d 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e  name="COMMANDS">
0c30: 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33  COMMANDS</a></h3
0c40: 3e 0a 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20  >..<p>Typically 
0c50: 6f 6e 65 20 77 6f 75 6c 64 20 75 73 65 20 74 68  one would use th
0c60: 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73  e <strong>tls::s
0c70: 6f 63 6b 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63  ocket </strong>c
0c80: 6f 6d 6d 61 6e 64 0a 77 68 69 63 68 20 70 72 6f  ommand.which pro
0c90: 76 69 64 65 73 20 63 6f 6d 70 61 74 69 62 69 6c  vides compatibil
0ca0: 69 74 79 20 77 69 74 68 20 74 68 65 20 6e 61 74  ity with the nat
0cb0: 69 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e  ive Tcl <strong>
0cc0: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a  socket</strong>.
0cd0: 63 6f 6d 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68  command. In such
0ce0: 20 63 61 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74   cases <strong>t
0cf0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
0d00: 6e 67 3e 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62  ng> should not b
0d10: 65 0a 75 73 65 64 20 64 69 72 65 63 74 6c 79 2e  e.used directly.
0d20: 3c 2f 70 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c  </p>..<dl>.    <
0d30: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a  dt><a name="tls:
0d40: 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69  :init"><b>tls::i
0d50: 6e 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69  nit </b><i>?opti
0d60: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  ons?</i></a></dt
0d70: 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 73 20 72  >.    <dd>This r
0d80: 6f 75 74 69 6e 65 20 73 65 74 73 20 74 68 65 20  outine sets the 
0d90: 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20  default options 
0da0: 75 73 65 64 20 62 79 20 3c 73 74 72 6f 6e 67 3e  used by <strong>
0db0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72  tls::socket</str
0dc0: 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 61 6e 64  ong>.        and
0dd0: 20 69 73 20 3c 65 6d 3e 6f 70 74 69 6f 6e 61 6c   is <em>optional
0de0: 3c 2f 65 6d 3e 2e 20 49 66 20 79 6f 75 20 63 61  </em>. If you ca
0df0: 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  ll <strong>tls::
0e00: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a  import</strong>.
0e10: 20 20 20 20 20 20 20 20 64 69 72 65 63 74 6c 79          directly
0e20: 20 74 68 69 73 20 72 6f 75 74 69 6e 65 20 68 61   this routine ha
0e30: 73 20 6e 6f 20 65 66 66 65 63 74 2e 20 41 6e 79  s no effect. Any
0e40: 20 6f 66 20 74 68 65 20 6f 70 74 69 6f 6e 73 0a   of the options.
0e50: 20 20 20 20 20 20 20 20 74 68 61 74 20 3c 73 74          that <st
0e60: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  rong>tls::socket
0e70: 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 70 74  </strong> accept
0e80: 73 20 63 61 6e 20 62 65 20 73 65 74 0a 20 20 20  s can be set.   
0e90: 20 20 20 20 20 75 73 69 6e 67 20 74 68 69 73 20       using this 
0ea0: 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20  command, though 
0eb0: 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74  you should limit
0ec0: 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 0a 20 20   your options.  
0ed0: 20 20 20 20 20 20 74 6f 20 6f 6e 6c 79 20 54 4c        to only TL
0ee0: 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c  S related ones.<
0ef0: 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62  /dd>.    <dt>&nb
0f00: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74  sp;</dt>.    <dt
0f10: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73  ><a name="tls::s
0f20: 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73  ocket"><b>tls::s
0f30: 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f  ocket </b><em>?o
0f40: 70 74 69 6f 6e 73 3f 0a 20 20 20 20 20 20 20 20  ptions?.        
0f50: 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f  host port</em></
0f60: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e  a></dt>.    <dt>
0f70: 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  <b>tls::socket</
0f80: 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20  b><em> ?-server 
0f90: 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e  command? ?option
0fa0: 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74  s? port</em></dt
0fb0: 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 73 20 69  >.    <dd>This i
0fc0: 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74  s a helper funct
0fd0: 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65  ion that utilize
0fe0: 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67  s the underlying
0ff0: 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 61 6e 64  .        command
1000: 73 20 28 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  s (<strong>tls::
1010: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 29  import</strong>)
1020: 2e 20 49 74 20 62 65 68 61 76 65 73 0a 20 20 20  . It behaves.   
1030: 20 20 20 20 20 65 78 61 63 74 6c 79 20 74 68 65       exactly the
1040: 20 73 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74   same as the nat
1050: 69 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e  ive Tcl <strong>
1060: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a  socket</strong>.
1070: 20 20 20 20 20 20 20 20 63 6f 6d 6d 61 6e 64 20          command 
1080: 65 78 63 65 70 74 20 74 68 61 74 20 74 68 65 20  except that the 
1090: 6f 70 74 69 6f 6e 73 20 63 61 6e 20 69 6e 63 6c  options can incl
10a0: 75 64 65 20 61 6e 79 20 6f 66 20 74 68 65 0a 20  ude any of the. 
10b0: 20 20 20 20 20 20 20 61 70 70 6c 69 63 61 62 6c         applicabl
10c0: 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  e <a href="#tls:
10d0: 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67  :import"><strong
10e0: 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72  >tls:import</str
10f0: 6f 6e 67 3e 3c 2f 61 3e 0a 20 20 20 20 20 20 20  ong></a>.       
1100: 20 6f 70 74 69 6f 6e 73 2e 3c 2f 64 64 3e 0a 20   options.</dd>. 
1110: 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64     <dt>&nbsp;</d
1120: 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  t>.    <dt><a na
1130: 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61  me="tls::handsha
1140: 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ke"><strong>tls:
1150: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f  :handshake</stro
1160: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c  ng> <em>channel<
1170: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
1180: 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e    <dd>Forces han
1190: 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70  dshake to take p
11a0: 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e  lace, and return
11b0: 73 20 30 20 69 66 0a 20 20 20 20 20 20 20 20 68  s 0 if.        h
11c0: 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c  andshake is stil
11d0: 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e  l in progress (n
11e0: 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72  on-blocking), or
11f0: 20 31 20 69 66 0a 20 20 20 20 20 20 20 20 74 68   1 if.        th
1200: 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 20  e handshake was 
1210: 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20 74  successful. If t
1220: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69  he handshake fai
1230: 6c 65 64 0a 20 20 20 20 20 20 20 20 74 68 69 73  led.        this
1240: 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 68   routine will th
1250: 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64  row an error.</d
1260: 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70  d>.    <dt>&nbsp
1270: 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c  ;</dt>.    <dt><
1280: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61  a name="tls::sta
1290: 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  tus"><strong>tls
12a0: 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67  ::status</strong
12b0: 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63 61  >.    <em>?-loca
12c0: 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c  l? channel</em><
12d0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  /a></dt>.    <dd
12e0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 72  >Returns the cur
12f0: 72 65 6e 74 20 73 65 63 75 72 69 74 79 20 73 74  rent security st
1300: 61 74 75 73 20 6f 66 20 61 20 53 53 4c 20 63 68  atus of a SSL ch
1310: 61 6e 6e 65 6c 2e 20 54 68 65 0a 20 20 20 20 20  annel. The.     
1320: 20 20 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c     result is a l
1330: 69 73 74 20 6f 66 20 6b 65 79 20 76 61 6c 75 65  ist of key value
1340: 20 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e   pairs describin
1350: 67 20 74 68 65 0a 20 20 20 20 20 20 20 20 63 6f  g the.        co
1360: 6e 6e 65 63 74 65 64 20 70 65 65 72 2e 20 49 66  nnected peer. If
1370: 20 74 68 65 20 72 65 73 75 6c 74 20 69 73 20 61   the result is a
1380: 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 74 68 65  n empty list the
1390: 6e 20 74 68 65 0a 20 20 20 20 20 20 20 20 53 53  n the.        SS
13a0: 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20  L handshake has 
13b0: 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65  not yet complete
13c0: 64 2e 0a 20 20 20 20 20 20 20 20 49 66 20 3c 65  d..        If <e
13d0: 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 69 73  m>-local</em> is
13e0: 20 67 69 76 65 6e 2c 20 74 68 65 6e 20 74 68 65   given, then the
13f0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 66   certificate inf
1400: 6f 72 6d 61 74 69 6f 6e 0a 20 20 20 20 20 20 20  ormation.       
1410: 20 69 73 20 74 68 65 20 6f 6e 65 20 75 73 65 64   is the one used
1420: 20 6c 6f 63 61 6c 6c 79 2e 3c 2f 64 64 3e 0a 3c   locally.</dd>.<
1430: 2f 64 6c 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74  /dl>..<blockquot
1440: 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20  e>.    <dl>.    
1450: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
1460: 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e 20  issuer</strong> 
1470: 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  <em>dn</em></dt>
1480: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65  .        <dd>The
1490: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e   distinguished n
14a0: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20  ame (DN) of the 
14b0: 63 65 72 74 69 66 69 63 61 74 65 0a 20 20 20 20  certificate.    
14c0: 20 20 20 20 20 20 20 20 69 73 73 75 65 72 2e 3c          issuer.<
14d0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
14e0: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74  ><strong>subject
14f0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e  </strong> <em>dn
1500: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
1510: 20 20 20 3c 64 64 3e 54 68 65 20 64 69 73 74 69     <dd>The disti
1520: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44  nguished name (D
1530: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  N) of the certif
1540: 69 63 61 74 65 0a 20 20 20 20 20 20 20 20 20 20  icate.          
1550: 20 20 73 75 62 6a 65 63 74 2e 3c 2f 64 64 3e 0a    subject.</dd>.
1560: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
1570: 6f 6e 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73  ong>notBefore</s
1580: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c  trong> <em>date<
1590: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
15a0: 20 20 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20    <dd>The begin 
15b0: 64 61 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c  date for the val
15c0: 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 65 72  idity of the cer
15d0: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20  tificate.</dd>. 
15e0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
15f0: 6e 67 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72  ng>notAfter</str
1600: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65  ong> <em>date</e
1610: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
1620: 3c 64 64 3e 54 68 65 20 65 78 70 69 72 79 20 64  <dd>The expiry d
1630: 61 74 65 20 66 6f 72 20 74 68 65 20 63 65 72 74  ate for the cert
1640: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20  ificate.</dd>.  
1650: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
1660: 67 3e 73 65 72 69 61 6c 3c 2f 73 74 72 6f 6e 67  g>serial</strong
1670: 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74  > <em>n</em></dt
1680: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68  >.        <dd>Th
1690: 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20  e serial number 
16a0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
16b0: 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  te.</dd>.       
16c0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70   <dt><strong>cip
16d0: 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  her</strong> <em
16e0: 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74  >cipher</em></dt
16f0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68  >.        <dd>Th
1700: 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 72  e current cipher
1710: 20 69 6e 20 75 73 65 20 62 65 74 77 65 65 6e 20   in use between 
1720: 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 0a 20  the client and. 
1730: 20 20 20 20 20 20 20 20 20 20 20 73 65 72 76 65             serve
1740: 72 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f 64 64 3e  r channels.</dd>
1750: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
1760: 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f  rong>sbits</stro
1770: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f  ng> <em>n</em></
1780: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
1790: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 62 69  The number of bi
17a0: 74 73 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  ts used for the 
17b0: 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64  session key.</dd
17c0: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c  >.    </dl>.</bl
17d0: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a  ockquote>..<dl>.
17e0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
17f0: 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62  "tls::import"><b
1800: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f 62  >tls::import </b
1810: 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 20 20 20 20  ><i>channel.    
1820: 20 20 20 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69      ?options?</i
1830: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  ></a></dt>.    <
1840: 64 64 3e 53 53 4c 2d 65 6e 61 62 6c 65 20 61 20  dd>SSL-enable a 
1850: 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e  regular Tcl chan
1860: 6e 65 6c 20 2d 20 69 74 20 6e 65 65 64 20 6e 6f  nel - it need no
1870: 74 20 62 65 20 61 0a 20 20 20 20 20 20 20 20 73  t be a.        s
1880: 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20  ocket, but must 
1890: 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63  provide bi-direc
18a0: 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73  tional flow. Als
18b0: 6f 0a 20 20 20 20 20 20 20 20 73 65 74 74 69 6e  o.        settin
18c0: 67 20 73 65 73 73 69 6f 6e 20 70 61 72 61 6d 65  g session parame
18d0: 74 65 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e  ters for SSL han
18e0: 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 3c 2f 64  dshake.</dd>.</d
18f0: 6c 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>..<blockquote>
1900: 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20  .    <dl>.      
1910: 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 63    <dt>-<strong>c
1920: 61 64 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  adir</strong> <e
1930: 6d 3e 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  m>dir</em></dt>.
1940: 20 20 20 20 20 20 20 20 3c 64 64 3e 50 72 6f 76          <dd>Prov
1950: 69 64 65 20 74 68 65 20 64 69 72 65 63 74 6f 72  ide the director
1960: 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65  y containing the
1970: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73   CA certificates
1980: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
1990: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69  dt><strong>-cafi
19a0: 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e  le </strong><em>
19b0: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64  filename</em></d
19c0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 50  t>.        <dd>P
19d0: 72 6f 76 69 64 65 20 74 68 65 20 43 41 20 66 69  rovide the CA fi
19e0: 6c 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  le.</dd>.       
19f0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65   <dt><strong>-ce
1a00: 72 74 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20  rtfile</strong> 
1a10: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d  <em>filename</em
1a20: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
1a30: 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 63  dd>Provide the c
1a40: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73  ertificate to us
1a50: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  e.</dd>.        
1a60: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70  <dt><strong>-cip
1a70: 68 65 72 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d  her </strong><em
1a80: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
1a90: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 50 72  >.        <dd>Pr
1aa0: 6f 76 69 64 65 20 74 68 65 20 63 69 70 68 65 72  ovide the cipher
1ab0: 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20   suites to use. 
1ac0: 53 79 6e 74 61 78 20 69 73 20 61 73 20 70 65 72  Syntax is as per
1ad0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 70 65  .            Ope
1ae0: 6e 53 53 4c 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  nSSL.</dd>.     
1af0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d     <dt><strong>-
1b00: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e  command</strong>
1b10: 3c 65 6d 3e 20 63 61 6c 6c 62 61 63 6b 3c 2f 65  <em> callback</e
1b20: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
1b30: 3c 64 64 3e 49 66 20 73 70 65 63 69 66 69 65 64  <dd>If specified
1b40: 2c 20 74 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  , this callback 
1b50: 77 69 6c 6c 20 62 65 20 69 6e 76 6f 6b 65 64 20  will be invoked 
1b60: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
1b70: 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 75  s.            du
1b80: 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 4c  ring the OpenSSL
1b90: 20 68 61 6e 64 73 68 61 6b 65 2e 20 20 49 74 20   handshake.  It 
1ba0: 63 61 6e 20 70 61 73 73 20 65 72 72 6f 72 73 20  can pass errors 
1bb0: 61 6e 64 20 74 72 61 63 69 6e 67 0a 20 20 20 20  and tracing.    
1bc0: 20 20 20 20 20 20 20 20 69 6e 66 6f 72 6d 61 74          informat
1bd0: 69 6f 6e 2c 20 61 6e 64 20 69 74 20 63 61 6e 20  ion, and it can 
1be0: 61 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 74  allow Tcl script
1bf0: 73 20 74 6f 20 70 65 72 66 6f 72 6d 0a 20 20 20  s to perform.   
1c00: 20 20 20 20 20 20 20 20 20 74 68 65 69 72 20 6f           their o
1c10: 77 6e 20 76 61 6c 69 64 61 74 69 6f 6e 20 6f 66  wn validation of
1c20: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
1c30: 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 68 65   in place of the
1c40: 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66  .            def
1c50: 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e 20  ault validation 
1c60: 70 72 6f 76 69 64 65 64 20 62 79 20 4f 70 65 6e  provided by Open
1c70: 53 53 4c 2e 0a 20 20 20 20 20 20 20 20 20 20 20  SSL..           
1c80: 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68   The callback sh
1c90: 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 6e 20 69  ould return an i
1ca0: 6e 74 65 67 65 72 20 77 68 6f 73 65 20 69 6e 74  nteger whose int
1cb0: 65 72 70 72 65 74 61 74 69 6f 6e 0a 20 20 20 20  erpretation.    
1cc0: 20 20 20 20 20 20 20 20 64 65 70 65 6e 64 73 20          depends 
1cd0: 6f 6e 20 63 6f 6e 74 65 78 74 2e 0a 20 20 20 20  on context..    
1ce0: 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 20 20          <br>.   
1cf0: 20 20 20 20 20 20 20 20 20 53 65 65 20 3c 61 20           See <a 
1d00: 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20  href="#CALLBACK 
1d10: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43  OPTIONS">CALLBAC
1d20: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 6f  K OPTIONS</a> fo
1d30: 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 75  r.            fu
1d40: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e  rther discussion
1d50: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
1d60: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 66  dt><strong>-keyf
1d70: 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ile</strong> <em
1d80: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f  >filename</em></
1d90: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
1da0: 50 72 6f 76 69 64 65 20 74 68 65 20 70 72 69 76  Provide the priv
1db0: 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28 3c  ate key file. (<
1dc0: 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f  strong>default</
1dd0: 73 74 72 6f 6e 67 3e 3a 0a 20 20 20 20 20 20 20  strong>:.       
1de0: 20 20 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63       value of -c
1df0: 65 72 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 20 20  ertfile)</dd>.  
1e00: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
1e10: 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67  g>-model</strong
1e20: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65  > <em>channel</e
1e30: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
1e40: 3c 64 64 3e 54 68 69 73 20 77 69 6c 6c 20 66 6f  <dd>This will fo
1e50: 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c  rce this channel
1e60: 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61   to share the sa
1e70: 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53  me <em><strong>S
1e80: 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c  SL_CTX</strong><
1e90: 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 20  /em>.           
1ea0: 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74 68   structure as th
1eb0: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e  e specified <em>
1ec0: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e  channel</em>, an
1ed0: 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68  d.            th
1ee0: 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 61  erefore share ca
1ef0: 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64  llbacks etc.</dd
1f00: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
1f10: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c  trong>-password<
1f20: 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 20 63 61 6c  /strong><em> cal
1f30: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  lback</em></dt>.
1f40: 20 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 73          <dd>If s
1f50: 75 70 70 6c 69 65 64 2c 20 74 68 69 73 20 63 61  upplied, this ca
1f60: 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69  llback will be i
1f70: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 4f 70 65 6e  nvoked when Open
1f80: 53 53 4c 20 6e 65 65 64 73 0a 20 20 20 20 20 20  SSL needs.      
1f90: 20 20 20 20 20 20 74 6f 20 6f 62 74 61 69 6e 20        to obtain 
1fa0: 61 20 70 61 73 73 77 6f 72 64 2c 20 74 79 70 69  a password, typi
1fb0: 63 61 6c 6c 79 20 66 6f 72 20 61 20 63 65 72 74  cally for a cert
1fc0: 69 66 69 63 61 74 65 2e 0a 20 20 20 20 20 20 20  ificate..       
1fd0: 20 20 20 20 20 54 68 65 20 63 61 6c 6c 62 61 63       The callbac
1fe0: 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20  k should return 
1ff0: 61 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 72  a string which r
2000: 65 70 72 65 73 65 6e 74 73 20 74 68 65 0a 20 20  epresents the.  
2010: 20 20 20 20 20 20 20 20 20 20 70 61 73 73 77 6f            passwo
2020: 72 64 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 20  rd to be used.. 
2030: 20 20 20 20 20 20 20 20 20 20 20 3c 62 72 3e 0a             <br>.
2040: 20 20 20 20 20 20 20 20 20 20 20 20 53 65 65 20              See 
2050: 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41  <a href="#CALLBA
2060: 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c  CK OPTIONS">CALL
2070: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e  BACK OPTIONS</a>
2080: 20 66 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20   for.           
2090: 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73   further discuss
20a0: 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ion.</dd>.      
20b0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72    <dt><strong>-r
20c0: 65 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e  equest </strong>
20d0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
20e0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52  t>.        <dd>R
20f0: 65 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69  equest a certifi
2100: 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64  cate from peer d
2110: 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68  uring SSL handsh
2120: 61 6b 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20  ake..           
2130: 20 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c   (<strong>defaul
2140: 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e  t</strong>: <em>
2150: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2160: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
2170: 6f 6e 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74  ong>-require</st
2180: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f  rong> <em>bool</
2190: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
21a0: 20 3c 64 64 3e 52 65 71 75 69 72 65 20 61 20 76   <dd>Require a v
21b0: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65  alid certificate
21c0: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e   from peer durin
21d0: 67 20 53 53 4c 0a 20 20 20 20 20 20 20 20 20 20  g SSL.          
21e0: 20 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20    handshake. If 
21f0: 74 68 69 73 20 69 73 20 73 65 74 20 74 6f 20 74  this is set to t
2200: 72 75 65 20 74 68 65 6e 20 3c 73 74 72 6f 6e 67  rue then <strong
2210: 3e 2d 72 65 71 75 65 73 74 3c 2f 73 74 72 6f 6e  >-request</stron
2220: 67 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d  g>.            m
2230: 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20  ust also be set 
2240: 74 6f 20 74 72 75 65 2e 20 28 3c 73 74 72 6f 6e  to true. (<stron
2250: 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e  g>default</stron
2260: 67 3e 3a 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65  g>: <em>false</e
2270: 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  m>)</dd>.       
2280: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65   <dt><strong>-se
2290: 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  rver</strong> <e
22a0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
22b0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 48 61 6e  .        <dd>Han
22c0: 64 73 68 61 6b 65 20 61 73 20 73 65 72 76 65 72  dshake as server
22d0: 20 69 66 20 74 72 75 65 2c 20 65 6c 73 65 20 68   if true, else h
22e0: 61 6e 64 73 68 61 6b 65 20 61 73 0a 20 20 20 20  andshake as.    
22f0: 20 20 20 20 20 20 20 20 63 6c 69 65 6e 74 2e 28          client.(
2300: 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c  <strong>default<
2310: 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 66 61  /strong>: <em>fa
2320: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20  lse</em>)</dd>. 
2330: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
2340: 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67  ng>-ssl2</strong
2350: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
2360: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
2370: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53  >Enable use of S
2380: 53 4c 20 76 32 2e 20 28 3c 73 74 72 6f 6e 67 3e  SL v2. (<strong>
2390: 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e  default</strong>
23a0: 3a 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 0a  : <em>true</em>.
23b0: 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 6c 65              unle
23c0: 73 73 20 2d 44 4e 4f 5f 50 41 54 45 4e 54 53 20  ss -DNO_PATENTS 
23d0: 77 61 73 20 73 70 65 63 69 66 69 65 64 20 69 6e  was specified in
23e0: 20 62 75 69 6c 64 29 3c 2f 64 64 3e 0a 20 20 20   build)</dd>.   
23f0: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
2400: 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e  >-ssl3 </strong>
2410: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
2420: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45  t>.        <dd>E
2430: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c  nable use of SSL
2440: 20 76 33 2e 20 28 3c 73 74 72 6f 6e 67 3e 64 65   v3. (<strong>de
2450: 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20  fault</strong>: 
2460: 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f  <em>true</em>)</
2470: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
2480: 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f 73  -<strong>tls1</s
2490: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
24a0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
24b0: 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65    <dd>Enable use
24c0: 20 6f 66 20 54 4c 53 20 76 31 2e 20 28 3c 73 74   of TLS v1. (<st
24d0: 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74  rong>default</st
24e0: 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 66 61 6c 73 65  rong>: <em>false
24f0: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20  </em>)</dd>.    
2500: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f  </dl>.</blockquo
2510: 74 65 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64  te>..<dl>.    <d
2520: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
2530: 63 69 70 68 65 72 73 20 70 72 6f 74 6f 63 6f 6c  ciphers protocol
2540: 20 3f 76 65 72 62 6f 73 65 3f 22 3e 3c 73 74 72   ?verbose?"><str
2550: 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  ong>tls::ciphers
2560: 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20 20  </strong>.      
2570: 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f    <em>protocol ?
2580: 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 61  verbose?</em></a
2590: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52  ></dt>.    <dd>R
25a0: 65 74 75 72 6e 73 20 6c 69 73 74 20 6f 66 20 73  eturns list of s
25b0: 75 70 70 6f 72 74 65 64 20 63 69 70 68 65 72 73  upported ciphers
25c0: 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 3c 65   based on the <e
25d0: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 0a  m>protocol</em>.
25e0: 20 20 20 20 20 20 20 20 79 6f 75 20 73 75 70 70          you supp
25f0: 6c 79 2c 20 77 68 69 63 68 20 6d 75 73 74 20 62  ly, which must b
2600: 65 20 6f 6e 65 20 6f 66 20 3c 65 6d 3e 73 73 6c  e one of <em>ssl
2610: 32 2c 20 73 73 6c 33 2c 20 6f 72 20 74 6c 73 31  2, ssl3, or tls1
2620: 3c 2f 65 6d 3e 2e 0a 20 20 20 20 20 20 20 20 49  </em>..        I
2630: 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65  f <em>verbose</e
2640: 6d 3e 20 69 73 20 73 70 65 63 69 66 69 65 64 20  m> is specified 
2650: 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 20 76  as true then a v
2660: 65 72 62 6f 73 65 2c 0a 20 20 20 20 20 20 20 20  erbose,.        
2670: 73 65 6d 69 2d 68 75 6d 61 6e 20 72 65 61 64 61  semi-human reada
2680: 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74 75  ble list is retu
2690: 72 6e 65 64 20 70 72 6f 76 69 64 69 6e 67 20 61  rned providing a
26a0: 64 64 69 74 69 6f 6e 61 6c 0a 20 20 20 20 20 20  dditional.      
26b0: 20 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e    information on
26c0: 20 74 68 65 20 6e 61 74 75 72 65 20 6f 66 20 74   the nature of t
26d0: 68 65 20 63 69 70 68 65 72 20 73 75 70 70 6f 72  he cipher suppor
26e0: 74 2e 20 49 6e 20 65 61 63 68 0a 20 20 20 20 20  t. In each.     
26f0: 20 20 20 63 61 73 65 20 74 68 65 20 72 65 73 75     case the resu
2700: 6c 74 20 69 73 20 61 20 54 63 6c 20 6c 69 73 74  lt is a Tcl list
2710: 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64  .</dd>.</dl>..<d
2720: 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  l>.    <dt><a na
2730: 6d 65 3d 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e  me="tls::version
2740: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76  "><strong>tls::v
2750: 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c  ersion</strong><
2760: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  /a></dt>.    <dd
2770: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 76 65 72  >Returns the ver
2780: 73 69 6f 6e 20 73 74 72 69 6e 67 20 64 65 66 69  sion string defi
2790: 6e 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e 3c  ned by OpenSSL.<
27a0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e  /dd>.</dl>..<h3>
27b0: 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43  <a name="CALLBAC
27c0: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42  K OPTIONS">CALLB
27d0: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c  ACK OPTIONS</a><
27e0: 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64  /h3>..<p>.As ind
27f0: 69 63 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e  icated above, in
2800: 64 69 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c  dividual channel
2810: 73 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74  s can be given t
2820: 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63  heir own callbac
2830: 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74  ks.to handle int
2840: 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73  ermediate proces
2850: 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e  sing by the Open
2860: 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69  SSL library, usi
2870: 6e 67 20 74 68 65 0a 3c 65 6d 3e 2d 63 6f 6d 6d  ng the.<em>-comm
2880: 61 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d  and</em> and <em
2890: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20  >-password</em> 
28a0: 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74  options passed t
28b0: 6f 20 65 69 74 68 65 72 20 6f 66 0a 3c 73 74 72  o either of.<str
28c0: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  ong>tls::socket<
28d0: 2f 73 74 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72  /strong> or <str
28e0: 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c  ong>tls::import<
28f0: 2f 73 74 72 6f 6e 67 3e 2e 0a 3c 2f 70 3e 0a 0a  /strong>..</p>..
2900: 3c 70 3e 0a 52 65 66 65 72 65 6e 63 65 20 69 6d  <p>.Reference im
2910: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66  plementations of
2920: 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 6b 73   these callbacks
2930: 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 69 6e   are provided in
2940: 20 74 68 65 20 64 69 73 74 72 69 62 75 74 69 6f   the distributio
2950: 6e 0a 61 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  n.as <strong>tls
2960: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f  ::callback</stro
2970: 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e  ng> and <strong>
2980: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73  tls::password</s
2990: 74 72 6f 6e 67 3e 2e 0a 4e 6f 74 65 20 74 68 61  trong>..Note tha
29a0: 74 20 74 68 65 73 65 20 61 72 65 20 3c 65 6d 3e  t these are <em>
29b0: 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c  sample</em> impl
29c0: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79  ementations only
29d0: 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61  .  In a more rea
29e0: 6c 69 73 74 69 63 0a 64 65 70 6c 6f 79 6d 65 6e  listic.deploymen
29f0: 74 20 79 6f 75 20 77 6f 75 6c 64 20 73 75 62 73  t you would subs
2a00: 74 69 74 75 74 65 20 79 6f 75 72 20 6f 77 6e 20  titute your own 
2a10: 63 61 6c 6c 62 61 63 6b 73 2c 20 74 79 70 69 63  callbacks, typic
2a20: 61 6c 6c 79 20 62 79 20 63 6f 6e 66 69 67 75 72  ally by configur
2a30: 69 6e 67 0a 74 68 65 20 3c 65 6d 3e 2d 63 6f 6d  ing.the <em>-com
2a40: 6d 61 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65  mand</em> and <e
2a50: 6d 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e  m>-password</em>
2a60: 20 6f 70 74 69 6f 6e 73 20 6f 6e 20 65 61 63 68   options on each
2a70: 20 63 68 61 6e 6e 65 6c 20 77 69 74 68 0a 73 63   channel with.sc
2a80: 72 69 70 74 73 20 74 6f 20 62 65 20 65 78 65 63  ripts to be exec
2a90: 75 74 65 64 20 77 68 65 6e 20 74 68 65 20 63 61  uted when the ca
2aa0: 6c 6c 62 61 63 6b 73 20 61 72 65 20 69 6e 76 6f  llbacks are invo
2ab0: 6b 65 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54  ked..</p>..<p>.T
2ac0: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76  he default behav
2ad0: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d  ior when the <em
2ae0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f  >-command</em> o
2af0: 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65  ption is not spe
2b00: 63 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54 4c  cified is for.TL
2b10: 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65  S to process the
2b20: 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72   associated libr
2b30: 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e  ary callbacks in
2b40: 74 65 72 6e 61 6c 6c 79 2e 0a 54 68 65 20 64 65  ternally..The de
2b50: 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77  fault behavior w
2b60: 68 65 6e 20 74 68 65 20 3c 65 6d 3e 2d 70 61 73  hen the <em>-pas
2b70: 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f  sword</em> optio
2b80: 6e 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69  n is not specifi
2b90: 65 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f  ed is for.TLS to
2ba0: 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73   process the ass
2bb0: 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20  ociated library 
2bc0: 63 61 6c 6c 62 61 63 6b 73 20 62 79 20 61 74 74  callbacks by att
2bd0: 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 0a  empting to call.
2be0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73  <strong>tls::pas
2bf0: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a  sword</strong>..
2c00: 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62  The difference b
2c10: 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f  etween these two
2c20: 20 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 20   behaviors is a 
2c30: 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d  consequence of m
2c40: 61 69 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61  aintaining.compa
2c50: 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 61  tibility with ea
2c60: 72 6c 69 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61  rlier implementa
2c70: 74 69 6f 6e 73 2e 20 20 54 68 65 20 75 73 65 20  tions.  The use 
2c80: 6f 66 20 69 6d 70 6c 69 65 64 20 63 61 6c 6c 62  of implied callb
2c90: 61 63 6b 73 0a 69 73 20 6e 6f 74 20 72 65 63 6f  acks.is not reco
2ca0: 6d 6d 65 6e 64 65 64 2e 0a 3c 2f 70 3e 0a 0a 3c  mmended..</p>..<
2cb0: 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e 67 3e 74  p>.The <strong>t
2cc0: 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e  ls::debug</stron
2cd0: 67 3e 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76  g> variable prov
2ce0: 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69  ides some additi
2cf0: 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 0a 6f 76 65  onal control.ove
2d00: 72 20 74 68 65 20 64 65 66 61 75 6c 74 20 63 6f  r the default co
2d10: 6d 6d 61 6e 64 73 2e 20 20 49 74 73 20 76 61 6c  mmands.  Its val
2d20: 75 65 20 69 73 20 7a 65 72 6f 20 62 79 20 64 65  ue is zero by de
2d30: 66 61 75 6c 74 2e 20 20 48 69 67 68 65 72 20 76  fault.  Higher v
2d40: 61 6c 75 65 73 0a 70 72 6f 64 75 63 65 20 6d 6f  alues.produce mo
2d50: 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75  re diagnostic ou
2d60: 74 70 75 74 2e 20 20 53 65 74 74 69 6e 67 20 74  tput.  Setting t
2d70: 68 69 73 20 76 61 6c 75 65 20 67 72 65 61 74 65  his value greate
2d80: 72 20 74 68 61 6e 20 7a 65 72 6f 0a 77 69 6c 6c  r than zero.will
2d90: 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 20   also force the 
2da0: 64 65 66 61 75 6c 74 20 76 65 72 69 66 79 20 6d  default verify m
2db0: 65 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67  ethod in <strong
2dc0: 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f  >tls::callback</
2dd0: 73 74 72 6f 6e 67 3e 0a 74 6f 20 61 63 63 65 70  strong>.to accep
2de0: 74 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  t the certificat
2df0: 65 2c 20 65 76 65 6e 20 69 66 20 69 74 20 69 73  e, even if it is
2e00: 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a   invalid..</p>..
2e10: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54  <h3><a name="HTT
2e20: 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50  PS EXAMPLE">HTTP
2e30: 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68  S EXAMPLE</a></h
2e40: 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 65 78 61 6d  3>..<p>This exam
2e50: 70 6c 65 20 72 65 71 75 69 72 65 73 20 61 20 70  ple requires a p
2e60: 61 74 63 68 20 74 6f 20 74 68 65 20 3c 73 74 72  atch to the <str
2e70: 6f 6e 67 3e 68 74 74 70 3c 2f 73 74 72 6f 6e 67  ong>http</strong
2e80: 3e 0a 6d 6f 64 75 6c 65 20 74 68 61 74 20 73 68  >.module that sh
2e90: 69 70 73 20 77 69 74 68 20 54 63 6c 20 2d 20 74  ips with Tcl - t
2ea0: 68 69 73 20 70 61 74 63 68 20 68 61 73 20 62 65  his patch has be
2eb0: 65 6e 20 73 75 62 6d 69 74 74 65 64 20 66 6f 72  en submitted for
2ec0: 0a 69 6e 63 6c 75 73 69 6f 6e 20 69 6e 20 54 63  .inclusion in Tc
2ed0: 6c 20 38 2e 32 2e 31 2c 20 62 75 74 20 69 73 20  l 8.2.1, but is 
2ee0: 61 6c 73 6f 20 70 72 6f 76 69 64 65 64 20 69 6e  also provided in
2ef0: 20 74 68 65 20 74 6c 73 20 64 69 72 65 63 74 6f   the tls directo
2f00: 72 79 0a 69 66 20 6e 65 65 64 65 64 2e 20 41 20  ry.if needed. A 
2f10: 73 61 6d 70 6c 65 20 73 65 72 76 65 72 2e 70 65  sample server.pe
2f20: 6d 20 69 73 20 70 72 6f 76 69 64 65 64 20 77 69  m is provided wi
2f30: 74 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61  th the TLS relea
2f40: 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20  se,.courtesy of 
2f50: 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e  the <strong>Open
2f60: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f  SSL</strong> pro
2f70: 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e  ject.</p>..<pre>
2f80: 3c 63 6f 64 65 3e 70 61 63 6b 61 67 65 20 72 65  <code>package re
2f90: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61  quire http.packa
2fa0: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a  ge require tls..
2fb0: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68  http::register h
2fc0: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a  ttps 443 [list :
2fd0: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 72 65  :tls::socket -re
2fe0: 71 75 69 72 65 20 31 20 2d 63 61 66 69 6c 65 20  quire 1 -cafile 
2ff0: 2e 2f 73 65 72 76 65 72 2e 70 65 6d 5d 0a 0a 73  ./server.pem]..s
3000: 65 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65  et tok [http::ge
3010: 74 75 72 6c 20 68 74 74 70 73 3a 2f 2f 64 65 76  turl https://dev
3020: 65 6c 6f 70 65 72 2e 6e 65 74 73 63 61 70 65 2e  eloper.netscape.
3030: 63 6f 6d 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70  com/].</code></p
3040: 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65  re>..<h3><a name
3050: 3d 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44  ="SPECIAL CONSID
3060: 45 52 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41  ERATIONS">SPECIA
3070: 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53  L CONSIDERATIONS
3080: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68  </a></h3>..<p>Th
3090: 65 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f  e capabilities o
30a0: 66 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 63  f this package c
30b0: 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73  an vary enormous
30c0: 6c 79 20 62 61 73 65 64 0a 75 70 6f 6e 20 68 6f  ly based.upon ho
30d0: 77 20 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 6c  w your OpenSSL l
30e0: 69 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69  ibrary was confi
30f0: 67 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e  gured and built.
3100: 20 41 74 20 74 68 65 0a 6d 6f 73 74 20 6d 61 63   At the.most mac
3110: 72 6f 2d 6c 65 76 65 6c 20 4f 70 65 6e 53 53 4c  ro-level OpenSSL
3120: 20 73 75 70 70 6f 72 74 73 20 61 20 26 71 75 6f   supports a &quo
3130: 74 3b 6e 6f 20 70 61 74 65 6e 74 73 26 71 75 6f  t;no patents&quo
3140: 74 3b 20 62 75 69 6c 64 2c 0a 77 68 69 63 68 20  t; build,.which 
3150: 64 69 73 61 62 6c 65 73 20 52 53 41 2c 20 49 44  disables RSA, ID
3160: 45 41 2c 20 52 43 28 32 2c 34 2c 35 29 20 61 6e  EA, RC(2,4,5) an
3170: 64 20 53 53 4c 32 20 2d 20 69 66 20 79 6f 75 72  d SSL2 - if your
3180: 20 4f 70 65 6e 53 53 4c 20 69 73 0a 63 6f 6e 66   OpenSSL is.conf
3190: 69 67 75 72 65 64 20 74 68 69 73 20 77 61 79 20  igured this way 
31a0: 74 68 65 6e 20 79 6f 75 20 77 69 6c 6c 20 6e 65  then you will ne
31b0: 65 64 20 74 6f 20 62 75 69 6c 64 20 54 4c 53 20  ed to build TLS 
31c0: 77 69 74 68 20 74 68 65 0a 2d 44 4e 4f 5f 50 41  with the.-DNO_PA
31d0: 54 45 4e 54 53 20 6f 70 74 69 6f 6e 20 2d 20 61  TENTS option - a
31e0: 6e 64 20 74 68 65 20 72 65 73 75 6c 74 61 6e 74  nd the resultant
31f0: 20 6d 6f 64 75 6c 65 20 77 69 6c 6c 20 66 75 6e   module will fun
3200: 63 74 69 6f 6e 0a 63 6f 72 72 65 63 74 6c 79 20  ction.correctly 
3210: 61 6e 64 20 61 6c 73 6f 20 73 75 70 70 6f 72 74  and also support
3220: 20 41 44 48 20 63 65 72 74 69 66 69 63 61 74 65   ADH certificate
3230: 2d 6c 65 73 73 20 65 6e 63 72 79 70 74 69 6f 6e  -less encryption
3240: 2c 0a 68 6f 77 65 76 65 72 20 79 6f 75 20 77 69  ,.however you wi
3250: 6c 6c 20 62 65 20 75 6e 61 62 6c 65 20 74 6f 20  ll be unable to 
3260: 75 74 69 6c 69 7a 65 20 74 68 69 73 20 74 6f 20  utilize this to 
3270: 73 70 65 61 6b 20 74 6f 20 6e 6f 72 6d 61 6c 20  speak to normal 
3280: 57 65 62 0a 53 65 72 76 65 72 73 2c 20 77 68 69  Web.Servers, whi
3290: 63 68 20 74 79 70 69 63 61 6c 6c 79 20 72 65 71  ch typically req
32a0: 75 69 72 65 20 52 53 41 20 73 75 70 70 6f 72 74  uire RSA support
32b0: 2e 20 50 6c 65 61 73 65 20 73 65 65 20 3c 61 0a  . Please see <a.
32c0: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77  href="http://www
32d0: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 68  .openssl.org/">h
32e0: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73  ttp://www.openss
32f0: 6c 2e 6f 72 67 2f 3c 2f 61 3e 20 66 6f 72 0a 6d  l.org/</a> for.m
3300: 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20  ore information 
3310: 6f 6e 20 74 68 65 20 77 68 6f 6c 65 20 69 73 73  on the whole iss
3320: 75 65 20 6f 66 20 70 61 74 65 6e 74 73 20 61 6e  ue of patents an
3330: 64 20 55 53 20 65 78 70 6f 72 74 0a 72 65 73 74  d US export.rest
3340: 72 69 63 74 69 6f 6e 73 2e 20 3c 2f 70 3e 0a 0a  rictions. </p>..
3350: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45  <h3><a name="SEE
3360: 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c   ALSO">SEE ALSO<
3370: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74  /a></h3>..<p><st
3380: 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72  rong>socket</str
3390: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69  ong>, <strong>fi
33a0: 6c 65 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e  leevent, </stron
33b0: 67 3e 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a  g><a.href="http:
33c0: 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72  //www.openssl.or
33d0: 67 2f 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e  g/"><strong>Open
33e0: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e  SSL</strong></a>
33f0: 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65  </p>..<hr>..<pre
3400: 3e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70  >.Copyright &cop
3410: 79 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77  y; 1999 Matt New
3420: 6d 61 6e 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f  man..</pre>.</bo
3430: 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a              dy>.</html>.