Hex Artifact Content

Artifact aa1cd06cde9b90c76852c86bf0f415384fb4c6803232f43cccb7640c940a4a23:


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: 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f 62 3e 20 2d  <dd><b>tls</b> -
0170: 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 62 3e 4f   binding to <b>O
0180: 70 65 6e 53 53 4c 3c 2f 62 3e 20 74 6f 6f 6c 6b  penSSL</b> toolk
0190: 69 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  it.</dd>.    </d
01a0: 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20  l>.    </dd>.   
01b0: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53   <dd><a href="#S
01c0: 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 49  YNOPSIS">SYNOPSI
01d0: 53 3c 2f 61 3e 20 3c 2f 64 64 3e 0a 20 20 20 20  S</a> </dd>.    
01e0: 3c 64 64 3e 3c 64 6c 3e 0a 20 20 20 20 20 20 20  <dd><dl>.       
01f0: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b       <dd><b>pack
0200: 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 3c  age require Tcl<
0210: 2f 62 3e 20 3c 65 6d 3e 3f 38 2e 34 3f 3c 2f 65  /b> <em>?8.4?</e
0220: 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  m></dd>.        
0230: 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61      <dd><b>packa
0240: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f  ge require tls</
0250: 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  b></dd>.        
0260: 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f      <dt>&nbsp;</
0270: 64 74 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20  dt>.            
0280: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74  <dd><b>tls::init
0290: 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e  </b> <em>?option
02a0: 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a 20 20  s?</em> </dd>.  
02b0: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62            <dd><b
02c0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
02d0: 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68   <em>?options? h
02e0: 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64  ost port</em></d
02f0: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c  d>.            <
0300: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65  dd><b>tls::socke
0310: 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d 73 65 72  t</b> <em> ?-ser
0320: 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70  ver command? ?op
0330: 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e  tions? port</em>
0340: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20  </dd>.          
0350: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 68 61    <dd><b>tls::ha
0360: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 65 6d 3e  ndshake</b> <em>
0370: 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64   channel</em></d
0380: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c  d>.            <
0390: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75  dd><b>tls::statu
03a0: 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 6c 6f 63  s </b> <em>?-loc
03b0: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  al? channel</em>
03c0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20  </dd>.          
03d0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 6f    <dd><b>tls::co
03e0: 6e 6e 65 63 74 69 6f 6e 20 3c 2f 62 3e 20 3c 65  nnection </b> <e
03f0: 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f  m>channel</em></
0400: 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20  dd>.            
0410: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f  <dd><b>tls::impo
0420: 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e  rt</b> <em>chann
0430: 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d  el ?options?</em
0440: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20  ></dd>.         
0450: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75     <dd><b>tls::u
0460: 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e  nimport</b> <em>
0470: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64  channel</em></dd
0480: 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64  >.            <d
0490: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20  t>&nbsp;</dt>.  
04a0: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62            <dd><b
04b0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 3c 2f  >tls::ciphers </
04c0: 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20  b> <em>protocol 
04d0: 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f  ?verbose? ?suppo
04e0: 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a  rted?</em></dd>.
04f0: 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e              <dd>
0500: 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  <b>tls::protocol
0510: 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20  s</b></dd>.     
0520: 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c         <dd><b>tl
0530: 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f  s::version</b></
0540: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 2f 64 6c  dd>.        </dl
0550: 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20  >.    </dd>.    
0560: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 4f  <dd><a href="#CO
0570: 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53  MMANDS">COMMANDS
0580: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  </a></dd>.    <d
0590: 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c  d><a href="#CALL
05a0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41  BACK OPTIONS">CA
05b0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f  LLBACK OPTIONS</
05c0: 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e  a></dd>.    <dd>
05d0: 3c 61 20 68 72 65 66 3d 22 23 48 54 54 50 53 20  <a href="#HTTPS 
05e0: 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45  EXAMPLE">HTTPS E
05f0: 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a  XAMPLE</a></dd>.
0600: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d      <dd><a href=
0610: 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 50 45 43  "#SEE ALSO">SPEC
0620: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f  IAL CONSIDERATIO
0630: 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20  NS</a></dd>.    
0640: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 45  <dd><a href="#SE
0650: 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f  E ALSO">SEE ALSO
0660: 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a  </a></dd>.</dl>.
0670: 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  .<hr>..<h3><a na
0680: 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f  me="NAME">NAME</
0690: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72  a></h3>..<p><str
06a0: 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e  ong>tls</strong>
06b0: 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 73   - binding to <s
06c0: 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73  trong>OpenSSL</s
06d0: 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74 2e 3c  trong>.toolkit.<
06e0: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65  /p>..<h3><a name
06f0: 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f  ="SYNOPSIS">SYNO
0700: 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  PSIS</a></h3>..<
0710: 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71  p><b>package req
0720: 75 69 72 65 20 54 63 6c 20 38 2e 34 3c 2f 62 3e  uire Tcl 8.4</b>
0730: 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20  <br>.<b>package 
0740: 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 3c  require tls</b><
0750: 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66  br>.<br>.<a href
0760: 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62  ="#tls::init"><b
0770: 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c  >tls::init</b> <
0780: 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c  i>?options?</i><
0790: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
07a0: 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c  "#tls::socket"><
07b0: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62  b>tls::socket</b
07c0: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68  > <i>?options? h
07d0: 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c 62 72 3e  ost port</i><br>
07e0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
07f0: 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a  socket"><b>tls::
0800: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 2d  socket</b> <i>?-
0810: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20  server command? 
0820: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f  ?options? port</
0830: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72  i></a><br>.<a hr
0840: 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73  ef="#tls::status
0850: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73  "><b>tls::status
0860: 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 61 6c 3f  </b> <i>?-local?
0870: 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e   channel</i></a>
0880: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
0890: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e  ls::connection">
08a0: 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  <b>tls::connecti
08b0: 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65  on</b> <i>channe
08c0: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61  l</i></a><br>.<a
08d0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e   href="#tls::han
08e0: 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a  dshake"><b>tls::
08f0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69  handshake</b> <i
0900: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
0910: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
0920: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74  ls::import"><b>t
0930: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c  ls::import</b> <
0940: 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f  i>channel ?optio
0950: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a  ns?</i></a><br>.
0960: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 75  <a href="#tls::u
0970: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a  nimport"><b>tls:
0980: 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69  :unimport</b> <i
0990: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
09a0: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65  <br>.<br>.<a hre
09b0: 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73  f="#tls::ciphers
09c0: 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72  "><b>tls::cipher
09d0: 73 3c 2f 62 3e 20 3c 69 3e 70 72 6f 74 6f 63 6f  s</b> <i>protoco
09e0: 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70  l ?verbose? ?sup
09f0: 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f 61 3e 3c  ported?</i></a><
0a00: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0a10: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 62  s::protocols"><b
0a20: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
0a30: 2f 62 3e 3c 2f 61 3e 0a 3c 61 20 68 72 65 66 3d  /b></a>.<a href=
0a40: 22 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e  "#tls::version">
0a50: 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c  <b>tls::version<
0a60: 2f 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68  /b></a>.</p>..<h
0a70: 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52  3><a name="DESCR
0a80: 49 50 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54  IPTION">DESCRIPT
0a90: 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70  ION</a></h3>..<p
0aa0: 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20  >This extension 
0ab0: 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72  provides a gener
0ac0: 69 63 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61  ic binding to <a
0ad0: 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77  .href="http://ww
0ae0: 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e  w.openssl.org/">
0af0: 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69  OpenSSL</a>, uti
0b00: 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f  lizing the.<stro
0b10: 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e  ng>Tcl_StackChan
0b20: 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49  nel</strong>.API
0b30: 20 66 6f 72 20 54 63 6c 20 38 2e 34 20 61 6e 64   for Tcl 8.4 and
0b40: 20 68 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63   higher. The soc
0b50: 6b 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63  kets behave exac
0b60: 74 6c 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20  tly the same.as 
0b70: 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64  channels created
0b80: 20 75 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69   using Tcl's bui
0b90: 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f  lt-in <strong>so
0ba0: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f  cket</strong>.co
0bb0: 6d 6d 61 6e 64 20 77 69 74 68 20 61 64 64 69 74  mmand with addit
0bc0: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f  ional options fo
0bd0: 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68  r controlling th
0be0: 65 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c  e SSL session..<
0bf0: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65  /p>..<h3><a name
0c00: 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d  ="COMMANDS">COMM
0c10: 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  ANDS</a></h3>..<
0c20: 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20  p>Typically one 
0c30: 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c 73  would use the <s
0c40: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65  trong>tls::socke
0c50: 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61  t </strong>comma
0c60: 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69 64 65  nd.which provide
0c70: 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20  s compatibility 
0c80: 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 65 20  with the native 
0c90: 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b  Tcl <strong>sock
0ca0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d  et</strong>.comm
0cb0: 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63 61 73  and. In such cas
0cc0: 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  es <strong>tls::
0cd0: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20  import</strong> 
0ce0: 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73  should not be.us
0cf0: 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e  ed directly.</p>
0d00: 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c  ..<dl>.    <dt><
0d10: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69  a name="tls::ini
0d20: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 20  t"><b>tls::init 
0d30: 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f  </b><i>?options?
0d40: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  </i></a></dt>.  
0d50: 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 66    <dd>Optional f
0d60: 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74  unction to set t
0d70: 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f  he default optio
0d80: 6e 73 20 75 73 65 64 20 62 79 0a 09 3c 73 74 72  ns used by..<str
0d90: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  ong>tls::socket<
0da0: 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f 75  /strong>. If you
0db0: 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c   call <strong>tl
0dc0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
0dd0: 67 3e 0a 20 20 20 20 20 20 20 20 64 69 72 65 63  g>.        direc
0de0: 74 6c 79 20 74 68 69 73 20 72 6f 75 74 69 6e 65  tly this routine
0df0: 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 2e 20   has no effect. 
0e00: 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 74 69 6f  Any of the optio
0e10: 6e 73 0a 20 20 20 20 20 20 20 20 74 68 61 74 20  ns.        that 
0e20: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63  <strong>tls::soc
0e30: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63  ket</strong> acc
0e40: 65 70 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a  epts can be set.
0e50: 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 74 68          using th
0e60: 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75  is command, thou
0e70: 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69  gh you should li
0e80: 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73  mit your options
0e90: 0a 20 20 20 20 20 20 20 20 74 6f 20 6f 6e 6c 79  .        to only
0ea0: 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65   TLS related one
0eb0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e  s.</dd>.    <dt>
0ec0: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20  &nbsp;</dt>.    
0ed0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
0ee0: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73  ::socket"><b>tls
0ef0: 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d  ::socket </b><em
0f00: 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20 20 20 20  >?options?.     
0f10: 20 20 20 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d     host port</em
0f20: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  ></a></dt>.    <
0f30: 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65  dt><b>tls::socke
0f40: 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76  t</b><em> ?-serv
0f50: 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74  er command? ?opt
0f60: 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c  ions? port</em><
0f70: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69  /dt>.    <dd>Thi
0f80: 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66 75  s is a helper fu
0f90: 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c  nction that util
0fa0: 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79  izes the underly
0fb0: 69 6e 67 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d  ing.        comm
0fc0: 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e 74 6c  ands (<strong>tl
0fd0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
0fe0: 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65 73 0a  g>). It behaves.
0ff0: 20 20 20 20 20 20 20 20 65 78 61 63 74 6c 79 20          exactly 
1000: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20  the same as the 
1010: 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72 6f  native Tcl <stro
1020: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  ng>socket</stron
1030: 67 3e 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 61  g>.        comma
1040: 6e 64 20 65 78 63 65 70 74 20 74 68 61 74 20 74  nd except that t
1050: 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 6e 20 69  he options can i
1060: 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 20 74 68  nclude any of th
1070: 65 0a 20 20 20 20 20 20 20 20 61 70 70 6c 69 63  e.        applic
1080: 61 62 6c 65 20 3c 61 20 68 72 65 66 3d 22 23 74  able <a href="#t
1090: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72  ls::import"><str
10a0: 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f  ong>tls:import</
10b0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20 20 20 20  strong></a>.    
10c0: 20 20 20 20 6f 70 74 69 6f 6e 73 20 77 69 74 68      options with
10d0: 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20   one additional 
10e0: 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f 63 6b 71 75  option:.<blockqu
10f0: 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 20 20  ote>.    <dl>.  
1100: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
1110: 67 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d  g>-autoservernam
1120: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  e</strong> <em>b
1130: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ool</em></dt>.  
1140: 20 20 20 20 20 20 3c 64 64 3e 41 75 74 6f 6d 61        <dd>Automa
1150: 74 69 63 61 6c 6c 79 20 73 65 6e 64 20 74 68 65  tically send the
1160: 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 61 73 20   -servername as 
1170: 74 68 65 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d  the <em>host</em
1180: 3e 20 61 72 67 75 6d 65 6e 74 0a 20 20 20 20 20  > argument.     
1190: 20 20 20 20 20 20 20 28 64 65 66 61 75 6c 74 20         (default 
11a0: 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d  is <em>false</em
11b0: 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c  >)</dd>.    </dl
11c0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >.</blockquote>.
11d0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
11e0: 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c  ="tls::import"><
11f0: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f  b>tls::import </
1200: 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 20 20 20  b><i>channel.   
1210: 20 20 20 20 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f       ?options?</
1220: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  i></a></dt>.    
1230: 3c 64 64 3e 53 53 4c 2d 65 6e 61 62 6c 65 20 61  <dd>SSL-enable a
1240: 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61   regular Tcl cha
1250: 6e 6e 65 6c 20 2d 20 69 74 20 6e 65 65 64 20 6e  nnel - it need n
1260: 6f 74 20 62 65 20 61 0a 20 20 20 20 20 20 20 20  ot be a.        
1270: 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74  socket, but must
1280: 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65   provide bi-dire
1290: 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c  ctional flow. Al
12a0: 73 6f 0a 20 20 20 20 20 20 20 20 73 65 74 74 69  so.        setti
12b0: 6e 67 20 73 65 73 73 69 6f 6e 20 70 61 72 61 6d  ng session param
12c0: 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20 68 61  eters for SSL ha
12d0: 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c  ndshake.</dd>..<
12e0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20  blockquote>.    
12f0: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  <dl>.        <dt
1300: 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 6e 3c 2f  ><strong>-alpn</
1310: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74  strong> <em>list
1320: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
1330: 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70     <dd>List of p
1340: 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65  rotocols to offe
1350: 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61  r during Applica
1360: 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20  tion-Layer..    
1370: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61  Protocol Negotia
1380: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72  tion (ALPN). For
1390: 20 65 78 61 6d 70 6c 65 3a 20 68 32 2c 20 68 74   example: h2, ht
13a0: 74 70 2f 31 2e 31 2c 20 65 74 63 2e 3c 2f 64 64  tp/1.1, etc.</dd
13b0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
13c0: 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74  trong>-cadir</st
13d0: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65  rong> <em>dir</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 53 70 65 63 69 66 79 20 74 68 65 20  <dd>Specify the 
1400: 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69  directory contai
1410: 6e 69 6e 67 20 74 68 65 20 43 41 20 63 65 72 74  ning the CA cert
1420: 69 66 69 63 61 74 65 73 2e 20 54 68 65 0a 09 20  ificates. The.. 
1430: 20 20 20 64 65 66 61 75 6c 74 20 64 69 72 65 63     default direc
1440: 74 6f 72 79 20 69 73 20 70 6c 61 74 66 6f 72 6d  tory is platform
1450: 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61   specific and ca
1460: 6e 20 62 65 20 73 65 74 20 61 74 0a 09 20 20 20  n be set at..   
1470: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54   compile time. T
1480: 68 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72  his can be overr
1490: 69 64 64 65 6e 20 76 69 61 20 74 68 65 20 3c 62  idden via the <b
14a0: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62  >SSL_CERT_DIR</b
14b0: 3e 0a 09 20 20 20 20 65 6e 76 69 72 6f 6e 6d 65  >..    environme
14c0: 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 64  nt variable.</dd
14d0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
14e0: 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65 20 3c 2f  trong>-cafile </
14f0: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e  strong><em>filen
1500: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ame</em></dt>.  
1510: 20 20 20 20 20 20 3c 64 64 3e 53 70 65 63 69 66        <dd>Specif
1520: 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  y the certificat
1530: 65 20 61 75 74 68 6f 72 69 74 79 20 28 43 41 29  e authority (CA)
1540: 20 66 69 6c 65 20 74 6f 20 75 73 65 2e 3c 2f 64   file to use.</d
1550: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
1560: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65  strong>-certfile
1570: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69  </strong> <em>fi
1580: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
1590: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65  .        <dd>Spe
15a0: 63 69 66 79 20 74 68 65 20 66 69 6c 65 6e 61 6d  cify the filenam
15b0: 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65  e containing the
15c0: 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20   certificate to 
15d0: 75 73 65 2e 20 54 68 65 0a 09 20 20 20 20 64 65  use. The..    de
15e0: 66 61 75 6c 74 20 6e 61 6d 65 20 69 73 20 3c 62  fault name is <b
15f0: 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 2e 20 54  >cert.pem</b>. T
1600: 68 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72  his can be overr
1610: 69 64 64 65 6e 20 76 69 61 0a 09 20 20 20 20 74  idden via..    t
1620: 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 46  he <b>SSL_CERT_F
1630: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d  ILE</b> environm
1640: 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64  ent variable.</d
1650: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
1660: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f 73 74  strong>-cert</st
1670: 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61  rong> <em>filena
1680: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  me</em></dt>.   
1690: 20 20 20 20 20 3c 64 64 3e 53 70 65 63 69 66 79       <dd>Specify
16a0: 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66   the contents of
16b0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 74   a certificate t
16c0: 6f 20 75 73 65 2c 20 61 73 20 61 20 44 45 52 0a  o use, as a DER.
16d0: 09 20 20 20 20 65 6e 63 6f 64 65 64 20 62 69 6e  .    encoded bin
16e0: 61 72 79 20 76 61 6c 75 65 20 28 58 2e 35 30 39  ary value (X.509
16f0: 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 20 20 20 20   DER).</dd>.    
1700: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
1710: 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e  -cipher</strong>
1720: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
1730: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
1740: 64 3e 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72  d>List of cipher
1750: 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67  s to use. String
1760: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22   is a colon (":"
1770: 29 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74  ) separated list
1780: 0a 09 20 20 20 20 6f 66 20 63 69 70 68 65 72 73  ..    of ciphers
1790: 20 6f 72 20 63 69 70 68 65 72 20 73 75 69 74 65   or cipher suite
17a0: 73 2e 20 43 69 70 68 65 72 20 73 75 69 74 65 73  s. Cipher suites
17b0: 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64   can be combined
17c0: 0a 09 20 20 20 20 75 73 69 6e 67 20 74 68 65 20  ..    using the 
17d0: 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74  <b>+</b> charact
17e0: 65 72 2e 20 50 72 65 66 69 78 65 73 20 63 61 6e  er. Prefixes can
17f0: 20 62 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d   be used to perm
1800: 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72 65 6d  anently..    rem
1810: 6f 76 65 20 28 22 21 22 29 2c 20 64 65 6c 65 74  ove ("!"), delet
1820: 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65  e ("-"), or move
1830: 20 61 20 63 79 70 68 65 72 20 74 6f 20 74 68 65   a cypher to the
1840: 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 74 68 65   end of..    the
1850: 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b 65 79   list ("+"). Key
1860: 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 45 4e 47  words <b>@STRENG
1870: 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20  TH</b> (sort by 
1880: 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20 20 6b  algorithm..    k
1890: 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62 3e 40  ey length), <b>@
18a0: 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 69 3e  SECLEVEL=</b><i>
18b0: 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 63 75 72  n</i> (set secur
18c0: 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09 20 20  ity level to..  
18d0: 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44 45 46    n), and <b>DEF
18e0: 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65  AULT</b> (use de
18f0: 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73  fault cipher lis
1900: 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79  t, at start only
1910: 29 0a 09 20 20 20 20 63 61 6e 20 61 6c 73 6f 20  )..    can also 
1920: 62 65 20 73 70 65 63 69 66 69 65 64 2e 20 53 65  be specified. Se
1930: 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75 6d 65  e OpenSSL docume
1940: 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20  ntation for the 
1950: 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74 20 6f  full..    list o
1960: 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 20  f valid values. 
1970: 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 61 72  (TLS 1.2 and ear
1980: 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a  lier only)</dd>.
1990: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
19a0: 6f 6e 67 3e 2d 63 69 70 68 65 72 73 75 69 74 65  ong>-ciphersuite
19b0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  s</strong> <em>s
19c0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
19d0: 20 20 20 20 20 20 20 20 3c 64 64 3e 4c 69 73 74          <dd>List
19e0: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65   of cipher suite
19f0: 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67  s to use. String
1a00: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22   is a colon (":"
1a10: 29 0a 09 20 20 20 20 73 65 70 61 72 61 74 65 64  )..    separated
1a20: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20   list of cipher 
1a30: 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 28 54 4c  suite names. (TL
1a40: 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f 64 64 3e  S 1.3 only)</dd>
1a50: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
1a60: 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73  rong>-command</s
1a70: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62  trong> <em>callb
1a80: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ack</em></dt>.  
1a90: 20 20 20 20 20 20 3c 64 64 3e 43 61 6c 6c 62 61        <dd>Callba
1aa0: 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 61 74 20  ck to invoke at 
1ab0: 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64  several points d
1ac0: 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68  uring the handsh
1ad0: 61 6b 65 2e 0a 09 20 20 20 20 54 68 69 73 20 69  ake...    This i
1ae0: 73 20 75 73 65 64 20 74 6f 20 70 61 73 73 20 65  s used to pass e
1af0: 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 6e  rrors and tracin
1b00: 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61  g information, a
1b10: 6e 64 0a 09 20 20 20 20 69 74 20 63 61 6e 20 61  nd..    it can a
1b20: 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 74 73  llow Tcl scripts
1b30: 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69   to perform thei
1b40: 72 20 6f 77 6e 20 63 65 72 74 69 66 69 63 61 74  r own certificat
1b50: 65 0a 09 20 20 20 20 76 61 6c 69 64 61 74 69 6f  e..    validatio
1b60: 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 68  n in place of th
1b70: 65 20 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61  e default valida
1b80: 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79  tion provided by
1b90: 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e 20 53  ..    OpenSSL. S
1ba0: 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c  ee <a href="#CAL
1bb0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43  LBACK OPTIONS">C
1bc0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c  ALLBACK OPTIONS<
1bd0: 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72  /a>..    for fur
1be0: 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e  ther discussion.
1bf0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
1c00: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72  t><strong>-dhpar
1c10: 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d  ams </strong><em
1c20: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f  >filename</em></
1c30: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
1c40: 53 70 65 63 69 66 79 20 74 68 65 20 44 69 66 66  Specify the Diff
1c50: 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d  ie-Hellman param
1c60: 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e  eters file.</dd>
1c70: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
1c80: 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73  rong>-keyfile</s
1c90: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e  trong> <em>filen
1ca0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ame</em></dt>.  
1cb0: 20 20 20 20 20 20 3c 64 64 3e 53 70 65 63 69 66        <dd>Specif
1cc0: 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  y the private ke
1cd0: 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c 74  y file. (default
1ce0: 20 69 73 0a 20 20 20 20 20 20 20 20 20 20 20 20   is.            
1cf0: 76 61 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69  value of -certfi
1d00: 6c 65 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  le)</dd>.       
1d10: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65   <dt><strong>-ke
1d20: 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66  y</strong> <em>f
1d30: 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74  ilename</em></dt
1d40: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70  >.        <dd>Sp
1d50: 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74  ecify the privat
1d60: 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20  e key to use as 
1d70: 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 76 61  a DER encoded va
1d80: 6c 75 65 20 28 50 4b 43 53 23 31 20 44 45 52 29  lue (PKCS#1 DER)
1d90: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
1da0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 6c  t><strong>-model
1db0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
1dc0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  annel</em></dt>.
1dd0: 20 20 20 20 20 20 20 20 3c 64 64 3e 46 6f 72 63          <dd>Forc
1de0: 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74  e this channel t
1df0: 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d 65  o share the same
1e00: 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c   <em><strong>SSL
1e10: 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65  _CTX</strong></e
1e20: 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 73  m>.            s
1e30: 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65 20  tructure as the 
1e40: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 68  specified <em>ch
1e50: 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a  annel</em>, and.
1e60: 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 72              ther
1e70: 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c  efore share call
1e80: 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a  backs etc.</dd>.
1e90: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
1ea0: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73  ong>-password</s
1eb0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62  trong> <em>callb
1ec0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ack</em></dt>.  
1ed0: 20 20 20 20 20 20 3c 64 64 3e 43 61 6c 6c 62 61        <dd>Callba
1ee0: 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65  ck to invoke whe
1ef0: 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20  n OpenSSL needs 
1f00: 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73  to obtain a pass
1f10: 77 6f 72 64 2c 0a 09 20 20 20 20 74 79 70 69 63  word,..    typic
1f20: 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 6b 20 74  ally to unlock t
1f30: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 6f  he private key o
1f40: 66 20 61 20 63 65 72 74 69 66 69 63 61 74 65 2e  f a certificate.
1f50: 20 54 68 65 0a 20 20 20 20 20 20 20 20 20 20 20   The.           
1f60: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64   callback should
1f70: 20 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67   return a string
1f80: 20 77 68 69 63 68 20 72 65 70 72 65 73 65 6e 74   which represent
1f90: 73 20 74 68 65 20 70 61 73 73 77 6f 72 64 0a 20  s the password. 
1fa0: 20 20 20 20 20 20 20 20 20 20 20 74 6f 20 62 65             to be
1fb0: 20 75 73 65 64 2e 20 53 65 65 20 3c 61 20 68 72   used. See <a hr
1fc0: 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50  ef="#CALLBACK OP
1fd0: 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20  TIONS">CALLBACK 
1fe0: 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20  OPTIONS</a>..   
1ff0: 20 66 6f 72 20 66 75 72 74 68 65 72 20 64 69 73   for further dis
2000: 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c  cussion.</dd>..<
2010: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74  dt><strong>-post
2020: 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f  _handshake</stro
2030: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
2040: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f  ></dt>..<dd>Allo
2050: 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65  w post-handshake
2060: 20 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e   ticket updates.
2070: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
2080: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65  t><strong>-reque
2090: 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e  st </strong><em>
20a0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  bool</em></dt>. 
20b0: 20 20 20 20 20 20 20 3c 64 64 3e 52 65 71 75 65         <dd>Reque
20c0: 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65  st a certificate
20d0: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e   from peer durin
20e0: 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e  g SSL handshake.
20f0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 64 65  .            (de
2100: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75  fault is <em>tru
2110: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20  e</em>)</dd>.   
2120: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
2130: 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 6f 6e  >-require</stron
2140: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e  g> <em>bool</em>
2150: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
2160: 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c 69  d>Require a vali
2170: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72  d certificate fr
2180: 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 53  om peer during S
2190: 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20  SL handshake... 
21a0: 20 20 20 49 66 20 74 68 69 73 20 69 73 20 73 65     If this is se
21b0: 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20  t to true, then 
21c0: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74  <strong>-request
21d0: 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 74 0a 20  </strong> must. 
21e0: 20 20 20 20 20 20 20 20 20 20 20 61 6c 73 6f 20             also 
21f0: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20  be set to true. 
2200: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2210: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e  false</em>)</dd>
2220: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
2230: 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74 79 6c 65  rong>-securityle
2240: 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  vel</strong> <em
2250: 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64  >integer</em></d
2260: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53  t>.        <dd>S
2270: 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 65  et security leve
2280: 6c 2e 20 4d 75 73 74 20 62 65 20 30 20 74 6f 20  l. Must be 0 to 
2290: 35 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 20  5. The security 
22a0: 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a 09 20  level affects.. 
22b0: 20 20 20 63 69 70 68 65 72 20 73 75 69 74 65 20     cipher suite 
22c0: 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72  encryption algor
22d0: 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 64  ithms, supported
22e0: 20 45 43 43 20 63 75 72 76 65 73 2c 0a 09 20 20   ECC curves,..  
22f0: 20 20 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e    supported sign
2300: 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73  ature algorithms
2310: 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 73  , DH parameter s
2320: 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 74  izes, certificat
2330: 65 0a 09 20 20 20 20 6b 65 79 20 73 69 7a 65 73  e..    key sizes
2340: 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61   and signature a
2350: 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64  lgorithms. The d
2360: 65 66 61 75 6c 74 20 69 73 20 31 2e 0a 09 20 20  efault is 1...  
2370: 20 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69    Level 3 and hi
2380: 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70  gher disable sup
2390: 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e  port for session
23a0: 20 74 69 63 6b 65 74 73 20 61 6e 64 20 6f 6e 6c   tickets and onl
23b0: 79 0a 09 20 20 20 20 61 63 63 65 70 74 20 63 69  y..    accept ci
23c0: 70 68 65 72 20 73 75 69 74 65 73 20 74 68 61 74  pher suites that
23d0: 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64   provide forward
23e0: 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 3e 0a 20   secrecy.</dd>. 
23f0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
2400: 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f  ng>-server</stro
2410: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
2420: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
2430: 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 20  dd>Handshake as 
2440: 73 65 72 76 65 72 20 69 66 20 74 72 75 65 2c 20  server if true, 
2450: 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65 20 61  else handshake a
2460: 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 6c  s.            cl
2470: 69 65 6e 74 2e 20 28 64 65 66 61 75 6c 74 20 69  ient. (default i
2480: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e  s <em>false</em>
2490: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  )</dd>.        <
24a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76  dt><strong>-serv
24b0: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  ername</strong> 
24c0: 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64  <em>host</em></d
24d0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53  t>.        <dd>S
24e0: 70 65 63 69 66 79 20 73 65 72 76 65 72 20 68 6f  pecify server ho
24f0: 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61 76 61  stname. Only ava
2500: 69 6c 61 62 6c 65 20 69 66 20 74 68 65 20 4f 70  ilable if the Op
2510: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 0a 09 20  enSSL library.. 
2520: 20 20 20 74 68 65 20 70 61 63 6b 61 67 65 20 69     the package i
2530: 73 20 6c 69 6e 6b 65 64 20 61 67 61 69 6e 73 74  s linked against
2540: 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 54 4c   supports the TL
2550: 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e  S hostname exten
2560: 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72 20 27 53  sion..    for 'S
2570: 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63  erver Name Indic
2580: 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73  ation' (SNI). Us
2590: 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f  e to name the lo
25a0: 67 69 63 61 6c 20 68 6f 73 74 0a 09 20 20 20 20  gical host..    
25b0: 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 20 74  we are talking t
25c0: 6f 20 61 6e 64 20 65 78 70 65 63 74 69 6e 67 20  o and expecting 
25d0: 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66 6f  a certificate fo
25e0: 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  r.</dd>.        
25f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 73  <dt><strong>-ses
2600: 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e  sion_id</strong>
2610: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
2620: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
2630: 64 3e 53 65 73 73 69 6f 6e 20 69 64 20 74 6f 20  d>Session id to 
2640: 72 65 73 75 6d 65 20 73 65 73 73 69 6f 6e 2e 3c  resume session.<
2650: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
2660: 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f  ><strong>-ssl2</
2670: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
2680: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
2690: 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73     <dd>Enable us
26a0: 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 64 65  e of SSL v2. (de
26b0: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c  fault is <em>fal
26c0: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20  se</em>)</dd>.  
26d0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
26e0: 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67  g>-ssl3 </strong
26f0: 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f  ><em>bool</em></
2700: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
2710: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53  Enable use of SS
2720: 4c 20 76 33 2e 20 28 64 65 66 61 75 6c 74 20 69  L v3. (default i
2730: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e  s <em>false</em>
2740: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  )</dd>.        <
2750: 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31  dt>-<strong>tls1
2760: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
2770: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ol</em></dt>.   
2780: 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20       <dd>Enable 
2790: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 20 28  use of TLS v1. (
27a0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74  default is <em>t
27b0: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20  rue</em>)</dd>. 
27c0: 20 20 20 20 20 20 20 3c 64 74 3e 2d 3c 73 74 72         <dt>-<str
27d0: 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 6f  ong>tls1.1</stro
27e0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
27f0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
2800: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  dd>Enable use of
2810: 20 54 4c 53 20 76 31 2e 31 20 28 64 65 66 61 75   TLS v1.1 (defau
2820: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f  lt is <em>true</
2830: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20  em>)</dd>.      
2840: 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74    <dt>-<strong>t
2850: 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c  ls1.2</strong> <
2860: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
2870: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e  >.        <dd>En
2880: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20  able use of TLS 
2890: 76 31 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73  v1.2 (default is
28a0: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c   <em>true</em>)<
28b0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
28c0: 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 33  >-<strong>tls1.3
28d0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
28e0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ol</em></dt>.   
28f0: 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20       <dd>Enable 
2900: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20  use of TLS v1.3 
2910: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2920: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2930: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63      </dl>.</bloc
2940: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74  kquote>..    <dt
2950: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75  ><a name="tls::u
2960: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a  nimport"><b>tls:
2970: 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69  :unimport </b><i
2980: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
2990: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72  </dt>.    <dd>Pr
29a0: 6f 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65  ovided for symme
29b0: 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74  try to <strong>t
29c0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
29d0: 6e 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20  ng>, this.      
29e0: 75 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c  unstacks the SSL
29f0: 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72  -enabling of a r
2a00: 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e  egular Tcl chann
2a10: 65 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20  el.  An error.  
2a20: 20 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66      is thrown if
2a30: 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20   TLS is not the 
2a40: 74 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e  top stacked chan
2a50: 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 20  nel type.</dd>. 
2a60: 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64     <dt>&nbsp;</d
2a70: 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  t>.    <dt><a na
2a80: 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61  me="tls::handsha
2a90: 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ke"><strong>tls:
2aa0: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f  :handshake</stro
2ab0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c  ng> <em>channel<
2ac0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
2ad0: 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e    <dd>Forces han
2ae0: 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70  dshake to take p
2af0: 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e  lace, and return
2b00: 73 20 30 20 69 66 0a 20 20 20 20 20 20 20 20 68  s 0 if.        h
2b10: 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c  andshake is stil
2b20: 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e  l in progress (n
2b30: 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72  on-blocking), or
2b40: 20 31 20 69 66 0a 20 20 20 20 20 20 20 20 74 68   1 if.        th
2b50: 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 20  e handshake was 
2b60: 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20 74  successful. If t
2b70: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69  he handshake fai
2b80: 6c 65 64 0a 20 20 20 20 20 20 20 20 74 68 69 73  led.        this
2b90: 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 68   routine will th
2ba0: 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64  row an error.</d
2bb0: 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70  d>.    <dt>&nbsp
2bc0: 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c  ;</dt>.    <dt><
2bd0: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61  a name="tls::sta
2be0: 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  tus"><strong>tls
2bf0: 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67  ::status</strong
2c00: 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63 61  >.    <em>?-loca
2c10: 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c  l? channel</em><
2c20: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  /a></dt>.    <dd
2c30: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 72  >Returns the cur
2c40: 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 65  rent certificate
2c50: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
2c60: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 20  L channel. The. 
2c70: 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 69 73         result is
2c80: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76   a list of key-v
2c90: 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 72  alue pairs descr
2ca0: 69 62 69 6e 67 20 74 68 65 0a 20 20 20 20 20 20  ibing the.      
2cb0: 20 20 63 6f 6e 6e 65 63 74 65 64 20 70 65 65 72    connected peer
2cc0: 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c 74 20  . If the result 
2cd0: 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74  is an empty list
2ce0: 20 74 68 65 6e 20 74 68 65 0a 20 20 20 20 20 20   then the.      
2cf0: 20 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20    SSL handshake 
2d00: 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70  has not yet comp
2d10: 6c 65 74 65 64 2e 0a 20 20 20 20 20 20 20 20 49  leted..        I
2d20: 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d  f <em>-local</em
2d30: 3e 20 69 73 20 67 69 76 65 6e 2c 20 74 68 65 6e  > is given, then
2d40: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
2d50: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a 20 20 20   information.   
2d60: 20 20 20 20 20 69 73 20 74 68 65 20 6f 6e 65 20       is the one 
2d70: 75 73 65 64 20 6c 6f 63 61 6c 6c 79 2e 3c 2f 64  used locally.</d
2d80: 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e  d>..<blockquote>
2d90: 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20  .    <dl>.      
2da0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c    <dt><strong>al
2db0: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  l</strong> <em>s
2dc0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
2dd0: 20 20 20 20 20 20 20 20 3c 64 64 3e 44 75 6d 70          <dd>Dump
2de0: 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63   of all certific
2df0: 61 74 65 20 64 61 74 61 2e 3c 2f 64 64 3e 0a 20  ate data.</dd>. 
2e00: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
2e10: 6e 67 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f  ng>version</stro
2e20: 6e 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65  ng> <em>value</e
2e30: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
2e40: 3c 64 64 3e 54 68 65 20 63 65 72 74 69 66 69 63  <dd>The certific
2e50: 61 74 69 6f 6e 20 76 65 72 73 69 6f 6e 3c 2f 64  ation version</d
2e60: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
2e70: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65  strong>signature
2e80: 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e  Algorithm</stron
2e90: 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d  g> <em>algorithm
2ea0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
2eb0: 20 20 20 3c 64 64 3e 43 69 70 68 65 72 20 61 6c     <dd>Cipher al
2ec0: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72  gorithm used for
2ed0: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67   certificate sig
2ee0: 6e 61 74 75 72 65 2e 3c 2f 64 64 3e 0a 20 20 20  nature.</dd>.   
2ef0: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
2f00: 3e 64 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e  >digest</strong>
2f10: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d   <em>version</em
2f20: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
2f30: 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  dd>Certificate s
2f40: 69 67 6e 61 74 75 72 65 20 64 69 67 65 73 74 2e  ignature digest.
2f50: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
2f60: 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63  t><strong>public
2f70: 4b 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74  KeyAlgorithm</st
2f80: 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69  rong> <em>algori
2f90: 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  thm</em></dt>.  
2fa0: 20 20 20 20 20 20 3c 64 64 3e 43 65 72 74 69 66        <dd>Certif
2fb0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
2fc0: 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72  public key algor
2fd0: 69 74 68 6d 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  ithm.</dd>.     
2fe0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70     <dt><strong>p
2ff0: 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 6f 6e 67  ublicKey</strong
3000: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d  > <em>string</em
3010: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
3020: 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  dd>Certificate s
3030: 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20  ignature public 
3040: 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  key.</dd>.      
3050: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69    <dt><strong>bi
3060: 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ts</strong> <em>
3070: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  n</em></dt>.    
3080: 20 20 20 20 3c 64 64 3e 4e 75 6d 62 65 72 20 6f      <dd>Number o
3090: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  f bits used for 
30a0: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  certificate sign
30b0: 61 74 75 72 65 20 6b 65 79 3c 2f 64 64 3e 0a 20  ature key</dd>. 
30c0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
30d0: 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f  ng>self_signed</
30e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
30f0: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ean</em></dt>.  
3100: 20 20 20 20 20 20 3c 64 64 3e 49 73 20 63 65 72        <dd>Is cer
3110: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
3120: 72 65 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c  re self signed.<
3130: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
3140: 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68 61  ><strong>sha1_ha
3150: 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  sh</strong> <em>
3160: 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  hash</em></dt>. 
3170: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 53         <dd>The S
3180: 48 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20  HA1 hash of the 
3190: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64  certificate.</dd
31a0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
31b0: 74 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 61 73  trong>sha256_has
31c0: 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68  h</strong> <em>h
31d0: 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ash</em></dt>.  
31e0: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 53 48        <dd>The SH
31f0: 41 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 65  A256 hash of the
3200: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3210: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
3220: 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f  strong>subject</
3230: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f  strong> <em>dn</
3240: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
3250: 20 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67   <dd>The disting
3260: 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29  uished name (DN)
3270: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63   of the certific
3280: 61 74 65 20 73 75 62 6a 65 63 74 2e 3c 2f 64 64  ate subject.</dd
3290: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
32a0: 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74  trong>issuer</st
32b0: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d  rong> <em>dn</em
32c0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
32d0: 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69  dd>The distingui
32e0: 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f  shed name (DN) o
32f0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
3300: 65 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20  e issuer.</dd>. 
3310: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
3320: 6e 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74  ng>notBefore</st
3330: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f  rong> <em>date</
3340: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
3350: 20 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64   <dd>The begin d
3360: 61 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69  ate for the vali
3370: 64 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 74  dity of the cert
3380: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20  ificate.</dd>.  
3390: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
33a0: 67 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f  g>notAfter</stro
33b0: 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d  ng> <em>date</em
33c0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
33d0: 64 64 3e 54 68 65 20 65 78 70 69 72 79 20 64 61  dd>The expiry da
33e0: 74 65 20 66 6f 72 20 74 68 65 20 63 65 72 74 69  te for the certi
33f0: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20  ficate.</dd>.   
3400: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
3410: 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 73  >serialNumber</s
3420: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
3430: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
3440: 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75  dd>The serial nu
3450: 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 72 74  mber of the cert
3460: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20  ificate.</dd>.  
3470: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
3480: 67 3e 63 65 72 74 69 66 69 63 61 74 65 3c 2f 73  g>certificate</s
3490: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65 72 74 3c  trong> <em>cert<
34a0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
34b0: 20 20 3c 64 64 3e 54 68 65 20 50 45 4d 20 65 6e    <dd>The PEM en
34c0: 63 6f 64 65 64 20 63 65 72 74 69 66 69 63 61 74  coded certificat
34d0: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  e.</dd>.        
34e0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 75 6d 5f  <dt><strong>num_
34f0: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f  extensions</stro
3500: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f  ng> <em>n</em></
3510: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
3520: 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66  Number of certif
3530: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73  icate extensions
3540: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
3550: 64 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 74 65 6e  dt><strong>exten
3560: 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c  sions</strong> <
3570: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74  em>list</em></dt
3580: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4c 69  >.        <dd>Li
3590: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  st of certificat
35a0: 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65  e extension name
35b0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  s.</dd>.        
35c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 72  <dt><strong>peer
35d0: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  name</strong> <e
35e0: 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>name</em></dt>
35f0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65  .        <dd>The
3600: 20 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74   peername from t
3610: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  he certificate.<
3620: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
3630: 3e 3c 73 74 72 6f 6e 67 3e 73 62 69 74 73 3c 2f  ><strong>sbits</
3640: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65  strong> <em>n</e
3650: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
3660: 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f  <dd>The number o
3670: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  f bits used for 
3680: 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e  the session key.
3690: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
36a0: 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72  t><strong>cipher
36b0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69  </strong> <em>ci
36c0: 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  pher</em></dt>. 
36d0: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 63         <dd>The c
36e0: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e  urrent cipher in
36f0: 20 75 73 65 20 62 65 74 77 65 65 6e 20 74 68 65   use between the
3700: 20 63 6c 69 65 6e 74 20 61 6e 64 0a 20 20 20 20   client and.    
3710: 20 20 20 20 20 20 20 20 73 65 72 76 65 72 20 63          server c
3720: 68 61 6e 6e 65 6c 73 2e 3c 2f 64 64 3e 0a 20 20  hannels.</dd>.  
3730: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
3740: 67 3e 76 65 72 69 66 69 63 61 74 69 6f 6e 3c 65  g>verification<e
3750: 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64  m>result</em></d
3760: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43  t>.        <dd>C
3770: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66  ertificate verif
3780: 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 2e 3c  ication result.<
3790: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
37a0: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
37b0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
37c0: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  col</em></dt>.  
37d0: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 70 72        <dd>The pr
37e0: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20  otocol selected 
37f0: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f  after Applicatio
3800: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
3810: 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f  ..    Negotiatio
3820: 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 20  n (ALPN).</dd>. 
3830: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
3840: 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72  ng>protocol</str
3850: 6f 6e 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f  ong> <em>value</
3860: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
3870: 20 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f   <dd>The protoco
3880: 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66  l version used f
3890: 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  or the connectio
38a0: 6e 3a 0a 09 20 20 53 53 4c 76 32 2c 20 53 53 4c  n:..  SSLv2, SSL
38b0: 76 33 2c 20 54 4c 53 76 31 2c 20 54 4c 53 76 31  v3, TLSv1, TLSv1
38c0: 2e 31 2c 20 54 4c 53 76 31 2e 32 2c 20 54 4c 53  .1, TLSv1.2, TLS
38d0: 76 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e  v1.3, or unknown
38e0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
38f0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74  t><strong>signat
3900: 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68 6d  ureHashAlgorithm
3910: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74  </strong> <em>st
3920: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  ring</em></dt>. 
3930: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 73         <dd>The s
3940: 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 61 6c  ignature hash al
3950: 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 20 20  gorithm.</dd>.  
3960: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
3970: 67 3e 73 69 67 6e 61 74 75 72 65 5f 74 79 70 65  g>signature_type
3980: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79  </strong> <em>ty
3990: 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  pe</em></dt>.   
39a0: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 73 69 67       <dd>The sig
39b0: 6e 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75  nature type valu
39c0: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  e.</dd>.        
39d0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a  <dt><strong>subj
39e0: 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f  ectAltName</stro
39f0: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d  ng> <em>list</em
3a00: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
3a10: 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f  dd>List of all o
3a20: 66 20 74 68 65 20 61 6c 74 65 72 6e 61 74 69 76  f the alternativ
3a30: 65 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20  e domain names, 
3a40: 73 75 62 20 64 6f 6d 61 69 6e 73 2c 0a 09 20 20  sub domains,..  
3a50: 20 20 61 6e 64 20 49 50 20 61 64 64 72 65 73 73    and IP address
3a60: 65 73 20 74 68 61 74 20 61 72 65 20 73 65 63 75  es that are secu
3a70: 72 65 64 20 62 79 20 74 68 65 20 63 65 72 74 69  red by the certi
3a80: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20  ficate.</dd>.   
3a90: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
3aa0: 3e 63 61 5f 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e  >ca_names</stron
3ab0: 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e  g> <em>list</em>
3ac0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
3ad0: 64 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43 65  d>List of the Ce
3ae0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
3af0: 69 74 69 65 73 20 75 73 65 64 20 74 6f 20 63 72  ities used to cr
3b00: 65 61 74 65 20 74 68 65 20 63 65 72 74 69 66 69  eate the certifi
3b10: 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  cate.</dd>.    <
3b20: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74  /dl>.</blockquot
3b30: 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  e>..    <dt><a n
3b40: 61 6d 65 3d 22 74 6c 73 3a 3a 63 6f 6e 6e 65 63  ame="tls::connec
3b50: 74 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  tion"><strong>tl
3b60: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 73  s::connection</s
3b70: 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 63  trong>.    <em>c
3b80: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c  hannel</em></a><
3b90: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74  /dt>.    <dd>Ret
3ba0: 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74  urns the current
3bb0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74   connection stat
3bc0: 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61  us of an SSL cha
3bd0: 6e 6e 65 6c 2e 20 54 68 65 0a 20 20 20 20 20 20  nnel. The.      
3be0: 20 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69    result is a li
3bf0: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20  st of key-value 
3c00: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67  pairs describing
3c10: 20 74 68 65 0a 20 20 20 20 20 20 20 20 63 6f 6e   the.        con
3c20: 6e 65 63 74 65 64 20 70 65 65 72 2e 3c 2f 64 64  nected peer.</dd
3c30: 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >..<blockquote>.
3c40: 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20      <dl>.       
3c50: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61   <dt><strong>sta
3c60: 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  te</strong> <em>
3c70: 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  state</em></dt>.
3c80: 20 20 20 20 20 20 20 20 3c 64 64 3e 53 74 61 74          <dd>Stat
3c90: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74  e of the connect
3ca0: 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ion.</dd>.      
3cb0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65    <dt><strong>se
3cc0: 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67  rvername</strong
3cd0: 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c  > <em>name</em><
3ce0: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
3cf0: 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65  >The name of the
3d00: 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65   connected to se
3d10: 72 76 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  rver.</dd>.     
3d20: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70     <dt><strong>p
3d30: 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e  rotocol</strong>
3d40: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d   <em>version</em
3d50: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
3d60: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  dd>The protocol 
3d70: 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72  version used for
3d80: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a   the connection:
3d90: 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c 33  ..    SSL2, SSL3
3da0: 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20  , TLS1, TLS1.1, 
3db0: 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20  TLS1.2, TLS1.3, 
3dc0: 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e  or unknown.</dd>
3dd0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
3de0: 72 6f 6e 67 3e 72 65 6e 65 67 6f 74 69 61 74 69  rong>renegotiati
3df0: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  on</strong> <em>
3e00: 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  state</em></dt>.
3e10: 20 20 20 20 20 20 20 20 3c 64 64 3e 57 68 65 74          <dd>Whet
3e20: 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e  her protocol ren
3e30: 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75  egotiation is su
3e40: 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c  pported or not.<
3e50: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
3e60: 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 75 72 69 74  ><strong>securit
3e70: 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20  ylevel</strong> 
3e80: 3c 65 6d 3e 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f  <em>level</em></
3e90: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
3ea0: 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76  The security lev
3eb0: 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65  el used for sele
3ec0: 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73  ction of ciphers
3ed0: 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e  , key size, etc.
3ee0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
3ef0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f  t><strong>sessio
3f00: 6e 5f 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67  n_reused</strong
3f10: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65  > <em>boolean</e
3f20: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
3f30: 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20  <dd>Whether the 
3f40: 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e  session has been
3f50: 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c   reused or not.<
3f60: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
3f70: 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76  ><strong>is_serv
3f80: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
3f90: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74  boolean</em></dt
3fa0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 57 68  >.        <dd>Wh
3fb0: 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63  ether the connec
3fc0: 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 64 20  tion configured 
3fd0: 61 73 20 61 20 73 65 72 76 65 72 20 6f 72 20 63  as a server or c
3fe0: 6c 69 65 6e 74 20 28 66 61 6c 73 65 29 2e 3c 2f  lient (false).</
3ff0: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
4000: 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f  <strong>cipher</
4010: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68  strong> <em>ciph
4020: 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  er</em></dt>.   
4030: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 63 75 72       <dd>The cur
4040: 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75  rent cipher in u
4050: 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65  se for the conne
4060: 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20  ction.</dd>.    
4070: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
4080: 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 73  standard_name</s
4090: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c  trong> <em>name<
40a0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
40b0: 20 20 3c 64 64 3e 54 68 65 20 73 74 61 6e 64 61    <dd>The standa
40c0: 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 63  rd RFC name of c
40d0: 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20  ipher.</dd>.    
40e0: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
40f0: 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  bits</strong> <e
4100: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  m>n</em></dt>.  
4110: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6e 75        <dd>The nu
4120: 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 65  mber of processe
4130: 64 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  d bits used for 
4140: 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20  cipher.</dd>.   
4150: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
4160: 3e 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 74  >secret_bits</st
4170: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e  rong> <em>n</em>
4180: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
4190: 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20  d>The number of 
41a0: 73 65 63 72 65 74 20 62 69 74 73 20 75 73 65 64  secret bits used
41b0: 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 64   for cipher.</dd
41c0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
41d0: 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 73 69 6f  trong>min_versio
41e0: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76  n</strong> <em>v
41f0: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  ersion</em></dt>
4200: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65  .        <dd>The
4210: 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f   minimum protoco
4220: 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69  l version for ci
4230: 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  pher.</dd>.     
4240: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69     <dt><strong>i
4250: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69  d</strong> <em>i
4260: 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  d</em></dt>.    
4270: 20 20 20 20 3c 64 64 3e 54 68 65 20 4f 70 65 6e      <dd>The Open
4280: 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f  SSL cipher id.</
4290: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
42a0: 3c 73 74 72 6f 6e 67 3e 64 65 73 63 72 69 70 74  <strong>descript
42b0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ion</strong> <em
42c0: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
42d0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 41 20  >.        <dd>A 
42e0: 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e  text description
42f0: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c   of the cipher.<
4300: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
4310: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
4320: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
4330: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  col</em></dt>.  
4340: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 70 72        <dd>The pr
4350: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20  otocol selected 
4360: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f  after Applicatio
4370: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
4380: 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f  ..    Negotiatio
4390: 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 20  n (ALPN).</dd>. 
43a0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
43b0: 6e 67 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 73 74  ng>resumable</st
43c0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61  rong> <em>boolea
43d0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  n</em></dt>.    
43e0: 20 20 20 20 3c 64 64 3e 43 61 6e 20 74 68 65 20      <dd>Can the 
43f0: 73 65 73 73 69 6f 6e 20 62 65 20 72 65 73 75 6d  session be resum
4400: 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a  ed or not.</dd>.
4410: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
4420: 6f 6e 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f  ong>start_time</
4430: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f  strong> <em>seco
4440: 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  nds</em></dt>.  
4450: 20 20 20 20 20 20 3c 64 64 3e 54 69 6d 65 20 73        <dd>Time s
4460: 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61  ince session sta
4470: 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20  rted in seconds 
4480: 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64  since epoch.</dd
4490: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
44a0: 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73  trong>timeout</s
44b0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e  trong> <em>secon
44c0: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ds</em></dt>.   
44d0: 20 20 20 20 20 3c 64 64 3e 4d 61 78 20 64 75 72       <dd>Max dur
44e0: 61 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e  ation of session
44f0: 20 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f   in seconds befo
4500: 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64  re time-out.</dd
4510: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
4520: 74 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65 3c 2f  trong>lifetime</
4530: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f  strong> <em>seco
4540: 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  nds</em></dt>.  
4550: 20 20 20 20 20 20 3c 64 64 3e 53 65 73 73 69 6f        <dd>Sessio
4560: 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d  n ticket lifetim
4570: 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64  e hint in second
4580: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  s.</dd>.        
4590: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73  <dt><strong>sess
45a0: 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20  ion_id</strong> 
45b0: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  <em>string</em><
45c0: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
45d0: 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20  >Unique session 
45e0: 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65  id for use in re
45f0: 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69  suming the sessi
4600: 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  on.</dd>.       
4610: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73   <dt><strong>ses
4620: 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72  sion_ticket</str
4630: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c  ong> <em>string<
4640: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
4650: 20 20 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73    <dd>Unique ses
4660: 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20  sion ticket for 
4670: 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20  use in resuming 
4680: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64  the session.</dd
4690: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
46a0: 74 72 6f 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70  trong>ticket_app
46b0: 5f 64 61 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c  _data</strong> <
46c0: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f  em>string</em></
46d0: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
46e0: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74  Unique session t
46f0: 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f  icket applicatio
4700: 6e 20 64 61 74 61 2e 3c 2f 64 64 3e 0a 20 20 20  n data.</dd>.   
4710: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
4720: 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72  >master_key</str
4730: 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f  ong> <em>binary_
4740: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
4750: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 55 6e 69  .        <dd>Uni
4760: 71 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74  que session mast
4770: 65 72 20 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20  er key.</dd>.   
4780: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
4790: 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 73 74  >compression</st
47a0: 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f  rong> <em>mode</
47b0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
47c0: 20 3c 64 64 3e 43 6f 6d 70 72 65 73 73 69 6f 6e   <dd>Compression
47d0: 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 20 20   method.</dd>.  
47e0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
47f0: 67 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72  g>expansion</str
4800: 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65  ong> <em>mode</e
4810: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
4820: 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65  <dd>Expansion me
4830: 74 68 6f 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 20  thod.</dd>.     
4840: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73     <dt><strong>s
4850: 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64  ession_cache_mod
4860: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d  e</strong> <em>m
4870: 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ode</em></dt>.  
4880: 20 20 20 20 20 20 3c 64 64 3e 53 65 72 76 65 72        <dd>Server
4890: 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69   cache mode (cli
48a0: 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20  ent, server, or 
48b0: 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 20  both).</dd>.    
48c0: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f  </dl>.</blockquo
48d0: 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20  te>..    <dt><a 
48e0: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65  name="tls::ciphe
48f0: 72 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  rs"><strong>tls:
4900: 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67  :ciphers</strong
4910: 3e 20 0a 20 20 20 20 3c 65 6d 3e 70 72 6f 74 6f  > .    <em>proto
4920: 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73  col ?verbose? ?s
4930: 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f  upported?</em></
4940: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
4950: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
4960: 66 20 73 75 70 70 6f 72 74 65 64 20 63 69 70 68  f supported ciph
4970: 65 72 73 20 61 76 61 69 6c 61 62 6c 65 20 66 6f  ers available fo
4980: 72 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  r <em>protocol</
4990: 65 6d 3e 2c 0a 20 20 20 20 20 20 20 20 77 68 65  em>,.        whe
49a0: 72 65 20 70 72 6f 74 6f 63 6f 6c 20 6d 75 73 74  re protocol must
49b0: 20 62 65 20 6f 6e 65 20 6f 66 20 3c 62 3e 73 73   be one of <b>ss
49c0: 6c 32 2c 20 73 73 6c 33 2c 20 74 6c 73 31 2c 20  l2, ssl3, tls1, 
49d0: 74 6c 73 31 2e 31 2c 0a 09 74 6c 73 31 2e 32 2c  tls1.1,..tls1.2,
49e0: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 74 6c 73 31 2e  </b> or <b>tls1.
49f0: 33 3c 2f 62 3e 2e 20 49 66 20 3c 65 6d 3e 76 65  3</b>. If <em>ve
4a00: 72 62 6f 73 65 3c 2f 65 6d 3e 20 69 73 20 73 70  rbose</em> is sp
4a10: 65 63 69 66 69 65 64 20 61 73 0a 09 74 72 75 65  ecified as..true
4a20: 20 74 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c   then a verbose,
4a30: 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 20   human readable 
4a40: 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64  list is returned
4a50: 20 77 69 74 68 0a 09 61 64 64 69 74 69 6f 6e 61   with..additiona
4a60: 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e  l information on
4a70: 20 74 68 65 20 63 69 70 68 65 72 2e 20 49 66 20   the cipher. If 
4a80: 3c 65 6d 3e 73 75 70 70 6f 72 74 65 64 3c 2f 65  <em>supported</e
4a90: 6d 3e 0a 09 69 73 20 73 70 65 63 69 66 69 65 64  m>..is specified
4aa0: 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f   as true, then o
4ab0: 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20  nly the ciphers 
4ac0: 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72  supported for pr
4ad0: 6f 74 6f 63 6f 6c 0a 09 77 69 6c 6c 20 62 65 20  otocol..will be 
4ae0: 6c 69 73 74 65 64 2e 3c 2f 64 64 3e 0a 0a 20 20  listed.</dd>..  
4af0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
4b00: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c  ls::protocols"><
4b10: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74  strong>tls::prot
4b20: 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f  ocols</strong></
4b30: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
4b40: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
4b50: 66 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74  f supported prot
4b60: 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20 76 61 6c  ocols. Valid val
4b70: 75 65 73 20 61 72 65 3a 0a 09 3c 62 3e 73 73 6c  ues are:..<b>ssl
4b80: 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73 6c 33 3c 2f  2</b>, <b>ssl3</
4b90: 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c 2f 62 3e 2c  b>, <b>tls1</b>,
4ba0: 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20   <b>tls1.1</b>, 
4bb0: 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 0a 09  <b>tls1.2</b>,..
4bc0: 61 6e 64 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62  and <b>tls1.3</b
4bd0: 3e 2e 20 45 78 61 63 74 20 6c 69 73 74 20 64 65  >. Exact list de
4be0: 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c  pends on OpenSSL
4bf0: 20 76 65 72 73 69 6f 6e 20 61 6e 64 0a 09 63 6f   version and..co
4c00: 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 73  mpile time flags
4c10: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e  .</dd>..    <dt>
4c20: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 76 65  <a name="tls::ve
4c30: 72 73 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74  rsion"><strong>t
4c40: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 74 72  ls::version</str
4c50: 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  ong></a></dt>.  
4c60: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68    <dd>Returns th
4c70: 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f  e OpenSSL versio
4c80: 6e 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 3c  n string.</dd>.<
4c90: 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  /dl>..<h3><a nam
4ca0: 65 3d 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  e="CALLBACK OPTI
4cb0: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
4cc0: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  TIONS</a></h3>..
4cd0: 3c 70 3e 0a 41 73 20 69 6e 64 69 63 61 74 65 64  <p>.As indicated
4ce0: 20 61 62 6f 76 65 2c 20 69 6e 64 69 76 69 64 75   above, individu
4cf0: 61 6c 20 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20  al channels can 
4d00: 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f  be given their o
4d10: 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20  wn callbacks.to 
4d20: 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69  handle intermedi
4d30: 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62  ate processing b
4d40: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69  y the OpenSSL li
4d50: 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65  brary, using the
4d60: 0a 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65  .<em>-command</e
4d70: 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73  m> and <em>-pass
4d80: 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e  word</em> option
4d90: 73 20 70 61 73 73 65 64 20 74 6f 20 65 69 74 68  s passed to eith
4da0: 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c  er of.<strong>tl
4db0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  s::socket</stron
4dc0: 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c  g> or <strong>tl
4dd0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
4de0: 67 3e 2e 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b  g>..</p>..<block
4df0: 71 75 6f 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20  quote>.<dl>..   
4e00: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f   <dt><strong>-co
4e10: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  mmand</strong> <
4e20: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
4e30: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09  </dt>.    <dd>..
4e40: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63  Invokes the spec
4e50: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61  ified <em>callba
4e60: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 61  ck</em> script a
4e70: 74 0a 09 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  t..several point
4e80: 73 20 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65  s during the Ope
4e90: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a  nSSL handshake..
4ea0: 09 45 78 63 65 70 74 20 61 73 20 69 6e 64 69 63  .Except as indic
4eb0: 61 74 65 64 20 62 65 6c 6f 77 2c 20 76 61 6c 75  ated below, valu
4ec0: 65 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d  es returned from
4ed0: 20 74 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61   the..callback a
4ee0: 72 65 20 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67  re ignored...Arg
4ef0: 75 6d 65 6e 74 73 20 61 70 70 65 6e 64 65 64 20  uments appended 
4f00: 74 6f 20 74 68 65 20 73 63 72 69 70 74 20 75 70  to the script up
4f10: 6f 6e 20 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65  on callback take
4f20: 20 6f 6e 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c   one of the..fol
4f30: 6c 6f 77 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09  lowing forms:...
4f40: 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c  <br>..<br>...<dl
4f50: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72  >...<dt>..  <str
4f60: 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67  ong>alpn</strong
4f70: 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  > <em>protocol</
4f80: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
4f90: 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c  ..  For servers,
4fa0: 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61   this form of ca
4fb0: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
4fc0: 64 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e  d when the clien
4fd0: 74 20 41 4c 50 4e 0a 09 20 20 68 65 61 64 65 72  t ALPN..  header
4fe0: 20 69 73 20 72 65 63 65 69 76 65 64 20 61 6e 64   is received and
4ff0: 20 74 68 65 20 66 69 72 73 74 20 2d 61 6c 70 6e   the first -alpn
5000: 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f   specified proto
5010: 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 0a 09 20  col common to.. 
5020: 20 74 68 65 20 62 6f 74 68 20 74 68 65 20 63 6c   the both the cl
5030: 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72 20  ient and server 
5040: 69 73 20 73 65 6c 65 63 74 65 64 2e 20 49 66 20  is selected. If 
5050: 6e 6f 6e 65 2c 20 74 68 65 20 66 69 72 73 74 0a  none, the first.
5060: 09 20 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66  .  client specif
5070: 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20  ied protocol is 
5080: 75 73 65 64 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c  used...</dd>...<
5090: 62 72 3e 0a 0a 3c 21 2d 2d 09 54 68 69 73 20 66  br>..<!--.This f
50a0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
50b0: 69 73 20 64 69 73 61 62 6c 65 64 2e 0a 0a 09 3c  is disabled....<
50c0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65  dt>..  <strong>e
50d0: 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  rror</strong> <e
50e0: 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67  m>channel messag
50f0: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c  e</em>..</dt>..<
5100: 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d  dd>..  The <em>m
5110: 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75  essage</em> argu
5120: 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e  ment contains an
5130: 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 67   error message g
5140: 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 74  enerated..  by t
5150: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
5160: 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 45 52 52  ion..  <code>ERR
5170: 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74  _reason_error_st
5180: 72 69 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09  ring()</code>...
5190: 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 2d 2d 3e  </dd>...<br>.-->
51a0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
51b0: 6e 67 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67  ng>hello</strong
51c0: 3e 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65  > <em>servername
51d0: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64  </em>..</dt>..<d
51e0: 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72  d>..  For server
51f0: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20  s, this form of 
5200: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
5210: 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65 6e  ked during clien
5220: 74 20 68 65 6c 6c 6f 0a 09 20 20 6d 65 73 73 61  t hello..  messa
5230: 67 65 20 70 72 6f 63 65 73 73 69 6e 67 2e 0a 09  ge processing...
5240: 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c  </dd>...<br>...<
5250: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69  dt>..  <strong>i
5260: 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  nfo</strong> <em
5270: 3e 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d  >channel major m
5280: 69 6e 6f 72 20 6d 65 73 73 61 67 65 3c 2f 65 6d  inor message</em
5290: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09  >..</dt>..<dd>..
52a0: 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63    This form of c
52b0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
52c0: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ed by the OpenSS
52d0: 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63  L function..  <c
52e0: 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f  ode>SSL_CTX_set_
52f0: 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c  info_callback()<
5300: 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a  /code>...  <br>.
5310: 09 20 20 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72  .  The <em>major
5320: 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69  </em> and <em>mi
5330: 6e 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e  nor</em> argumen
5340: 74 73 20 61 72 65 20 75 73 65 64 20 74 6f 0a 09  ts are used to..
5350: 20 20 72 65 70 72 65 73 65 6e 74 20 74 68 65 20    represent the 
5360: 73 74 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f  state informatio
5370: 6e 20 62 69 74 6d 61 73 6b 2e 0a 09 20 20 3c 64  n bitmask...  <d
5380: 6c 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 62  l>..  <dt>Possib
5390: 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65  le values for <e
53a0: 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65  m>major</em> are
53b0: 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63  :</dt>..  <dd><c
53c0: 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61  ode>handshake, a
53d0: 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61  lert, connect, a
53e0: 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64  ccept</code>.</d
53f0: 64 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 62  d>..  <dt>Possib
5400: 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65  le values for <e
5410: 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65  m>minor</em> are
5420: 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63  :</dt>..  <dd><c
5430: 6f 64 65 3e 73 74 61 72 74 2c 20 64 6f 6e 65 2c  ode>start, done,
5440: 20 72 65 61 64 2c 20 77 72 69 74 65 2c 20 6c 6f   read, write, lo
5450: 6f 70 2c 20 65 78 69 74 3c 2f 63 6f 64 65 3e 2e  op, exit</code>.
5460: 3c 2f 64 64 3e 0a 09 20 20 3c 2f 64 6c 3e 0a 09  </dd>..  </dl>..
5470: 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67    The <em>messag
5480: 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20  e</em> argument 
5490: 69 73 20 61 20 64 65 73 63 72 69 70 74 69 76 65  is a descriptive
54a0: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61   string which ma
54b0: 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 65  y..  be generate
54c0: 64 20 65 69 74 68 65 72 20 62 79 0a 09 20 20 3c  d either by..  <
54d0: 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73  code>SSL_state_s
54e0: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f  tring_long()</co
54f0: 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f  de> or by..  <co
5500: 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73  de>SSL_alert_des
5510: 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c  c_string_long()<
5520: 2f 63 6f 64 65 3e 2c 0a 09 20 20 64 65 70 65 6e  /code>,..  depen
5530: 64 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 74 2e  ding on context.
5540: 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a  ..</dd>...<br>..
5550: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67  .<dt>..  <strong
5560: 3e 73 65 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67  >session</strong
5570: 3e 20 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64  > <em>session_id
5580: 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65   ticket lifetime
5590: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64  </em>..</dt>..<d
55a0: 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20  d>..  This form 
55b0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69  of callback is i
55c0: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70  nvoked by the Op
55d0: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09  enSSL function..
55e0: 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f    <code>SSL_CTX_
55f0: 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28  sess_set_new_cb(
5600: 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65  )</code>...  Whe
5610: 72 65 20 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69  re <em>session_i
5620: 64 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 63 75  d</em> is the cu
5630: 72 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 64  rrent session id
5640: 65 6e 74 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d  entifier,..  <em
5650: 3e 74 69 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20  >ticket</em> is 
5660: 74 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b  the session tick
5670: 65 74 20 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d  et info, and <em
5680: 3e 6c 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09  >lifetime</em>..
5690: 20 20 69 73 20 74 68 65 20 74 68 65 20 74 69 63    is the the tic
56a0: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20  ket lifetime in 
56b0: 73 65 63 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a  seconds...</dd>.
56c0: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20  ..<br>...<dt>.. 
56d0: 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74   <strong>sni</st
56e0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 72 76 65 72  rong> <em>server
56f0: 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e  name</em>..</dt>
5700: 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65  ..<dd>..  For se
5710: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d  rvers, this form
5720: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20   of callback is 
5730: 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65  invoked when the
5740: 20 53 4e 49 20 68 65 61 64 65 72 0a 09 20 20 66   SNI header..  f
5750: 72 6f 6d 20 74 68 65 20 63 6c 69 65 6e 74 20 69  rom the client i
5760: 73 20 72 65 63 65 69 76 65 64 2e 20 57 68 65 72  s received. Wher
5770: 65 20 3c 69 3e 73 65 72 76 65 72 6e 61 6d 65 3c  e <i>servername<
5780: 2f 69 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e  /i> is the clien
5790: 74 0a 09 20 20 73 70 65 63 69 66 69 65 64 20 73  t..  specified s
57a0: 65 72 76 65 72 6e 61 6d 65 2e 20 54 68 69 73 20  ervername. This 
57b0: 69 73 20 75 73 65 64 20 77 68 65 6e 20 61 20 73  is used when a s
57c0: 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d  erver supports m
57d0: 75 6c 74 69 70 6c 65 0a 09 20 20 6e 61 6d 65 73  ultiple..  names
57e0: 2c 20 73 6f 20 74 68 65 20 72 69 67 68 74 20 63  , so the right c
57f0: 65 72 74 69 66 69 63 61 74 65 20 63 61 6e 20 62  ertificate can b
5800: 65 20 75 73 65 64 2e 0a 09 3c 2f 64 64 3e 0a 0a  e used...</dd>..
5810: 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64  .<br>..<br>...<d
5820: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 76 65  t>..  <strong>ve
5830: 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  rify</strong> <e
5840: 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70 74 68 20  m>channel depth 
5850: 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f  cert status erro
5860: 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c  r</em>..</dt>..<
5870: 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d  dd>..  This form
5880: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20   of callback is 
5890: 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53  invoked by OpenS
58a0: 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63 65  SL when a new ce
58b0: 72 74 69 66 69 63 61 74 65 0a 09 20 20 69 73 20  rtificate..  is 
58c0: 72 65 63 65 69 76 65 64 20 66 72 6f 6d 20 74 68  received from th
58d0: 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77  e peer. It allow
58e0: 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20  s the client to 
58f0: 63 68 65 63 6b 20 74 68 65 0a 09 20 20 63 65 72  check the..  cer
5900: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63  tificate verific
5910: 61 74 69 6f 6e 20 72 65 73 75 6c 74 20 61 6e 64  ation result and
5920: 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 20   choose whether 
5930: 74 6f 20 63 6f 6e 74 69 6e 75 65 20 6f 72 20 6e  to continue or n
5940: 6f 74 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54  ot...  <br>..  T
5950: 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d  he <em>depth</em
5960: 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e  > argument is an
5970: 20 69 6e 74 65 67 65 72 20 72 65 70 72 65 73 65   integer represe
5980: 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 63 75 72  nting the..  cur
5990: 72 65 6e 74 20 64 65 70 74 68 20 6f 6e 20 74 68  rent depth on th
59a0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68  e certificate ch
59b0: 61 69 6e 2c 20 77 69 74 68 0a 09 20 20 3c 63 6f  ain, with..  <co
59c0: 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 61 73 20 74  de>0</code> as t
59d0: 68 65 20 73 75 62 6a 65 63 74 20 63 65 72 74 69  he subject certi
59e0: 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 65  ficate and highe
59f0: 72 20 76 61 6c 75 65 73 0a 09 20 20 64 65 6e 6f  r values..  deno
5a00: 74 69 6e 67 20 70 72 6f 67 72 65 73 73 69 76 65  ting progressive
5a10: 6c 79 20 6d 6f 72 65 20 69 6e 64 69 72 65 63 74  ly more indirect
5a20: 20 69 73 73 75 65 72 20 63 65 72 74 69 66 69 63   issuer certific
5a30: 61 74 65 73 2e 0a 09 20 20 3c 62 72 3e 0a 09 20  ates...  <br>.. 
5a40: 20 54 68 65 20 3c 65 6d 3e 63 65 72 74 3c 2f 65   The <em>cert</e
5a50: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61  m> argument is a
5a60: 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c   list of key-val
5a70: 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72  ue pairs similar
5a80: 0a 09 20 20 74 6f 20 74 68 6f 73 65 20 72 65 74  ..  to those ret
5a90: 75 72 6e 65 64 20 62 79 0a 09 20 20 3c 61 20 68  urned by..  <a h
5aa0: 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75  ref="#tls::statu
5ab0: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  s"><strong>tls::
5ac0: 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c  status</strong><
5ad0: 2f 61 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20  /a>...  <br>..  
5ae0: 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f  The <em>status</
5af0: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20  em> argument is 
5b00: 61 6e 20 69 6e 74 65 67 65 72 20 72 65 70 72 65  an integer repre
5b10: 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 63  senting the..  c
5b20: 75 72 72 65 6e 74 20 76 61 6c 69 64 69 74 79 20  urrent validity 
5b30: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
5b40: 74 65 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f  te...  A value o
5b50: 66 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e  f <code>0</code>
5b60: 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69   means the certi
5b70: 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64  ficate is deemed
5b80: 20 69 6e 76 61 6c 69 64 2e 0a 09 20 20 41 20 76   invalid...  A v
5b90: 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c  alue of <code>1<
5ba0: 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65  /code> means the
5bb0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20   certificate is 
5bc0: 64 65 65 6d 65 64 20 76 61 6c 69 64 2e 0a 09 20  deemed valid... 
5bd0: 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d   <br>..  The <em
5be0: 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75  >error</em> argu
5bf0: 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 20 74 68  ment supplies th
5c00: 65 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e  e message, if an
5c10: 79 2c 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20  y, generated..  
5c20: 62 79 20 3c 63 6f 64 65 3e 58 35 30 39 5f 53 54  by <code>X509_ST
5c30: 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f  ORE_CTX_get_erro
5c40: 72 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c  r()</code>...  <
5c50: 62 72 3e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54  br>..  <br>..  T
5c60: 68 65 20 63 61 6c 6c 62 61 63 6b 20 6d 61 79 20  he callback may 
5c70: 6f 76 65 72 72 69 64 65 20 6e 6f 72 6d 61 6c 20  override normal 
5c80: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 63 65  validation proce
5c90: 73 73 69 6e 67 20 62 79 20 65 78 70 6c 69 63 69  ssing by explici
5ca0: 74 6c 79 0a 09 20 20 72 65 74 75 72 6e 69 6e 67  tly..  returning
5cb0: 20 6f 6e 65 20 6f 66 20 74 68 65 20 61 62 6f 76   one of the abov
5cc0: 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d  e <em>status</em
5cd0: 3e 20 76 61 6c 75 65 73 2e 0a 09 3c 2f 64 64 3e  > values...</dd>
5ce0: 0a 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64  ...</dl>.    </d
5cf0: 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20 20  d>..    <br>..  
5d00: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70    <dt><strong>-p
5d10: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e  assword</strong>
5d20: 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65   <em>callback</e
5d30: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  m></dt>.    <dd>
5d40: 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70  ..Invokes the sp
5d50: 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c  ecified <em>call
5d60: 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74  back</em> script
5d70: 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65   when OpenSSL ne
5d80: 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20 61  eds to..obtain a
5d90: 20 70 61 73 73 77 6f 72 64 2e 20 20 54 68 65 20   password.  The 
5da0: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20  callback should 
5db0: 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20  return a string 
5dc0: 77 68 69 63 68 0a 09 72 65 70 72 65 73 65 6e 74  which..represent
5dd0: 73 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 74  s the password t
5de0: 6f 20 62 65 20 75 73 65 64 2e 0a 09 4e 6f 20 61  o be used...No a
5df0: 72 67 75 6d 65 6e 74 73 20 61 72 65 20 61 70 70  rguments are app
5e00: 65 6e 64 65 64 20 74 6f 20 74 68 65 20 73 63 72  ended to the scr
5e10: 69 70 74 20 75 70 6f 6e 20 63 61 6c 6c 62 61 63  ipt upon callbac
5e20: 6b 2e 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64  k..    </dd>.</d
5e30: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
5e40: 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e 63 65 20  ..<p>.Reference 
5e50: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20  implementations 
5e60: 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63  of these callbac
5e70: 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 20  ks are provided 
5e80: 69 6e 20 74 68 65 0a 64 69 73 74 72 69 62 75 74  in the.distribut
5e90: 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e 67 3e 74  ion as <strong>t
5ea0: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74  ls::callback</st
5eb0: 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e  rong> and.<stron
5ec0: 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c  g>tls::password<
5ed0: 2f 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74  /strong> respect
5ee0: 69 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61  ively.  Note tha
5ef0: 74 20 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e  t these are.<em>
5f00: 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c  sample</em> impl
5f10: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79  ementations only
5f20: 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61  .  In a more rea
5f30: 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e  listic deploymen
5f40: 74 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63  t.you would spec
5f50: 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c  ify your own cal
5f60: 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e  lback scripts on
5f70: 20 65 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65   each TLS channe
5f80: 6c 0a 75 73 69 6e 67 20 74 68 65 20 3c 65 6d 3e  l.using the <em>
5f90: 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 61 6e  -command</em> an
5fa0: 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 64 3c  d <em>-password<
5fb0: 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f  /em> options..</
5fc0: 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64 65 66 61  p>..<p>.The defa
5fd0: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65  ult behavior whe
5fe0: 6e 20 74 68 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61  n the <em>-comma
5ff0: 6e 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 20 69  nd</em> option i
6000: 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 20  s not specified 
6010: 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20 70 72  is for.TLS to pr
6020: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69  ocess the associ
6030: 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c  ated library cal
6040: 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c  lbacks internall
6050: 79 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62  y..The default b
6060: 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65  ehavior when the
6070: 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 64 3c 2f   <em>-password</
6080: 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f  em> option is no
6090: 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66  t specified is f
60a0: 6f 72 0a 54 4c 53 20 74 6f 20 70 72 6f 63 65 73  or.TLS to proces
60b0: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64  s the associated
60c0: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63   library callbac
60d0: 6b 73 20 62 79 20 61 74 74 65 6d 70 74 69 6e 67  ks by attempting
60e0: 20 74 6f 20 63 61 6c 6c 0a 3c 73 74 72 6f 6e 67   to call.<strong
60f0: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f  >tls::password</
6100: 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66  strong>..The dif
6110: 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20  ference between 
6120: 74 68 65 73 65 20 74 77 6f 20 62 65 68 61 76 69  these two behavi
6130: 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75  ors is a consequ
6140: 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e  ence of maintain
6150: 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74  ing.compatibilit
6160: 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 20 69  y with earlier i
6170: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a  mplementations..
6180: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73  </p>..<p>.The <s
6190: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67  trong>tls::debug
61a0: 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 62  </strong> variab
61b0: 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65  le provides some
61c0: 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74   additional.cont
61d0: 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 65 20 72  rol over these r
61e0: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63  eference callbac
61f0: 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 65 20 69  ks.  Its value i
6200: 73 20 7a 65 72 6f 20 62 79 20 64 65 66 61 75 6c  s zero by defaul
6210: 74 2e 0a 48 69 67 68 65 72 20 76 61 6c 75 65 73  t..Higher values
6220: 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 20 64 69   produce more di
6230: 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c  agnostic output,
6240: 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66   and will also f
6250: 6f 72 63 65 20 74 68 65 0a 76 65 72 69 66 79 20  orce the.verify 
6260: 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e  method in <stron
6270: 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c  g>tls::callback<
6280: 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65  /strong> to acce
6290: 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 61  pt the.certifica
62a0: 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74  te, even when it
62b0: 20 69 73 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70   is invalid..</p
62c0: 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20  >..<p>.<em>.The 
62d0: 75 73 65 20 6f 66 20 74 68 65 20 72 65 66 65 72  use of the refer
62e0: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c  ence callbacks <
62f0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c  strong>tls::call
6300: 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e  back</strong> an
6310: 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70  d.<strong>tls::p
6320: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e  assword</strong>
6330: 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e   is not recommen
6340: 64 65 64 2e 20 20 54 68 65 79 20 6d 61 79 20 62  ded.  They may b
6350: 65 20 72 65 6d 6f 76 65 64 0a 66 72 6f 6d 20 66  e removed.from f
6360: 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 0a  uture releases..
6370: 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a  </em>.</p>..<p>.
6380: 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20  <em>.The use of 
6390: 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c 73 74  the variable <st
63a0: 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c  rong>tls::debug<
63b0: 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20  /strong> is not 
63c0: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20  recommended..It 
63d0: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66  may be removed f
63e0: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61  rom future relea
63f0: 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a  ses..</em>.</p>.
6400: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45  .<h3><a name="DE
6410: 42 55 47 22 3e 44 45 42 55 47 3c 2f 61 3e 3c 2f  BUG">DEBUG</a></
6420: 68 33 3e 0a 0a 54 4c 53 20 6b 65 79 20 6c 6f 67  h3>..TLS key log
6430: 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62  ging can be enab
6440: 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 74  led by setting t
6450: 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76  he environment v
6460: 61 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c 4b 45  ariable.<b>SSLKE
6470: 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f 20  YLOGFILE</b> to 
6480: 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20  the name of the 
6490: 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e 20  file to log to. 
64a0: 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 4c  Then whenever TL
64b0: 53 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c 20 69  S.key material i
64c0: 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20 72  s generated or r
64d0: 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c 20  eceived it will 
64e0: 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 65  be logged to the
64f0: 20 66 69 6c 65 2e 0a 0a 3c 68 33 3e 3c 61 20 6e   file...<h3><a n
6500: 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50  ame="HTTPS EXAMP
6510: 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c  LE">HTTPS EXAMPL
6520: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54  E</a></h3>..<p>T
6530: 68 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73  his example uses
6540: 20 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72   a sample server
6550: 2e 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69  .pem provided wi
6560: 74 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61  th the TLS relea
6570: 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20  se,.courtesy of 
6580: 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e  the <strong>Open
6590: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f  SSL</strong> pro
65a0: 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e  ject.</p>..<pre>
65b0: 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72  <code>.package r
65c0: 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b  equire http.pack
65d0: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a  age require tls.
65e0: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20  .http::register 
65f0: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20  https 443 [list 
6600: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61  ::tls::socket -a
6610: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72  utoservername tr
6620: 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65  ue -require true
6630: 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c   -cadir /etc/ssl
6640: 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b  /certs]..set tok
6650: 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68   [http::geturl h
6660: 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74  ttps://www.tcl.t
6670: 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65  k/].</code></pre
6680: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
6690: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52  SPECIAL CONSIDER
66a0: 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20  ATIONS">SPECIAL 
66b0: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f  CONSIDERATIONS</
66c0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20  a></h3>..<p>The 
66d0: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20  capabilities of 
66e0: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e  this package can
66f0: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79   vary enormously
6700: 20 62 61 73 65 64 0a 75 70 6f 6e 20 68 6f 77 20   based.upon how 
6710: 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 6c 69 62  your OpenSSL lib
6720: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75  rary was configu
6730: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 41  red and built. A
6740: 74 20 74 68 65 0a 6d 6f 73 74 20 6d 61 63 72 6f  t the.most macro
6750: 2d 6c 65 76 65 6c 20 4f 70 65 6e 53 53 4c 20 73  -level OpenSSL s
6760: 75 70 70 6f 72 74 73 20 61 20 26 71 75 6f 74 3b  upports a &quot;
6770: 6e 6f 20 70 61 74 65 6e 74 73 26 71 75 6f 74 3b  no patents&quot;
6780: 20 62 75 69 6c 64 2c 0a 77 68 69 63 68 20 64 69   build,.which di
6790: 73 61 62 6c 65 73 20 52 53 41 2c 20 49 44 45 41  sables RSA, IDEA
67a0: 2c 20 52 43 28 32 2c 34 2c 35 29 20 61 6e 64 20  , RC(2,4,5) and 
67b0: 53 53 4c 32 20 2d 20 69 66 20 79 6f 75 72 20 4f  SSL2 - if your O
67c0: 70 65 6e 53 53 4c 20 69 73 0a 63 6f 6e 66 69 67  penSSL is.config
67d0: 75 72 65 64 20 74 68 69 73 20 77 61 79 20 74 68  ured this way th
67e0: 65 6e 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64  en you will need
67f0: 20 74 6f 20 62 75 69 6c 64 20 54 4c 53 20 77 69   to build TLS wi
6800: 74 68 20 74 68 65 0a 2d 44 4e 4f 5f 50 41 54 45  th the.-DNO_PATE
6810: 4e 54 53 20 6f 70 74 69 6f 6e 20 2d 20 61 6e 64  NTS option - and
6820: 20 74 68 65 20 72 65 73 75 6c 74 61 6e 74 20 6d   the resultant m
6830: 6f 64 75 6c 65 20 77 69 6c 6c 20 66 75 6e 63 74  odule will funct
6840: 69 6f 6e 0a 63 6f 72 72 65 63 74 6c 79 20 61 6e  ion.correctly an
6850: 64 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 20 41  d also support A
6860: 44 48 20 63 65 72 74 69 66 69 63 61 74 65 2d 6c  DH certificate-l
6870: 65 73 73 20 65 6e 63 72 79 70 74 69 6f 6e 2c 0a  ess encryption,.
6880: 68 6f 77 65 76 65 72 20 79 6f 75 20 77 69 6c 6c  however you will
6890: 20 62 65 20 75 6e 61 62 6c 65 20 74 6f 20 75 74   be unable to ut
68a0: 69 6c 69 7a 65 20 74 68 69 73 20 74 6f 20 73 70  ilize this to sp
68b0: 65 61 6b 20 74 6f 20 6e 6f 72 6d 61 6c 20 57 65  eak to normal We
68c0: 62 0a 53 65 72 76 65 72 73 2c 20 77 68 69 63 68  b.Servers, which
68d0: 20 74 79 70 69 63 61 6c 6c 79 20 72 65 71 75 69   typically requi
68e0: 72 65 20 52 53 41 20 73 75 70 70 6f 72 74 2e 20  re RSA support. 
68f0: 50 6c 65 61 73 65 20 73 65 65 20 3c 61 0a 68 72  Please see <a.hr
6900: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f  ef="http://www.o
6910: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 68 74 74  penssl.org/">htt
6920: 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e  p://www.openssl.
6930: 6f 72 67 2f 3c 2f 61 3e 20 66 6f 72 0a 6d 6f 72  org/</a> for.mor
6940: 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e  e information on
6950: 20 74 68 65 20 77 68 6f 6c 65 20 69 73 73 75 65   the whole issue
6960: 20 6f 66 20 70 61 74 65 6e 74 73 20 61 6e 64 20   of patents and 
6970: 55 53 20 65 78 70 6f 72 74 0a 72 65 73 74 72 69  US export.restri
6980: 63 74 69 6f 6e 73 2e 20 3c 2f 70 3e 0a 0a 3c 68  ctions. </p>..<h
6990: 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 41  3><a name="SEE A
69a0: 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61  LSO">SEE ALSO</a
69b0: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f  ></h3>..<p><stro
69c0: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  ng>socket</stron
69d0: 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65  g>, <strong>file
69e0: 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e  event, </strong>
69f0: 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a.href="http://
6a00: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
6a10: 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53  "><strong>OpenSS
6a20: 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f  L</strong></a></
6a30: 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a  p>..<hr>..<pre>.
6a40: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
6a50: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61   1999 Matt Newma
6a60: 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f  n..Copyright &co
6a70: 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73  py; 2004 Starfis
6a80: 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65  h Systems..</pre
6a90: 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c  >.</body>.</html
6aa0: 3e 0a                                            >.