Hex Artifact Content

Artifact 652ed627a176ea942aafadbd676f12ff9cb42d7742cec47765021b816d1d4e90:


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 0a 0a  sitional//EN">..
0040: 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a 3c  <html>..<head>.<
0050: 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d  meta http-equiv=
0060: 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a 63  "Content-Type".c
0070: 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d  ontent="text/htm
0080: 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38  l; charset=iso-8
0090: 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e 61  859-1">.<meta na
00a0: 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20 63  me="Copyright" c
00b0: 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61 74  ontent="1999 Mat
00c0: 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34 20  t Newman / 2004 
00d0: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73  Starfish Systems
00e0: 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 53  ">.<title>TLS (S
00f0: 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 73  SL) Tcl Commands
0100: 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e  </title>.</head>
0110: 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 3d  ..<body bgcolor=
0120: 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c 3e  "#FFFFFF">..<dl>
0130: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66  .    <dd><a href
0140: 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61  ="#NAME">NAME</a
0150: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 64 3e  >.    <dl>..<dd>
0160: 3c 62 3e 74 6c 73 3c 2f 62 3e 20 2d 20 62 69 6e  <b>tls</b> - bin
0170: 64 69 6e 67 20 74 6f 20 3c 62 3e 4f 70 65 6e 53  ding to <b>OpenS
0180: 53 4c 3c 2f 62 3e 20 74 6f 6f 6c 6b 69 74 2e 3c  SL</b> toolkit.<
0190: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20  /dd>.    </dl>. 
01a0: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64     </dd>.    <dd
01b0: 3e 3c 61 20 68 72 65 66 3d 22 23 53 59 4e 4f 50  ><a href="#SYNOP
01c0: 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61  SIS">SYNOPSIS</a
01d0: 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e  > </dd>.    <dd>
01e0: 3c 64 6c 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62  <dl>..    <dd><b
01f0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
0200: 20 54 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 38 2e   Tcl</b> <em>?8.
0210: 34 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20  4?</em></dd>..  
0220: 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65    <dd><b>package
0230: 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e   require tls</b>
0240: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 3e 26  </dd>..    <dt>&
0250: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 20 20  nbsp;</dt>..    
0260: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74  <dd><b>tls::init
0270: 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e  </b> <em>?option
0280: 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a 09 20  s?</em> </dd>.. 
0290: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73     <dd><b>tls::s
02a0: 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f  ocket</b> <em>?o
02b0: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72  ptions? host por
02c0: 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20  t</em></dd>..   
02d0: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63   <dd><b>tls::soc
02e0: 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d 73  ket</b> <em> ?-s
02f0: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f  erver command? ?
0300: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65  options? port</e
0310: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64  m></dd>..    <dd
0320: 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61  ><b>tls::handsha
0330: 6b 65 3c 2f 62 3e 20 3c 65 6d 3e 20 63 68 61 6e  ke</b> <em> chan
0340: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20  nel</em></dd>.. 
0350: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73     <dd><b>tls::s
0360: 74 61 74 75 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f  tatus </b> <em>?
0370: 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c  -local? channel<
0380: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c  /em></dd>..    <
0390: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65  dd><b>tls::conne
03a0: 63 74 69 6f 6e 20 3c 2f 62 3e 20 3c 65 6d 3e 63  ction </b> <em>c
03b0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e  hannel</em></dd>
03c0: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73  ..    <dd><b>tls
03d0: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d  ::import</b> <em
03e0: 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e  >channel ?option
03f0: 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20  s?</em></dd>..  
0400: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e    <dd><b>tls::un
0410: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63  import</b> <em>c
0420: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e  hannel</em></dd>
0430: 0a 09 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b  ..    <dt>&nbsp;
0440: 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 3c  </dt>..    <dd><
0450: 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 3c  b>tls::ciphers <
0460: 2f 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c  /b> <em>protocol
0470: 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70   ?verbose? ?supp
0480: 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e  orted?</em></dd>
0490: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73  ..    <dd><b>tls
04a0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c  ::protocols</b><
04b0: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62  /dd>..    <dd><b
04c0: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62  >tls::version</b
04d0: 3e 3c 2f 64 64 3e 0a 09 3c 2f 64 6c 3e 0a 20 20  ></dd>..</dl>.  
04e0: 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e    </dd>.    <dd>
04f0: 3c 61 20 68 72 65 66 3d 22 23 43 4f 4d 4d 41 4e  <a href="#COMMAN
0500: 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e  DS">COMMANDS</a>
0510: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61  </dd>.    <dd><a
0520: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b   href="#CALLBACK
0530: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41   OPTIONS">CALLBA
0540: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f  CK OPTIONS</a></
0550: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68  dd>.    <dd><a h
0560: 72 65 66 3d 22 23 48 54 54 50 53 20 45 58 41 4d  ref="#HTTPS EXAM
0570: 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50  PLE">HTTPS EXAMP
0580: 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20  LE</a></dd>.    
0590: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 45  <dd><a href="#SE
05a0: 45 20 41 4c 53 4f 22 3e 53 50 45 43 49 41 4c 20  E ALSO">SPECIAL 
05b0: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f  CONSIDERATIONS</
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 53 45 45 20 41 4c  <a href="#SEE AL
05e0: 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e  SO">SEE ALSO</a>
05f0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 72  </dd>.</dl>..<hr
0600: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
0610: 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 3c 2f  NAME">NAME</a></
0620: 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e  h3>..<p><strong>
0630: 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62  tls</strong> - b
0640: 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e  inding to <stron
0650: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e  g>OpenSSL</stron
0660: 67 3e 0a 74 6f 6f 6c 6b 69 74 2e 3c 2f 70 3e 0a  g>.toolkit.</p>.
0670: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 59  .<h3><a name="SY
0680: 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 49 53  NOPSIS">SYNOPSIS
0690: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 62  </a></h3>..<p><b
06a0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
06b0: 20 54 63 6c 20 38 2e 34 3c 2f 62 3e 3c 62 72 3e   Tcl 8.4</b><br>
06c0: 0a 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75  .<b>package requ
06d0: 69 72 65 20 74 6c 73 3c 2f 62 3e 3c 62 72 3e 0a  ire tls</b><br>.
06e0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
06f0: 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73  ls::init"><b>tls
0700: 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 69 3e 3f 6f  ::init</b> <i>?o
0710: 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c  ptions?</i></a><
0720: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0730: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c  s::socket"><b>tl
0740: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69  s::socket</b> <i
0750: 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20  >?options? host 
0760: 70 6f 72 74 3c 2f 69 3e 3c 62 72 3e 0a 3c 61 20  port</i><br>.<a 
0770: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b  href="#tls::sock
0780: 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b  et"><b>tls::sock
0790: 65 74 3c 2f 62 3e 20 3c 69 3e 3f 2d 73 65 72 76  et</b> <i>?-serv
07a0: 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74  er command? ?opt
07b0: 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 69 3e 3c 2f  ions? port</i></
07c0: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
07d0: 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 62  #tls::status"><b
07e0: 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e  >tls::status</b>
07f0: 20 3c 69 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61   <i>?-local? cha
0800: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  nnel</i></a><br>
0810: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0820: 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 62 3e 74  connection"><b>t
0830: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f  ls::connection</
0840: 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69  b> <i>channel</i
0850: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  ></a><br>.<a hre
0860: 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64 73 68 61  f="#tls::handsha
0870: 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64  ke"><b>tls::hand
0880: 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 3e 63 68 61  shake</b> <i>cha
0890: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  nnel</i></a><br>
08a0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
08b0: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a  import"><b>tls::
08c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68  import</b> <i>ch
08d0: 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c  annel ?options?<
08e0: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68  /i></a><br>.<a h
08f0: 72 65 66 3d 22 23 74 6c 73 3a 3a 75 6e 69 6d 70  ref="#tls::unimp
0900: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69  ort"><b>tls::uni
0910: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61  mport</b> <i>cha
0920: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  nnel</i></a><br>
0930: 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23  .<br>.<a href="#
0940: 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 3e 3c 62  tls::ciphers"><b
0950: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62  >tls::ciphers</b
0960: 3e 20 3c 69 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76  > <i>protocol ?v
0970: 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f 72 74  erbose? ?support
0980: 65 64 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a  ed?</i></a><br>.
0990: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 70  <a href="#tls::p
09a0: 72 6f 74 6f 63 6f 6c 73 22 3e 3c 62 3e 74 6c 73  rotocols"><b>tls
09b0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c  ::protocols</b><
09c0: 2f 61 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  /a>.<a href="#tl
09d0: 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74  s::version"><b>t
09e0: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c  ls::version</b><
09f0: 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61  /a>.</p>..<h3><a
0a00: 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 54 49   name="DESCRIPTI
0a10: 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c  ON">DESCRIPTION<
0a20: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69  /a></h3>..<p>Thi
0a30: 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76  s extension prov
0a40: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 20 62  ides a generic b
0a50: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68 72 65  inding to <a.hre
0a60: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70  f="http://www.op
0a70: 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e  enssl.org/">Open
0a80: 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69  SSL</a>, utilizi
0a90: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 54  ng the.<strong>T
0aa0: 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c  cl_StackChannel<
0ab0: 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66 6f 72  /strong>.API for
0ac0: 20 54 63 6c 20 38 2e 34 20 61 6e 64 20 68 69 67   Tcl 8.4 and hig
0ad0: 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65 74 73  her. The sockets
0ae0: 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 20   behave exactly 
0af0: 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68 61 6e  the same.as chan
0b00: 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69  nels created usi
0b10: 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74 2d 69  ng Tcl's built-i
0b20: 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74  n <strong>socket
0b30: 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e  </strong>.comman
0b40: 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61  d with additiona
0b50: 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f  l options for co
0b60: 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53  ntrolling the SS
0b70: 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a  L session..</p>.
0b80: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f  .<h3><a name="CO
0b90: 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53  MMANDS">COMMANDS
0ba0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79  </a></h3>..<p>Ty
0bb0: 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c  pically one woul
0bc0: 64 20 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e  d use the <stron
0bd0: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f  g>tls::socket </
0be0: 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77  strong>command.w
0bf0: 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f  hich provides co
0c00: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68  mpatibility with
0c10: 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20   the native Tcl 
0c20: 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f  <strong>socket</
0c30: 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e  strong>.command.
0c40: 20 49 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c   In such cases <
0c50: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f  strong>tls::impo
0c60: 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75  rt</strong> shou
0c70: 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64  ld not be.used d
0c80: 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64  irectly.</p>..<d
0c90: 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  l>.    <dt><a na
0ca0: 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c  me="tls::init"><
0cb0: 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e  b>tls::init </b>
0cc0: 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e  <i>?options?</i>
0cd0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
0ce0: 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74  d>Optional funct
0cf0: 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20 64  ion to set the d
0d00: 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75  efault options u
0d10: 73 65 64 20 62 79 0a 09 3c 73 74 72 6f 6e 67 3e  sed by..<strong>
0d20: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72  tls::socket</str
0d30: 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20 63 61 6c  ong>. If you cal
0d40: 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69  l <strong>tls::i
0d50: 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09  mport</strong>..
0d60: 64 69 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f  directly this ro
0d70: 75 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66  utine has no eff
0d80: 65 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20  ect. Any of the 
0d90: 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74 20 3c 73  options..that <s
0da0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65  trong>tls::socke
0db0: 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 70  t</strong> accep
0dc0: 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a 09 75  ts can be set..u
0dd0: 73 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d 61 6e  sing this comman
0de0: 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 73 68  d, though you sh
0df0: 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 20  ould limit your 
0e00: 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79  options..to only
0e10: 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65   TLS related one
0e20: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e  s.</dd>.    <dt>
0e30: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20  &nbsp;</dt>.    
0e40: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
0e50: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73  ::socket"><b>tls
0e60: 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d  ::socket </b><em
0e70: 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f 73 74  >?options?..host
0e80: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f   port</em></a></
0e90: 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 3e 74  dt>.    <dt><b>t
0ea0: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65  ls::socket</b><e
0eb0: 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d  m> ?-server comm
0ec0: 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70  and? ?options? p
0ed0: 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ort</em></dt>.  
0ee0: 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20 61 20    <dd>This is a 
0ef0: 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20  helper function 
0f00: 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68  that utilizes th
0f10: 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09 63 6f  e underlying..co
0f20: 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e  mmands (<strong>
0f30: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72  tls::import</str
0f40: 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65  ong>). It behave
0f50: 73 0a 09 65 78 61 63 74 6c 79 20 74 68 65 20 73  s..exactly the s
0f60: 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 76  ame as the nativ
0f70: 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f  e Tcl <strong>so
0f80: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63  cket</strong>..c
0f90: 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68  ommand except th
0fa0: 61 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63  at the options c
0fb0: 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f  an include any o
0fc0: 66 20 74 68 65 0a 09 61 70 70 6c 69 63 61 62 6c  f the..applicabl
0fd0: 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  e <a href="#tls:
0fe0: 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67  :import"><strong
0ff0: 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72  >tls:import</str
1000: 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e  ong></a>..option
1010: 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74  s with one addit
1020: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62  ional option:.<b
1030: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c  lockquote>.    <
1040: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dl>..<dt><strong
1050: 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65  >-autoservername
1060: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
1070: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ol</em></dt>..<d
1080: 64 3e 41 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20  d>Automatically 
1090: 73 65 6e 64 20 74 68 65 20 2d 73 65 72 76 65 72  send the -server
10a0: 6e 61 6d 65 20 61 73 20 74 68 65 20 3c 65 6d 3e  name as the <em>
10b0: 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  host</em> argume
10c0: 6e 74 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74  nt..    (default
10d0: 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65   is <em>false</e
10e0: 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  m>)</dd>.    </d
10f0: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
1100: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
1110: 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e  e="tls::import">
1120: 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c  <b>tls::import <
1130: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f  /b><i>channel..?
1140: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e  options?</i></a>
1150: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 53 53  </dt>.    <dd>SS
1160: 4c 2d 65 6e 61 62 6c 65 20 61 20 72 65 67 75 6c  L-enable a regul
1170: 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 20 2d  ar Tcl channel -
1180: 20 69 74 20 6e 65 65 64 20 6e 6f 74 20 62 65 20   it need not be 
1190: 61 0a 09 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d  a..socket, but m
11a0: 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64  ust provide bi-d
11b0: 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e  irectional flow.
11c0: 20 41 6c 73 6f 0a 09 73 65 74 74 69 6e 67 20 73   Also..setting s
11d0: 65 73 73 69 6f 6e 20 70 61 72 61 6d 65 74 65 72  ession parameter
11e0: 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68  s for SSL handsh
11f0: 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63  ake.</dd>..<bloc
1200: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e  kquote>.    <dl>
1210: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61  ..<dt><strong>-a
1220: 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  lpn</strong> <em
1230: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >list</em></dt>.
1240: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70 72 6f  .<dd>List of pro
1250: 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20  tocols to offer 
1260: 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69  during Applicati
1270: 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20 50 72  on-Layer..    Pr
1280: 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69  otocol Negotiati
1290: 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65  on (ALPN). For e
12a0: 78 61 6d 70 6c 65 3a 20 68 32 2c 20 68 74 74 70  xample: h2, http
12b0: 2f 31 2e 31 2c 20 65 74 63 2e 3c 2f 64 64 3e 0a  /1.1, etc.</dd>.
12c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61  .<dt><strong>-ca
12d0: 64 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  dir</strong> <em
12e0: 3e 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  >dir</em></dt>..
12f0: 3c 64 64 3e 53 65 74 20 74 68 65 20 43 41 20 63  <dd>Set the CA c
1300: 65 72 74 69 66 69 63 61 74 65 73 20 70 61 74 68  ertificates path
1310: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 64 69  . The default di
1320: 72 65 63 74 6f 72 79 20 69 73 20 70 6c 61 74 66  rectory is platf
1330: 6f 72 6d 0a 09 20 20 20 20 73 70 65 63 69 66 69  orm..    specifi
1340: 63 20 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74  c and can be set
1350: 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65   at compile time
1360: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76  . This can be ov
1370: 65 72 72 69 64 64 65 6e 0a 09 20 20 20 20 76 69  erridden..    vi
1380: 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52  a the <b>SSL_CER
1390: 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f  T_DIR</b> enviro
13a0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c  nment variable.<
13b0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
13c0: 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f  g>-cafile </stro
13d0: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c  ng><em>filename<
13e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
13f0: 65 74 20 74 68 65 20 63 65 72 74 69 66 69 63 61  et the certifica
1400: 74 65 20 61 75 74 68 6f 72 69 74 79 20 28 43 41  te authority (CA
1410: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 66  ) certificates f
1420: 69 6c 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74  ile. The default
1430: 0a 09 20 20 20 20 69 73 20 74 68 65 20 63 65 72  ..    is the cer
1440: 74 2e 70 65 6d 20 66 69 6c 65 20 69 6e 20 74 68  t.pem file in th
1450: 65 20 4f 70 73 6e 53 53 4c 20 64 69 72 65 63 74  e OpsnSSL direct
1460: 6f 72 79 2e 20 54 68 69 73 20 63 61 6e 20 61 6c  ory. This can al
1470: 73 6f 20 62 65 0a 09 20 20 20 20 6f 76 65 72 72  so be..    overr
1480: 69 64 64 65 6e 20 76 69 61 20 74 68 65 20 3c 62  idden via the <b
1490: 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f  >SSL_CERT_FILE</
14a0: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76  b> environment v
14b0: 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c  ariable.</dd>..<
14c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74  dt><strong>-cert
14d0: 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  file</strong> <e
14e0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c  m>filename</em><
14f0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66  /dt>..<dd>Specif
1500: 79 20 74 68 65 20 66 69 6c 65 6e 61 6d 65 20 77  y the filename w
1510: 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69 63  ith the certific
1520: 61 74 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e  ate to use.</dd>
1530: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63  ..<dt><strong>-c
1540: 65 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ert</strong> <em
1550: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f  >filename</em></
1560: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79  dt>..<dd>Specify
1570: 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66   the contents of
1580: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 74   a certificate t
1590: 6f 20 75 73 65 2c 20 61 73 20 61 20 44 45 52 0a  o use, as a DER.
15a0: 09 20 20 20 20 65 6e 63 6f 64 65 64 20 62 69 6e  .    encoded bin
15b0: 61 72 79 20 76 61 6c 75 65 20 28 58 2e 35 30 39  ary value (X.509
15c0: 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74   DER).</dd>..<dt
15d0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72  ><strong>-cipher
15e0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74  </strong> <em>st
15f0: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  ring</em></dt>..
1600: 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 69 70 68  <dd>List of ciph
1610: 65 72 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69  ers to use. Stri
1620: 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22  ng is a colon ("
1630: 3a 22 29 20 73 65 70 61 72 61 74 65 64 20 6c 69  :") separated li
1640: 73 74 0a 09 20 20 20 20 6f 66 20 63 69 70 68 65  st..    of ciphe
1650: 72 73 20 6f 72 20 63 69 70 68 65 72 20 73 75 69  rs or cipher sui
1660: 74 65 73 2e 20 43 69 70 68 65 72 20 73 75 69 74  tes. Cipher suit
1670: 65 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e  es can be combin
1680: 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74 68  ed..    using th
1690: 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61  e <b>+</b> chara
16a0: 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20 63  cter. Prefixes c
16b0: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 65  an be used to pe
16c0: 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72  rmanently..    r
16d0: 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65 6c  emove ("!"), del
16e0: 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f  ete ("-"), or mo
16f0: 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20 74  ve a cypher to t
1700: 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 74  he end of..    t
1710: 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b  he list ("+"). K
1720: 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 45  eywords <b>@STRE
1730: 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62  NGTH</b> (sort b
1740: 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20  y algorithm..   
1750: 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62   key length), <b
1760: 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c  >@SECLEVEL=</b><
1770: 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 63  i>n</i> (set sec
1780: 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09  urity level to..
1790: 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44      n), and <b>D
17a0: 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20  EFAULT</b> (use 
17b0: 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c  default cipher l
17c0: 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e  ist, at start on
17d0: 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c 73  ly)..    can als
17e0: 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e 20  o be specified. 
17f0: 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75  See OpenSSL docu
1800: 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68  mentation for th
1810: 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74  e full..    list
1820: 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73   of valid values
1830: 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 65  . (TLS 1.2 and e
1840: 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64  arlier only)</dd
1850: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
1860: 63 69 70 68 65 72 73 75 69 74 65 73 3c 2f 73 74  ciphersuites</st
1870: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67  rong> <em>string
1880: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1890: 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73  List of cipher s
18a0: 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53 74  uites to use. St
18b0: 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20  ring is a colon 
18c0: 28 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61 72  (":")..    separ
18d0: 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70  ated list of cip
18e0: 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e  her suite names.
18f0: 20 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c   (TLS 1.3 only)<
1900: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
1910: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
1920: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b  ng> <em>callback
1930: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1940: 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f  Callback to invo
1950: 6b 65 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f  ke at several po
1960: 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 20  ints during the 
1970: 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20  handshake...    
1980: 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20  This is used to 
1990: 70 61 73 73 20 65 72 72 6f 72 73 20 61 6e 64 20  pass errors and 
19a0: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74  tracing informat
19b0: 69 6f 6e 2c 20 61 6e 64 0a 09 20 20 20 20 69 74  ion, and..    it
19c0: 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c 20 73   can allow Tcl s
19d0: 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72  cripts to perfor
19e0: 6d 20 74 68 65 69 72 20 6f 77 6e 20 63 65 72 74  m their own cert
19f0: 69 66 69 63 61 74 65 0a 09 20 20 20 20 76 61 6c  ificate..    val
1a00: 69 64 61 74 69 6f 6e 20 69 6e 20 70 6c 61 63 65  idation in place
1a10: 20 6f 66 20 74 68 65 20 64 65 66 61 75 6c 74 20   of the default 
1a20: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69  validation provi
1a30: 64 65 64 20 62 79 0a 09 20 20 20 20 4f 70 65 6e  ded by..    Open
1a40: 53 53 4c 2e 20 53 65 65 20 3c 61 20 68 72 65 66  SSL. See <a href
1a50: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  ="#CALLBACK OPTI
1a60: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
1a70: 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66  TIONS</a>..    f
1a80: 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75  or further discu
1a90: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ssion.</dd>..<dt
1aa0: 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72 61  ><strong>-dhpara
1ab0: 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e  ms </strong><em>
1ac0: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64  filename</em></d
1ad0: 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20  t>..<dd>Specify 
1ae0: 74 68 65 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d  the Diffie-Hellm
1af0: 61 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 69  an parameters fi
1b00: 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  le.</dd>..<dt><s
1b10: 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f  trong>-keyfile</
1b20: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65  strong> <em>file
1b30: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
1b40: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20  <dd>Specify the 
1b50: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65  private key file
1b60: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 0a 09 20  . (default is.. 
1b70: 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 65 72     value of -cer
1b80: 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 09 3c 64 74  tfile)</dd>..<dt
1b90: 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 3c 2f 73  ><strong>-key</s
1ba0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e  trong> <em>filen
1bb0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ame</em></dt>..<
1bc0: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 70  dd>Specify the p
1bd0: 72 69 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73  rivate key to us
1be0: 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64  e as a DER encod
1bf0: 65 64 20 76 61 6c 75 65 20 28 50 4b 43 53 23 31  ed value (PKCS#1
1c00: 20 44 45 52 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e   DER)</dd>..<dt>
1c10: 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f  <strong>-model</
1c20: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e  strong> <em>chan
1c30: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  nel</em></dt>..<
1c40: 64 64 3e 46 6f 72 63 65 20 74 68 69 73 20 63 68  dd>Force this ch
1c50: 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74  annel to share t
1c60: 68 65 20 73 61 6d 65 20 3c 65 6d 3e 3c 73 74 72  he same <em><str
1c70: 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c 2f 73 74 72  ong>SSL_CTX</str
1c80: 6f 6e 67 3e 3c 2f 65 6d 3e 0a 09 20 20 20 20 73  ong></em>..    s
1c90: 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65 20  tructure as the 
1ca0: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 68  specified <em>ch
1cb0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a  annel</em>, and.
1cc0: 09 20 20 20 20 74 68 65 72 65 66 6f 72 65 20 73  .    therefore s
1cd0: 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73 20 65  hare callbacks e
1ce0: 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  tc.</dd>..<dt><s
1cf0: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c  trong>-password<
1d00: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c  /strong> <em>cal
1d10: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  lback</em></dt>.
1d20: 09 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f  .<dd>Callback to
1d30: 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65   invoke when Ope
1d40: 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62  nSSL needs to ob
1d50: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2c  tain a password,
1d60: 0a 09 20 20 20 20 74 79 70 69 63 61 6c 6c 79 20  ..    typically 
1d70: 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72  to unlock the pr
1d80: 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63  ivate key of a c
1d90: 65 72 74 69 66 69 63 61 74 65 2e 20 54 68 65 0a  ertificate. The.
1da0: 09 20 20 20 20 63 61 6c 6c 62 61 63 6b 20 73 68  .    callback sh
1db0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74  ould return a st
1dc0: 72 69 6e 67 20 77 68 69 63 68 20 72 65 70 72 65  ring which repre
1dd0: 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f  sents the passwo
1de0: 72 64 0a 09 20 20 20 20 74 6f 20 62 65 20 75 73  rd..    to be us
1df0: 65 64 2e 20 53 65 65 20 3c 61 20 68 72 65 66 3d  ed. See <a href=
1e00: 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f  "#CALLBACK OPTIO
1e10: 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54  NS">CALLBACK OPT
1e20: 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f  IONS</a>..    fo
1e30: 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73  r further discus
1e40: 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  sion.</dd>..<dt>
1e50: 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74 5f 68 61  <strong>-post_ha
1e60: 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e  ndshake</strong>
1e70: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
1e80: 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f 77 20 70  dt>..<dd>Allow p
1e90: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 74 69  ost-handshake ti
1ea0: 63 6b 65 74 20 75 70 64 61 74 65 73 2e 3c 2f 64  cket updates.</d
1eb0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
1ec0: 2d 72 65 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e  -request </stron
1ed0: 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  g><em>bool</em><
1ee0: 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 65 73  /dt>..<dd>Reques
1ef0: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
1f00: 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67  from peer during
1f10: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a   SSL handshake..
1f20: 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73  .    (default is
1f30: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c   <em>true</em>)<
1f40: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
1f50: 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 6f  g>-require</stro
1f60: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
1f70: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75  ></dt>..<dd>Requ
1f80: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74  ire a valid cert
1f90: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65  ificate from pee
1fa0: 72 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e  r during SSL han
1fb0: 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 49 66 20  dshake...    If 
1fc0: 74 68 69 73 20 69 73 20 73 65 74 20 74 6f 20 74  this is set to t
1fd0: 72 75 65 2c 20 74 68 65 6e 20 3c 73 74 72 6f 6e  rue, then <stron
1fe0: 67 3e 2d 72 65 71 75 65 73 74 3c 2f 73 74 72 6f  g>-request</stro
1ff0: 6e 67 3e 20 6d 75 73 74 0a 09 20 20 20 20 61 6c  ng> must..    al
2000: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75  so be set to tru
2010: 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  e. (default is <
2020: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f  em>false</em>)</
2030: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2040: 3e 2d 73 65 63 75 72 69 74 79 6c 65 76 65 6c 3c  >-securitylevel<
2050: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 6e 74  /strong> <em>int
2060: 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  eger</em></dt>..
2070: 3c 64 64 3e 53 65 74 20 73 65 63 75 72 69 74 79  <dd>Set security
2080: 20 6c 65 76 65 6c 2e 20 4d 75 73 74 20 62 65 20   level. Must be 
2090: 30 20 74 6f 20 35 2e 20 54 68 65 20 73 65 63 75  0 to 5. The secu
20a0: 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63  rity level affec
20b0: 74 73 0a 09 20 20 20 20 63 69 70 68 65 72 20 73  ts..    cipher s
20c0: 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20  uite encryption 
20d0: 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70  algorithms, supp
20e0: 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 73  orted ECC curves
20f0: 2c 0a 09 20 20 20 20 73 75 70 70 6f 72 74 65 64  ,..    supported
2100: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
2110: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65  ithms, DH parame
2120: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69  ter sizes, certi
2130: 66 69 63 61 74 65 0a 09 20 20 20 20 6b 65 79 20  ficate..    key 
2140: 73 69 7a 65 73 20 61 6e 64 20 73 69 67 6e 61 74  sizes and signat
2150: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20  ure algorithms. 
2160: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 31  The default is 1
2170: 2e 0a 09 20 20 20 20 4c 65 76 65 6c 20 33 20 61  ...    Level 3 a
2180: 6e 64 20 68 69 67 68 65 72 20 64 69 73 61 62 6c  nd higher disabl
2190: 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65  e support for se
21a0: 73 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e  ssion tickets an
21b0: 64 20 6f 6e 6c 79 0a 09 20 20 20 20 61 63 63 65  d only..    acce
21c0: 70 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73  pt cipher suites
21d0: 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f   that provide fo
21e0: 72 77 61 72 64 20 73 65 63 72 65 63 79 2e 3c 2f  rward secrecy.</
21f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2200: 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67  >-server</strong
2210: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
2220: 2f 64 74 3e 0a 09 3c 64 64 3e 48 61 6e 64 73 68  /dt>..<dd>Handsh
2230: 61 6b 65 20 61 73 20 73 65 72 76 65 72 20 69 66  ake as server if
2240: 20 74 72 75 65 2c 20 65 6c 73 65 20 68 61 6e 64   true, else hand
2250: 73 68 61 6b 65 20 61 73 0a 09 20 20 20 20 63 6c  shake as..    cl
2260: 69 65 6e 74 2e 20 28 64 65 66 61 75 6c 74 20 69  ient. (default i
2270: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e  s <em>false</em>
2280: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  )</dd>..<dt><str
2290: 6f 6e 67 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c  ong>-servername<
22a0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73  /strong> <em>hos
22b0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  t</em></dt>..<dd
22c0: 3e 53 70 65 63 69 66 79 20 73 65 72 76 65 72 20  >Specify server 
22d0: 68 6f 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61  hostname. Only a
22e0: 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68 65 20  vailable if the 
22f0: 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 0a  OpenSSL library.
2300: 09 20 20 20 20 74 68 65 20 70 61 63 6b 61 67 65  .    the package
2310: 20 69 73 20 6c 69 6e 6b 65 64 20 61 67 61 69 6e   is linked again
2320: 73 74 20 73 75 70 70 6f 72 74 73 20 74 68 65 20  st supports the 
2330: 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 74  TLS hostname ext
2340: 65 6e 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72 20  ension..    for 
2350: 27 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64  'Server Name Ind
2360: 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20  ication' (SNI). 
2370: 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 20  Use to name the 
2380: 6c 6f 67 69 63 61 6c 20 68 6f 73 74 0a 09 20 20  logical host..  
2390: 20 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67    we are talking
23a0: 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74 69 6e   to and expectin
23b0: 67 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  g a certificate 
23c0: 66 6f 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  for.</dd>..<dt><
23d0: 73 74 72 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f  strong>-session_
23e0: 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  id</strong> <em>
23f0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
2400: 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69 64  ..<dd>Session id
2410: 20 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73 69   to resume sessi
2420: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  on.</dd>..<dt><s
2430: 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72  trong>-ssl2</str
2440: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65  ong> <em>bool</e
2450: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61  m></dt>..<dd>Ena
2460: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
2470: 32 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  2. (default is <
2480: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f  em>false</em>)</
2490: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
24a0: 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e  >-ssl3 </strong>
24b0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
24c0: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75  t>..<dd>Enable u
24d0: 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 64  se of SSL v3. (d
24e0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61  efault is <em>fa
24f0: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09  lse</em>)</dd>..
2500: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73  <dt>-<strong>tls
2510: 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  1</strong> <em>b
2520: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ool</em></dt>..<
2530: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  dd>Enable use of
2540: 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75 6c   TLS v1. (defaul
2550: 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65  t is <em>true</e
2560: 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c  m>)</dd>..<dt>-<
2570: 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73  strong>tls1.1</s
2580: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
2590: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45  /em></dt>..<dd>E
25a0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53  nable use of TLS
25b0: 20 76 31 2e 31 20 28 64 65 66 61 75 6c 74 20 69   v1.1 (default i
25c0: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29  s <em>true</em>)
25d0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72  </dd>..<dt>-<str
25e0: 6f 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f  ong>tls1.2</stro
25f0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
2600: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62  ></dt>..<dd>Enab
2610: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31  le use of TLS v1
2620: 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  .2 (default is <
2630: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64  em>true</em>)</d
2640: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67  d>..<dt>-<strong
2650: 3e 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e  >tls1.3</strong>
2660: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
2670: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20  dt>..<dd>Enable 
2680: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20  use of TLS v1.3 
2690: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
26a0: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
26b0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61  .<dt><strong>-va
26c0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73  lidatecommand</s
26d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62  trong> <em>callb
26e0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ack</em></dt>..<
26f0: 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69  dd>Callback to i
2700: 6e 76 6f 6b 65 20 74 6f 20 76 65 72 69 66 79 20  nvoke to verify 
2710: 6f 72 20 76 61 6c 69 64 61 74 65 20 70 72 6f 74  or validate prot
2720: 6f 63 6f 6c 20 63 6f 6e 66 69 67 0a 09 20 20 20  ocol config..   
2730: 20 70 61 72 61 6d 65 74 65 72 73 20 64 75 72 69   parameters duri
2740: 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20  ng the protocol 
2750: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73  negotiation phas
2760: 65 2e 20 53 65 65 0a 09 20 20 20 20 3c 61 20 68  e. See..    <a h
2770: 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f  ref="#CALLBACK O
2780: 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b  PTIONS">CALLBACK
2790: 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20   OPTIONS</a>..  
27a0: 20 20 66 6f 72 20 66 75 72 74 68 65 72 20 64 69    for further di
27b0: 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20  scussion.</dd>. 
27c0: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b     </dl>.</block
27d0: 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e  quote>..    <dt>
27e0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75 6e  <a name="tls::un
27f0: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a  import"><b>tls::
2800: 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e  unimport </b><i>
2810: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
2820: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72 6f  /dt>.    <dd>Pro
2830: 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65 74  vided for symmet
2840: 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74 6c  ry to <strong>tl
2850: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
2860: 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20 75  g>, this.      u
2870: 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c 2d  nstacks the SSL-
2880: 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72 65  enabling of a re
2890: 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65  gular Tcl channe
28a0: 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20 20  l.  An error.   
28b0: 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20     is thrown if 
28c0: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74  TLS is not the t
28d0: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  op stacked chann
28e0: 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 20 20  el type.</dd>.  
28f0: 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74    <dt>&nbsp;</dt
2900: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  >.    <dt><a nam
2910: 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b  e="tls::handshak
2920: 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  e"><strong>tls::
2930: 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e  handshake</stron
2940: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f  g> <em>channel</
2950: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20  em></a></dt>.   
2960: 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e 64   <dd>Forces hand
2970: 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c  shake to take pl
2980: 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e 73  ace, and returns
2990: 20 30 20 69 66 0a 09 68 61 6e 64 73 68 61 6b 65   0 if..handshake
29a0: 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f   is still in pro
29b0: 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b  gress (non-block
29c0: 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 0a 09 74  ing), or 1 if..t
29d0: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73  he handshake was
29e0: 20 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20   successful. If 
29f0: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61  the handshake fa
2a00: 69 6c 65 64 0a 09 74 68 69 73 20 72 6f 75 74 69  iled..this routi
2a10: 6e 65 20 77 69 6c 6c 20 74 68 72 6f 77 20 61 6e  ne will throw an
2a20: 20 65 72 72 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20   error.</dd>.   
2a30: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e   <dt>&nbsp;</dt>
2a40: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
2a50: 3d 22 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c  ="tls::status"><
2a60: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74  strong>tls::stat
2a70: 75 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20  us</strong>.    
2a80: 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61  <em>?-local? cha
2a90: 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64  nnel</em></a></d
2aa0: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72  t>.    <dd>Retur
2ab0: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73  ns the current s
2ac0: 74 61 74 75 73 20 6f 66 20 74 68 65 20 63 65 72  tatus of the cer
2ad0: 74 69 66 69 63 61 74 65 20 66 6f 72 20 61 6e 20  tificate for an 
2ae0: 53 53 4c 0a 09 63 68 61 6e 6e 65 6c 2e 20 54 68  SSL..channel. Th
2af0: 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69  e result is a li
2b00: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20  st of key-value 
2b10: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67  pairs describing
2b20: 0a 09 74 68 65 20 63 65 72 74 69 66 69 63 61 74  ..the certificat
2b30: 65 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c 74  e. If the result
2b40: 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69 73   is an empty lis
2b50: 74 20 74 68 65 6e 20 74 68 65 0a 09 53 53 4c 20  t then the..SSL 
2b60: 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f  handshake has no
2b70: 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e  t yet completed.
2b80: 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f   If <em>-local</
2b90: 65 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65  em> is..specifie
2ba0: 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61  d, then the loca
2bb0: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  l certificate is
2bc0: 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f   used.</dd>.<blo
2bd0: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c  ckquote>..<b>SSL
2be0: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20   Status</b>.    
2bf0: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  <dl>..<dt><stron
2c00: 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20  g>alpn</strong> 
2c10: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d  <em>protocol</em
2c20: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
2c30: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65  protocol selecte
2c40: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74  d after Applicat
2c50: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63  ion-Layer Protoc
2c60: 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74  ol..    Negotiat
2c70: 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e  ion (ALPN).</dd>
2c80: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69  ..<dt><strong>ci
2c90: 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  pher</strong> <e
2ca0: 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64  m>cipher</em></d
2cb0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 72 72  t>..<dd>The curr
2cc0: 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73  ent cipher in us
2cd0: 65 20 62 65 74 77 65 65 6e 20 74 68 65 20 63 6c  e between the cl
2ce0: 69 65 6e 74 20 61 6e 64 0a 09 20 20 20 20 73 65  ient and..    se
2cf0: 72 76 65 72 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f  rver channels.</
2d00: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2d10: 3e 70 65 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e  >peername</stron
2d20: 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e  g> <em>name</em>
2d30: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70  </dt>..<dd>The p
2d40: 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65  eername from the
2d50: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
2d60: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
2d70: 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67  protocol</strong
2d80: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65  > <em>version</e
2d90: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
2da0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
2db0: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63  n used for the c
2dc0: 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20  onnection:..    
2dd0: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31  SSL2, SSL3, TLS1
2de0: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32  , TLS1.1, TLS1.2
2df0: 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b  , TLS1.3, or unk
2e00: 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  nown.</dd>..<dt>
2e10: 3c 73 74 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73  <strong>sbits</s
2e20: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
2e30: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
2e40: 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75  number of bits u
2e50: 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73  sed for the sess
2e60: 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c  ion key.</dd>..<
2e70: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61  dt><strong>signa
2e80: 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68  tureHashAlgorith
2e90: 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61  m</strong> <em>a
2ea0: 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64  lgorithm</em></d
2eb0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e  t>..<dd>The sign
2ec0: 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72  ature hash algor
2ed0: 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  ithm.</dd>..<dt>
2ee0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72  <strong>signatur
2ef0: 65 5f 74 79 70 65 3c 2f 73 74 72 6f 6e 67 3e 20  e_type</strong> 
2f00: 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64  <em>type</em></d
2f10: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e  t>..<dd>The sign
2f20: 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65  ature type value
2f30: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
2f40: 6f 6e 67 3e 76 65 72 69 66 69 63 61 74 69 6f 6e  ong>verification
2f50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 65  </strong> <em>re
2f60: 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  sult</em></dt>..
2f70: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20  <dd>Certificate 
2f80: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73  verification res
2f90: 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ult.</dd>..<dt><
2fa0: 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 73 3c  strong>ca_names<
2fb0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73  /strong> <em>lis
2fc0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  t</em></dt>..<dd
2fd0: 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43 65 72  >List of the Cer
2fe0: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
2ff0: 74 69 65 73 20 75 73 65 64 20 74 6f 20 63 72 65  ties used to cre
3000: 61 74 65 20 74 68 65 20 63 65 72 74 69 66 69 63  ate the certific
3010: 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f  ate.</dd>.    </
3020: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65  dl>.</blockquote
3030: 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09  >.<blockquote>..
3040: 3c 62 3e 43 65 72 74 69 66 69 63 61 74 65 20 53  <b>Certificate S
3050: 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64  tatus</b>.    <d
3060: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  l>..<dt><strong>
3070: 61 6c 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  all</strong> <em
3080: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
3090: 3e 0a 09 3c 64 64 3e 44 75 6d 70 20 6f 66 20 61  >..<dd>Dump of a
30a0: 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69  ll certificate i
30b0: 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e  nfo.</dd>...<dt>
30c0: 3c 73 74 72 6f 6e 67 3e 76 65 72 73 69 6f 6e 3c  <strong>version<
30d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 61 6c  /strong> <em>val
30e0: 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ue</em></dt>..<d
30f0: 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 74  d>The certificat
3100: 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e 0a  e version.</dd>.
3110: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72  .<dt><strong>ser
3120: 69 61 6c 4e 75 6d 62 65 72 3c 2f 73 74 72 6f 6e  ialNumber</stron
3130: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64  g> <em>n</em></d
3140: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 72 69  t>..<dd>The seri
3150: 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65  al number of the
3160: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20   certificate as 
3170: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e  hex string.</dd>
3180: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69  ..<dt><strong>si
3190: 67 6e 61 74 75 72 65 3c 2f 73 74 72 6f 6e 67 3e  gnature</strong>
31a0: 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f   <em>algorithm</
31b0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69  em></dt>..<dd>Ci
31c0: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75  pher algorithm u
31d0: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63  sed for certific
31e0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f  ate signature.</
31f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
3200: 3e 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e  >issuer</strong>
3210: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74   <em>dn</em></dt
3220: 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69  >..<dd>The disti
3230: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44  nguished name (D
3240: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  N) of the certif
3250: 69 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 64  icate issuer.</d
3260: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3270: 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e  notBefore</stron
3280: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e  g> <em>date</em>
3290: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62  </dt>..<dd>The b
32a0: 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 74 68  egin date for th
32b0: 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68  e validity of th
32c0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  e certificate.</
32d0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
32e0: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e  >notAfter</stron
32f0: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e  g> <em>date</em>
3300: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 65  </dt>..<dd>The e
3310: 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 66  xpiration date f
3320: 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61  or the certifica
3330: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  te.</dd>..<dt><s
3340: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73  trong>subject</s
3350: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65  trong> <em>dn</e
3360: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3370: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e   distinguished n
3380: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20  ame (DN) of the 
3390: 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a  certificate subj
33a0: 65 63 74 2e 0a 09 20 20 20 20 46 69 65 6c 64 73  ect...    Fields
33b0: 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e   include: Common
33c0: 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61   Name (CN), Orga
33d0: 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f  nization (O), Lo
33e0: 63 61 6c 69 74 79 0a 09 20 20 20 20 6f 72 20 43  cality..    or C
33f0: 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f  ity (L), State o
3400: 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20  r Province (S), 
3410: 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e 61 6d 65  and Country Name
3420: 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   (C).</dd>..<dt>
3430: 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 55 6e  <strong>issuerUn
3440: 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20  iqueID</strong> 
3450: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  <em>string</em><
3460: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 69 73  /dt>..<dd>The is
3470: 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 2e 3c  suer unique id.<
3480: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3490: 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 75 65 49  g>subjectUniqueI
34a0: 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  D</strong> <em>s
34b0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
34c0: 09 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 63 74  .<dd>The subject
34d0: 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e   unique id.</dd>
34e0: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e  ...<dt><strong>n
34f0: 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73  um_extensions</s
3500: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
3510: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62  ></dt>..<dd>Numb
3520: 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  er of certificat
3530: 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64  e extensions.</d
3540: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3550: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f  extensions</stro
3560: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d  ng> <em>list</em
3570: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74  ></dt>..<dd>List
3580: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20   of certificate 
3590: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e  extension names.
35a0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
35b0: 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49  ng>authorityKeyI
35c0: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e  dentifier</stron
35d0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
35e0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 41 4b  m></dt>..<dd>(AK
35f0: 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 69 65  I) Key identifie
3600: 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67  r of the Issuing
3610: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20   CA certificate 
3620: 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 20 20  that signed..   
3630: 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 66 69   the SSL certifi
3640: 63 61 74 65 2e 20 54 68 69 73 20 76 61 6c 75 65  cate. This value
3650: 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b 49   matches the SKI
3660: 20 76 61 6c 75 65 20 6f 66 20 74 68 65 0a 09 20   value of the.. 
3670: 20 20 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20     Intermediate 
3680: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  CA certificate.<
3690: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
36a0: 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e  g>subjectKeyIden
36b0: 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20  tifier</strong> 
36c0: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  <em>string</em><
36d0: 2f 64 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20  /dt>..<dd>(SKI) 
36e0: 48 61 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c  Hash of the publ
36f0: 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68  ic key inside th
3700: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 55  e certificate. U
3710: 73 65 64 20 74 6f 0a 09 20 20 20 69 64 65 6e 74  sed to..   ident
3720: 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73  ify certificates
3730: 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20   that contain a 
3740: 70 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69  particular publi
3750: 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74  c key.</dd>..<dt
3760: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74  ><strong>subject
3770: 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e  AltName</strong>
3780: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f   <em>list</em></
3790: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66  dt>..<dd>List of
37a0: 20 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c 74 65   all of the alte
37b0: 72 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e 20 6e  rnative domain n
37c0: 61 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 69 6e  ames, sub domain
37d0: 73 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 20 61  s,..    and IP a
37e0: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72  ddresses that ar
37f0: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65  e secured by the
3800: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3810: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3820: 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ocsp</strong> <e
3830: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>list</em></dt>
3840: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c  ..<dd>List of al
3850: 6c 20 4f 43 53 50 20 55 52 4c 73 2e 3c 2f 64 64  l OCSP URLs.</dd
3860: 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  >...<dt><strong>
3870: 63 65 72 74 69 66 69 63 61 74 65 3c 2f 73 74 72  certificate</str
3880: 6f 6e 67 3e 20 3c 65 6d 3e 63 65 72 74 3c 2f 65  ong> <em>cert</e
3890: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
38a0: 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72   PEM encoded cer
38b0: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 0a  tificate.</dd>..
38c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67  .<dt><strong>sig
38d0: 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d 3c  natureAlgorithm<
38e0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67  /strong> <em>alg
38f0: 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e  orithm</em></dt>
3900: 0a 09 3c 64 64 3e 43 69 70 68 65 72 20 61 6c 67  ..<dd>Cipher alg
3910: 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20  orithm used for 
3920: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  certificate sign
3930: 61 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ature.</dd>..<dt
3940: 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75  ><strong>signatu
3950: 72 65 56 61 6c 75 65 3c 2f 73 74 72 6f 6e 67 3e  reValue</strong>
3960: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
3970: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69  </dt>..<dd>Certi
3980: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
3990: 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c   as hex string.<
39a0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
39b0: 67 3e 73 69 67 6e 61 74 75 72 65 44 69 67 65 73  g>signatureDiges
39c0: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76  t</strong> <em>v
39d0: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  ersion</em></dt>
39e0: 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74  ..<dd>Certificat
39f0: 65 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74  e signing digest
3a00: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
3a10: 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67  ong>publicKeyAlg
3a20: 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20  orithm</strong> 
3a30: 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65  <em>algorithm</e
3a40: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72  m></dt>..<dd>Cer
3a50: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
3a60: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c  re public key al
3a70: 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c  gorithm.</dd>..<
3a80: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69  dt><strong>publi
3a90: 63 4b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  cKey</strong> <e
3aa0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  m>string</em></d
3ab0: 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63  t>..<dd>Certific
3ac0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75  ate signature pu
3ad0: 62 6c 69 63 20 6b 65 79 20 61 73 20 68 65 78 20  blic key as hex 
3ae0: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64  string.</dd>..<d
3af0: 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 73 3c 2f  t><strong>bits</
3b00: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65  strong> <em>n</e
3b10: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d  m></dt>..<dd>Num
3b20: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64  ber of bits used
3b30: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65   for certificate
3b40: 20 73 69 67 6e 61 74 75 72 65 20 6b 65 79 3c 2f   signature key</
3b50: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
3b60: 3e 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 73 74  >self_signed</st
3b70: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61  rong> <em>boolea
3b80: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
3b90: 3e 49 73 20 63 65 72 74 69 66 69 63 61 74 65 20  >Is certificate 
3ba0: 73 69 67 6e 61 74 75 72 65 20 73 65 6c 66 20 73  signature self s
3bb0: 69 67 6e 65 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64  igned.</dd>...<d
3bc0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68  t><strong>sha1_h
3bd0: 61 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ash</strong> <em
3be0: 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >hash</em></dt>.
3bf0: 09 3c 64 64 3e 54 68 65 20 53 48 41 31 20 68 61  .<dd>The SHA1 ha
3c00: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
3c10: 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72  icate as hex str
3c20: 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ing.</dd>..<dt><
3c30: 73 74 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 61  strong>sha256_ha
3c40: 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  sh</strong> <em>
3c50: 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  hash</em></dt>..
3c60: 3c 64 64 3e 54 68 65 20 53 48 41 32 35 36 20 68  <dd>The SHA256 h
3c70: 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69  ash of the certi
3c80: 66 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74  ficate as hex st
3c90: 72 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  ring.</dd>.    <
3ca0: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74  /dl>.</blockquot
3cb0: 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  e>..    <dt><a n
3cc0: 61 6d 65 3d 22 74 6c 73 3a 3a 63 6f 6e 6e 65 63  ame="tls::connec
3cd0: 74 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  tion"><strong>tl
3ce0: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 73  s::connection</s
3cf0: 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 63  trong>.    <em>c
3d00: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c  hannel</em></a><
3d10: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74  /dt>.    <dd>Ret
3d20: 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74  urns the current
3d30: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74   connection stat
3d40: 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61  us of an SSL cha
3d50: 6e 6e 65 6c 2e 20 54 68 65 0a 09 72 65 73 75 6c  nnel. The..resul
3d60: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b  t is a list of k
3d70: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64  ey-value pairs d
3d80: 65 73 63 72 69 62 69 6e 67 20 74 68 65 0a 09 63  escribing the..c
3d90: 6f 6e 6e 65 63 74 65 64 20 70 65 65 72 2e 3c 2f  onnected peer.</
3da0: 64 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e  dd>.<blockquote>
3db0: 0a 09 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 3c  ..<b>SSL Status<
3dc0: 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64  /b>.    <dl>..<d
3dd0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 74 65 3c  t><strong>state<
3de0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 61  /strong> <em>sta
3df0: 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  te</em></dt>..<d
3e00: 64 3e 53 74 61 74 65 20 6f 66 20 74 68 65 20 63  d>State of the c
3e10: 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a  onnection.</dd>.
3e20: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72  .<dt><strong>ser
3e30: 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e  vername</strong>
3e40: 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f   <em>name</em></
3e50: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 61 6d  dt>..<dd>The nam
3e60: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74  e of the connect
3e70: 65 64 20 74 6f 20 73 65 72 76 65 72 2e 3c 2f 64  ed to server.</d
3e80: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3e90: 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67  protocol</strong
3ea0: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65  > <em>version</e
3eb0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3ec0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
3ed0: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63  n used for the c
3ee0: 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20  onnection:..    
3ef0: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31  SSL2, SSL3, TLS1
3f00: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32  , TLS1.1, TLS1.2
3f10: 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b  , TLS1.3, or unk
3f20: 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  nown.</dd>..<dt>
3f30: 3c 73 74 72 6f 6e 67 3e 72 65 6e 65 67 6f 74 69  <strong>renegoti
3f40: 61 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c  ation</strong> <
3f50: 65 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64  em>state</em></d
3f60: 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20  t>..<dd>Whether 
3f70: 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74  protocol renegot
3f80: 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f 72  iation is suppor
3f90: 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e  ted or not.</dd>
3fa0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65  ..<dt><strong>se
3fb0: 63 75 72 69 74 79 6c 65 76 65 6c 3c 2f 73 74 72  curitylevel</str
3fc0: 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 65 6c 3c 2f  ong> <em>level</
3fd0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
3fe0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
3ff0: 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74   used for select
4000: 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20  ion of ciphers, 
4010: 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f  key size, etc.</
4020: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4030: 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c  >session_reused<
4040: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f  /strong> <em>boo
4050: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  lean</em></dt>..
4060: 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20  <dd>Whether the 
4070: 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e  session has been
4080: 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c   reused or not.<
4090: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
40a0: 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f 73 74 72  g>is_server</str
40b0: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e  ong> <em>boolean
40c0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
40d0: 57 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e  Whether the conn
40e0: 65 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65  ection configure
40f0: 64 20 61 73 20 61 20 73 65 72 76 65 72 20 6f 72  d as a server or
4100: 20 63 6c 69 65 6e 74 20 28 66 61 6c 73 65 29 2e   client (false).
4110: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4120: 6e 67 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f  ng>compression</
4130: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65  strong> <em>mode
4140: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4150: 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68  Compression meth
4160: 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  od.</dd>..<dt><s
4170: 74 72 6f 6e 67 3e 65 78 70 61 6e 73 69 6f 6e 3c  trong>expansion<
4180: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64  /strong> <em>mod
4190: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
41a0: 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f  >Expansion metho
41b0: 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c  d.</dd>.    </dl
41c0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >.</blockquote>.
41d0: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62  <blockquote>..<b
41e0: 3e 43 69 70 68 65 72 20 49 6e 66 6f 3c 2f 62 3e  >Cipher Info</b>
41f0: 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c  .    <dl>..<dt><
4200: 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73  strong>cipher</s
4210: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65  trong> <em>ciphe
4220: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  r</em></dt>..<dd
4230: 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70  >The current cip
4240: 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74  her in use for t
4250: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f  he connection.</
4260: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4270: 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f  >standard_name</
4280: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65  strong> <em>name
4290: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
42a0: 54 68 65 20 73 74 61 6e 64 61 72 64 20 52 46 43  The standard RFC
42b0: 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e   name of cipher.
42c0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
42d0: 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e  ng>bits</strong>
42e0: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e   <em>n</em></dt>
42f0: 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72  ..<dd>The number
4300: 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69   of processed bi
4310: 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68  ts used for ciph
4320: 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  er.</dd>..<dt><s
4330: 74 72 6f 6e 67 3e 73 65 63 72 65 74 5f 62 69 74  trong>secret_bit
4340: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  s</strong> <em>n
4350: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4360: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65  The number of se
4370: 63 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66  cret bits used f
4380: 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a  or cipher.</dd>.
4390: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e  .<dt><strong>min
43a0: 5f 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67  _version</strong
43b0: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65  > <em>version</e
43c0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
43d0: 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f   minimum protoco
43e0: 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69  l version for ci
43f0: 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  pher.</dd>..<dt>
4400: 3c 73 74 72 6f 6e 67 3e 69 64 3c 2f 73 74 72 6f  <strong>id</stro
4410: 6e 67 3e 20 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c  ng> <em>id</em><
4420: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 4f 70  /dt>..<dd>The Op
4430: 65 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e  enSSL cipher id.
4440: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4450: 6e 67 3e 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f  ng>description</
4460: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69  strong> <em>stri
4470: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ng</em></dt>..<d
4480: 64 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 70  d>A text descrip
4490: 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68  tion of the ciph
44a0: 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  er.</dd>.    </d
44b0: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
44c0: 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c  .<blockquote>..<
44d0: 62 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f  b>Session Info</
44e0: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74  b>.    <dl>..<dt
44f0: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
4500: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
4510: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  col</em></dt>..<
4520: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  dd>The protocol 
4530: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41  selected after A
4540: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72  pplication-Layer
4550: 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e   Protocol..    N
4560: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e  egotiation (ALPN
4570: 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  ).</dd>..<dt><st
4580: 72 6f 6e 67 3e 72 65 73 75 6d 61 62 6c 65 3c 2f  rong>resumable</
4590: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
45a0: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ean</em></dt>..<
45b0: 64 64 3e 43 61 6e 20 74 68 65 20 73 65 73 73 69  dd>Can the sessi
45c0: 6f 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72  on be resumed or
45d0: 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   not.</dd>..<dt>
45e0: 3c 73 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 69  <strong>start_ti
45f0: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  me</strong> <em>
4600: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74  seconds</em></dt
4610: 3e 0a 09 3c 64 64 3e 54 69 6d 65 20 73 69 6e 63  >..<dd>Time sinc
4620: 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65  e session starte
4630: 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e  d in seconds sin
4640: 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09  ce epoch.</dd>..
4650: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d 65  <dt><strong>time
4660: 6f 75 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  out</strong> <em
4670: 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64  >seconds</em></d
4680: 74 3e 0a 09 3c 64 64 3e 4d 61 78 20 64 75 72 61  t>..<dd>Max dura
4690: 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20  tion of session 
46a0: 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72  in seconds befor
46b0: 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e  e time-out.</dd>
46c0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69  ..<dt><strong>li
46d0: 66 65 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  fetime</strong> 
46e0: 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e  <em>seconds</em>
46f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73 73 69  </dt>..<dd>Sessi
4700: 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69  on ticket lifeti
4710: 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e  me hint in secon
4720: 64 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ds.</dd>..<dt><s
4730: 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 69 64  trong>session_id
4740: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74  </strong> <em>st
4750: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  ring</em></dt>..
4760: 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69  <dd>Unique sessi
4770: 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e  on id for use in
4780: 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65   resuming the se
4790: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ssion.</dd>..<dt
47a0: 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e  ><strong>session
47b0: 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e  _ticket</strong>
47c0: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
47d0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75  </dt>..<dd>Uniqu
47e0: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  e session ticket
47f0: 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75   for use in resu
4800: 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e  ming the session
4810: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
4820: 6f 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64  ong>ticket_app_d
4830: 61 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ata</strong> <em
4840: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
4850: 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65  >..<dd>Unique se
4860: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70  ssion ticket app
4870: 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f  lication data.</
4880: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4890: 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72  >master_key</str
48a0: 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f  ong> <em>binary_
48b0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
48c0: 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73  ..<dd>Unique ses
48d0: 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e  sion master key.
48e0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
48f0: 6e 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65  ng>session_cache
4900: 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  _mode</strong> <
4910: 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74  em>mode</em></dt
4920: 3e 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 61  >..<dd>Server ca
4930: 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74  che mode (client
4940: 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74  , server, or bot
4950: 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  h).</dd>.    </d
4960: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
4970: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
4980: 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 22  e="tls::ciphers"
4990: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69  ><strong>tls::ci
49a0: 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20  phers</strong>. 
49b0: 20 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20     <em>protocol 
49c0: 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f  ?verbose? ?suppo
49d0: 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  rted?</em></a></
49e0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75  dt>.    <dd>Retu
49f0: 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 73 75  rns a list of su
4a00: 70 70 6f 72 74 65 64 20 63 69 70 68 65 72 73 20  pported ciphers 
4a10: 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 3c 65  available for <e
4a20: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c  m>protocol</em>,
4a30: 0a 09 77 68 65 72 65 20 70 72 6f 74 6f 63 6f 6c  ..where protocol
4a40: 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20   must be one of 
4a50: 3c 62 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 74  <b>ssl2, ssl3, t
4a60: 6c 73 31 2c 20 74 6c 73 31 2e 31 2c 0a 09 74 6c  ls1, tls1.1,..tl
4a70: 73 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 3e  s1.2,</b> or <b>
4a80: 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 3c  tls1.3</b>. If <
4a90: 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e 20  em>verbose</em> 
4aa0: 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 0a  is specified as.
4ab0: 09 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72  .true then a ver
4ac0: 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64  bose, human read
4ad0: 61 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74  able list is ret
4ae0: 75 72 6e 65 64 20 77 69 74 68 0a 09 61 64 64 69  urned with..addi
4af0: 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69  tional informati
4b00: 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72  on on the cipher
4b10: 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72 74  . If <em>support
4b20: 65 64 3c 2f 65 6d 3e 0a 09 69 73 20 73 70 65 63  ed</em>..is spec
4b30: 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74  ified as true, t
4b40: 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70  hen only the cip
4b50: 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66  hers supported f
4b60: 6f 72 20 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 6c  or protocol..wil
4b70: 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64  l be listed.</dd
4b80: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  >..    <dt><a na
4b90: 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  me="tls::protoco
4ba0: 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ls"><strong>tls:
4bb0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f  :protocols</stro
4bc0: 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20  ng></a></dt>.   
4bd0: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c   <dd>Returns a l
4be0: 69 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64  ist of supported
4bf0: 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69   protocols. Vali
4c00: 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c  d values are:..<
4c10: 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73  b>ssl2</b>, <b>s
4c20: 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31  sl3</b>, <b>tls1
4c30: 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c  </b>, <b>tls1.1<
4c40: 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f  /b>, <b>tls1.2</
4c50: 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31  b>,..and <b>tls1
4c60: 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69  .3</b>. Exact li
4c70: 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70  st depends on Op
4c80: 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e  enSSL version an
4c90: 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20  d..compile time 
4ca0: 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 20  flags.</dd>..   
4cb0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c   <dt><a name="tl
4cc0: 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72  s::version"><str
4cd0: 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e  ong>tls::version
4ce0: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64  </strong></a></d
4cf0: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72  t>.    <dd>Retur
4d00: 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76  ns the OpenSSL v
4d10: 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f  ersion string.</
4d20: 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c  dd>.</dl>..<h3><
4d30: 61 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 4b  a name="CALLBACK
4d40: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41   OPTIONS">CALLBA
4d50: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f  CK OPTIONS</a></
4d60: 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 69  h3>..<p>.As indi
4d70: 63 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e 64  cated above, ind
4d80: 69 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c 73  ividual channels
4d90: 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68   can be given th
4da0: 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b  eir own callback
4db0: 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65  s.to handle inte
4dc0: 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73  rmediate process
4dd0: 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53  ing by the OpenS
4de0: 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e  SL library, usin
4df0: 67 20 74 68 65 0a 3c 65 6d 3e 2d 63 6f 6d 6d 61  g the.<em>-comma
4e00: 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e  nd</em> and <em>
4e10: 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f  -password</em> o
4e20: 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74 6f  ptions passed to
4e30: 20 65 69 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f   either of.<stro
4e40: 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  ng>tls::socket</
4e50: 73 74 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f  strong> or <stro
4e60: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  ng>tls::import</
4e70: 73 74 72 6f 6e 67 3e 2e 0a 3c 2f 70 3e 0a 0a 3c  strong>..</p>..<
4e80: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 64 6c 3e  blockquote>.<dl>
4e90: 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e  ..    <dt><stron
4ea0: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
4eb0: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b  ng> <em>callback
4ec0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  </em></dt>.    <
4ed0: 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65  dd>..Invokes the
4ee0: 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63   specified <em>c
4ef0: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72  allback</em> scr
4f00: 69 70 74 20 61 74 0a 09 73 65 76 65 72 61 6c 20  ipt at..several 
4f10: 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68  points during th
4f20: 65 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68  e OpenSSL handsh
4f30: 61 6b 65 2e 0a 09 56 61 6c 75 65 73 20 72 65 74  ake...Values ret
4f40: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 63  urned from the c
4f50: 61 6c 6c 62 61 63 6b 20 61 72 65 20 69 67 6e 6f  allback are igno
4f60: 72 65 64 2e 0a 09 41 72 67 75 6d 65 6e 74 73 20  red...Arguments 
4f70: 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 65 20  appended to the 
4f80: 73 63 72 69 70 74 20 75 70 6f 6e 20 63 61 6c 6c  script upon call
4f90: 62 61 63 6b 20 74 61 6b 65 20 6f 6e 65 20 6f 66  back take one of
4fa0: 20 74 68 65 0a 09 66 6f 6c 6c 6f 77 69 6e 67 20   the..following 
4fb0: 66 6f 72 6d 73 3a 0a 0a 09 3c 62 72 3e 0a 09 3c  forms:...<br>..<
4fc0: 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 3c 21 2d 2d  br>...<dl>..<!--
4fd0: 09 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61  .This form of ca
4fe0: 6c 6c 62 61 63 6b 20 69 73 20 64 69 73 61 62 6c  llback is disabl
4ff0: 65 64 2e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73  ed....<dt>..  <s
5000: 74 72 6f 6e 67 3e 65 72 72 6f 72 3c 2f 73 74 72  trong>error</str
5010: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  ong> <em>channel
5020: 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c   message</em>..<
5030: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68  /dt>..<dd>..  Th
5040: 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65  e <em>message</e
5050: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 63 6f 6e 74  m> argument cont
5060: 61 69 6e 73 20 61 6e 20 65 72 72 6f 72 20 6d 65  ains an error me
5070: 73 73 61 67 65 20 67 65 6e 65 72 61 74 65 64 0a  ssage generated.
5080: 09 20 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  .  by the OpenSS
5090: 4c 20 66 75 6e 63 74 69 6f 6e 20 3c 63 6f 64 65  L function <code
50a0: 3e 45 52 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f  >ERR_reason_erro
50b0: 72 5f 73 74 72 69 6e 67 28 29 3c 2f 63 6f 64 65  r_string()</code
50c0: 3e 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e  >...</dd>...<br>
50d0: 0a 2d 2d 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  .-->...<dt>..  <
50e0: 73 74 72 6f 6e 67 3e 69 6e 66 6f 3c 2f 73 74 72  strong>info</str
50f0: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  ong> <em>channel
5100: 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73   major minor mes
5110: 73 61 67 65 20 74 79 70 65 3c 2f 65 6d 3e 0a 09  sage type</em>..
5120: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54  </dt>..<dd>..  T
5130: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c  his form of call
5140: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20  back is invoked 
5150: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66  by the OpenSSL f
5160: 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65  unction..  <code
5170: 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69 6e 66  >SSL_CTX_set_inf
5180: 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 6f  o_callback()</co
5190: 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20  de>...  <br>..  
51a0: 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65  The <em>major</e
51b0: 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69 6e 6f 72  m> and <em>minor
51c0: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 73 20  </em> arguments 
51d0: 61 72 65 20 75 73 65 64 20 74 6f 0a 09 20 20 72  are used to..  r
51e0: 65 70 72 65 73 65 6e 74 20 74 68 65 20 73 74 61  epresent the sta
51f0: 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 62  te information b
5200: 69 74 6d 61 73 6b 2e 0a 09 20 20 3c 75 6c 3e 0a  itmask...  <ul>.
5210: 09 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20  .  <li>Possible 
5220: 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d  values for <em>m
5230: 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09  ajor</em> are:..
5240: 20 20 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b    <code>handshak
5250: 65 2c 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63  e, alert, connec
5260: 74 2c 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e  t, accept</code>
5270: 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f  .</li>..  <li>Po
5280: 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f  ssible values fo
5290: 72 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e  r <em>minor</em>
52a0: 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73   are:..  <code>s
52b0: 74 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64  tart, done, read
52c0: 2c 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65  , write, loop, e
52d0: 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e  xit</code>.</li>
52e0: 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e  ..  <li>The <em>
52f0: 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67  message</em> arg
5300: 75 6d 65 6e 74 20 69 73 20 61 20 64 65 73 63 72  ument is a descr
5310: 69 70 74 69 76 65 20 73 74 72 69 6e 67 20 77 68  iptive string wh
5320: 69 63 68 20 6d 61 79 0a 09 20 20 62 65 20 67 65  ich may..  be ge
5330: 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20 62  nerated either b
5340: 79 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74  y <code>SSL_stat
5350: 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c  e_string_long()<
5360: 2f 63 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20  /code> or by..  
5370: 3c 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f  <code>SSL_alert_
5380: 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67  desc_string_long
5390: 28 29 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e  ()</code>, depen
53a0: 64 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 74 2e  ding on context.
53b0: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f 72  </li>..  <li>For
53c0: 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73   alerts, the pos
53d0: 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72  sible values for
53e0: 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 61   <em>type</em> a
53f0: 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61 72  re:..  <code>war
5400: 6e 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e 64  ning, fatal, and
5410: 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e 2e   unknown</code>.
5420: 3c 2f 6c 69 3e 0a 09 20 20 3c 2f 75 6c 3e 0a 09  </li>..  </ul>..
5430: 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20  </dd>...<dt>..  
5440: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c  <strong>session<
5450: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 73  /strong> <em>ses
5460: 73 69 6f 6e 5f 69 64 20 74 69 63 6b 65 74 20 6c  sion_id ticket l
5470: 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f  ifetime</em>..</
5480: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69  dt>..<dd>..  Thi
5490: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
54a0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79  ck is invoked by
54b0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e   the OpenSSL fun
54c0: 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53  ction..  <code>S
54d0: 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73 65 74 5f  SL_CTX_sess_set_
54e0: 6e 65 77 5f 63 62 28 29 3c 2f 63 6f 64 65 3e 2e  new_cb()</code>.
54f0: 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 73 65  ..  Where <em>se
5500: 73 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e 20 69 73  ssion_id</em> is
5510: 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 73   the current ses
5520: 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 2c  sion identifier,
5530: 0a 09 20 20 3c 65 6d 3e 74 69 63 6b 65 74 3c 2f  ..  <em>ticket</
5540: 65 6d 3e 20 69 73 20 74 68 65 20 73 65 73 73 69  em> is the sessi
5550: 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 2c 20  on ticket info, 
5560: 61 6e 64 20 3c 65 6d 3e 6c 69 66 65 74 69 6d 65  and <em>lifetime
5570: 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 20  </em>..  is the 
5580: 74 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74  the ticket lifet
5590: 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e 0a  ime in seconds..
55a0: 09 3c 2f 64 64 3e 0a 0a 09 3c 2f 64 6c 3e 0a 20  .</dd>...</dl>. 
55b0: 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62     </dd>..    <b
55c0: 72 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72  r>..    <dt><str
55d0: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73  ong>-password</s
55e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62  trong> <em>callb
55f0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ack</em></dt>.  
5600: 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20    <dd>..Invokes 
5610: 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65  the specified <e
5620: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20  m>callback</em> 
5630: 73 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e  script when Open
5640: 53 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62  SSL needs to..ob
5650: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e  tain a password.
5660: 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73    The callback s
5670: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 68 65  hould return the
5680: 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 20 73   password as a s
5690: 74 72 69 6e 67 2e 0a 09 4e 6f 20 61 72 67 75 6d  tring...No argum
56a0: 65 6e 74 73 20 61 72 65 20 61 70 70 65 6e 64 65  ents are appende
56b0: 64 20 74 6f 20 74 68 65 20 73 63 72 69 70 74 20  d to the script 
56c0: 75 70 6f 6e 20 63 61 6c 6c 62 61 63 6b 2e 0a 20  upon callback.. 
56d0: 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62     </dd>..    <b
56e0: 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74  r>...    <dt><st
56f0: 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f  rong>-validateco
5700: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  mmand</strong> <
5710: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
5720: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09  </dt>.    <dd>..
5730: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63  Invokes the spec
5740: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61  ified <em>callba
5750: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 64  ck</em> script d
5760: 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 20  uring handshake 
5770: 69 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 65 72  in..order to ver
5780: 69 66 79 2f 76 61 6c 69 64 61 74 65 20 74 68 65  ify/validate the
5790: 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 2e   provided value.
57a0: 20 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65   ..To reject the
57b0: 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74   value and abort
57c0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65   connection, the
57d0: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64   callback should
57e0: 20 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f 20 61   return 0...To a
57f0: 63 63 65 70 74 20 74 68 65 20 76 61 6c 75 65 2c  ccept the value,
5800: 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72   it should retur
5810: 6e 20 31 2e 20 20 54 6f 20 72 65 6a 65 63 74 20  n 1.  To reject 
5820: 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74 0a 09  the value, but..
5830: 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e  continue the con
5840: 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75  nection, it shou
5850: 6c 64 20 72 65 74 75 72 6e 20 32 2e 0a 0a 09 3c  ld return 2....<
5860: 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e  br>..<br>...<dl>
5870: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
5880: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e  ng>alpn</strong>
5890: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65   <em>protocol</e
58a0: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a  m>..</dt>..<dd>.
58b0: 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c 20  .  For servers, 
58c0: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  this form of cal
58d0: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
58e0: 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74   when the client
58f0: 20 41 4c 50 4e 0a 09 20 20 68 65 61 64 65 72 20   ALPN..  header 
5900: 69 73 20 72 65 63 65 69 76 65 64 20 61 6e 64 20  is received and 
5910: 74 68 65 20 66 69 72 73 74 20 3c 62 3e 2d 61 6c  the first <b>-al
5920: 70 6e 3c 2f 62 3e 20 73 70 65 63 69 66 69 65 64  pn</b> specified
5930: 20 70 72 6f 74 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e   protocol common
5940: 0a 09 20 20 74 6f 20 74 68 65 20 62 6f 74 68 20  ..  to the both 
5950: 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 20 73  the client and s
5960: 65 72 76 65 72 20 69 73 20 73 65 6c 65 63 74 65  erver is selecte
5970: 64 2e 20 49 66 20 6e 6f 6e 65 2c 20 74 68 65 20  d. If none, the 
5980: 66 69 72 73 74 0a 09 20 20 63 6c 69 65 6e 74 20  first..  client 
5990: 73 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63  specified protoc
59a0: 6f 6c 20 69 73 20 75 73 65 64 2e 0a 09 3c 2f 64  ol is used...</d
59b0: 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e  d>...<br>...<dt>
59c0: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 68 65 6c 6c  ..  <strong>hell
59d0: 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  o</strong> <em>s
59e0: 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09  ervername</em>..
59f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46  </dt>..<dd>..  F
5a00: 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73  or servers, this
5a10: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
5a20: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72  k is invoked dur
5a30: 69 6e 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f  ing client hello
5a40: 0a 09 20 20 6d 65 73 73 61 67 65 20 70 72 6f 63  ..  message proc
5a50: 65 73 73 69 6e 67 2e 20 55 73 65 64 20 74 6f 20  essing. Used to 
5a60: 73 65 6c 65 63 74 20 61 6e 20 61 70 70 72 6f 70  select an approp
5a70: 72 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74  riate certificat
5a80: 65 20 74 6f 0a 09 20 20 70 72 65 73 65 6e 74 2c  e to..  present,
5a90: 20 61 6e 64 20 6d 61 6b 65 20 6f 74 68 65 72 20   and make other 
5aa0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64  configuration ad
5ab0: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61  justments releva
5ac0: 6e 74 20 74 6f 20 74 68 61 74 0a 09 20 20 73 65  nt to that..  se
5ad0: 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74  rver name and it
5ae0: 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e  s configuration.
5af0: 20 43 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 53   Called before S
5b00: 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c  NI and ALPN call
5b10: 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09  backs...</dd>...
5b20: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  <br>...<dt>..  <
5b30: 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 72 6f  strong>sni</stro
5b40: 6e 67 3e 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61  ng> <em>serverna
5b50: 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  me</em>..</dt>..
5b60: 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76  <dd>..  For serv
5b70: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f  ers, this form o
5b80: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
5b90: 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53  voked when the S
5ba0: 4e 49 20 68 65 61 64 65 72 0a 09 20 20 66 72 6f  NI header..  fro
5bb0: 6d 20 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20  m the client is 
5bc0: 72 65 63 65 69 76 65 64 2e 20 57 68 65 72 65 20  received. Where 
5bd0: 3c 69 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69  <i>servername</i
5be0: 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a  > is the client.
5bf0: 09 20 20 73 70 65 63 69 66 69 65 64 20 73 65 72  .  specified ser
5c00: 76 65 72 6e 61 6d 65 2e 20 54 68 69 73 20 69 73  vername. This is
5c10: 20 75 73 65 64 20 77 68 65 6e 20 61 20 73 65 72   used when a ser
5c20: 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c  ver supports mul
5c30: 74 69 70 6c 65 0a 09 20 20 6e 61 6d 65 73 2c 20  tiple..  names, 
5c40: 73 6f 20 74 68 65 20 72 69 67 68 74 20 63 65 72  so the right cer
5c50: 74 69 66 69 63 61 74 65 20 63 61 6e 20 62 65 20  tificate can be 
5c60: 75 73 65 64 2e 20 43 61 6c 6c 65 64 20 61 66 74  used. Called aft
5c70: 65 72 20 68 65 6c 6c 6f 0a 09 20 20 63 61 6c 6c  er hello..  call
5c80: 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72 65 20  back but before 
5c90: 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 2e 0a 09  ALPN callback...
5ca0: 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c  </dd>...<br>...<
5cb0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 76  dt>..  <strong>v
5cc0: 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c  erify</strong> <
5cd0: 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70 74 68  em>channel depth
5ce0: 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72   cert status err
5cf0: 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  or</em>..</dt>..
5d00: 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72  <dd>..  This for
5d10: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
5d20: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e   invoked by Open
5d30: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63  SSL when a new c
5d40: 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 69 73  ertificate..  is
5d50: 20 72 65 63 65 69 76 65 64 20 66 72 6f 6d 20 74   received from t
5d60: 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f  he peer. It allo
5d70: 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 6f  ws the client to
5d80: 20 63 68 65 63 6b 20 74 68 65 0a 09 20 20 63 65   check the..  ce
5d90: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 20  rtificate chain 
5da0: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73  verification res
5db0: 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20  ults and choose 
5dc0: 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69  whether to conti
5dd0: 6e 75 65 20 6f 72 20 6e 6f 74 2e 0a 09 20 20 3c  nue or not...  <
5de0: 75 6c 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c  ul>..  <li>The <
5df0: 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72  em>depth</em> ar
5e00: 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 69 6e 74  gument is an int
5e10: 65 67 65 72 20 72 65 70 72 65 73 65 6e 74 69 6e  eger representin
5e20: 67 20 74 68 65 0a 09 20 20 63 75 72 72 65 6e 74  g the..  current
5e30: 20 64 65 70 74 68 20 6f 6e 20 74 68 65 20 63 65   depth on the ce
5e40: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c  rtificate chain,
5e50: 20 77 69 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30   with..  <code>0
5e60: 3c 2f 63 6f 64 65 3e 20 61 73 20 74 68 65 20 70  </code> as the p
5e70: 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20  eer certificate 
5e80: 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65  and higher value
5e90: 73 20 67 6f 69 6e 67 0a 09 20 20 75 70 20 74 6f  s going..  up to
5ea0: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65   the Certificate
5eb0: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e   Authority (CA).
5ec0: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65  </li>..  <li>The
5ed0: 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61   <em>cert</em> a
5ee0: 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73  rgument is a lis
5ef0: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70  t of key-value p
5f00: 61 69 72 73 20 73 69 6d 69 6c 61 72 0a 09 20 20  airs similar..  
5f10: 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65  to those returne
5f20: 64 20 62 79 0a 09 20 20 3c 61 20 68 72 65 66 3d  d by..  <a href=
5f30: 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c  "#tls::status"><
5f40: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74  strong>tls::stat
5f50: 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e  us</strong></a>.
5f60: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65  </li>..  <li>The
5f70: 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e   <em>status</em>
5f80: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20   argument is an 
5f90: 62 6f 6f 6c 65 61 6e 20 72 65 70 72 65 73 65 6e  boolean represen
5fa0: 74 69 6e 67 20 74 68 65 0a 09 20 20 76 61 6c 69  ting the..  vali
5fb0: 64 69 74 79 20 6f 66 20 74 68 65 20 63 75 72 72  dity of the curr
5fc0: 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 65 2e  ent certificate.
5fd0: 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c  ..  A value of <
5fe0: 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65  code>0</code> me
5ff0: 61 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63  ans the certific
6000: 61 74 65 20 69 73 20 64 65 65 6d 65 64 20 69 6e  ate is deemed in
6010: 76 61 6c 69 64 2e 0a 09 20 20 41 20 76 61 6c 75  valid...  A valu
6020: 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f  e of <code>1</co
6030: 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65  de> means the ce
6040: 72 74 69 66 69 63 61 74 65 20 69 73 20 64 65 65  rtificate is dee
6050: 6d 65 64 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a  med valid.</li>.
6060: 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65  .  <li>The <em>e
6070: 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  rror</em> argume
6080: 6e 74 20 73 75 70 70 6c 69 65 73 20 74 68 65 20  nt supplies the 
6090: 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c  message, if any,
60a0: 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79   generated..  by
60b0: 20 3c 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52   <code>X509_STOR
60c0: 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28  E_CTX_get_error(
60d0: 29 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09  )</code>.</li>..
60e0: 20 20 3c 2f 75 6c 3e 0a 09 20 20 3c 62 72 3e 0a    </ul>..  <br>.
60f0: 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 63  .  <br>..  The c
6100: 61 6c 6c 62 61 63 6b 20 6d 61 79 20 6f 76 65 72  allback may over
6110: 72 69 64 65 20 6e 6f 72 6d 61 6c 20 76 61 6c 69  ride normal vali
6120: 64 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 69 6e  dation processin
6130: 67 20 62 79 20 65 78 70 6c 69 63 69 74 6c 79 0a  g by explicitly.
6140: 09 20 20 72 65 74 75 72 6e 69 6e 67 20 6f 6e 65  .  returning one
6150: 20 6f 66 20 74 68 65 20 61 62 6f 76 65 20 3c 65   of the above <e
6160: 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 76 61  m>status</em> va
6170: 6c 75 65 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62  lues...</dd>..<b
6180: 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f  r>..</dl>.    </
6190: 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63  dd>.</dl>.</bloc
61a0: 6b 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66  kquote>..<p>.Ref
61b0: 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74  erence implement
61c0: 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20  ations of these 
61d0: 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72  callbacks are pr
61e0: 6f 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69  ovided in the.di
61f0: 73 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73  stribution as <s
6200: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62  trong>tls::callb
6210: 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64  ack</strong> and
6220: 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61  .<strong>tls::pa
6230: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20  ssword</strong> 
6240: 72 65 73 70 65 63 74 69 76 65 6c 79 2e 20 20 4e  respectively.  N
6250: 6f 74 65 20 74 68 61 74 20 74 68 65 73 65 20 61  ote that these a
6260: 72 65 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65  re.<em>sample</e
6270: 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f  m> implementatio
6280: 6e 73 20 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d  ns only.  In a m
6290: 6f 72 65 20 72 65 61 6c 69 73 74 69 63 20 64 65  ore realistic de
62a0: 70 6c 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75  ployment.you wou
62b0: 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 20  ld specify your 
62c0: 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72  own callback scr
62d0: 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53  ipts on each TLS
62e0: 20 63 68 61 6e 6e 65 6c 0a 75 73 69 6e 67 20 74   channel.using t
62f0: 68 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c  he <em>-command<
6300: 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61  /em> and <em>-pa
6310: 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69  ssword</em> opti
6320: 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54  ons..</p>..<p>.T
6330: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76  he default behav
6340: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d  ior when the <em
6350: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f  >-command</em> o
6360: 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65  ption is not spe
6370: 63 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54 4c  cified is for.TL
6380: 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65  S to process the
6390: 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72   associated libr
63a0: 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e  ary callbacks in
63b0: 74 65 72 6e 61 6c 6c 79 2e 0a 54 68 65 20 64 65  ternally..The de
63c0: 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77  fault behavior w
63d0: 68 65 6e 20 74 68 65 20 3c 65 6d 3e 2d 70 61 73  hen the <em>-pas
63e0: 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f  sword</em> optio
63f0: 6e 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69  n is not specifi
6400: 65 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f  ed is for.TLS to
6410: 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73   process the ass
6420: 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20  ociated library 
6430: 63 61 6c 6c 62 61 63 6b 73 20 62 79 20 61 74 74  callbacks by att
6440: 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 0a  empting to call.
6450: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73  <strong>tls::pas
6460: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a  sword</strong>..
6470: 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62  The difference b
6480: 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f  etween these two
6490: 20 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 20   behaviors is a 
64a0: 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d  consequence of m
64b0: 61 69 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61  aintaining.compa
64c0: 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 61  tibility with ea
64d0: 72 6c 69 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61  rlier implementa
64e0: 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e  tions..</p>..<p>
64f0: 0a 54 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  .The <strong>tls
6500: 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e  ::debug</strong>
6510: 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64   variable provid
6520: 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e  es some addition
6530: 61 6c 0a 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20  al.control over 
6540: 74 68 65 73 65 20 72 65 66 65 72 65 6e 63 65 20  these reference 
6550: 63 61 6c 6c 62 61 63 6b 73 2e 20 20 49 74 73 20  callbacks.  Its 
6560: 76 61 6c 75 65 20 69 73 20 7a 65 72 6f 20 62 79  value is zero by
6570: 20 64 65 66 61 75 6c 74 2e 0a 48 69 67 68 65 72   default..Higher
6580: 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63 65 20   values produce 
6590: 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20  more diagnostic 
65a0: 6f 75 74 70 75 74 2c 20 61 6e 64 20 77 69 6c 6c  output, and will
65b0: 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 0a   also force the.
65c0: 76 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e  verify method in
65d0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61   <strong>tls::ca
65e0: 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20  llback</strong> 
65f0: 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a 63 65  to accept the.ce
6600: 72 74 69 66 69 63 61 74 65 2c 20 65 76 65 6e 20  rtificate, even 
6610: 77 68 65 6e 20 69 74 20 69 73 20 69 6e 76 61 6c  when it is inval
6620: 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65  id..</p>..<p>.<e
6630: 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68  m>.The use of th
6640: 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c  e reference call
6650: 62 61 63 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c  backs <strong>tl
6660: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72  s::callback</str
6670: 6f 6e 67 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67  ong> and.<strong
6680: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f  >tls::password</
6690: 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72  strong> is not r
66a0: 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65  ecommended.  The
66b0: 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64  y may be removed
66c0: 0a 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c  .from future rel
66d0: 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70  eases..</em>.</p
66e0: 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20  >..<p>.<em>.The 
66f0: 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61  use of the varia
6700: 62 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ble <strong>tls:
6710: 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20  :debug</strong> 
6720: 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64  is not recommend
6730: 65 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65  ed..It may be re
6740: 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72  moved from futur
6750: 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d  e releases..</em
6760: 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  >.</p>..<h3><a n
6770: 61 6d 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55  ame="DEBUG">DEBU
6780: 47 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20  G</a></h3>..TLS 
6790: 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20  key logging can 
67a0: 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65  be enabled by se
67b0: 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f  tting the enviro
67c0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c  nment variable.<
67d0: 62 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c  b>SSLKEYLOGFILE<
67e0: 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20  /b> to the name 
67f0: 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c  of the file to l
6800: 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e  og to. Then when
6810: 65 76 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74  ever TLS.key mat
6820: 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74  erial is generat
6830: 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69  ed or received i
6840: 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64  t will be logged
6850: 20 74 6f 20 74 68 65 20 66 69 6c 65 2e 0a 0a 3c   to the file...<
6860: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50  h3><a name="HTTP
6870: 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53  S EXAMPLE">HTTPS
6880: 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33   EXAMPLE</a></h3
6890: 3e 0a 0a 3c 70 3e 54 68 69 73 20 65 78 61 6d 70  >..<p>This examp
68a0: 6c 65 20 75 73 65 73 20 61 20 73 61 6d 70 6c 65  le uses a sample
68b0: 20 73 65 72 76 65 72 2e 70 65 6d 20 70 72 6f 76   server.pem prov
68c0: 69 64 65 64 20 77 69 74 68 20 74 68 65 20 54 4c  ided with the TL
68d0: 53 20 72 65 6c 65 61 73 65 2c 0a 63 6f 75 72 74  S release,.court
68e0: 65 73 79 20 6f 66 20 74 68 65 20 3c 73 74 72 6f  esy of the <stro
68f0: 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f  ng>OpenSSL</stro
6900: 6e 67 3e 20 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e  ng> project.</p>
6910: 0a 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61  ..<pre><code>.pa
6920: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74  ckage require ht
6930: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  tp.package requi
6940: 72 65 20 74 6c 73 0a 0a 68 74 74 70 3a 3a 72 65  re tls..http::re
6950: 67 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33  gister https 443
6960: 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f   [list ::tls::so
6970: 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72  cket -autoserver
6980: 6e 61 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69  name true -requi
6990: 72 65 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f  re true -cadir /
69a0: 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 5d 0a 0a  etc/ssl/certs]..
69b0: 73 65 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 67  set tok [http::g
69c0: 65 74 75 72 6c 20 68 74 74 70 73 3a 2f 2f 77 77  eturl https://ww
69d0: 77 2e 74 63 6c 2e 74 6b 2f 5d 0a 3c 2f 63 6f 64  w.tcl.tk/].</cod
69e0: 65 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61  e></pre>..<h3><a
69f0: 20 6e 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 43   name="SPECIAL C
6a00: 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 3e 53  ONSIDERATIONS">S
6a10: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41  PECIAL CONSIDERA
6a20: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  TIONS</a></h3>..
6a30: 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74  <p>The capabilit
6a40: 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b  ies of this pack
6a50: 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f  age can vary eno
6a60: 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 0a 75 70  rmously based.up
6a70: 6f 6e 20 68 6f 77 20 79 6f 75 72 20 4f 70 65 6e  on how your Open
6a80: 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20  SSL library was 
6a90: 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62  configured and b
6aa0: 75 69 6c 74 2e 20 41 74 20 74 68 65 0a 6d 6f 73  uilt. At the.mos
6ab0: 74 20 6d 61 63 72 6f 2d 6c 65 76 65 6c 20 4f 70  t macro-level Op
6ac0: 65 6e 53 53 4c 20 73 75 70 70 6f 72 74 73 20 61  enSSL supports a
6ad0: 20 26 71 75 6f 74 3b 6e 6f 20 70 61 74 65 6e 74   &quot;no patent
6ae0: 73 26 71 75 6f 74 3b 20 62 75 69 6c 64 2c 0a 77  s&quot; build,.w
6af0: 68 69 63 68 20 64 69 73 61 62 6c 65 73 20 52 53  hich disables RS
6b00: 41 2c 20 49 44 45 41 2c 20 52 43 28 32 2c 34 2c  A, IDEA, RC(2,4,
6b10: 35 29 20 61 6e 64 20 53 53 4c 32 20 2d 20 69 66  5) and SSL2 - if
6b20: 20 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 69 73   your OpenSSL is
6b30: 0a 63 6f 6e 66 69 67 75 72 65 64 20 74 68 69 73  .configured this
6b40: 20 77 61 79 20 74 68 65 6e 20 79 6f 75 20 77 69   way then you wi
6b50: 6c 6c 20 6e 65 65 64 20 74 6f 20 62 75 69 6c 64  ll need to build
6b60: 20 54 4c 53 20 77 69 74 68 20 74 68 65 0a 2d 44   TLS with the.-D
6b70: 4e 4f 5f 50 41 54 45 4e 54 53 20 6f 70 74 69 6f  NO_PATENTS optio
6b80: 6e 20 2d 20 61 6e 64 20 74 68 65 20 72 65 73 75  n - and the resu
6b90: 6c 74 61 6e 74 20 6d 6f 64 75 6c 65 20 77 69 6c  ltant module wil
6ba0: 6c 20 66 75 6e 63 74 69 6f 6e 0a 63 6f 72 72 65  l function.corre
6bb0: 63 74 6c 79 20 61 6e 64 20 61 6c 73 6f 20 73 75  ctly and also su
6bc0: 70 70 6f 72 74 20 41 44 48 20 63 65 72 74 69 66  pport ADH certif
6bd0: 69 63 61 74 65 2d 6c 65 73 73 20 65 6e 63 72 79  icate-less encry
6be0: 70 74 69 6f 6e 2c 0a 68 6f 77 65 76 65 72 20 79  ption,.however y
6bf0: 6f 75 20 77 69 6c 6c 20 62 65 20 75 6e 61 62 6c  ou will be unabl
6c00: 65 20 74 6f 20 75 74 69 6c 69 7a 65 20 74 68 69  e to utilize thi
6c10: 73 20 74 6f 20 73 70 65 61 6b 20 74 6f 20 6e 6f  s to speak to no
6c20: 72 6d 61 6c 20 57 65 62 0a 53 65 72 76 65 72 73  rmal Web.Servers
6c30: 2c 20 77 68 69 63 68 20 74 79 70 69 63 61 6c 6c  , which typicall
6c40: 79 20 72 65 71 75 69 72 65 20 52 53 41 20 73 75  y require RSA su
6c50: 70 70 6f 72 74 2e 20 50 6c 65 61 73 65 20 73 65  pport. Please se
6c60: 65 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a  e <a.href="http:
6c70: 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72  //www.openssl.or
6c80: 67 2f 22 3e 68 74 74 70 3a 2f 2f 77 77 77 2e 6f  g/">http://www.o
6c90: 70 65 6e 73 73 6c 2e 6f 72 67 2f 3c 2f 61 3e 20  penssl.org/</a> 
6ca0: 66 6f 72 0a 6d 6f 72 65 20 69 6e 66 6f 72 6d 61  for.more informa
6cb0: 74 69 6f 6e 20 6f 6e 20 74 68 65 20 77 68 6f 6c  tion on the whol
6cc0: 65 20 69 73 73 75 65 20 6f 66 20 70 61 74 65 6e  e issue of paten
6cd0: 74 73 20 61 6e 64 20 55 53 20 65 78 70 6f 72 74  ts and US export
6ce0: 0a 72 65 73 74 72 69 63 74 69 6f 6e 73 2e 20 3c  .restrictions. <
6cf0: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65  /p>..<h3><a name
6d00: 3d 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20  ="SEE ALSO">SEE 
6d10: 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  ALSO</a></h3>..<
6d20: 70 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74  p><strong>socket
6d30: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f  </strong>, <stro
6d40: 6e 67 3e 66 69 6c 65 65 76 65 6e 74 2c 20 3c 2f  ng>fileevent, </
6d50: 73 74 72 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d 22  strong><a.href="
6d60: 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73  http://www.opens
6d70: 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e 67  sl.org/"><strong
6d80: 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67  >OpenSSL</strong
6d90: 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a  ></a></p>..<hr>.
6da0: 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 74  .<pre>.Copyright
6db0: 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74   &copy; 1999 Mat
6dc0: 74 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 69  t Newman..Copyri
6dd0: 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 20  ght &copy; 2004 
6de0: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73  Starfish Systems
6df0: 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 3e  ..</pre>.</body>
6e00: 0a 3c 2f 68 74 6d 6c 3e 0a                       .</html>.