Hex Artifact Content

Artifact 6d8fb07f8c8f07197b46954910b4095f291d47bf501d971b16a35c6e9384a559:


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 20 61 73 20 68 65 78 20 73 74 72 69  cate as hex stri
3650: 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d  ng. This value m
3660: 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 0a 09  atches the SKI..
3670: 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74 68 65      value of the
3680: 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41   Intermediate CA
3690: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
36a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
36b0: 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69  subjectKeyIdenti
36c0: 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  fier</strong> <e
36d0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  m>string</em></d
36e0: 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20 48 61  t>..<dd>(SKI) Ha
36f0: 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63  sh of the public
3700: 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20   key inside the 
3710: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68  certificate as h
3720: 65 78 0a 09 20 20 20 73 74 72 69 6e 67 2e 20 55  ex..   string. U
3730: 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20  sed to identify 
3740: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61  certificates tha
3750: 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74  t contain a part
3760: 69 63 75 6c 61 72 0a 09 20 20 20 70 75 62 6c 69  icular..   publi
3770: 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74  c key.</dd>..<dt
3780: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74  ><strong>subject
3790: 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e  AltName</strong>
37a0: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f   <em>list</em></
37b0: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66  dt>..<dd>List of
37c0: 20 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c 74 65   all of the alte
37d0: 72 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e 20 6e  rnative domain n
37e0: 61 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 69 6e  ames, sub domain
37f0: 73 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 20 61  s,..    and IP a
3800: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72  ddresses that ar
3810: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65  e secured by the
3820: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3830: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3840: 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ocsp</strong> <e
3850: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>list</em></dt>
3860: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c  ..<dd>List of al
3870: 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69  l Online Certifi
3880: 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74  cate Status Prot
3890: 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73  ocol (OCSP) URLs
38a0: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74  .</dd>...<dt><st
38b0: 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65  rong>certificate
38c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65  </strong> <em>ce
38d0: 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  rt</em></dt>..<d
38e0: 64 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65  d>The PEM encode
38f0: 64 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  d certificate.</
3900: 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  dd>...<dt><stron
3910: 67 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72  g>signatureAlgor
3920: 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ithm</strong> <e
3930: 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e  m>algorithm</em>
3940: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65  </dt>..<dd>Ciphe
3950: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64  r algorithm used
3960: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65   for certificate
3970: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e   signature.</dd>
3980: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69  ..<dt><strong>si
3990: 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f 73 74  gnatureValue</st
39a0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67  rong> <em>string
39b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
39c0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
39d0: 61 74 75 72 65 20 61 73 20 68 65 78 20 73 74 72  ature as hex str
39e0: 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ing.</dd>..<dt><
39f0: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65  strong>signature
3a00: 44 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20  Digest</strong> 
3a10: 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e  <em>version</em>
3a20: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69  </dt>..<dd>Certi
3a30: 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64  ficate signing d
3a40: 69 67 65 73 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74  igest.</dd>..<dt
3a50: 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b  ><strong>publicK
3a60: 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72  eyAlgorithm</str
3a70: 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74  ong> <em>algorit
3a80: 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  hm</em></dt>..<d
3a90: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69  d>Certificate si
3aa0: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b  gnature public k
3ab0: 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64  ey algorithm.</d
3ac0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3ad0: 70 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 6f 6e  publicKey</stron
3ae0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
3af0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72  m></dt>..<dd>Cer
3b00: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
3b10: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 73  re public key as
3b20: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64   hex string.</dd
3b30: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62  >..<dt><strong>b
3b40: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  its</strong> <em
3b50: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  >n</em></dt>..<d
3b60: 64 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73  d>Number of bits
3b70: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66   used for certif
3b80: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
3b90: 6b 65 79 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  key</dd>..<dt><s
3ba0: 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65  trong>self_signe
3bb0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  d</strong> <em>b
3bc0: 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  oolean</em></dt>
3bd0: 0a 09 3c 64 64 3e 49 73 20 63 65 72 74 69 66 69  ..<dd>Is certifi
3be0: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 73  cate signature s
3bf0: 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 64 64 3e  elf signed.</dd>
3c00: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  ...<dt><strong>s
3c10: 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67  ha1_hash</strong
3c20: 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c  > <em>hash</em><
3c30: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48  /dt>..<dd>The SH
3c40: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63  A1 hash of the c
3c50: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 65  ertificate as he
3c60: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09  x string.</dd>..
3c70: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 32  <dt><strong>sha2
3c80: 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 3e  56_hash</strong>
3c90: 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f   <em>hash</em></
3ca0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48 41  dt>..<dd>The SHA
3cb0: 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 65 20  256 hash of the 
3cc0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68  certificate as h
3cd0: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a  ex string.</dd>.
3ce0: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63      </dl>.</bloc
3cf0: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74  kquote>..    <dt
3d00: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63  ><a name="tls::c
3d10: 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 72 6f  onnection"><stro
3d20: 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  ng>tls::connecti
3d30: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20  on</strong>.    
3d40: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  <em>channel</em>
3d50: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
3d60: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75  d>Returns the cu
3d70: 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  rrent connection
3d80: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
3d90: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 09  L channel. The..
3da0: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74  result is a list
3db0: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61   of key-value pa
3dc0: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74  irs describing t
3dd0: 68 65 0a 09 63 6f 6e 6e 65 63 74 65 64 20 70 65  he..connected pe
3de0: 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71  er.</dd>.<blockq
3df0: 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74  uote>..<b>SSL St
3e00: 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c  atus</b>.    <dl
3e10: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
3e20: 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  tate</strong> <e
3e30: 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74  m>state</em></dt
3e40: 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f 66 20  >..<dd>State of 
3e50: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c  the connection.<
3e60: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3e70: 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74  g>servername</st
3e80: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f  rong> <em>name</
3e90: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
3ea0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f  e name of the co
3eb0: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65  nnected to serve
3ec0: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  r.</dd>..<dt><st
3ed0: 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73  rong>protocol</s
3ee0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69  trong> <em>versi
3ef0: 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  on</em></dt>..<d
3f00: 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76  d>The protocol v
3f10: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20  ersion used for 
3f20: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a  the connection:.
3f30: 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c 33 2c  .    SSL2, SSL3,
3f40: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54   TLS1, TLS1.1, T
3f50: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f  LS1.2, TLS1.3, o
3f60: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a  r unknown.</dd>.
3f70: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 6e  .<dt><strong>ren
3f80: 65 67 6f 74 69 61 74 69 6f 6e 3c 2f 73 74 72 6f  egotiation</stro
3f90: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c  ng> <em>boolean<
3fa0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57  /em></dt>..<dd>W
3fb0: 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20  hether protocol 
3fc0: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73  renegotiation is
3fd0: 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f   supported or no
3fe0: 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  t.</dd>..<dt><st
3ff0: 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c 65 76  rong>securitylev
4000: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  el</strong> <em>
4010: 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  level</em></dt>.
4020: 09 3c 64 64 3e 54 68 65 20 73 65 63 75 72 69 74  .<dd>The securit
4030: 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66 6f 72  y level used for
4040: 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69   selection of ci
4050: 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c  phers, key size,
4060: 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   etc.</dd>..<dt>
4070: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f  <strong>session_
4080: 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20  reused</strong> 
4090: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e  <em>boolean</em>
40a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68  </dt>..<dd>Wheth
40b0: 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68  er the session h
40c0: 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f  as been reused o
40d0: 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74  r not.</dd>..<dt
40e0: 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76  ><strong>is_serv
40f0: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
4100: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74  boolean</em></dt
4110: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74  >..<dd>Whether t
4120: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73  he connection is
4130: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61   configured as a
4140: 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63   server (1) or c
4150: 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 64 64 3e 0a  lient (0).</dd>.
4160: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d  .<dt><strong>com
4170: 70 72 65 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67  pression</strong
4180: 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c  > <em>mode</em><
4190: 2f 64 74 3e 0a 09 3c 64 64 3e 43 6f 6d 70 72 65  /dt>..<dd>Compre
41a0: 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64  ssion method.</d
41b0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
41c0: 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e  expansion</stron
41d0: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e  g> <em>mode</em>
41e0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 78 70 61 6e  </dt>..<dd>Expan
41f0: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64  sion method.</dd
4200: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c  >.    </dl>.</bl
4210: 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b  ockquote>.<block
4220: 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 68 65  quote>..<b>Ciphe
4230: 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c  r Info</b>.    <
4240: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dl>..<dt><strong
4250: 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e  >cipher</strong>
4260: 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e   <em>cipher</em>
4270: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63  </dt>..<dd>The c
4280: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e  urrent cipher in
4290: 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e   use for the con
42a0: 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c  nection.</dd>..<
42b0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 6e 64  dt><strong>stand
42c0: 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67  ard_name</strong
42d0: 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c  > <em>name</em><
42e0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 74  /dt>..<dd>The st
42f0: 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20  andard RFC name 
4300: 6f 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a  of cipher.</dd>.
4310: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74  .<dt><strong>bit
4320: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  s</strong> <em>n
4330: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4340: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72  The number of pr
4350: 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 65  ocessed bits use
4360: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64  d for cipher.</d
4370: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4380: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 74 72  secret_bits</str
4390: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c  ong> <em>n</em><
43a0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75  /dt>..<dd>The nu
43b0: 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62  mber of secret b
43c0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70  its used for cip
43d0: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  her.</dd>..<dt><
43e0: 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 73 69  strong>min_versi
43f0: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  on</strong> <em>
4400: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74  version</em></dt
4410: 3e 0a 09 3c 64 64 3e 54 68 65 20 6d 69 6e 69 6d  >..<dd>The minim
4420: 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  um protocol vers
4430: 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 2e 3c  ion for cipher.<
4440: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4450: 67 3e 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  g>id</strong> <e
4460: 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  m>id</em></dt>..
4470: 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20  <dd>The OpenSSL 
4480: 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e 0a  cipher id.</dd>.
4490: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 65 73  .<dt><strong>des
44a0: 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67  cription</strong
44b0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d  > <em>string</em
44c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 74 65  ></dt>..<dd>A te
44d0: 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f  xt description o
44e0: 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64  f the cipher.</d
44f0: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62  d>.    </dl>.</b
4500: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63  lockquote>.<bloc
4510: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 65 73 73  kquote>..<b>Sess
4520: 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20  ion Info</b>.   
4530: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f   <dl>..<dt><stro
4540: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e  ng>alpn</strong>
4550: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65   <em>protocol</e
4560: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
4570: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74   protocol select
4580: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61  ed after Applica
4590: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f  tion-Layer Proto
45a0: 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61  col..    Negotia
45b0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64  tion (ALPN).</dd
45c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72  >..<dt><strong>r
45d0: 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e 67  esumable</strong
45e0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65  > <em>boolean</e
45f0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6e  m></dt>..<dd>Can
4600: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 62 65 20   the session be 
4610: 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c  resumed or not.<
4620: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4630: 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73 74  g>start_time</st
4640: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64  rong> <em>second
4650: 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  s</em></dt>..<dd
4660: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73  >Time since sess
4670: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73  ion started in s
4680: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f  econds since epo
4690: 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ch.</dd>..<dt><s
46a0: 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73  trong>timeout</s
46b0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e  trong> <em>secon
46c0: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ds</em></dt>..<d
46d0: 64 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f  d>Max duration o
46e0: 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63  f session in sec
46f0: 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65  onds before time
4700: 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  -out.</dd>..<dt>
4710: 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65  <strong>lifetime
4720: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65  </strong> <em>se
4730: 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  conds</em></dt>.
4740: 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 69 63  .<dd>Session tic
4750: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e  ket lifetime hin
4760: 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 64  t in seconds.</d
4770: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4780: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f  session_id</stro
4790: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73  ng> <em>binary_s
47a0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
47b0: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73  .<dd>Unique sess
47c0: 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69  ion id for use i
47d0: 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73  n resuming the s
47e0: 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64  ession.</dd>..<d
47f0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f  t><strong>sessio
4800: 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67  n_ticket</strong
4810: 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72  > <em>binary_str
4820: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
4830: 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f  dd>Unique sessio
4840: 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65  n ticket for use
4850: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65   in resuming the
4860: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09   session.</dd>..
4870: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 63 6b  <dt><strong>tick
4880: 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 74 72  et_app_data</str
4890: 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f  ong> <em>binary_
48a0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
48b0: 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73  ..<dd>Unique ses
48c0: 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c  sion ticket appl
48d0: 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 64  ication data.</d
48e0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
48f0: 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f  master_key</stro
4900: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73  ng> <em>binary_s
4910: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
4920: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73  .<dd>Unique sess
4930: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c  ion master key.<
4940: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4950: 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f  g>session_cache_
4960: 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  mode</strong> <e
4970: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>mode</em></dt>
4980: 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 61 63  ..<dd>Server cac
4990: 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c  he mode (client,
49a0: 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 68   server, or both
49b0: 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c  ).</dd>.    </dl
49c0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >.</blockquote>.
49d0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
49e0: 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 3e  ="tls::ciphers">
49f0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70  <strong>tls::cip
4a00: 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20  hers</strong>.  
4a10: 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f    <em>protocol ?
4a20: 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f 72  verbose? ?suppor
4a30: 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64  ted?</em></a></d
4a40: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72  t>.    <dd>Retur
4a50: 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 73 75 70  ns a list of sup
4a60: 70 6f 72 74 65 64 20 63 69 70 68 65 72 73 20 61  ported ciphers a
4a70: 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 3c 65 6d  vailable for <em
4a80: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c 0a  >protocol</em>,.
4a90: 09 77 68 65 72 65 20 70 72 6f 74 6f 63 6f 6c 20  .where protocol 
4aa0: 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 3c  must be one of <
4ab0: 62 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 74 6c  b>ssl2, ssl3, tl
4ac0: 73 31 2c 20 74 6c 73 31 2e 31 2c 0a 09 74 6c 73  s1, tls1.1,..tls
4ad0: 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 3e 74  1.2,</b> or <b>t
4ae0: 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 3c 65  ls1.3</b>. If <e
4af0: 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e 20 69  m>verbose</em> i
4b00: 73 20 73 70 65 63 69 66 69 65 64 20 61 73 0a 09  s specified as..
4b10: 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62  true then a verb
4b20: 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61  ose, human reada
4b30: 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74 75  ble list is retu
4b40: 72 6e 65 64 20 77 69 74 68 0a 09 61 64 64 69 74  rned with..addit
4b50: 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f  ional informatio
4b60: 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e  n on the cipher.
4b70: 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72 74 65   If <em>supporte
4b80: 64 3c 2f 65 6d 3e 0a 09 69 73 20 73 70 65 63 69  d</em>..is speci
4b90: 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 68  fied as true, th
4ba0: 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68  en only the ciph
4bb0: 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f  ers supported fo
4bc0: 72 20 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 6c 6c  r protocol..will
4bd0: 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64 3e   be listed.</dd>
4be0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
4bf0: 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  e="tls::protocol
4c00: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  s"><strong>tls::
4c10: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e  protocols</stron
4c20: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  g></a></dt>.    
4c30: 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69  <dd>Returns a li
4c40: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20  st of supported 
4c50: 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64  protocols. Valid
4c60: 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c 62   values are:..<b
4c70: 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73  >ssl2</b>, <b>ss
4c80: 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c  l3</b>, <b>tls1<
4c90: 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f  /b>, <b>tls1.1</
4ca0: 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62  b>, <b>tls1.2</b
4cb0: 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31 2e  >,..and <b>tls1.
4cc0: 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73  3</b>. Exact lis
4cd0: 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65  t depends on Ope
4ce0: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64  nSSL version and
4cf0: 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66  ..compile time f
4d00: 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20  lags.</dd>..    
4d10: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
4d20: 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 6f  ::version"><stro
4d30: 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c  ng>tls::version<
4d40: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74  /strong></a></dt
4d50: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e  >.    <dd>Return
4d60: 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65  s the OpenSSL ve
4d70: 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 64  rsion string.</d
4d80: 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61  d>.</dl>..<h3><a
4d90: 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 4b 20   name="CALLBACK 
4da0: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43  OPTIONS">CALLBAC
4db0: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68  K OPTIONS</a></h
4dc0: 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 69 63  3>..<p>.As indic
4dd0: 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e 64 69  ated above, indi
4de0: 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c 73 20  vidual channels 
4df0: 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65  can be given the
4e00: 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73  ir own callbacks
4e10: 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72  .to handle inter
4e20: 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69  mediate processi
4e30: 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ng by the OpenSS
4e40: 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67  L library, using
4e50: 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f   the.<strong>-co
4e60: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20  mmand</strong>, 
4e70: 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72  <strong>-passwor
4e80: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 0a  d</strong>, and.
4e90: 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74  <strong>-validat
4ea0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  e_command</stron
4eb0: 67 3e 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65  g> options passe
4ec0: 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 0a 3c  d to either of.<
4ed0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b  strong>tls::sock
4ee0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 6f 72 20 3c  et</strong> or <
4ef0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f  strong>tls::impo
4f00: 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 3c 2f 70  rt</strong>..</p
4f10: 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >..<blockquote>.
4f20: 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73  <dl>..    <dt><s
4f30: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  trong>-command</
4f40: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c  strong> <em>call
4f50: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  back</em></dt>. 
4f60: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73     <dd>..Invokes
4f70: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c   the specified <
4f80: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
4f90: 20 73 63 72 69 70 74 20 61 74 0a 09 73 65 76 65   script at..seve
4fa0: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e  ral points durin
4fb0: 67 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 68 61  g the OpenSSL ha
4fc0: 6e 64 73 68 61 6b 65 2e 0a 09 56 61 6c 75 65 73  ndshake...Values
4fd0: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74   returned from t
4fe0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 20  he callback are 
4ff0: 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67 75 6d 65  ignored...Argume
5000: 6e 74 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20  nts appended to 
5010: 74 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20  the script upon 
5020: 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65 20 6f 6e  callback take on
5030: 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c 6c 6f 77  e of the..follow
5040: 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09 3c 62 72  ing forms:...<br
5050: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a  >..<br>...<dl>..
5060: 3c 21 2d 2d 09 54 68 69 73 20 66 6f 72 6d 20 6f  <!--.This form o
5070: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 64 69  f callback is di
5080: 73 61 62 6c 65 64 2e 0a 0a 09 3c 64 74 3e 0a 09  sabled....<dt>..
5090: 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f 72 3c    <strong>error<
50a0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61  /strong> <em>cha
50b0: 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f 65 6d  nnel message</em
50c0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09  >..</dt>..<dd>..
50d0: 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67    The <em>messag
50e0: 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20  e</em> argument 
50f0: 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72 72 6f  contains an erro
5100: 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65 72 61  r message genera
5110: 74 65 64 0a 09 20 20 62 79 20 74 68 65 20 4f 70  ted..  by the Op
5120: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 20 3c  enSSL function <
5130: 63 6f 64 65 3e 45 52 52 5f 72 65 61 73 6f 6e 5f  code>ERR_reason_
5140: 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 3c 2f  error_string()</
5150: 63 6f 64 65 3e 2e 0a 09 3c 2f 64 64 3e 0a 0a 09  code>...</dd>...
5160: 3c 62 72 3e 0a 2d 2d 3e 0a 0a 09 3c 64 74 3e 0a  <br>.-->...<dt>.
5170: 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f 3c  .  <strong>info<
5180: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61  /strong> <em>cha
5190: 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72  nnel major minor
51a0: 20 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f 65   message type</e
51b0: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a  m>..</dt>..<dd>.
51c0: 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20  .  This form of 
51d0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
51e0: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53  ked by the OpenS
51f0: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c  SL function..  <
5200: 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74  code>SSL_CTX_set
5210: 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29  _info_callback()
5220: 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e  </code>...  <br>
5230: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f  ..  The <em>majo
5240: 72 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d  r</em> and <em>m
5250: 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  inor</em> argume
5260: 6e 74 73 20 61 72 65 20 75 73 65 64 20 74 6f 0a  nts are used to.
5270: 09 20 20 72 65 70 72 65 73 65 6e 74 20 74 68 65  .  represent the
5280: 20 73 74 61 74 65 20 69 6e 66 6f 72 6d 61 74 69   state informati
5290: 6f 6e 20 62 69 74 6d 61 73 6b 2e 0a 09 20 20 3c  on bitmask...  <
52a0: 75 6c 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69  ul>..  <li>Possi
52b0: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c  ble values for <
52c0: 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72  em>major</em> ar
52d0: 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 68 61 6e 64  e:..  <code>hand
52e0: 73 68 61 6b 65 2c 20 61 6c 65 72 74 2c 20 63 6f  shake, alert, co
52f0: 6e 6e 65 63 74 2c 20 61 63 63 65 70 74 3c 2f 63  nnect, accept</c
5300: 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c  ode>.</li>..  <l
5310: 69 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65  i>Possible value
5320: 73 20 66 6f 72 20 3c 65 6d 3e 6d 69 6e 6f 72 3c  s for <em>minor<
5330: 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f  /em> are:..  <co
5340: 64 65 3e 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20  de>start, done, 
5350: 72 65 61 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f  read, write, loo
5360: 70 2c 20 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c  p, exit</code>.<
5370: 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20  /li>..  <li>The 
5380: 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e  <em>message</em>
5390: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 64   argument is a d
53a0: 65 73 63 72 69 70 74 69 76 65 20 73 74 72 69 6e  escriptive strin
53b0: 67 20 77 68 69 63 68 20 6d 61 79 0a 09 20 20 62  g which may..  b
53c0: 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 74 68  e generated eith
53d0: 65 72 20 62 79 20 3c 63 6f 64 65 3e 53 53 4c 5f  er by <code>SSL_
53e0: 73 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e  state_string_lon
53f0: 67 28 29 3c 2f 63 6f 64 65 3e 20 6f 72 20 62 79  g()</code> or by
5400: 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 61 6c  ..  <code>SSL_al
5410: 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f  ert_desc_string_
5420: 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 2c 20 64  long()</code>, d
5430: 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6e 74  epending on cont
5440: 65 78 74 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69  ext.</li>..  <li
5450: 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65  >For alerts, the
5460: 20 70 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73   possible values
5470: 20 66 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65   for <em>type</e
5480: 6d 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65  m> are:..  <code
5490: 3e 77 61 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c  >warning, fatal,
54a0: 20 61 6e 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f   and unknown</co
54b0: 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 2f 75  de>.</li>..  </u
54c0: 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e  l>..</dd>...<dt>
54d0: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73 65 73 73  ..  <strong>sess
54e0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ion</strong> <em
54f0: 3e 73 65 73 73 69 6f 6e 5f 69 64 20 74 69 63 6b  >session_id tick
5500: 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65 6d 3e  et lifetime</em>
5510: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20  ..</dt>..<dd>.. 
5520: 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61   This form of ca
5530: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
5540: 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  d by the OpenSSL
5550: 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f   function..  <co
5560: 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f  de>SSL_CTX_sess_
5570: 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 63 6f  set_new_cb()</co
5580: 64 65 3e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65  de>...  Where <e
5590: 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 65 6d  m>session_id</em
55a0: 3e 20 69 73 20 74 68 65 20 63 75 72 72 65 6e 74  > is the current
55b0: 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66   session identif
55c0: 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69 63 6b  ier,..  <em>tick
55d0: 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 73  et</em> is the s
55e0: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e  ession ticket in
55f0: 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69 66 65  fo, and <em>life
5600: 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69 73 20  time</em>..  is 
5610: 74 68 65 20 74 68 65 20 74 69 63 6b 65 74 20 6c  the the ticket l
5620: 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e  ifetime in secon
5630: 64 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e  ds...</dd>..<br>
5640: 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64  ..</dl>.    </dd
5650: 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20 20 20  >..    <br>..   
5660: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61   <dt><strong>-pa
5670: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20  ssword</strong> 
5680: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d  <em>callback</em
5690: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a  ></dt>.    <dd>.
56a0: 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65  .Invokes the spe
56b0: 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62  cified <em>callb
56c0: 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20  ack</em> script 
56d0: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65  when OpenSSL nee
56e0: 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20 61 20  ds to..obtain a 
56f0: 70 61 73 73 77 6f 72 64 2e 20 20 54 68 65 20 63  password.  The c
5700: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72  allback should r
5710: 65 74 75 72 6e 20 74 68 65 20 70 61 73 73 77 6f  eturn the passwo
5720: 72 64 20 61 73 20 61 20 73 74 72 69 6e 67 2e 0a  rd as a string..
5730: 09 4e 6f 20 61 72 67 75 6d 65 6e 74 73 20 61 72  .No arguments ar
5740: 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68  e appended to th
5750: 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 63 61  e script upon ca
5760: 6c 6c 62 61 63 6b 2e 0a 20 20 20 20 3c 2f 64 64  llback..    </dd
5770: 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 0a 20 20  >..    <br>...  
5780: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76    <dt><strong>-v
5790: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f  alidatecommand</
57a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c  strong> <em>call
57b0: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  back</em></dt>. 
57c0: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73     <dd>..Invokes
57d0: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c   the specified <
57e0: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
57f0: 20 73 63 72 69 70 74 20 64 75 72 69 6e 67 20 68   script during h
5800: 61 6e 64 73 68 61 6b 65 20 69 6e 0a 09 6f 72 64  andshake in..ord
5810: 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74  er to validate t
5820: 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75  he provided valu
5830: 65 28 73 29 2e 20 0a 09 54 6f 20 72 65 6a 65 63  e(s). ..To rejec
5840: 74 20 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20  t the value and 
5850: 61 62 6f 72 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  abort connection
5860: 2c 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73  , the callback s
5870: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 2e 0a  hould return 0..
5880: 09 54 6f 20 61 63 63 65 70 74 20 74 68 65 20 76  .To accept the v
5890: 61 6c 75 65 2c 20 69 74 20 73 68 6f 75 6c 64 20  alue, it should 
58a0: 72 65 74 75 72 6e 20 31 2e 20 20 54 6f 20 72 65  return 1.  To re
58b0: 6a 65 63 74 20 74 68 65 20 76 61 6c 75 65 2c 20  ject the value, 
58c0: 62 75 74 0a 09 63 6f 6e 74 69 6e 75 65 20 74 68  but..continue th
58d0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74  e connection, it
58e0: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 32   should return 2
58f0: 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a  ....<br>..<br>..
5900: 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20  .<dl>...<dt>..  
5910: 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74  <strong>alpn</st
5920: 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63  rong> <em>protoc
5930: 6f 6c 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  ol</em>..</dt>..
5940: 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76  <dd>..  For serv
5950: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f  ers, this form o
5960: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
5970: 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63  voked when the c
5980: 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 20 20 65 78  lient ALPN..  ex
5990: 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69  tension is recei
59a0: 76 65 64 20 61 6e 64 20 74 68 65 20 66 69 72 73  ved and the firs
59b0: 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 73  t <b>-alpn</b> s
59c0: 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f  pecified protoco
59d0: 6c 20 63 6f 6d 6d 6f 6e 0a 09 20 20 74 6f 20 74  l common..  to t
59e0: 68 65 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65  he both the clie
59f0: 6e 74 20 61 6e 64 20 73 65 72 76 65 72 20 69 73  nt and server is
5a00: 20 73 65 6c 65 63 74 65 64 2e 20 49 66 20 6e 6f   selected. If no
5a10: 6e 65 2c 20 74 68 65 20 66 69 72 73 74 0a 09 20  ne, the first.. 
5a20: 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65   client specifie
5a30: 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73  d protocol is us
5a40: 65 64 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72  ed...</dd>...<br
5a50: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72  >...<dt>..  <str
5a60: 6f 6e 67 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e  ong>hello</stron
5a70: 67 3e 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d  g> <em>servernam
5a80: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c  e</em>..</dt>..<
5a90: 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65  dd>..  For serve
5aa0: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66  rs, this form of
5ab0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
5ac0: 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65  oked during clie
5ad0: 6e 74 20 68 65 6c 6c 6f 0a 09 20 20 6d 65 73 73  nt hello..  mess
5ae0: 61 67 65 20 70 72 6f 63 65 73 73 69 6e 67 2e 20  age processing. 
5af0: 49 74 20 69 73 20 75 73 65 64 20 74 6f 20 73 65  It is used to se
5b00: 6c 65 63 74 20 61 6e 20 61 70 70 72 6f 70 72 69  lect an appropri
5b10: 61 74 65 20 63 65 72 74 69 66 69 63 61 74 65 20  ate certificate 
5b20: 74 6f 0a 09 20 20 70 72 65 73 65 6e 74 2c 20 61  to..  present, a
5b30: 6e 64 20 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f  nd make other co
5b40: 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75  nfiguration adju
5b50: 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74  stments relevant
5b60: 20 74 6f 20 74 68 61 74 0a 09 20 20 73 65 72 76   to that..  serv
5b70: 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20  er name and its 
5b80: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 43  configuration. C
5b90: 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 53 4e 49  alled before SNI
5ba0: 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61   and ALPN callba
5bb0: 63 6b 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62  cks...</dd>...<b
5bc0: 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74  r>...<dt>..  <st
5bd0: 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 72 6f 6e 67  rong>sni</strong
5be0: 3e 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65  > <em>servername
5bf0: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64  </em>..</dt>..<d
5c00: 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72  d>..  For server
5c10: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20  s, this form of 
5c20: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
5c30: 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 4e 49  ked when the SNI
5c40: 20 65 78 74 65 6e 73 69 6f 6e 0a 09 20 20 66 72   extension..  fr
5c50: 6f 6d 20 74 68 65 20 63 6c 69 65 6e 74 20 69 73  om the client is
5c60: 20 72 65 63 65 69 76 65 64 2e 20 54 68 69 73 20   received. This 
5c70: 69 73 20 75 73 65 64 20 77 68 65 6e 20 61 20 73  is used when a s
5c80: 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d  erver supports m
5c90: 75 6c 74 69 70 6c 65 0a 09 20 20 6e 61 6d 65 73  ultiple..  names
5ca0: 2c 20 73 6f 20 74 68 65 20 72 69 67 68 74 20 63  , so the right c
5cb0: 65 72 74 69 66 69 63 61 74 65 20 63 61 6e 20 62  ertificate can b
5cc0: 65 20 75 73 65 64 2e 20 43 61 6c 6c 65 64 20 61  e used. Called a
5cd0: 66 74 65 72 20 68 65 6c 6c 6f 0a 09 20 20 63 61  fter hello..  ca
5ce0: 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72  llback but befor
5cf0: 65 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 2e  e ALPN callback.
5d00: 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a  ..</dd>...<br>..
5d10: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67  .<dt>..  <strong
5d20: 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e  >verify</strong>
5d30: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70   <em>channel dep
5d40: 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65  th cert status e
5d50: 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e  rror</em>..</dt>
5d60: 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66  ..<dd>..  This f
5d70: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
5d80: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70  is invoked by Op
5d90: 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77  enSSL when a new
5da0: 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20   certificate..  
5db0: 69 73 20 72 65 63 65 69 76 65 64 20 66 72 6f 6d  is received from
5dc0: 20 74 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c   the peer. It al
5dd0: 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20  lows the client 
5de0: 74 6f 20 63 68 65 63 6b 20 74 68 65 0a 09 20 20  to check the..  
5df0: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69  certificate chai
5e00: 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72  n verification r
5e10: 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73  esults and choos
5e20: 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e  e whether to con
5e30: 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 0a 09 20  tinue or not... 
5e40: 20 3c 75 6c 3e 0a 09 20 20 3c 6c 69 3e 54 68 65   <ul>..  <li>The
5e50: 20 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e 20   <em>depth</em> 
5e60: 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 69  argument is an i
5e70: 6e 74 65 67 65 72 20 72 65 70 72 65 73 65 6e 74  nteger represent
5e80: 69 6e 67 20 74 68 65 0a 09 20 20 63 75 72 72 65  ing the..  curre
5e90: 6e 74 20 64 65 70 74 68 20 6f 6e 20 74 68 65 20  nt depth on the 
5ea0: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69  certificate chai
5eb0: 6e 2c 20 77 69 74 68 0a 09 20 20 3c 63 6f 64 65  n, with..  <code
5ec0: 3e 30 3c 2f 63 6f 64 65 3e 20 61 73 20 74 68 65  >0</code> as the
5ed0: 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74   peer certificat
5ee0: 65 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c  e and higher val
5ef0: 75 65 73 20 67 6f 69 6e 67 0a 09 20 20 75 70 20  ues going..  up 
5f00: 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 61  to the Certifica
5f10: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41  te Authority (CA
5f20: 29 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54  ).</li>..  <li>T
5f30: 68 65 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e  he <em>cert</em>
5f40: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c   argument is a l
5f50: 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65  ist of key-value
5f60: 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72 0a 09   pairs similar..
5f70: 20 20 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72    to those retur
5f80: 6e 65 64 20 62 79 0a 09 20 20 3c 61 20 68 72 65  ned by..  <a hre
5f90: 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22  f="#tls::status"
5fa0: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74  ><strong>tls::st
5fb0: 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61  atus</strong></a
5fc0: 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54  >.</li>..  <li>T
5fd0: 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65  he <em>status</e
5fe0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61  m> argument is a
5ff0: 6e 20 62 6f 6f 6c 65 61 6e 20 72 65 70 72 65 73  n boolean repres
6000: 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 76 61  enting the..  va
6010: 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 75  lidity of the cu
6020: 72 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74  rrent certificat
6030: 65 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66  e...  A value of
6040: 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20   <code>0</code> 
6050: 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 66  means the certif
6060: 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 20  icate is deemed 
6070: 69 6e 76 61 6c 69 64 2e 0a 09 20 20 41 20 76 61  invalid...  A va
6080: 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c 2f  lue of <code>1</
6090: 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 20  code> means the 
60a0: 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20 64  certificate is d
60b0: 65 65 6d 65 64 20 76 61 6c 69 64 2e 3c 2f 6c 69  eemed valid.</li
60c0: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d  >..  <li>The <em
60d0: 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75  >error</em> argu
60e0: 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 20 74 68  ment supplies th
60f0: 65 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e  e message, if an
6100: 79 2c 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20  y, generated..  
6110: 62 79 20 3c 63 6f 64 65 3e 58 35 30 39 5f 53 54  by <code>X509_ST
6120: 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f  ORE_CTX_get_erro
6130: 72 28 29 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e  r()</code>.</li>
6140: 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e  ..  </ul>..</dd>
6150: 0a 09 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20  ..<br>..</dl>.  
6160: 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f    </dd>.</dl>.</
6170: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 70 3e  blockquote>..<p>
6180: 0a 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c 65  .Reference imple
6190: 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 68  mentations of th
61a0: 65 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 72  ese callbacks ar
61b0: 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 74 68  e provided in th
61c0: 65 0a 64 69 73 74 72 69 62 75 74 69 6f 6e 20 61  e.distribution a
61d0: 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63  s <strong>tls::c
61e0: 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e  allback</strong>
61f0: 2c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70  , <strong>tls::p
6200: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e  assword</strong>
6210: 2c 0a 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c  ,.and <strong>tl
6220: 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d  s::validate_comm
6230: 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 65 73  and</strong> res
6240: 70 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f 74 65  pectively.  Note
6250: 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 0a   that these are.
6260: 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20  <em>sample</em> 
6270: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20  implementations 
6280: 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f 72 65  only.  In a more
6290: 20 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c 6f   realistic deplo
62a0: 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64 20  yment.you would 
62b0: 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 6e  specify your own
62c0: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
62d0: 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 63 68  s on each TLS ch
62e0: 61 6e 6e 65 6c 20 75 73 69 6e 67 20 74 68 65 0a  annel using the.
62f0: 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64  <strong>-command
6300: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f  </strong>, <stro
6310: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74  ng>-password</st
6320: 72 6f 6e 67 3e 2c 20 61 6e 64 20 3c 73 74 72 6f  rong>, and <stro
6330: 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d  ng>-validate_com
6340: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70  mand</strong> op
6350: 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e  tions..</p>..<p>
6360: 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68  .The default beh
6370: 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c  avior when the <
6380: 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c  strong>-command<
6390: 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73 74  /strong> and <st
63a0: 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63  rong>-validate_c
63b0: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a  ommand</strong>.
63c0: 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20  options are not 
63d0: 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72  specified is for
63e0: 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20   TLS to process 
63f0: 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c  the associated l
6400: 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73  ibrary callbacks
6410: 0a 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65  .internally. The
6420: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f   default behavio
6430: 72 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f  r when the <stro
6440: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74  ng>-password</st
6450: 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 20 69 73 20  rong> option is 
6460: 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 20 69 73  not.specified is
6470: 20 66 6f 72 20 54 4c 53 20 74 6f 20 70 72 6f 63   for TLS to proc
6480: 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 74  ess the associat
6490: 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62  ed library callb
64a0: 61 63 6b 73 20 62 79 20 61 74 74 65 6d 70 74 69  acks by attempti
64b0: 6e 67 0a 74 6f 20 63 61 6c 6c 20 3c 73 74 72 6f  ng.to call <stro
64c0: 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64  ng>tls::password
64d0: 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 64  </strong>..The d
64e0: 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65  ifference betwee
64f0: 6e 20 74 68 65 73 65 20 74 77 6f 20 62 65 68 61  n these two beha
6500: 76 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65  viors is a conse
6510: 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61  quence of mainta
6520: 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 6c  ining.compatibil
6530: 69 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 72  ity with earlier
6540: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73   implementations
6550: 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20  ..</p>..<p>.The 
6560: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62  <strong>tls::deb
6570: 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 69  ug</strong> vari
6580: 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f  able provides so
6590: 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 6f  me additional.co
65a0: 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 65  ntrol over these
65b0: 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62   reference callb
65c0: 61 63 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 65  acks.  Its value
65d0: 20 69 73 20 7a 65 72 6f 20 62 79 20 64 65 66 61   is zero by defa
65e0: 75 6c 74 2e 0a 48 69 67 68 65 72 20 76 61 6c 75  ult..Higher valu
65f0: 65 73 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 20  es produce more 
6600: 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75  diagnostic outpu
6610: 74 2c 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f  t, and will also
6620: 20 66 6f 72 63 65 20 74 68 65 0a 76 65 72 69 66   force the.verif
6630: 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 72  y method in <str
6640: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63  ong>tls::callbac
6650: 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 63  k</strong> to ac
6660: 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 69  cept the.certifi
6670: 63 61 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20  cate, even when 
6680: 69 74 20 69 73 20 69 6e 76 61 6c 69 64 2e 0a 3c  it is invalid..<
6690: 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68  /p>..<p>.<em>.Th
66a0: 65 20 75 73 65 20 6f 66 20 74 68 65 20 72 65 66  e use of the ref
66b0: 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73  erence callbacks
66c0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61   <strong>tls::ca
66d0: 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c  llback</strong>,
66e0: 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61  .<strong>tls::pa
66f0: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c  ssword</strong>,
6700: 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73   and <strong>tls
6710: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61  ::validate_comma
6720: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a 69 73 20 6e  nd</strong>.is n
6730: 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20  ot recommended. 
6740: 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d   They may be rem
6750: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65  oved from future
6760: 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e   releases..</em>
6770: 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a  .</p>..<p>.<em>.
6780: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 76  The use of the v
6790: 61 72 69 61 62 6c 65 20 3c 73 74 72 6f 6e 67 3e  ariable <strong>
67a0: 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f  tls::debug</stro
67b0: 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d  ng> is not recom
67c0: 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 62  mended..It may b
67d0: 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66  e removed from f
67e0: 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 0a  uture releases..
67f0: 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e  </em>.</p>..<h3>
6800: 3c 61 20 6e 61 6d 65 3d 22 44 45 42 55 47 22 3e  <a name="DEBUG">
6810: 44 45 42 55 47 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  DEBUG</a></h3>..
6820: 54 4c 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20  TLS key logging 
6830: 63 61 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62  can be enabled b
6840: 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e  y setting the en
6850: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62  vironment variab
6860: 6c 65 0a 3c 62 3e 53 53 4c 4b 45 59 4c 4f 47 46  le.<b>SSLKEYLOGF
6870: 49 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 6e  ILE</b> to the n
6880: 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20  ame of the file 
6890: 74 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e 20  to log to. Then 
68a0: 77 68 65 6e 65 76 65 72 20 54 4c 53 0a 6b 65 79  whenever TLS.key
68b0: 20 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e   material is gen
68c0: 65 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76  erated or receiv
68d0: 65 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f  ed it will be lo
68e0: 67 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65  gged to the file
68f0: 2e 20 54 68 69 73 0a 69 73 20 75 73 65 66 75 6c  . This.is useful
6900: 20 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79   for logging key
6910: 20 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72   data for networ
6920: 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20  k logging tools 
6930: 74 6f 20 75 73 65 20 74 6f 0a 64 65 63 72 79 70  to use to.decryp
6940: 74 20 74 68 65 20 64 61 74 61 2e 0a 0a 3c 68 33  t the data...<h3
6950: 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 20  ><a name="HTTPS 
6960: 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45  EXAMPLE">HTTPS E
6970: 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a  XAMPLE</a></h3>.
6980: 0a 3c 70 3e 54 68 69 73 20 65 78 61 6d 70 6c 65  .<p>This example
6990: 20 75 73 65 73 20 61 20 73 61 6d 70 6c 65 20 73   uses a sample s
69a0: 65 72 76 65 72 2e 70 65 6d 20 70 72 6f 76 69 64  erver.pem provid
69b0: 65 64 20 77 69 74 68 20 74 68 65 20 54 4c 53 20  ed with the TLS 
69c0: 72 65 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65 73  release,.courtes
69d0: 79 20 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e 67  y of the <strong
69e0: 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67  >OpenSSL</strong
69f0: 3e 20 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a 0a  > project.</p>..
6a00: 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b  <pre><code>.pack
6a10: 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74 70  age require http
6a20: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  .package require
6a30: 20 74 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67 69   tls..http::regi
6a40: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b  ster https 443 [
6a50: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b  list ::tls::sock
6a60: 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61  et -autoserverna
6a70: 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69 72 65  me true -require
6a80: 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f 65 74   true -cadir /et
6a90: 63 2f 73 73 6c 2f 63 65 72 74 73 5d 0a 0a 73 65  c/ssl/certs]..se
6aa0: 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65 74  t tok [http::get
6ab0: 75 72 6c 20 68 74 74 70 73 3a 2f 2f 77 77 77 2e  url https://www.
6ac0: 74 63 6c 2e 74 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e  tcl.tk/].</code>
6ad0: 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  </pre>..<h3><a n
6ae0: 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 43 4f 4e  ame="SPECIAL CON
6af0: 53 49 44 45 52 41 54 49 4f 4e 53 22 3e 53 50 45  SIDERATIONS">SPE
6b00: 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49  CIAL CONSIDERATI
6b10: 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70  ONS</a></h3>..<p
6b20: 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 69 65  >The capabilitie
6b30: 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61 67  s of this packag
6b40: 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d  e can vary enorm
6b50: 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70 6f 6e  ously based upon
6b60: 20 68 6f 77 20 79 6f 75 72 0a 4f 70 65 6e 53 53   how your.OpenSS
6b70: 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20 63 6f  L library was co
6b80: 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62 75 69  nfigured and bui
6b90: 6c 74 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e 73  lt. New versions
6ba0: 20 6d 61 79 20 6f 62 73 6f 6c 65 74 65 20 6f 6c   may obsolete ol
6bb0: 64 65 72 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72  der.protocol ver
6bc0: 73 69 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 65  sions, add or re
6bd0: 6d 6f 76 65 20 63 69 70 68 65 72 73 2c 20 63 68  move ciphers, ch
6be0: 61 6e 67 65 20 64 65 66 61 75 6c 74 20 76 61 6c  ange default val
6bf0: 75 65 73 2c 20 65 74 63 2e 20 55 73 65 20 74 68  ues, etc. Use th
6c00: 65 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63  e.<strong>tls::c
6c10: 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 20  iphers</strong> 
6c20: 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  and <strong>tls:
6c30: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f  :protocols</stro
6c40: 6e 67 3e 20 63 6f 6d 6d 61 6e 64 73 20 74 6f 0a  ng> commands to.
6c50: 6f 62 74 61 69 6e 20 74 68 65 20 73 75 70 70 6f  obtain the suppo
6c60: 72 74 65 64 20 76 65 72 73 69 6f 6e 73 2e 3c 2f  rted versions.</
6c70: 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d  p>..<h3><a name=
6c80: 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41  "SEE ALSO">SEE A
6c90: 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70  LSO</a></h3>..<p
6ca0: 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c  ><strong>socket<
6cb0: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e  /strong>, <stron
6cc0: 67 3e 66 69 6c 65 65 76 65 6e 74 2c 20 3c 2f 73  g>fileevent, </s
6cd0: 74 72 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d 22 68  trong><a.href="h
6ce0: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73  ttp://www.openss
6cf0: 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e 67 3e  l.org/"><strong>
6d00: 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e  OpenSSL</strong>
6d10: 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a  </a></p>..<hr>..
6d20: 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 74 20  <pre>.Copyright 
6d30: 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 74  &copy; 1999 Matt
6d40: 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 69 67   Newman..Copyrig
6d50: 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 20 53  ht &copy; 2004 S
6d60: 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 2e  tarfish Systems.
6d70: 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 3e 0a  .</pre>.</body>.
6d80: 3c 2f 68 74 6d 6c 3e 0a                          </html>.