Hex Artifact Content

Artifact e0ba147546a0faed93f8f367f5123b3e6f6076b51676f857b44e97cc68eb896d:


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 3c 2f  b>tls::ciphers</
0460: 62 3e 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f 6c  b> <em>?protocol
0470: 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70  ? ?verbose? ?sup
0480: 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64  ported?</em></dd
0490: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c  >..    <dd><b>tl
04a0: 73 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e 3c 2f  s::digests</b></
04b0: 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e  dd>..    <dd><b>
04c0: 74 6c 73 3a 3a 6d 61 63 73 3c 2f 62 3e 3c 2f 64  tls::macs</b></d
04d0: 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74  d>..    <dd><b>t
04e0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
04f0: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e  ></dd>..    <dd>
0500: 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c  <b>tls::version<
0510: 2f 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64  /b></dd>..    <d
0520: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20  t>&nbsp;</dt>.. 
0530: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 64     <dd><b>tls::d
0540: 69 67 65 73 74 3c 2f 62 3e 20 3c 65 6d 3e 74 79  igest</b> <em>ty
0550: 70 65 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f 20 3f  pe ?-bin|-hex? ?
0560: 2d 6b 65 79 20 68 6d 61 63 5f 6b 65 79 3f 20 5b  -key hmac_key? [
0570: 2d 66 69 6c 65 20 66 69 6c 65 6e 61 6d 65 20 7c  -file filename |
0580: 20 2d 63 68 61 6e 20 63 68 61 6e 6e 65 6c 20 7c   -chan channel |
0590: 20 3f 2d 64 61 74 61 3f 20 64 61 74 61 5d 3c 2f   ?-data? data]</
05a0: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64  em></dd>..    <d
05b0: 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 62  d><b>tls::md4</b
05c0: 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c  > <em>data</em><
05d0: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62  /dd>..    <dd><b
05e0: 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20 3c 65  >tls::md5</b> <e
05f0: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e  m>data</em></dd>
0600: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73  ..    <dd><b>tls
0610: 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c 65 6d 3e 64  ::sha1</b> <em>d
0620: 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20  ata</em></dd>.. 
0630: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73     <dd><b>tls::s
0640: 68 61 32 35 36 3c 2f 62 3e 20 3c 65 6d 3e 64 61  ha256</b> <em>da
0650: 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20  ta</em></dd>..  
0660: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 68    <dd><b>tls::sh
0670: 61 35 31 32 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74  a512</b> <em>dat
0680: 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 2f 64  a</em></dd>..</d
0690: 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20  l>.    </dd>.   
06a0: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43   <dd><a href="#C
06b0: 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44  OMMANDS">COMMAND
06c0: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c  S</a></dd>.    <
06d0: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41 4c  dd><a href="#CAL
06e0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43  LBACK OPTIONS">C
06f0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c  ALLBACK OPTIONS<
0700: 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64  /a></dd>.    <dd
0710: 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54 50 53  ><a href="#HTTPS
0720: 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20   EXAMPLE">HTTPS 
0730: 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e  EXAMPLE</a></dd>
0740: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66  .    <dd><a href
0750: 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 50 45  ="#SEE ALSO">SPE
0760: 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49  CIAL CONSIDERATI
0770: 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20  ONS</a></dd>.   
0780: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53   <dd><a href="#S
0790: 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53  EE ALSO">SEE ALS
07a0: 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  O</a></dd>.</dl>
07b0: 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  ..<hr>..<h3><a n
07c0: 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c  ame="NAME">NAME<
07d0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74  /a></h3>..<p><st
07e0: 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67  rong>tls</strong
07f0: 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c  > - binding to <
0800: 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f  strong>OpenSSL</
0810: 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74 2e  strong>.toolkit.
0820: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  </p>..<h3><a nam
0830: 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e  e="SYNOPSIS">SYN
0840: 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  OPSIS</a></h3>..
0850: 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65  <p><b>package re
0860: 71 75 69 72 65 20 54 63 6c 20 38 2e 35 3c 2f 62  quire Tcl 8.5</b
0870: 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65  ><br>.<b>package
0880: 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e   require tls</b>
0890: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65  <br>.<br>.<a hre
08a0: 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c  f="#tls::init"><
08b0: 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20  b>tls::init</b> 
08c0: 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e  <i>?options?</i>
08d0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
08e0: 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e  ="#tls::socket">
08f0: 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  <b>tls::socket</
0900: 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 20  b> <i>?options? 
0910: 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c 62 72  host port</i><br
0920: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  >.<a href="#tls:
0930: 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a  :socket"><b>tls:
0940: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f  :socket</b> <i>?
0950: 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f  -server command?
0960: 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c   ?options? port<
0970: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68  /i></a><br>.<a h
0980: 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75  ref="#tls::statu
0990: 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75  s"><b>tls::statu
09a0: 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 61 6c  s</b> <i>?-local
09b0: 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ? channel</i></a
09c0: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23  ><br>.<a href="#
09d0: 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22  tls::connection"
09e0: 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74  ><b>tls::connect
09f0: 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e  ion</b> <i>chann
0a00: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c  el</i></a><br>.<
0a10: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61  a href="#tls::ha
0a20: 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a  ndshake"><b>tls:
0a30: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c  :handshake</b> <
0a40: 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  i>channel</i></a
0a50: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23  ><br>.<a href="#
0a60: 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e  tls::import"><b>
0a70: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20  tls::import</b> 
0a80: 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69  <i>channel ?opti
0a90: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  ons?</i></a><br>
0aa0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0ab0: 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73  unimport"><b>tls
0ac0: 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c  ::unimport</b> <
0ad0: 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  i>channel</i></a
0ae0: 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72  ><br>.<br>.<a hr
0af0: 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72  ef="#tls::cipher
0b00: 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65  s"><b>tls::ciphe
0b10: 72 73 3c 2f 62 3e 20 3c 69 3e 3f 70 72 6f 74 6f  rs</b> <i>?proto
0b20: 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f  col? ?verbose? ?
0b30: 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f  supported?</i></
0b40: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
0b50: 23 74 6c 73 3a 3a 64 69 67 65 73 74 73 22 3e 3c  #tls::digests"><
0b60: 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 73 3c 2f  b>tls::digests</
0b70: 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72  b></a><br>.<a hr
0b80: 65 66 3d 22 23 74 6c 73 3a 3a 6d 61 63 73 22 3e  ef="#tls::macs">
0b90: 3c 62 3e 74 6c 73 3a 3a 6d 61 63 73 3c 2f 62 3e  <b>tls::macs</b>
0ba0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0bb0: 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  ="#tls::protocol
0bc0: 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f  s"><b>tls::proto
0bd0: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e  cols</b></a><br>
0be0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0bf0: 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a  version"><b>tls:
0c00: 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e  :version</b></a>
0c10: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65  <br>.<br>.<a hre
0c20: 66 3d 22 23 74 6c 73 3a 3a 64 69 67 65 73 74 22  f="#tls::digest"
0c30: 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c  ><b>tls::digest<
0c40: 2f 62 3e 20 3c 69 3e 74 79 70 65 20 3f 2d 62 69  /b> <i>type ?-bi
0c50: 6e 7c 2d 68 65 78 3f 20 3f 2d 6b 65 79 20 68 6d  n|-hex? ?-key hm
0c60: 61 63 5f 6b 65 79 3f 20 5b 2d 66 69 6c 65 20 66  ac_key? [-file f
0c70: 69 6c 65 6e 61 6d 65 20 7c 20 2d 63 68 61 6e 20  ilename | -chan 
0c80: 63 68 61 6e 6e 65 6c 20 7c 20 3f 2d 64 61 74 61  channel | ?-data
0c90: 3f 20 64 61 74 61 5d 3c 2f 69 3e 3c 2f 61 3e 3c  ? data]</i></a><
0ca0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0cb0: 73 3a 3a 6d 64 34 22 3e 3c 62 3e 74 6c 73 3a 3a  s::md4"><b>tls::
0cc0: 6d 64 34 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c  md4</b> <i>data<
0cd0: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68  /i></a><br>.<a h
0ce0: 72 65 66 3d 22 23 74 6c 73 3a 3a 6d 64 35 22 3e  ref="#tls::md5">
0cf0: 3c 62 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20  <b>tls::md5</b> 
0d00: 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c  <i>data</i></a><
0d10: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0d20: 73 3a 3a 73 68 61 31 22 3e 3c 62 3e 74 6c 73 3a  s::sha1"><b>tls:
0d30: 3a 73 68 61 31 3c 2f 62 3e 20 3c 69 3e 64 61 74  :sha1</b> <i>dat
0d40: 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61  a</i></a><br>.<a
0d50: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 68 61   href="#tls::sha
0d60: 32 35 36 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61  256"><b>tls::sha
0d70: 32 35 36 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c  256</b> <i>data<
0d80: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68  /i></a><br>.<a h
0d90: 72 65 66 3d 22 23 74 6c 73 3a 3a 73 68 61 35 31  ref="#tls::sha51
0da0: 32 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 35 31  2"><b>tls::sha51
0db0: 32 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69  2</b> <i>data</i
0dc0: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 2f 70 3e 0a 0a  ></a><br>.</p>..
0dd0: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53  <h3><a name="DES
0de0: 43 52 49 50 54 49 4f 4e 22 3e 44 45 53 43 52 49  CRIPTION">DESCRI
0df0: 50 54 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  PTION</a></h3>..
0e00: 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f  <p>This extensio
0e10: 6e 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e  n provides a gen
0e20: 65 72 69 63 20 62 69 6e 64 69 6e 67 20 74 6f 20  eric binding to 
0e30: 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a.href="http://
0e40: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
0e50: 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75  ">OpenSSL</a>, u
0e60: 74 69 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74  tilizing the.<st
0e70: 72 6f 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68  rong>Tcl_StackCh
0e80: 61 6e 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41  annel</strong>.A
0e90: 50 49 20 66 6f 72 20 54 63 6c 20 38 2e 34 20 61  PI for Tcl 8.4 a
0ea0: 6e 64 20 68 69 67 68 65 72 2e 20 54 68 65 20 73  nd higher. The s
0eb0: 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 78  ockets behave ex
0ec0: 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 0a 61  actly the same.a
0ed0: 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74  s channels creat
0ee0: 65 64 20 75 73 69 6e 67 20 54 63 6c 27 73 20 62  ed using Tcl's b
0ef0: 75 69 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e  uilt-in <strong>
0f00: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a  socket</strong>.
0f10: 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 61 64 64  command with add
0f20: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20  itional options 
0f30: 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20  for controlling 
0f40: 74 68 65 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e  the SSL session.
0f50: 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  .</p>..<h3><a na
0f60: 6d 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f  me="COMMANDS">CO
0f70: 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a  MMANDS</a></h3>.
0f80: 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e  .<p>Typically on
0f90: 65 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20  e would use the 
0fa0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63  <strong>tls::soc
0fb0: 6b 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d  ket </strong>com
0fc0: 6d 61 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69  mand.which provi
0fd0: 64 65 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74  des compatibilit
0fe0: 79 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 76  y with the nativ
0ff0: 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f  e Tcl <strong>so
1000: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f  cket</strong>.co
1010: 6d 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63  mmand. In such c
1020: 61 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  ases <strong>tls
1030: 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67  ::import</strong
1040: 3e 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a  > should not be.
1050: 75 73 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f  used directly.</
1060: 70 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74  p>..<dl>.    <dt
1070: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69  ><a name="tls::i
1080: 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69  nit"><b>tls::ini
1090: 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e  t </b><i>?option
10a0: 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  s?</i></a></dt>.
10b0: 20 20 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c      <dd>Optional
10c0: 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74   function to set
10d0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74   the default opt
10e0: 69 6f 6e 73 20 75 73 65 64 20 62 79 0a 09 3c 73  ions used by..<s
10f0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65  trong>tls::socke
1100: 74 3c 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79  t</strong>. If y
1110: 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e  ou call <strong>
1120: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72  tls::import</str
1130: 6f 6e 67 3e 0a 09 64 69 72 65 63 74 6c 79 20 74  ong>..directly t
1140: 68 69 73 20 72 6f 75 74 69 6e 65 20 68 61 73 20  his routine has 
1150: 6e 6f 20 65 66 66 65 63 74 2e 20 41 6e 79 20 6f  no effect. Any o
1160: 66 20 74 68 65 20 6f 70 74 69 6f 6e 73 0a 09 74  f the options..t
1170: 68 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  hat <strong>tls:
1180: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e  :socket</strong>
1190: 20 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20   accepts can be 
11a0: 73 65 74 0a 09 75 73 69 6e 67 20 74 68 69 73 20  set..using this 
11b0: 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20  command, though 
11c0: 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74  you should limit
11d0: 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 0a 09 74   your options..t
11e0: 6f 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74  o only TLS relat
11f0: 65 64 20 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20  ed ones.</dd>.  
1200: 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74    <dt>&nbsp;</dt
1210: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  >.    <dt><a nam
1220: 65 3d 22 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e  e="tls::socket">
1230: 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c  <b>tls::socket <
1240: 2f 62 3e 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f  /b><em>?options?
1250: 0a 09 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e  ..host port</em>
1260: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
1270: 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  t><b>tls::socket
1280: 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 65  </b><em> ?-serve
1290: 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69  r command? ?opti
12a0: 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f  ons? port</em></
12b0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 73  dt>.    <dd>This
12c0: 20 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e   is a helper fun
12d0: 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69  ction that utili
12e0: 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69  zes the underlyi
12f0: 6e 67 0a 09 63 6f 6d 6d 61 6e 64 73 20 28 3c 73  ng..commands (<s
1300: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72  trong>tls::impor
1310: 74 3c 2f 73 74 72 6f 6e 67 3e 29 2e 20 49 74 20  t</strong>). It 
1320: 62 65 68 61 76 65 73 0a 09 65 78 61 63 74 6c 79  behaves..exactly
1330: 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65   the same as the
1340: 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72   native Tcl <str
1350: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ong>socket</stro
1360: 6e 67 3e 0a 09 63 6f 6d 6d 61 6e 64 20 65 78 63  ng>..command exc
1370: 65 70 74 20 74 68 61 74 20 74 68 65 20 6f 70 74  ept that the opt
1380: 69 6f 6e 73 20 63 61 6e 20 69 6e 63 6c 75 64 65  ions can include
1390: 20 61 6e 79 20 6f 66 20 74 68 65 0a 09 61 70 70   any of the..app
13a0: 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d  licable <a href=
13b0: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c  "#tls::import"><
13c0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72  strong>tls:impor
13d0: 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 09  t</strong></a>..
13e0: 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65  options with one
13f0: 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69   additional opti
1400: 6f 6e 3a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e  on:.<blockquote>
1410: 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c  .    <dl>..<dt><
1420: 73 74 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 76  strong>-autoserv
1430: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  ername</strong> 
1440: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
1450: 74 3e 0a 09 3c 64 64 3e 41 75 74 6f 6d 61 74 69  t>..<dd>Automati
1460: 63 61 6c 6c 79 20 73 65 6e 64 20 74 68 65 20 2d  cally send the -
1470: 73 65 72 76 65 72 6e 61 6d 65 20 61 73 20 74 68  servername as th
1480: 65 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 20  e <em>host</em> 
1490: 61 72 67 75 6d 65 6e 74 0a 09 20 20 20 20 28 64  argument..    (d
14a0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61  efault is <em>fa
14b0: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20  lse</em>)</dd>. 
14c0: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b     </dl>.</block
14d0: 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e  quote>..    <dt>
14e0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d  <a name="tls::im
14f0: 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d  port"><b>tls::im
1500: 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e  port </b><i>chan
1510: 6e 65 6c 0a 09 3f 6f 70 74 69 6f 6e 73 3f 3c 2f  nel..?options?</
1520: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  i></a></dt>.    
1530: 3c 64 64 3e 53 53 4c 2d 65 6e 61 62 6c 65 20 61  <dd>SSL-enable a
1540: 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61   regular Tcl cha
1550: 6e 6e 65 6c 20 2d 20 69 74 20 6e 65 65 64 20 6e  nnel - it need n
1560: 6f 74 20 62 65 20 61 0a 09 73 6f 63 6b 65 74 2c  ot be a..socket,
1570: 20 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64   but must provid
1580: 65 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c  e bi-directional
1590: 20 66 6c 6f 77 2e 20 41 6c 73 6f 0a 09 73 65 74   flow. Also..set
15a0: 74 69 6e 67 20 73 65 73 73 69 6f 6e 20 70 61 72  ting session par
15b0: 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20  ameters for SSL 
15c0: 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a  handshake.</dd>.
15d0: 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20  .<blockquote>.  
15e0: 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72    <dl>..<dt><str
15f0: 6f 6e 67 3e 2d 61 6c 70 6e 3c 2f 73 74 72 6f 6e  ong>-alpn</stron
1600: 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e  g> <em>list</em>
1610: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20  </dt>..<dd>List 
1620: 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20  of protocols to 
1630: 6f 66 66 65 72 20 64 75 72 69 6e 67 20 41 70 70  offer during App
1640: 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 0a 09  lication-Layer..
1650: 20 20 20 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67      Protocol Neg
1660: 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e  otiation (ALPN).
1670: 20 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 65   For example: <e
1680: 6d 3e 68 32 3c 2f 65 6d 3e 20 61 6e 64 0a 09 20  m>h2</em> and.. 
1690: 20 20 20 3c 65 6d 3e 68 74 74 70 2f 31 2e 31 3c     <em>http/1.1<
16a0: 2f 65 6d 3e 2c 20 62 75 74 20 6e 6f 74 20 3c 65  /em>, but not <e
16b0: 6d 3e 68 33 3c 2f 65 6d 3e 20 6f 72 20 3c 65 6d  m>h3</em> or <em
16c0: 3e 71 75 69 63 3c 2f 65 6d 3e 2e 3c 2f 64 64 3e  >quic</em>.</dd>
16d0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63  ..<dt><strong>-c
16e0: 61 64 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  adir</strong> <e
16f0: 6d 3e 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  m>dir</em></dt>.
1700: 09 3c 64 64 3e 53 65 74 20 74 68 65 20 43 41 20  .<dd>Set the CA 
1710: 63 65 72 74 69 66 69 63 61 74 65 73 20 70 61 74  certificates pat
1720: 68 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 64  h. The default d
1730: 69 72 65 63 74 6f 72 79 20 69 73 20 70 6c 61 74  irectory is plat
1740: 66 6f 72 6d 0a 09 20 20 20 20 73 70 65 63 69 66  form..    specif
1750: 69 63 20 61 6e 64 20 63 61 6e 20 62 65 20 73 65  ic and can be se
1760: 74 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d  t at compile tim
1770: 65 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f  e. This can be o
1780: 76 65 72 72 69 64 64 65 6e 0a 09 20 20 20 20 76  verridden..    v
1790: 69 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45  ia the <b>SSL_CE
17a0: 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72  RT_DIR</b> envir
17b0: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e  onment variable.
17c0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
17d0: 6e 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72  ng>-cafile </str
17e0: 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65  ong><em>filename
17f0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1800: 53 65 74 20 74 68 65 20 63 65 72 74 69 66 69 63  Set the certific
1810: 61 74 65 20 61 75 74 68 6f 72 69 74 79 20 28 43  ate authority (C
1820: 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20  A) certificates 
1830: 66 69 6c 65 2e 20 54 68 65 20 64 65 66 61 75 6c  file. The defaul
1840: 74 0a 09 20 20 20 20 69 73 20 74 68 65 20 63 65  t..    is the ce
1850: 72 74 2e 70 65 6d 20 66 69 6c 65 20 69 6e 20 74  rt.pem file in t
1860: 68 65 20 4f 70 73 6e 53 53 4c 20 64 69 72 65 63  he OpsnSSL direc
1870: 74 6f 72 79 2e 20 54 68 69 73 20 63 61 6e 20 61  tory. This can a
1880: 6c 73 6f 20 62 65 0a 09 20 20 20 20 6f 76 65 72  lso be..    over
1890: 72 69 64 64 65 6e 20 76 69 61 20 74 68 65 20 3c  ridden via the <
18a0: 62 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c  b>SSL_CERT_FILE<
18b0: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  /b> environment 
18c0: 76 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09  variable.</dd>..
18d0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72  <dt><strong>-cer
18e0: 74 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  tfile</strong> <
18f0: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e  em>filename</em>
1900: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69  </dt>..<dd>Speci
1910: 66 79 20 74 68 65 20 66 69 6c 65 6e 61 6d 65 20  fy the filename 
1920: 77 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69  with the certifi
1930: 63 61 74 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64  cate to use.</dd
1940: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
1950: 63 65 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  cert</strong> <e
1960: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c  m>filename</em><
1970: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66  /dt>..<dd>Specif
1980: 79 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f  y the contents o
1990: 66 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  f a certificate 
19a0: 74 6f 20 75 73 65 2c 20 61 73 20 61 20 44 45 52  to use, as a DER
19b0: 0a 09 20 20 20 20 65 6e 63 6f 64 65 64 20 62 69  ..    encoded bi
19c0: 6e 61 72 79 20 76 61 6c 75 65 20 28 58 2e 35 30  nary value (X.50
19d0: 39 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 09 3c 64  9 DER).</dd>..<d
19e0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65  t><strong>-ciphe
19f0: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  r</strong> <em>s
1a00: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
1a10: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 69 70  .<dd>List of cip
1a20: 68 65 72 73 20 74 6f 20 75 73 65 2e 20 53 74 72  hers to use. Str
1a30: 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28  ing is a colon (
1a40: 22 3a 22 29 20 73 65 70 61 72 61 74 65 64 20 6c  ":") separated l
1a50: 69 73 74 0a 09 20 20 20 20 6f 66 20 63 69 70 68  ist..    of ciph
1a60: 65 72 73 20 6f 72 20 63 69 70 68 65 72 20 73 75  ers or cipher su
1a70: 69 74 65 73 2e 20 43 69 70 68 65 72 20 73 75 69  ites. Cipher sui
1a80: 74 65 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69  tes can be combi
1a90: 6e 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74  ned..    using t
1aa0: 68 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72  he <b>+</b> char
1ab0: 61 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20  acter. Prefixes 
1ac0: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70  can be used to p
1ad0: 65 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20  ermanently..    
1ae0: 72 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65  remove ("!"), de
1af0: 6c 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d  lete ("-"), or m
1b00: 6f 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20  ove a cypher to 
1b10: 74 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20  the end of..    
1b20: 74 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20  the list ("+"). 
1b30: 4b 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52  Keywords <b>@STR
1b40: 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20  ENGTH</b> (sort 
1b50: 62 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20  by algorithm..  
1b60: 20 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c    key length), <
1b70: 62 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e  b>@SECLEVEL=</b>
1b80: 3c 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65  <i>n</i> (set se
1b90: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a  curity level to.
1ba0: 09 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e  .    n), and <b>
1bb0: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65  DEFAULT</b> (use
1bc0: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20   default cipher 
1bd0: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f  list, at start o
1be0: 6e 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c  nly)..    can al
1bf0: 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e  so be specified.
1c00: 20 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63   See OpenSSL doc
1c10: 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74  umentation for t
1c20: 68 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73  he full..    lis
1c30: 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65  t of valid value
1c40: 73 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20  s. (TLS 1.2 and 
1c50: 65 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64  earlier only)</d
1c60: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
1c70: 2d 63 69 70 68 65 72 73 75 69 74 65 73 3c 2f 73  -ciphersuites</s
1c80: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e  trong> <em>strin
1c90: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  g</em></dt>..<dd
1ca0: 3e 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20  >List of cipher 
1cb0: 73 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53  suites to use. S
1cc0: 74 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e  tring is a colon
1cd0: 20 28 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61   (":")..    sepa
1ce0: 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69  rated list of ci
1cf0: 70 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73  pher suite names
1d00: 2e 20 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29  . (TLS 1.3 only)
1d10: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
1d20: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72  ng>-command</str
1d30: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63  ong> <em>callbac
1d40: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  k</em></dt>..<dd
1d50: 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76  >Callback to inv
1d60: 6f 6b 65 20 61 74 20 73 65 76 65 72 61 6c 20 70  oke at several p
1d70: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65  oints during the
1d80: 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20   handshake...   
1d90: 20 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f   This is used to
1da0: 20 70 61 73 73 20 65 72 72 6f 72 73 20 61 6e 64   pass errors and
1db0: 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61   tracing informa
1dc0: 74 69 6f 6e 2c 20 61 6e 64 0a 09 20 20 20 20 69  tion, and..    i
1dd0: 74 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c 20  t can allow Tcl 
1de0: 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f  scripts to perfo
1df0: 72 6d 20 74 68 65 69 72 20 6f 77 6e 20 63 65 72  rm their own cer
1e00: 74 69 66 69 63 61 74 65 0a 09 20 20 20 20 76 61  tificate..    va
1e10: 6c 69 64 61 74 69 6f 6e 20 69 6e 20 70 6c 61 63  lidation in plac
1e20: 65 20 6f 66 20 74 68 65 20 64 65 66 61 75 6c 74  e of the default
1e30: 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76   validation prov
1e40: 69 64 65 64 20 62 79 0a 09 20 20 20 20 4f 70 65  ided by..    Ope
1e50: 6e 53 53 4c 2e 20 53 65 65 20 3c 61 20 68 72 65  nSSL. See <a hre
1e60: 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54  f="#CALLBACK OPT
1e70: 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f  IONS">CALLBACK O
1e80: 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20  PTIONS</a>..    
1e90: 66 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 63  for further disc
1ea0: 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64  ussion.</dd>..<d
1eb0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72  t><strong>-dhpar
1ec0: 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d  ams </strong><em
1ed0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f  >filename</em></
1ee0: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79  dt>..<dd>Specify
1ef0: 20 74 68 65 20 44 69 66 66 69 65 2d 48 65 6c 6c   the Diffie-Hell
1f00: 6d 61 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66  man parameters f
1f10: 69 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ile.</dd>..<dt><
1f20: 73 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c  strong>-keyfile<
1f30: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c  /strong> <em>fil
1f40: 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  ename</em></dt>.
1f50: 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65  .<dd>Specify the
1f60: 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c   private key fil
1f70: 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 0a 09  e. (default is..
1f80: 20 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 65      value of -ce
1f90: 72 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 09 3c 64  rtfile)</dd>..<d
1fa0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 3c 2f  t><strong>-key</
1fb0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65  strong> <em>file
1fc0: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
1fd0: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20  <dd>Specify the 
1fe0: 70 72 69 76 61 74 65 20 6b 65 79 20 74 6f 20 75  private key to u
1ff0: 73 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f  se as a DER enco
2000: 64 65 64 20 76 61 6c 75 65 20 28 50 4b 43 53 23  ded value (PKCS#
2010: 31 20 44 45 52 29 3c 2f 64 64 3e 0a 09 3c 64 74  1 DER)</dd>..<dt
2020: 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c  ><strong>-model<
2030: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61  /strong> <em>cha
2040: 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  nnel</em></dt>..
2050: 3c 64 64 3e 46 6f 72 63 65 20 74 68 69 73 20 63  <dd>Force this c
2060: 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20  hannel to share 
2070: 74 68 65 20 73 61 6d 65 20 3c 65 6d 3e 3c 73 74  the same <em><st
2080: 72 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c 2f 73 74  rong>SSL_CTX</st
2090: 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a 09 20 20 20 20  rong></em>..    
20a0: 73 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65  structure as the
20b0: 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63   specified <em>c
20c0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64  hannel</em>, and
20d0: 0a 09 20 20 20 20 74 68 65 72 65 66 6f 72 65 20  ..    therefore 
20e0: 73 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73 20  share callbacks 
20f0: 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  etc.</dd>..<dt><
2100: 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64  strong>-password
2110: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61  </strong> <em>ca
2120: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e  llback</em></dt>
2130: 0a 09 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74  ..<dd>Callback t
2140: 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70  o invoke when Op
2150: 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f  enSSL needs to o
2160: 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64  btain a password
2170: 2c 0a 09 20 20 20 20 74 79 70 69 63 61 6c 6c 79  ,..    typically
2180: 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70   to unlock the p
2190: 72 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20  rivate key of a 
21a0: 63 65 72 74 69 66 69 63 61 74 65 2e 20 54 68 65  certificate. The
21b0: 0a 09 20 20 20 20 63 61 6c 6c 62 61 63 6b 20 73  ..    callback s
21c0: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73  hould return a s
21d0: 74 72 69 6e 67 20 77 68 69 63 68 20 72 65 70 72  tring which repr
21e0: 65 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 77  esents the passw
21f0: 6f 72 64 0a 09 20 20 20 20 74 6f 20 62 65 20 75  ord..    to be u
2200: 73 65 64 2e 20 53 65 65 20 3c 61 20 68 72 65 66  sed. See <a href
2210: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  ="#CALLBACK OPTI
2220: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
2230: 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66  TIONS</a>..    f
2240: 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75  or further discu
2250: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ssion.</dd>..<dt
2260: 3e 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74 5f 68  ><strong>-post_h
2270: 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e 67  andshake</strong
2280: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
2290: 2f 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f 77 20  /dt>..<dd>Allow 
22a0: 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 74  post-handshake t
22b0: 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e 3c 2f  icket updates.</
22c0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
22d0: 3e 2d 72 65 71 75 65 73 74 20 3c 2f 73 74 72 6f  >-request </stro
22e0: 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e  ng><em>bool</em>
22f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 65  </dt>..<dd>Reque
2300: 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65  st a certificate
2310: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e   from peer durin
2320: 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e  g SSL handshake.
2330: 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 69  ..    (default i
2340: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29  s <em>true</em>)
2350: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
2360: 6e 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72  ng>-require</str
2370: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65  ong> <em>bool</e
2380: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71  m></dt>..<dd>Req
2390: 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72  uire a valid cer
23a0: 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65  tificate from pe
23b0: 65 72 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61  er during SSL ha
23c0: 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 49 66  ndshake...    If
23d0: 20 74 68 69 73 20 69 73 20 73 65 74 20 74 6f 20   this is set to 
23e0: 74 72 75 65 2c 20 74 68 65 6e 20 3c 73 74 72 6f  true, then <stro
23f0: 6e 67 3e 2d 72 65 71 75 65 73 74 3c 2f 73 74 72  ng>-request</str
2400: 6f 6e 67 3e 20 6d 75 73 74 0a 09 20 20 20 20 61  ong> must..    a
2410: 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72  lso be set to tr
2420: 75 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20  ue. (default is 
2430: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c  <em>false</em>)<
2440: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
2450: 67 3e 2d 73 65 63 75 72 69 74 79 6c 65 76 65 6c  g>-securitylevel
2460: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 6e  </strong> <em>in
2470: 74 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  teger</em></dt>.
2480: 09 3c 64 64 3e 53 65 74 20 73 65 63 75 72 69 74  .<dd>Set securit
2490: 79 20 6c 65 76 65 6c 2e 20 4d 75 73 74 20 62 65  y level. Must be
24a0: 20 30 20 74 6f 20 35 2e 20 54 68 65 20 73 65 63   0 to 5. The sec
24b0: 75 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65  urity level affe
24c0: 63 74 73 0a 09 20 20 20 20 63 69 70 68 65 72 20  cts..    cipher 
24d0: 73 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e  suite encryption
24e0: 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70   algorithms, sup
24f0: 70 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65  ported ECC curve
2500: 73 2c 0a 09 20 20 20 20 73 75 70 70 6f 72 74 65  s,..    supporte
2510: 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f  d signature algo
2520: 72 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d  rithms, DH param
2530: 65 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74  eter sizes, cert
2540: 69 66 69 63 61 74 65 0a 09 20 20 20 20 6b 65 79  ificate..    key
2550: 20 73 69 7a 65 73 20 61 6e 64 20 73 69 67 6e 61   sizes and signa
2560: 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e  ture algorithms.
2570: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
2580: 31 2e 0a 09 20 20 20 20 4c 65 76 65 6c 20 33 20  1...    Level 3 
2590: 61 6e 64 20 68 69 67 68 65 72 20 64 69 73 61 62  and higher disab
25a0: 6c 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73  le support for s
25b0: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 61  ession tickets a
25c0: 6e 64 20 6f 6e 6c 79 0a 09 20 20 20 20 61 63 63  nd only..    acc
25d0: 65 70 74 20 63 69 70 68 65 72 20 73 75 69 74 65  ept cipher suite
25e0: 73 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 66  s that provide f
25f0: 6f 72 77 61 72 64 20 73 65 63 72 65 63 79 2e 3c  orward secrecy.<
2600: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
2610: 67 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e  g>-server</stron
2620: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e  g> <em>bool</em>
2630: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 48 61 6e 64 73  </dt>..<dd>Hands
2640: 68 61 6b 65 20 61 73 20 73 65 72 76 65 72 20 69  hake as server i
2650: 66 20 74 72 75 65 2c 20 65 6c 73 65 20 68 61 6e  f true, else han
2660: 64 73 68 61 6b 65 20 61 73 0a 09 20 20 20 20 63  dshake as..    c
2670: 6c 69 65 6e 74 2e 20 28 64 65 66 61 75 6c 74 20  lient. (default 
2680: 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d  is <em>false</em
2690: 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  >)</dd>..<dt><st
26a0: 72 6f 6e 67 3e 2d 73 65 72 76 65 72 6e 61 6d 65  rong>-servername
26b0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f  </strong> <em>ho
26c0: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  st</em></dt>..<d
26d0: 64 3e 53 70 65 63 69 66 79 20 73 65 72 76 65 72  d>Specify server
26e0: 20 68 6f 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20   hostname. Only 
26f0: 61 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68 65  available if the
2700: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79   OpenSSL library
2710: 0a 09 20 20 20 20 74 68 65 20 70 61 63 6b 61 67  ..    the packag
2720: 65 20 69 73 20 6c 69 6e 6b 65 64 20 61 67 61 69  e is linked agai
2730: 6e 73 74 20 73 75 70 70 6f 72 74 73 20 74 68 65  nst supports the
2740: 20 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65 78   TLS hostname ex
2750: 74 65 6e 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72  tension..    for
2760: 20 27 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e   'Server Name In
2770: 64 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e  dication' (SNI).
2780: 20 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68 65   Use to name the
2790: 20 6c 6f 67 69 63 61 6c 20 68 6f 73 74 0a 09 20   logical host.. 
27a0: 20 20 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e     we are talkin
27b0: 67 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74 69  g to and expecti
27c0: 6e 67 20 61 20 63 65 72 74 69 66 69 63 61 74 65  ng a certificate
27d0: 20 66 6f 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   for.</dd>..<dt>
27e0: 3c 73 74 72 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e  <strong>-session
27f0: 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  _id</strong> <em
2800: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
2810: 3e 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69  >..<dd>Session i
2820: 64 20 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73  d to resume sess
2830: 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ion.</dd>..<dt><
2840: 73 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74  strong>-ssl2</st
2850: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f  rong> <em>bool</
2860: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e  em></dt>..<dd>En
2870: 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20  able use of SSL 
2880: 76 32 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20  v2. (default is 
2890: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c  <em>false</em>)<
28a0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
28b0: 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67  g>-ssl3 </strong
28c0: 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f  ><em>bool</em></
28d0: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20  dt>..<dd>Enable 
28e0: 75 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28  use of SSL v3. (
28f0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66  default is <em>f
2900: 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  alse</em>)</dd>.
2910: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c  .<dt>-<strong>tl
2920: 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  s1</strong> <em>
2930: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  bool</em></dt>..
2940: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  <dd>Enable use o
2950: 66 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75  f TLS v1. (defau
2960: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f  lt is <em>true</
2970: 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d  em>)</dd>..<dt>-
2980: 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f  <strong>tls1.1</
2990: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
29a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
29b0: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
29c0: 53 20 76 31 2e 31 20 28 64 65 66 61 75 6c 74 20  S v1.1 (default 
29d0: 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e  is <em>true</em>
29e0: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74  )</dd>..<dt>-<st
29f0: 72 6f 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72  rong>tls1.2</str
2a00: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65  ong> <em>bool</e
2a10: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61  m></dt>..<dd>Ena
2a20: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76  ble use of TLS v
2a30: 31 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73 20  1.2 (default is 
2a40: 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f  <em>true</em>)</
2a50: 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e  dd>..<dt>-<stron
2a60: 67 3e 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67  g>tls1.3</strong
2a70: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
2a80: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65  /dt>..<dd>Enable
2a90: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33   use of TLS v1.3
2aa0: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d   (default is <em
2ab0: 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e  >true</em>)</dd>
2ac0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76  ..<dt><strong>-v
2ad0: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f  alidatecommand</
2ae0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c  strong> <em>call
2af0: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  back</em></dt>..
2b00: 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20  <dd>Callback to 
2b10: 69 6e 76 6f 6b 65 20 74 6f 20 76 65 72 69 66 79  invoke to verify
2b20: 20 6f 72 20 76 61 6c 69 64 61 74 65 20 70 72 6f   or validate pro
2b30: 74 6f 63 6f 6c 20 63 6f 6e 66 69 67 0a 09 20 20  tocol config..  
2b40: 20 20 70 61 72 61 6d 65 74 65 72 73 20 64 75 72    parameters dur
2b50: 69 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c  ing the protocol
2b60: 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61   negotiation pha
2b70: 73 65 2e 20 53 65 65 0a 09 20 20 20 20 3c 61 20  se. See..    <a 
2b80: 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20  href="#CALLBACK 
2b90: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43  OPTIONS">CALLBAC
2ba0: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20  K OPTIONS</a>.. 
2bb0: 20 20 20 66 6f 72 20 66 75 72 74 68 65 72 20 64     for further d
2bc0: 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a  iscussion.</dd>.
2bd0: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63      </dl>.</bloc
2be0: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74  kquote>..    <dt
2bf0: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75  ><a name="tls::u
2c00: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a  nimport"><b>tls:
2c10: 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69  :unimport </b><i
2c20: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
2c30: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72  </dt>.    <dd>Pr
2c40: 6f 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65  ovided for symme
2c50: 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74  try to <strong>t
2c60: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
2c70: 6e 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20  ng>, this.      
2c80: 75 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c  unstacks the SSL
2c90: 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72  -enabling of a r
2ca0: 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e  egular Tcl chann
2cb0: 65 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20  el.  An error.  
2cc0: 20 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66      is thrown if
2cd0: 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20   TLS is not the 
2ce0: 74 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e  top stacked chan
2cf0: 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 20  nel type.</dd>. 
2d00: 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64     <dt>&nbsp;</d
2d10: 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  t>.    <dt><a na
2d20: 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61  me="tls::handsha
2d30: 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ke"><strong>tls:
2d40: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f  :handshake</stro
2d50: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c  ng> <em>channel<
2d60: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
2d70: 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e    <dd>Forces han
2d80: 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70  dshake to take p
2d90: 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e  lace, and return
2da0: 73 20 30 20 69 66 0a 09 68 61 6e 64 73 68 61 6b  s 0 if..handshak
2db0: 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72  e is still in pr
2dc0: 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63  ogress (non-bloc
2dd0: 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 0a 09  king), or 1 if..
2de0: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61  the handshake wa
2df0: 73 20 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66  s successful. If
2e00: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66   the handshake f
2e10: 61 69 6c 65 64 0a 09 74 68 69 73 20 72 6f 75 74  ailed..this rout
2e20: 69 6e 65 20 77 69 6c 6c 20 74 68 72 6f 77 20 61  ine will throw a
2e30: 6e 20 65 72 72 6f 72 2e 3c 2f 64 64 3e 0a 20 20  n error.</dd>.  
2e40: 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74    <dt>&nbsp;</dt
2e50: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  >.    <dt><a nam
2e60: 65 3d 22 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e  e="tls::status">
2e70: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61  <strong>tls::sta
2e80: 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20  tus</strong>.   
2e90: 20 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68   <em>?-local? ch
2ea0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  annel</em></a></
2eb0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75  dt>.    <dd>Retu
2ec0: 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20  rns the current 
2ed0: 73 74 61 74 75 73 20 6f 66 20 74 68 65 20 63 65  status of the ce
2ee0: 72 74 69 66 69 63 61 74 65 20 66 6f 72 20 61 6e  rtificate for an
2ef0: 20 53 53 4c 0a 09 63 68 61 6e 6e 65 6c 2e 20 54   SSL..channel. T
2f00: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c  he result is a l
2f10: 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65  ist of key-value
2f20: 20 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e   pairs describin
2f30: 67 0a 09 74 68 65 20 63 65 72 74 69 66 69 63 61  g..the certifica
2f40: 74 65 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c  te. If the resul
2f50: 74 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69  t is an empty li
2f60: 73 74 20 74 68 65 6e 20 74 68 65 0a 09 53 53 4c  st then the..SSL
2f70: 20 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e   handshake has n
2f80: 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64  ot yet completed
2f90: 2e 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c  . If <em>-local<
2fa0: 2f 65 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69  /em> is..specifi
2fb0: 65 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63  ed, then the loc
2fc0: 61 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69  al certificate i
2fd0: 73 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c  s used.</dd>.<bl
2fe0: 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53  ockquote>..<b>SS
2ff0: 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20  L Status</b>.   
3000: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f   <dl>..<dt><stro
3010: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e  ng>alpn</strong>
3020: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65   <em>protocol</e
3030: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3040: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74   protocol select
3050: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61  ed after Applica
3060: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f  tion-Layer Proto
3070: 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61  col..    Negotia
3080: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64  tion (ALPN).</dd
3090: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63  >..<dt><strong>c
30a0: 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c  ipher</strong> <
30b0: 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f  em>cipher</em></
30c0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 72  dt>..<dd>The cur
30d0: 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75  rent cipher in u
30e0: 73 65 20 62 65 74 77 65 65 6e 20 74 68 65 20 63  se between the c
30f0: 6c 69 65 6e 74 20 61 6e 64 0a 09 20 20 20 20 73  lient and..    s
3100: 65 72 76 65 72 20 63 68 61 6e 6e 65 6c 73 2e 3c  erver channels.<
3110: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3120: 67 3e 70 65 65 72 6e 61 6d 65 3c 2f 73 74 72 6f  g>peername</stro
3130: 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d  ng> <em>name</em
3140: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
3150: 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68  peername from th
3160: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  e certificate.</
3170: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
3180: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e  >protocol</stron
3190: 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f  g> <em>version</
31a0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
31b0: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69  e protocol versi
31c0: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  on used for the 
31d0: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20  connection:..   
31e0: 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53   SSL2, SSL3, TLS
31f0: 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e  1, TLS1.1, TLS1.
3200: 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e  2, TLS1.3, or un
3210: 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74  known.</dd>..<dt
3220: 3e 3c 73 74 72 6f 6e 67 3e 73 62 69 74 73 3c 2f  ><strong>sbits</
3230: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65  strong> <em>n</e
3240: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3250: 20 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20   number of bits 
3260: 75 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73  used for the ses
3270: 73 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09  sion key.</dd>..
3280: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e  <dt><strong>sign
3290: 61 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74  atureHashAlgorit
32a0: 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  hm</strong> <em>
32b0: 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f  algorithm</em></
32c0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67  dt>..<dd>The sig
32d0: 6e 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f  nature hash algo
32e0: 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74  rithm.</dd>..<dt
32f0: 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75  ><strong>signatu
3300: 72 65 54 79 70 65 3c 2f 73 74 72 6f 6e 67 3e 20  reType</strong> 
3310: 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64  <em>type</em></d
3320: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e  t>..<dd>The sign
3330: 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65  ature type value
3340: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
3350: 6f 6e 67 3e 76 65 72 69 66 79 44 65 70 74 68 3c  ong>verifyDepth<
3360: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f  /strong> <em>n</
3370: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61  em></dt>..<dd>Ma
3380: 78 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20  ximum depth for 
3390: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
33a0: 63 68 61 69 6e 20 76 65 72 69 66 69 63 61 74 69  chain verificati
33b0: 6f 6e 2e 0a 09 20 20 20 20 44 65 66 61 75 6c 74  on...    Default
33c0: 20 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 6b   is -1, to check
33d0: 20 61 6c 6c 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   all.</dd>..<dt>
33e0: 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 4d 6f  <strong>verifyMo
33f0: 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  de</strong> <em>
3400: 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  list</em></dt>..
3410: 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 65 72 74  <dd>List of cert
3420: 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61  ificate verifica
3430: 74 69 6f 6e 20 6d 6f 64 65 73 2e 3c 2f 64 64 3e  tion modes.</dd>
3440: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65  ..<dt><strong>ve
3450: 72 69 66 79 52 65 73 75 6c 74 3c 2f 73 74 72 6f  rifyResult</stro
3460: 6e 67 3e 20 3c 65 6d 3e 72 65 73 75 6c 74 3c 2f  ng> <em>result</
3470: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65  em></dt>..<dd>Ce
3480: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69  rtificate verifi
3490: 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f  cation result.</
34a0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
34b0: 3e 63 61 5f 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e  >ca_names</stron
34c0: 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e  g> <em>list</em>
34d0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20  </dt>..<dd>List 
34e0: 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61  of the Certifica
34f0: 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75  te Authorities u
3500: 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68  sed to create th
3510: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  e certificate.</
3520: 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f  dd>.    </dl>.</
3530: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f  blockquote>.<blo
3540: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 65 72  ckquote>..<b>Cer
3550: 74 69 66 69 63 61 74 65 20 53 74 61 74 75 73 3c  tificate Status<
3560: 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64  /b>.    <dl>..<d
3570: 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 6c 3c 2f 73  t><strong>all</s
3580: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e  trong> <em>strin
3590: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  g</em></dt>..<dd
35a0: 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72  >Dump of all cer
35b0: 74 69 66 69 63 61 74 65 20 69 6e 66 6f 2e 3c 2f  tificate info.</
35c0: 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  dd>...<dt><stron
35d0: 67 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e  g>version</stron
35e0: 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d  g> <em>value</em
35f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
3600: 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 73  certificate vers
3610: 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ion.</dd>..<dt><
3620: 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c 4e 75 6d  strong>serialNum
3630: 62 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ber</strong> <em
3640: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  >n</em></dt>..<d
3650: 64 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d  d>The serial num
3660: 62 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69  ber of the certi
3670: 66 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74  ficate as hex st
3680: 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  ring.</dd>..<dt>
3690: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72  <strong>signatur
36a0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61  e</strong> <em>a
36b0: 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64  lgorithm</em></d
36c0: 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65 72 20 61  t>..<dd>Cipher a
36d0: 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f  lgorithm used fo
36e0: 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69  r certificate si
36f0: 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c  gnature.</dd>..<
3700: 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65  dt><strong>issue
3710: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64  r</strong> <em>d
3720: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
3730: 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68  >The distinguish
3740: 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20  ed name (DN) of 
3750: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
3760: 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64  issuer.</dd>..<d
3770: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65 66  t><strong>notBef
3780: 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ore</strong> <em
3790: 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >date</em></dt>.
37a0: 09 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64  .<dd>The begin d
37b0: 61 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69  ate for the vali
37c0: 64 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 74  dity of the cert
37d0: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c  ificate.</dd>..<
37e0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66  dt><strong>notAf
37f0: 74 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ter</strong> <em
3800: 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >date</em></dt>.
3810: 09 3c 64 64 3e 54 68 65 20 65 78 70 69 72 61 74  .<dd>The expirat
3820: 69 6f 6e 20 64 61 74 65 20 66 6f 72 20 74 68 65  ion date for the
3830: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3840: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3850: 73 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 3e  subject</strong>
3860: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74   <em>dn</em></dt
3870: 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69  >..<dd>The disti
3880: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44  nguished name (D
3890: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  N) of the certif
38a0: 69 63 61 74 65 20 73 75 62 6a 65 63 74 2e 0a 09  icate subject...
38b0: 20 20 20 20 46 69 65 6c 64 73 20 69 6e 63 6c 75      Fields inclu
38c0: 64 65 3a 20 43 6f 6d 6d 6f 6e 20 4e 61 6d 65 20  de: Common Name 
38d0: 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69  (CN), Organizati
38e0: 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79  on (O), Locality
38f0: 0a 09 20 20 20 20 6f 72 20 43 69 74 79 20 28 4c  ..    or City (L
3900: 29 2c 20 53 74 61 74 65 20 6f 72 20 50 72 6f 76  ), State or Prov
3910: 69 6e 63 65 20 28 53 29 2c 20 61 6e 64 20 43 6f  ince (S), and Co
3920: 75 6e 74 72 79 20 4e 61 6d 65 20 28 43 29 2e 3c  untry Name (C).<
3930: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3940: 67 3e 69 73 73 75 65 72 55 6e 69 71 75 65 49 44  g>issuerUniqueID
3950: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74  </strong> <em>st
3960: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  ring</em></dt>..
3970: 3c 64 64 3e 54 68 65 20 69 73 73 75 65 72 20 75  <dd>The issuer u
3980: 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e 0a 09  nique id.</dd>..
3990: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a  <dt><strong>subj
39a0: 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 73 74 72  ectUniqueID</str
39b0: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c  ong> <em>string<
39c0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
39d0: 68 65 20 73 75 62 6a 65 63 74 20 75 6e 69 71 75  he subject uniqu
39e0: 65 20 69 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74  e id.</dd>...<dt
39f0: 3e 3c 73 74 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74  ><strong>num_ext
3a00: 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e  ensions</strong>
3a10: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e   <em>n</em></dt>
3a20: 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 20  ..<dd>Number of 
3a30: 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65  certificate exte
3a40: 6e 73 69 6f 6e 73 2e 3c 2f 64 64 3e 0a 09 3c 64  nsions.</dd>..<d
3a50: 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 74 65 6e 73  t><strong>extens
3a60: 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ions</strong> <e
3a70: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>list</em></dt>
3a80: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 65  ..<dd>List of ce
3a90: 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73  rtificate extens
3aa0: 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 64 64 3e 0a  ion names.</dd>.
3ab0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 75 74  .<dt><strong>aut
3ac0: 68 6f 72 69 74 79 4b 65 79 49 64 65 6e 74 69 66  horityKeyIdentif
3ad0: 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ier</strong> <em
3ae0: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
3af0: 3e 0a 09 3c 64 64 3e 28 41 4b 49 29 20 4b 65 79  >..<dd>(AKI) Key
3b00: 20 69 64 65 6e 74 69 66 69 65 72 20 6f 66 20 74   identifier of t
3b10: 68 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 65  he Issuing CA ce
3b20: 72 74 69 66 69 63 61 74 65 20 74 68 61 74 20 73  rtificate that s
3b30: 69 67 6e 65 64 0a 09 20 20 20 20 74 68 65 20 53  igned..    the S
3b40: 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 61  SL certificate a
3b50: 73 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 68  s hex string. Th
3b60: 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73  is value matches
3b70: 20 74 68 65 20 53 4b 49 0a 09 20 20 20 20 76 61   the SKI..    va
3b80: 6c 75 65 20 6f 66 20 74 68 65 20 49 6e 74 65 72  lue of the Inter
3b90: 6d 65 64 69 61 74 65 20 43 41 20 63 65 72 74 69  mediate CA certi
3ba0: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64  ficate.</dd>..<d
3bb0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63  t><strong>subjec
3bc0: 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f  tKeyIdentifier</
3bd0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69  strong> <em>stri
3be0: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ng</em></dt>..<d
3bf0: 64 3e 28 53 4b 49 29 20 48 61 73 68 20 6f 66 20  d>(SKI) Hash of 
3c00: 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69  the public key i
3c10: 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66  nside the certif
3c20: 69 63 61 74 65 20 61 73 20 68 65 78 0a 09 20 20  icate as hex..  
3c30: 20 73 74 72 69 6e 67 2e 20 55 73 65 64 20 74 6f   string. Used to
3c40: 20 69 64 65 6e 74 69 66 79 20 63 65 72 74 69 66   identify certif
3c50: 69 63 61 74 65 73 20 74 68 61 74 20 63 6f 6e 74  icates that cont
3c60: 61 69 6e 20 61 20 70 61 72 74 69 63 75 6c 61 72  ain a particular
3c70: 0a 09 20 20 20 70 75 62 6c 69 63 20 6b 65 79 2e  ..   public key.
3c80: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3c90: 6e 67 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d  ng>subjectAltNam
3ca0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c  e</strong> <em>l
3cb0: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ist</em></dt>..<
3cc0: 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f  dd>List of all o
3cd0: 66 20 74 68 65 20 61 6c 74 65 72 6e 61 74 69 76  f the alternativ
3ce0: 65 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20  e domain names, 
3cf0: 73 75 62 20 64 6f 6d 61 69 6e 73 2c 0a 09 20 20  sub domains,..  
3d00: 20 20 61 6e 64 20 49 50 20 61 64 64 72 65 73 73    and IP address
3d10: 65 73 20 74 68 61 74 20 61 72 65 20 73 65 63 75  es that are secu
3d20: 72 65 64 20 62 79 20 74 68 65 20 63 65 72 74 69  red by the certi
3d30: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64  ficate.</dd>..<d
3d40: 74 3e 3c 73 74 72 6f 6e 67 3e 6f 63 73 70 3c 2f  t><strong>ocsp</
3d50: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74  strong> <em>list
3d60: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
3d70: 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69  List of all Onli
3d80: 6e 65 20 43 65 72 74 69 66 69 63 61 74 65 20 53  ne Certificate S
3d90: 74 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28  tatus Protocol (
3da0: 4f 43 53 50 29 20 55 52 4c 73 2e 3c 2f 64 64 3e  OCSP) URLs.</dd>
3db0: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63  ...<dt><strong>c
3dc0: 65 72 74 69 66 69 63 61 74 65 3c 2f 73 74 72 6f  ertificate</stro
3dd0: 6e 67 3e 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d  ng> <em>cert</em
3de0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
3df0: 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 74  PEM encoded cert
3e00: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 0a 09  ificate.</dd>...
3e10: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e  <dt><strong>sign
3e20: 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d 3c 2f  atureAlgorithm</
3e30: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f  strong> <em>algo
3e40: 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  rithm</em></dt>.
3e50: 09 3c 64 64 3e 43 69 70 68 65 72 20 61 6c 67 6f  .<dd>Cipher algo
3e60: 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63  rithm used for c
3e70: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
3e80: 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  ture.</dd>..<dt>
3e90: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72  <strong>signatur
3ea0: 65 56 61 6c 75 65 3c 2f 73 74 72 6f 6e 67 3e 20  eValue</strong> 
3eb0: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  <em>string</em><
3ec0: 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66  /dt>..<dd>Certif
3ed0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
3ee0: 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f  as hex string.</
3ef0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
3f00: 3e 73 69 67 6e 61 74 75 72 65 44 69 67 65 73 74  >signatureDigest
3f10: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65  </strong> <em>ve
3f20: 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  rsion</em></dt>.
3f30: 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65  .<dd>Certificate
3f40: 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 2e   signing digest.
3f50: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3f60: 6e 67 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f  ng>publicKeyAlgo
3f70: 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rithm</strong> <
3f80: 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d  em>algorithm</em
3f90: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74  ></dt>..<dd>Cert
3fa0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
3fb0: 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67  e public key alg
3fc0: 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64  orithm.</dd>..<d
3fd0: 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63  t><strong>public
3fe0: 4b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  Key</strong> <em
3ff0: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
4000: 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61  >..<dd>Certifica
4010: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62  te signature pub
4020: 6c 69 63 20 6b 65 79 20 61 73 20 68 65 78 20 73  lic key as hex s
4030: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74  tring.</dd>..<dt
4040: 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 73 3c 2f 73  ><strong>bits</s
4050: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
4060: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62  ></dt>..<dd>Numb
4070: 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20  er of bits used 
4080: 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20  for certificate 
4090: 73 69 67 6e 61 74 75 72 65 20 6b 65 79 3c 2f 64  signature key</d
40a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
40b0: 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 73 74 72  self_signed</str
40c0: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e  ong> <em>boolean
40d0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
40e0: 49 73 20 63 65 72 74 69 66 69 63 61 74 65 20 73  Is certificate s
40f0: 69 67 6e 61 74 75 72 65 20 73 65 6c 66 20 73 69  ignature self si
4100: 67 6e 65 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74  gned.</dd>...<dt
4110: 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68 61  ><strong>sha1_ha
4120: 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  sh</strong> <em>
4130: 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  hash</em></dt>..
4140: 3c 64 64 3e 54 68 65 20 53 48 41 31 20 68 61 73  <dd>The SHA1 has
4150: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  h of the certifi
4160: 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72 69  cate as hex stri
4170: 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ng.</dd>..<dt><s
4180: 74 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 61 73  trong>sha256_has
4190: 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68  h</strong> <em>h
41a0: 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ash</em></dt>..<
41b0: 64 64 3e 54 68 65 20 53 48 41 32 35 36 20 68 61  dd>The SHA256 ha
41c0: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
41d0: 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72  icate as hex str
41e0: 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f  ing.</dd>.    </
41f0: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65  dl>.</blockquote
4200: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  >..    <dt><a na
4210: 6d 65 3d 22 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74  me="tls::connect
4220: 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  ion"><strong>tls
4230: 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 73 74  ::connection</st
4240: 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 63 68  rong>.    <em>ch
4250: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  annel</em></a></
4260: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75  dt>.    <dd>Retu
4270: 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20  rns the current 
4280: 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75  connection statu
4290: 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e  s of an SSL chan
42a0: 6e 65 6c 2e 20 54 68 65 0a 09 72 65 73 75 6c 74  nel. The..result
42b0: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65   is a list of ke
42c0: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65  y-value pairs de
42d0: 73 63 72 69 62 69 6e 67 20 74 68 65 0a 09 63 6f  scribing the..co
42e0: 6e 6e 65 63 74 65 64 20 70 65 65 72 2e 3c 2f 64  nnected peer.</d
42f0: 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  d>.<blockquote>.
4300: 09 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f  .<b>SSL Status</
4310: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74  b>.    <dl>..<dt
4320: 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 74 65 3c 2f  ><strong>state</
4330: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 61 74  strong> <em>stat
4340: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
4350: 3e 53 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f  >State of the co
4360: 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09  nnection.</dd>..
4370: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 76  <dt><strong>serv
4380: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  ername</strong> 
4390: 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64  <em>name</em></d
43a0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 61 6d 65  t>..<dd>The name
43b0: 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 65   of the connecte
43c0: 64 20 74 6f 20 73 65 72 76 65 72 2e 3c 2f 64 64  d to server.</dd
43d0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70  >..<dt><strong>p
43e0: 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e  rotocol</strong>
43f0: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d   <em>version</em
4400: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
4410: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e  protocol version
4420: 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f   used for the co
4430: 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53  nnection:..    S
4440: 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c  SL2, SSL3, TLS1,
4450: 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c   TLS1.1, TLS1.2,
4460: 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e   TLS1.3, or unkn
4470: 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  own.</dd>..<dt><
4480: 73 74 72 6f 6e 67 3e 72 65 6e 65 67 6f 74 69 61  strong>renegotia
4490: 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  tion</strong> <e
44a0: 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f  m>boolean</em></
44b0: 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72  dt>..<dd>Whether
44c0: 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f   protocol renego
44d0: 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f  tiation is suppo
44e0: 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64  rted or not.</dd
44f0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
4500: 65 63 75 72 69 74 79 6c 65 76 65 6c 3c 2f 73 74  ecuritylevel</st
4510: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 65 6c 3c  rong> <em>level<
4520: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
4530: 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65  he security leve
4540: 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63  l used for selec
4550: 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c  tion of ciphers,
4560: 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c   key size, etc.<
4570: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4580: 67 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64  g>session_reused
4590: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
45a0: 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  olean</em></dt>.
45b0: 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65  .<dd>Whether the
45c0: 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65   session has bee
45d0: 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e  n reused or not.
45e0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
45f0: 6e 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f 73 74  ng>is_server</st
4600: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61  rong> <em>boolea
4610: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
4620: 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e  >Whether the con
4630: 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e 66 69  nection is confi
4640: 67 75 72 65 64 20 61 73 20 61 20 73 65 72 76 65  gured as a serve
4650: 72 20 28 31 29 20 6f 72 20 63 6c 69 65 6e 74 20  r (1) or client 
4660: 28 30 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  (0).</dd>..<dt><
4670: 73 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 73 73 69  strong>compressi
4680: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  on</strong> <em>
4690: 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  mode</em></dt>..
46a0: 3c 64 64 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20  <dd>Compression 
46b0: 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64  method.</dd>..<d
46c0: 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 61 6e 73  t><strong>expans
46d0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ion</strong> <em
46e0: 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >mode</em></dt>.
46f0: 09 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e 20 6d  .<dd>Expansion m
4700: 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 20 20 20 20  ethod.</dd>.    
4710: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f  </dl>.</blockquo
4720: 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e  te>.<blockquote>
4730: 0a 09 3c 62 3e 43 69 70 68 65 72 20 49 6e 66 6f  ..<b>Cipher Info
4740: 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c  </b>.    <dl>..<
4750: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65  dt><strong>ciphe
4760: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  r</strong> <em>c
4770: 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  ipher</em></dt>.
4780: 09 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74  .<dd>The current
4790: 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66   cipher in use f
47a0: 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  or the connectio
47b0: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  n.</dd>..<dt><st
47c0: 72 6f 6e 67 3e 73 74 61 6e 64 61 72 64 5f 6e 61  rong>standard_na
47d0: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  me</strong> <em>
47e0: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
47f0: 3c 64 64 3e 54 68 65 20 73 74 61 6e 64 61 72 64  <dd>The standard
4800: 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70   RFC name of cip
4810: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  her.</dd>..<dt><
4820: 73 74 72 6f 6e 67 3e 62 69 74 73 3c 2f 73 74 72  strong>bits</str
4830: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c  ong> <em>n</em><
4840: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75  /dt>..<dd>The nu
4850: 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 65  mber of processe
4860: 64 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  d bits used for 
4870: 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64  cipher.</dd>..<d
4880: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 72 65 74  t><strong>secret
4890: 5f 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c  _bits</strong> <
48a0: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  em>n</em></dt>..
48b0: 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f  <dd>The number o
48c0: 66 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73  f secret bits us
48d0: 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f  ed for cipher.</
48e0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
48f0: 3e 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f 73 74  >min_version</st
4900: 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f  rong> <em>versio
4910: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
4920: 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f  >The minimum pro
4930: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f  tocol version fo
4940: 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09  r cipher.</dd>..
4950: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 64 3c 2f  <dt><strong>id</
4960: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 64 3c 2f  strong> <em>id</
4970: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
4980: 65 20 4f 70 65 6e 53 53 4c 20 63 69 70 68 65 72  e OpenSSL cipher
4990: 20 69 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c   id.</dd>..<dt><
49a0: 73 74 72 6f 6e 67 3e 64 65 73 63 72 69 70 74 69  strong>descripti
49b0: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  on</strong> <em>
49c0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
49d0: 0a 09 3c 64 64 3e 41 20 74 65 78 74 20 64 65 73  ..<dd>A text des
49e0: 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20  cription of the 
49f0: 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20  cipher.</dd>.   
4a00: 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75   </dl>.</blockqu
4a10: 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65  ote>.<blockquote
4a20: 3e 0a 09 3c 62 3e 53 65 73 73 69 6f 6e 20 49 6e  >..<b>Session In
4a30: 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a  fo</b>.    <dl>.
4a40: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70  .<dt><strong>alp
4a50: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70  n</strong> <em>p
4a60: 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  rotocol</em></dt
4a70: 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f  >..<dd>The proto
4a80: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74  col selected aft
4a90: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c  er Application-L
4aa0: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20  ayer Protocol.. 
4ab0: 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28     Negotiation (
4ac0: 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ALPN).</dd>..<dt
4ad0: 3e 3c 73 74 72 6f 6e 67 3e 72 65 73 75 6d 61 62  ><strong>resumab
4ae0: 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  le</strong> <em>
4af0: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74  boolean</em></dt
4b00: 3e 0a 09 3c 64 64 3e 43 61 6e 20 74 68 65 20 73  >..<dd>Can the s
4b10: 65 73 73 69 6f 6e 20 62 65 20 72 65 73 75 6d 65  ession be resume
4b20: 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09  d or not.</dd>..
4b30: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 72  <dt><strong>star
4b40: 74 5f 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  t_time</strong> 
4b50: 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e  <em>seconds</em>
4b60: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 69 6d 65 20  </dt>..<dd>Time 
4b70: 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74  since session st
4b80: 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73  arted in seconds
4b90: 20 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 64   since epoch.</d
4ba0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4bb0: 74 69 6d 65 6f 75 74 3c 2f 73 74 72 6f 6e 67 3e  timeout</strong>
4bc0: 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d   <em>seconds</em
4bd0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 20  ></dt>..<dd>Max 
4be0: 64 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 73  duration of sess
4bf0: 69 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 62  ion in seconds b
4c00: 65 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c  efore time-out.<
4c10: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4c20: 67 3e 6c 69 66 65 74 69 6d 65 3c 2f 73 74 72 6f  g>lifetime</stro
4c30: 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c  ng> <em>seconds<
4c40: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
4c50: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69  ession ticket li
4c60: 66 65 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73  fetime hint in s
4c70: 65 63 6f 6e 64 73 2e 3c 2f 64 64 3e 0a 09 3c 64  econds.</dd>..<d
4c80: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f  t><strong>sessio
4c90: 6e 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  n_id</strong> <e
4ca0: 6d 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  m>binary_string<
4cb0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55  /em></dt>..<dd>U
4cc0: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 69 64  nique session id
4cd0: 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75   for use in resu
4ce0: 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e  ming the session
4cf0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
4d00: 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b  ong>session_tick
4d10: 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  et</strong> <em>
4d20: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65  binary_string</e
4d30: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69  m></dt>..<dd>Uni
4d40: 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b  que session tick
4d50: 65 74 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65  et for use in re
4d60: 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69  suming the sessi
4d70: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  on.</dd>..<dt><s
4d80: 74 72 6f 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70  trong>ticket_app
4d90: 5f 64 61 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c  _data</strong> <
4da0: 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67  em>binary_string
4db0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4dc0: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74  Unique session t
4dd0: 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f  icket applicatio
4de0: 6e 20 64 61 74 61 2e 3c 2f 64 64 3e 0a 09 3c 64  n data.</dd>..<d
4df0: 74 3e 3c 73 74 72 6f 6e 67 3e 6d 61 73 74 65 72  t><strong>master
4e00: 5f 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  _key</strong> <e
4e10: 6d 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  m>binary_string<
4e20: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55  /em></dt>..<dd>U
4e30: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 6d 61  nique session ma
4e40: 73 74 65 72 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09  ster key.</dd>..
4e50: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73  <dt><strong>sess
4e60: 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64 65 3c 2f  ion_cache_mode</
4e70: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65  strong> <em>mode
4e80: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4e90: 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64  Server cache mod
4ea0: 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65  e (client, serve
4eb0: 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 64 64  r, or both).</dd
4ec0: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c  >.    </dl>.</bl
4ed0: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c  ockquote>..    <
4ee0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a  dt><a name="tls:
4ef0: 3a 63 69 70 68 65 72 73 22 3e 3c 73 74 72 6f 6e  :ciphers"><stron
4f00: 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f  g>tls::ciphers</
4f10: 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e  strong>.    <em>
4f20: 3f 70 72 6f 74 6f 63 6f 6c 3f 20 3f 76 65 72 62  ?protocol? ?verb
4f30: 6f 73 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f  ose? ?supported?
4f40: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20  </em></a></dt>. 
4f50: 20 20 20 3c 64 64 3e 57 69 74 68 6f 75 74 20 61     <dd>Without a
4f60: 6e 79 20 61 72 67 73 2c 20 72 65 74 75 72 6e 73  ny args, returns
4f70: 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 63   a list of all c
4f80: 69 70 68 65 72 73 2e 20 57 69 74 68 0a 09 3c 65  iphers. With..<e
4f90: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c  m>protocol</em>,
4fa0: 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72   only the cipher
4fb0: 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20  s supported for 
4fc0: 74 68 61 74 20 70 72 6f 74 6f 63 6f 6c 0a 09 61  that protocol..a
4fd0: 72 65 20 72 65 74 75 72 6e 65 64 20 77 68 65 72  re returned wher
4fe0: 65 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  e <em>protocol</
4ff0: 65 6d 3e 20 6d 75 73 74 20 62 65 20 6f 6e 65 20  em> must be one 
5000: 6f 66 20 3c 62 3e 73 73 6c 32 2c 20 73 73 6c 33  of <b>ssl2, ssl3
5010: 2c 0a 09 74 6c 73 31 2c 20 74 6c 73 31 2e 31 2c  ,..tls1, tls1.1,
5020: 20 74 6c 73 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20   tls1.2,</b> or 
5030: 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49  <b>tls1.3</b>. I
5040: 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65  f <em>verbose</e
5050: 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65 64  m> is..specified
5060: 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 20   as true then a 
5070: 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72  verbose, human r
5080: 65 61 64 61 62 6c 65 20 6c 69 73 74 20 69 73 20  eadable list is 
5090: 72 65 74 75 72 6e 65 64 0a 09 77 69 74 68 20 61  returned..with a
50a0: 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d  dditional inform
50b0: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70  ation on the cip
50c0: 68 65 72 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70  her. If <em>supp
50d0: 6f 72 74 65 64 3c 2f 65 6d 3e 0a 09 69 73 20 73  orted</em>..is s
50e0: 70 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65  pecified as true
50f0: 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20  , then only the 
5100: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65  ciphers supporte
5110: 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 0a 09  d for protocol..
5120: 77 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c  will be listed.<
5130: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
5140: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 64 69 67 65   name="tls::dige
5150: 73 74 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  sts"><strong>tls
5160: 3a 3a 64 69 67 65 73 74 73 3c 2f 73 74 72 6f 6e  ::digests</stron
5170: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  g></a></dt>.    
5180: 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69  <dd>Returns a li
5190: 73 74 20 6f 66 20 74 68 65 20 68 61 73 68 20 61  st of the hash a
51a0: 6c 67 6f 72 69 74 68 6d 73 20 66 6f 72 20 3c 62  lgorithms for <b
51b0: 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f 62 3e  >tls::digest</b>
51c0: 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 64 64 3e 0a 0a   command.</dd>..
51d0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
51e0: 22 74 6c 73 3a 3a 6d 61 63 73 22 3e 3c 73 74 72  "tls::macs"><str
51f0: 6f 6e 67 3e 74 6c 73 3a 3a 6d 61 63 73 3c 2f 73  ong>tls::macs</s
5200: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  trong></a></dt>.
5210: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
5220: 61 20 6c 69 73 74 20 6f 66 20 74 68 65 20 61 76  a list of the av
5230: 61 69 6c 61 62 6c 65 20 4d 65 73 73 61 67 65 20  ailable Message 
5240: 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 20 43  Authentication C
5250: 6f 64 65 73 20 28 4d 41 43 29 20 66 6f 72 0a 09  odes (MAC) for..
5260: 74 68 65 20 3c 62 3e 74 6c 73 3a 3a 64 69 67 65  the <b>tls::dige
5270: 73 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c  st</b> command.<
5280: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
5290: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74   name="tls::prot
52a0: 6f 63 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74  ocols"><strong>t
52b0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73  ls::protocols</s
52c0: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  trong></a></dt>.
52d0: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
52e0: 61 20 6c 69 73 74 20 6f 66 20 73 75 70 70 6f 72  a list of suppor
52f0: 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56  ted protocols. V
5300: 61 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a  alid values are:
5310: 0a 09 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c  ..<b>ssl2</b>, <
5320: 62 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74  b>ssl3</b>, <b>t
5330: 6c 73 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31  ls1</b>, <b>tls1
5340: 2e 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e  .1</b>, <b>tls1.
5350: 32 3c 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74  2</b>,..and <b>t
5360: 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74  ls1.3</b>. Exact
5370: 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e   list depends on
5380: 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e   OpenSSL version
5390: 20 61 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69   and..compile ti
53a0: 6d 65 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a  me flags.</dd>..
53b0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
53c0: 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c  "tls::version"><
53d0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73  strong>tls::vers
53e0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e  ion</strong></a>
53f0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65  </dt>.    <dd>Re
5400: 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53  turns the OpenSS
5410: 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67  L version string
5420: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e  .</dd>..    <br>
5430: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
5440: 3d 22 74 6c 73 3a 3a 64 69 67 65 73 74 22 3e 3c  ="tls::digest"><
5450: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 69 67 65  strong>tls::dige
5460: 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  st</strong> <em>
5470: 74 79 70 65 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f  type ?-bin|-hex?
5480: 0a 09 3f 2d 6b 65 79 20 68 6d 61 63 5f 6b 65 79  ..?-key hmac_key
5490: 3f 20 5b 2d 66 69 6c 65 20 66 69 6c 65 6e 61 6d  ? [-file filenam
54a0: 65 20 7c 20 2d 63 68 61 6e 20 63 68 61 6e 6e 65  e | -chan channe
54b0: 6c 20 7c 20 3f 2d 64 61 74 61 3f 20 64 61 74 61  l | ?-data? data
54c0: 5d 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  ]</em></a></dt>.
54d0: 20 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74      <dd>Calculat
54e0: 65 20 74 68 65 20 6d 65 73 73 61 67 65 20 64 69  e the message di
54f0: 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74  gest for <em>dat
5500: 61 3c 2f 65 6d 3e 20 6f 72 20 66 69 6c 65 20 3c  a</em> or file <
5510: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e  em>filename</em>
5520: 0a 09 75 73 69 6e 67 20 3c 65 6d 3e 74 79 70 65  ..using <em>type
5530: 3c 2f 65 6d 3e 20 68 61 73 68 20 61 6c 67 6f 72  </em> hash algor
5540: 69 74 68 6d 2e 20 52 65 74 75 72 6e 73 20 76 61  ithm. Returns va
5550: 6c 75 65 20 61 73 20 61 20 68 65 78 20 73 74 72  lue as a hex str
5560: 69 6e 67 0a 09 28 64 65 66 61 75 6c 74 29 20 6f  ing..(default) o
5570: 72 20 61 73 20 61 20 62 69 6e 61 72 79 20 76 61  r as a binary va
5580: 6c 75 65 20 77 69 74 68 20 3c 65 6d 3e 2d 62 69  lue with <em>-bi
5590: 6e 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 20 55  n</em> option. U
55a0: 73 69 6e 67 0a 09 3c 65 6d 3e 2d 63 68 61 6e 3c  sing..<em>-chan<
55b0: 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2c 20 61 20 73  /em> option, a s
55c0: 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 69  tacked channel i
55d0: 73 20 63 72 65 61 74 65 64 20 61 6e 64 20 64 61  s created and da
55e0: 74 61 20 72 65 61 64 0a 09 66 72 6f 6d 20 74 68  ta read..from th
55f0: 65 20 63 68 61 6e 6e 65 6c 20 69 73 20 75 73 65  e channel is use
5600: 64 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 20 61  d to calculate a
5610: 20 6d 65 73 73 61 67 65 20 64 69 67 65 73 74 20   message digest 
5620: 77 69 74 68 20 74 68 65 20 72 65 73 75 6c 74 0a  with the result.
5630: 09 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 74  .returned with t
5640: 68 65 20 6c 61 73 74 20 72 65 61 64 20 6f 70 65  he last read ope
5650: 72 61 74 69 6f 6e 20 62 65 66 6f 72 65 20 45 4f  ration before EO
5660: 46 2e 20 55 73 65 20 3c 65 6d 3e 2d 6b 65 79 3c  F. Use <em>-key<
5670: 2f 65 6d 3e 20 74 6f 0a 09 73 70 65 63 69 66 79  /em> to..specify
5680: 20 74 68 65 20 6b 65 79 20 61 6e 64 20 72 65 74   the key and ret
5690: 75 72 6e 20 61 20 48 61 73 68 65 64 20 4d 65 73  urn a Hashed Mes
56a0: 73 61 67 65 20 41 75 74 68 65 6e 74 69 63 61 74  sage Authenticat
56b0: 69 6f 6e 20 43 6f 64 65 20 28 48 4d 41 43 29 2e  ion Code (HMAC).
56c0: 0a 09 54 6f 20 73 61 6c 74 20 61 20 70 61 73 73  ..To salt a pass
56d0: 77 6f 72 64 2c 20 61 70 70 65 6e 64 20 6f 72 20  word, append or 
56e0: 70 72 65 70 65 6e 64 20 74 68 65 20 73 61 6c 74  prepend the salt
56f0: 20 74 65 78 74 20 74 6f 20 74 68 65 20 70 61 73   text to the pas
5700: 73 77 6f 72 64 2e 0a 09 54 79 70 65 20 63 61 6e  sword...Type can
5710: 20 62 65 20 61 6e 79 20 4f 70 65 6e 53 53 4c 20   be any OpenSSL 
5720: 73 75 70 70 6f 72 74 65 64 20 68 61 73 68 20 61  supported hash a
5730: 6c 67 6f 72 69 74 68 6d 20 69 6e 63 6c 75 64 69  lgorithm includi
5740: 6e 67 3a 20 3c 62 3e 6d 64 34 3c 2f 62 3e 2c 0a  ng: <b>md4</b>,.
5750: 09 3c 62 3e 6d 64 35 3c 2f 62 3e 2c 20 3c 62 3e  .<b>md5</b>, <b>
5760: 73 68 61 31 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61  sha1</b>, <b>sha
5770: 32 35 36 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61 35  256</b>, <b>sha5
5780: 31 32 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61 33 2d  12</b>, <b>sha3-
5790: 32 35 36 3c 2f 62 3e 2c 0a 09 65 74 63 2e 20 53  256</b>,..etc. S
57a0: 65 65 20 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73  ee <b>tls::diges
57b0: 74 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66  ts</b> command f
57c0: 6f 72 20 61 20 66 75 6c 6c 20 6c 69 73 74 2e 3c  or a full list.<
57d0: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
57e0: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 6d 64 34 22   name="tls::md4"
57f0: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64  ><strong>tls::md
5800: 34 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64  4</strong> <em>d
5810: 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74  ata</em></a></dt
5820: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e  >.    <dd>Return
5830: 73 20 74 68 65 20 4d 44 34 20 6d 65 73 73 61 67  s the MD4 messag
5840: 65 2d 64 69 67 65 73 74 20 66 6f 72 20 3c 65 6d  e-digest for <em
5850: 3e 64 61 74 61 3c 2f 65 6d 3e 20 61 73 20 61 20  >data</em> as a 
5860: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e  hex string.</dd>
5870: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
5880: 65 3d 22 74 6c 73 3a 3a 6d 64 35 22 3e 3c 73 74  e="tls::md5"><st
5890: 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 73  rong>tls::md5</s
58a0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c  trong> <em>data<
58b0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
58c0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68    <dd>Returns th
58d0: 65 20 4d 44 35 20 6d 65 73 73 61 67 65 2d 64 69  e MD5 message-di
58e0: 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74  gest for <em>dat
58f0: 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 78 20  a</em> as a hex 
5900: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20  string.</dd>..  
5910: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
5920: 6c 73 3a 3a 73 68 61 31 22 3e 3c 73 74 72 6f 6e  ls::sha1"><stron
5930: 67 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f 73 74 72  g>tls::sha1</str
5940: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65  ong> <em>data</e
5950: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  m></a></dt>.    
5960: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20  <dd>Returns the 
5970: 53 48 41 31 20 73 65 63 75 72 65 20 68 61 73 68  SHA1 secure hash
5980: 20 61 6c 67 6f 72 69 74 68 6d 20 64 69 67 65 73   algorithm diges
5990: 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f  t for <em>data</
59a0: 65 6d 3e 20 61 73 20 61 20 68 65 78 20 73 74 72  em> as a hex str
59b0: 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c  ing.</dd>..    <
59c0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a  dt><a name="tls:
59d0: 3a 73 68 61 32 35 36 22 3e 3c 73 74 72 6f 6e 67  :sha256"><strong
59e0: 3e 74 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 73 74  >tls::sha256</st
59f0: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f  rong> <em>data</
5a00: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20  em></a></dt>.   
5a10: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65   <dd>Returns the
5a20: 20 53 48 41 2d 32 20 53 48 41 32 35 36 20 73 65   SHA-2 SHA256 se
5a30: 63 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69  cure hash algori
5a40: 74 68 6d 20 64 69 67 65 73 74 20 66 6f 72 20 3c  thm digest for <
5a50: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 61 73 20  em>data</em> as 
5a60: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64  a hex string.</d
5a70: 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  d>..    <dt><a n
5a80: 61 6d 65 3d 22 74 6c 73 3a 3a 73 68 61 35 31 32  ame="tls::sha512
5a90: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73  "><strong>tls::s
5aa0: 68 61 35 31 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c  ha512</strong> <
5ab0: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e  em>data</em></a>
5ac0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65  </dt>.    <dd>Re
5ad0: 74 75 72 6e 73 20 74 68 65 20 53 48 41 2d 32 20  turns the SHA-2 
5ae0: 53 48 41 35 31 32 20 73 65 63 75 72 65 20 68 61  SHA512 secure ha
5af0: 73 68 20 61 6c 67 6f 72 69 74 68 6d 20 64 69 67  sh algorithm dig
5b00: 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61  est for <em>data
5b10: 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 78 20 73  </em> as a hex s
5b20: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c  tring.</dd>.</dl
5b30: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
5b40: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53  CALLBACK OPTIONS
5b50: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f  ">CALLBACK OPTIO
5b60: 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e  NS</a></h3>..<p>
5b70: 0a 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 62  .As indicated ab
5b80: 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20  ove, individual 
5b90: 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20  channels can be 
5ba0: 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20  given their own 
5bb0: 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e  callbacks.to han
5bc0: 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65  dle intermediate
5bd0: 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74   processing by t
5be0: 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61  he OpenSSL libra
5bf0: 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73  ry, using the.<s
5c00: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  trong>-command</
5c10: 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67  strong>, <strong
5c20: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f  >-password</stro
5c30: 6e 67 3e 2c 20 61 6e 64 0a 3c 73 74 72 6f 6e 67  ng>, and.<strong
5c40: 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61  >-validate_comma
5c50: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69  nd</strong> opti
5c60: 6f 6e 73 20 70 61 73 73 65 64 20 74 6f 20 65 69  ons passed to ei
5c70: 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e  ther of.<strong>
5c80: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72  tls::socket</str
5c90: 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e  ong> or <strong>
5ca0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72  tls::import</str
5cb0: 6f 6e 67 3e 2e 0a 49 66 20 74 68 65 20 63 61 6c  ong>..If the cal
5cc0: 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20  lback generates 
5cd0: 61 6e 20 65 72 72 6f 72 2c 20 74 68 65 20 3c 62  an error, the <b
5ce0: 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d  >bgerror</b> com
5cf0: 6d 61 6e 64 20 77 69 74 68 20 62 65 0a 69 6e 76  mand with be.inv
5d00: 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20 65 72  oked with the er
5d10: 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e  ror information.
5d20: 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f  .</p>..<blockquo
5d30: 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64  te>.<dl>..    <d
5d40: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61  t><strong>-comma
5d50: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  nd</strong> <em>
5d60: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64  callback</em></d
5d70: 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76  t>.    <dd>..Inv
5d80: 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69  okes the specifi
5d90: 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c  ed <em>callback<
5da0: 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 74 20 73  /em> script at s
5db0: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 0a 09 64  everal points..d
5dc0: 75 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53  uring the OpenSS
5dd0: 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20  L handshake and 
5de0: 75 73 65 2e 20 53 65 65 20 62 65 6c 6f 77 20 66  use. See below f
5df0: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a  or the possible.
5e00: 09 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65  .arguments passe
5e10: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63  d to the callbac
5e20: 6b 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 73  k script. Values
5e30: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74   returned from t
5e40: 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65  he..callback are
5e50: 20 69 67 6e 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e   ignored....<br>
5e60: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09  ..<br>...<dl>...
5e70: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e  <dt>..  <strong>
5e80: 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c  error</strong> <
5e90: 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 61  em>channel messa
5ea0: 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  ge</em>..</dt>..
5eb0: 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e  <dd>..  The <em>
5ec0: 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67  message</em> arg
5ed0: 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 61  ument contains a
5ee0: 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20  n error message 
5ef0: 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20  generated..  by 
5f00: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63  the OpenSSL func
5f10: 74 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 52 5f 72  tion <code>ERR_r
5f20: 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69  eason_error_stri
5f30: 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f  ng()</code>...</
5f40: 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74  dd>...<br>...<dt
5f50: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66  >..  <strong>inf
5f60: 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  o</strong> <em>c
5f70: 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e  hannel major min
5f80: 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 3c  or message type<
5f90: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64  /em>..</dt>..<dd
5fa0: 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f  >..  This form o
5fb0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
5fc0: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65  voked by the Ope
5fd0: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20  nSSL function.. 
5fe0: 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73   <code>SSL_CTX_s
5ff0: 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b  et_info_callback
6000: 28 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e 67  ()</code> during
6010: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 65 74 75   connection setu
6020: 70 0a 09 20 20 61 6e 64 20 75 73 65 2e 0a 09 20  p..  and use... 
6030: 20 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20   <br>..  <ul>.. 
6040: 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 61   <li>Possible va
6050: 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a  lues for <em>maj
6060: 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20  or</em> are:..  
6070: 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c  <code>handshake,
6080: 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c   alert, connect,
6090: 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c   accept</code>.<
60a0: 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 73  /li>..  <li>Poss
60b0: 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20  ible values for 
60c0: 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61  <em>minor</em> a
60d0: 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73 74 61  re:..  <code>sta
60e0: 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20  rt, done, read, 
60f0: 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69  write, loop, exi
6100: 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09  t</code>.</li>..
6110: 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d 65    <li>The <em>me
6120: 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d  ssage</em> argum
6130: 65 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 70  ent is a descrip
6140: 74 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 63  tive string whic
6150: 68 20 6d 61 79 0a 09 20 20 62 65 20 67 65 6e 65  h may..  be gene
6160: 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 20  rated either by 
6170: 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f  <code>SSL_state_
6180: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63  string_long()</c
6190: 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63  ode> or by..  <c
61a0: 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65  ode>SSL_alert_de
61b0: 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29  sc_string_long()
61c0: 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e 64 69  </code>, dependi
61d0: 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78  ng on the contex
61e0: 74 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46  t.</li>..  <li>F
61f0: 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70  or alerts, the p
6200: 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66  ossible values f
6210: 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e  or <em>type</em>
6220: 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77   are:..  <code>w
6230: 61 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61  arning, fatal, a
6240: 6e 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65  nd unknown</code
6250: 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 0a 09  >. For others,..
6260: 20 20 3c 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f    <code>info</co
6270: 64 65 3e 20 69 73 20 75 73 65 64 2e 3c 2f 6c 69  de> is used.</li
6280: 3e 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64  >..  </ul>..</dd
6290: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72  >...<dt>..  <str
62a0: 6f 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72  ong>message</str
62b0: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  ong> <em>channel
62c0: 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69   direction versi
62d0: 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20  on content_type 
62e0: 64 61 74 61 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e  data</em>..</dt>
62f0: 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66  ..<dd>..  This f
6300: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
6310: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
6320: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
6330: 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f  on..  <code>SSL_
6340: 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b  set_msg_callback
6350: 28 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76  ()</code> whenev
6360: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20  er a message is 
6370: 73 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 65 69  sent or..  recei
6380: 76 65 64 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20  ved. It is only 
6390: 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a 09  available when..
63a0: 20 20 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d    OpenSSL is com
63b0: 70 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 3c  plied with the <
63c0: 65 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72  em>enable-ssl-tr
63d0: 61 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e  ace</em> option.
63e0: 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 64 69  ..  Where <em>di
63f0: 72 65 63 74 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20  rection</em> is 
6400: 53 65 6e 74 20 6f 72 20 52 65 63 65 69 76 65 64  Sent or Received
6410: 2c 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65  , <em>version</e
6420: 6d 3e 20 69 73 20 74 68 65 0a 09 20 20 70 72 6f  m> is the..  pro
6430: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2c 20 3c  tocol version, <
6440: 65 6d 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c  em>content_type<
6450: 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d 65 73 73  /em> is the mess
6460: 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65  age content type
6470: 2c 0a 09 20 20 61 6e 64 20 3c 65 6d 3e 64 61 74  ,..  and <em>dat
6480: 61 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69  a</em> is more i
6490: 6e 66 6f 20 6f 6e 20 74 68 65 20 6d 65 73 73 61  nfo on the messa
64a0: 67 65 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64  ge from the <cod
64b0: 65 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64  e>SSL_trace</cod
64c0: 65 3e 20 41 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09  e> API...</dd>..
64d0: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  <br>...<dt>..  <
64e0: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f  strong>session</
64f0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e  strong> <em>chan
6500: 6e 65 6c 20 73 65 73 73 69 6f 6e 5f 69 64 20 74  nel session_id t
6510: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f  icket lifetime</
6520: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
6530: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66  ..  This form of
6540: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
6550: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e  oked by the Open
6560: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20  SSL function..  
6570: 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65  <code>SSL_CTX_se
6580: 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c  ss_set_new_cb()<
6590: 2f 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 65  /code>...  Where
65a0: 20 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c   <em>session_id<
65b0: 2f 65 6d 3e 20 69 73 20 74 68 65 20 63 75 72 72  /em> is the curr
65c0: 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e  ent session iden
65d0: 74 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74  tifier,..  <em>t
65e0: 69 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68  icket</em> is th
65f0: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  e session ticket
6600: 20 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c   info, and <em>l
6610: 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20  ifetime</em>..  
6620: 69 73 20 74 68 65 20 74 68 65 20 74 69 63 6b 65  is the the ticke
6630: 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65  t lifetime in se
6640: 63 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c  conds...</dd>..<
6650: 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c  br>..</dl>.    <
6660: 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a  /dd>..    <br>..
6670: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
6680: 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e  -password</stron
6690: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c  g> <em>callback<
66a0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  /em></dt>.    <d
66b0: 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20  d>..Invokes the 
66c0: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61  specified <em>ca
66d0: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69  llback</em> scri
66e0: 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20  pt when OpenSSL 
66f0: 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e  needs to..obtain
6700: 20 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65   a password. See
6710: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70   below for the p
6720: 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74  ossible argument
6730: 73 20 70 61 73 73 65 64 20 74 6f 0a 09 74 68 65  s passed to..the
6740: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
6750: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20  . See below for 
6760: 76 61 6c 69 64 20 72 65 74 75 72 6e 20 76 61 6c  valid return val
6770: 75 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72  ues....<br>..<br
6780: 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a  >...<dl>...<dt>.
6790: 09 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 77  .  <strong>passw
67a0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ord</strong> <em
67b0: 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 6d  >rwflag size</em
67c0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09  >..</dt>..<dd>..
67d0: 20 20 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c    Invoked when l
67e0: 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e  oading or storin
67f0: 67 20 61 20 50 45 4d 20 63 65 72 74 69 66 69 63  g a PEM certific
6800: 61 74 65 20 77 69 74 68 20 65 6e 63 72 79 70 74  ate with encrypt
6810: 69 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65  ion...  Where <e
6820: 6d 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 73  m>rwflag</em> is
6830: 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64   0 for reading/d
6840: 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66  ecryption or 1 f
6850: 6f 72 0a 09 20 20 77 72 69 74 69 6e 67 2f 65 6e  or..  writing/en
6860: 63 72 79 70 74 69 6f 6e 20 28 63 61 6e 20 70 72  cryption (can pr
6870: 6f 6d 70 74 20 75 73 65 72 20 74 6f 20 63 6f 6e  ompt user to con
6880: 66 69 72 6d 29 20 61 6e 64 0a 09 20 20 3c 65 6d  firm) and..  <em
6890: 3e 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 68  >size</em> is th
68a0: 65 20 6d 61 78 20 70 61 73 73 77 6f 72 64 20 6c  e max password l
68b0: 65 6e 67 74 68 20 69 6e 20 62 79 74 65 73 2e 0a  ength in bytes..
68c0: 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20  .  The callback 
68d0: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 68  should return th
68e0: 65 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 20  e password as a 
68f0: 73 74 72 69 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 20  string...</dd>. 
6900: 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62     </dd>..    <b
6910: 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74  r>...    <dt><st
6920: 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f  rong>-validateco
6930: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  mmand</strong> <
6940: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
6950: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09  </dt>.    <dd>..
6960: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63  Invokes the spec
6970: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61  ified <em>callba
6980: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 64  ck</em> script d
6990: 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 20  uring handshake 
69a0: 69 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 61 6c  in..order to val
69b0: 69 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 64  idate the provid
69c0: 65 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65 65  ed value(s). See
69d0: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70   below for the p
69e0: 6f 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 6e  ossible..argumen
69f0: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65  ts passed to the
6a00: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
6a10: 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65  ...To reject the
6a20: 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74   value and abort
6a30: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65   connection, the
6a40: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64   callback should
6a50: 20 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f 20 61   return 0...To a
6a60: 63 63 65 70 74 20 74 68 65 20 76 61 6c 75 65 20  ccept the value 
6a70: 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65  and continue the
6a80: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20   connection, it 
6a90: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e  should return 1.
6aa0: 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20  ..To reject the 
6ab0: 76 61 6c 75 65 2c 20 62 75 74 20 63 6f 6e 74 69  value, but conti
6ac0: 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  nue the connecti
6ad0: 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65  on, it should re
6ae0: 74 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e 0a 09  turn 2....<br>..
6af0: 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64  <br>...<dl>...<d
6b00: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 61 6c  t>..  <strong>al
6b10: 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  pn</strong> <em>
6b20: 63 68 61 6e 6e 65 6c 20 70 72 6f 74 6f 63 6f 6c  channel protocol
6b30: 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 3c 2f 64   match</em>..</d
6b40: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20  t>..<dd>..  For 
6b50: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
6b60: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
6b70: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74  s invoked when t
6b80: 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 0a 09  he client ALPN..
6b90: 20 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72    extension is r
6ba0: 65 63 65 69 76 65 64 2e 20 49 66 20 3c 65 6d 3e  eceived. If <em>
6bb0: 6d 61 74 63 68 3c 2f 65 6d 3e 20 69 73 20 74 72  match</em> is tr
6bc0: 75 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c  ue, <em>protocol
6bd0: 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 20  </em>..  is the 
6be0: 66 69 72 73 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f  first <b>-alpn</
6bf0: 62 3e 20 73 70 65 63 69 66 69 65 64 20 70 72 6f  b> specified pro
6c00: 74 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20  tocol common to 
6c10: 74 68 65 20 62 6f 74 68 20 74 68 65 0a 09 20 20  the both the..  
6c20: 63 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65  client and serve
6c30: 72 2e 20 49 66 20 6e 6f 74 2c 20 74 68 65 20 66  r. If not, the f
6c40: 69 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63  irst client spec
6c50: 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69  ified protocol i
6c60: 73 0a 09 20 20 75 73 65 64 2e 20 43 61 6c 6c 65  s..  used. Calle
6c70: 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 61 6e  d after hello an
6c80: 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73  d ALPN callbacks
6c90: 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a  ...</dd>...<br>.
6ca0: 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e  ..<dt>..  <stron
6cb0: 67 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e  g>hello</strong>
6cc0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 73 65 72   <em>channel ser
6cd0: 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f  vername</em>..</
6ce0: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72  dt>..<dd>..  For
6cf0: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66   servers, this f
6d00: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
6d10: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e  is invoked durin
6d20: 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a 09  g client hello..
6d30: 20 20 6d 65 73 73 61 67 65 20 70 72 6f 63 65 73    message proces
6d40: 73 69 6e 67 2e 20 49 74 20 69 73 20 75 73 65 64  sing. It is used
6d50: 20 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70   to select an ap
6d60: 70 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66  propriate certif
6d70: 69 63 61 74 65 20 74 6f 0a 09 20 20 70 72 65 73  icate to..  pres
6d80: 65 6e 74 2c 20 61 6e 64 20 6d 61 6b 65 20 6f 74  ent, and make ot
6d90: 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f  her configuratio
6da0: 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65  n adjustments re
6db0: 6c 65 76 61 6e 74 20 74 6f 20 74 68 61 74 0a 09  levant to that..
6dc0: 20 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e    server name an
6dd0: 64 20 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74  d its configurat
6de0: 69 6f 6e 2e 20 43 61 6c 6c 65 64 20 62 65 66 6f  ion. Called befo
6df0: 72 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 20  re SNI and ALPN 
6e00: 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c 2f 64 64  callbacks...</dd
6e10: 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a  >...<br>...<dt>.
6e20: 09 20 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f  .  <strong>sni</
6e30: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e  strong> <em>chan
6e40: 6e 65 6c 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f  nel servername</
6e50: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
6e60: 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c  ..  For servers,
6e70: 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61   this form of ca
6e80: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
6e90: 64 20 77 68 65 6e 20 74 68 65 20 53 4e 49 20 65  d when the SNI e
6ea0: 78 74 65 6e 73 69 6f 6e 0a 09 20 20 66 72 6f 6d  xtension..  from
6eb0: 20 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 72   the client is r
6ec0: 65 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 3c  eceived. Where <
6ed0: 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65  em>servername</e
6ee0: 6d 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74  m> is the client
6ef0: 0a 09 20 20 70 72 6f 76 69 64 65 64 20 73 65 72  ..  provided ser
6f00: 76 65 72 20 6e 61 6d 65 20 66 72 6f 6d 20 74 68  ver name from th
6f10: 65 20 3c 62 3e 2d 73 65 72 76 65 72 6e 61 6d 65  e <b>-servername
6f20: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69  </b> option. Thi
6f30: 73 20 69 73 0a 09 20 20 75 73 65 64 20 77 68 65  s is..  used whe
6f40: 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 70 6f  n a server suppo
6f50: 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d  rts multiple nam
6f60: 65 73 2c 20 73 6f 20 74 68 65 20 72 69 67 68 74  es, so the right
6f70: 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20   certificate..  
6f80: 63 61 6e 20 62 65 20 75 73 65 64 2e 20 43 61 6c  can be used. Cal
6f90: 6c 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20  led after hello 
6fa0: 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66  callback but bef
6fb0: 6f 72 65 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63  ore ALPN callbac
6fc0: 6b 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e  k...</dd>...<br>
6fd0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
6fe0: 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e  ng>verify</stron
6ff0: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64  g> <em>channel d
7000: 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73  epth cert status
7010: 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64   error</em>..</d
7020: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73  t>..<dd>..  This
7030: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
7040: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20  k is invoked by 
7050: 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e  OpenSSL when a n
7060: 65 77 20 63 65 72 74 69 66 69 63 61 74 65 0a 09  ew certificate..
7070: 20 20 69 73 20 72 65 63 65 69 76 65 64 20 66 72    is received fr
7080: 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 20  om the peer. It 
7090: 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e  allows the clien
70a0: 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 0a 09  t to check the..
70b0: 20 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65    certificate ve
70c0: 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c  rification resul
70d0: 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68  ts and choose wh
70e0: 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75  ether to continu
70f0: 65 0a 09 20 20 6f 72 20 6e 6f 74 2e 20 49 74 20  e..  or not. It 
7100: 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61  is called for ea
7110: 63 68 20 63 65 72 74 69 66 69 63 61 74 65 20 69  ch certificate i
7120: 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  n the certificat
7130: 65 20 63 68 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e  e chain...  <ul>
7140: 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e  ..  <li>The <em>
7150: 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d  depth</em> argum
7160: 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65  ent is an intege
7170: 72 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74  r representing t
7180: 68 65 0a 09 20 20 63 75 72 72 65 6e 74 20 64 65  he..  current de
7190: 70 74 68 20 6f 6e 20 74 68 65 20 63 65 72 74 69  pth on the certi
71a0: 66 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 69  ficate chain, wi
71b0: 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63  th..  <code>0</c
71c0: 6f 64 65 3e 20 61 73 20 74 68 65 20 70 65 65 72  ode> as the peer
71d0: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64   certificate and
71e0: 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 67   higher values g
71f0: 6f 69 6e 67 0a 09 20 20 75 70 20 74 6f 20 74 68  oing..  up to th
7200: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  e Certificate Au
7210: 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f 6c  thority (CA).</l
7220: 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65  i>..  <li>The <e
7230: 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75  m>cert</em> argu
7240: 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f  ment is a list o
7250: 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72  f key-value pair
7260: 73 20 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20  s similar..  to 
7270: 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62  those returned b
7280: 79 0a 09 20 20 3c 61 20 68 72 65 66 3d 22 23 74  y..  <a href="#t
7290: 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72  ls::status"><str
72a0: 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c  ong>tls::status<
72b0: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c  /strong></a>.</l
72c0: 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65  i>..  <li>The <e
72d0: 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72  m>status</em> ar
72e0: 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 62 6f 6f  gument is an boo
72f0: 6c 65 61 6e 20 72 65 70 72 65 73 65 6e 74 69 6e  lean representin
7300: 67 20 74 68 65 0a 09 20 20 76 61 6c 69 64 69 74  g the..  validit
7310: 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74  y of the current
7320: 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09 20   certificate... 
7330: 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64   A value of <cod
7340: 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73  e>0</code> means
7350: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
7360: 20 69 73 20 64 65 65 6d 65 64 20 69 6e 76 61 6c   is deemed inval
7370: 69 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f  id...  A value o
7380: 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e  f <code>1</code>
7390: 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69   means the certi
73a0: 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64  ficate is deemed
73b0: 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20   valid.</li>..  
73c0: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 6f  <li>The <em>erro
73d0: 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20  r</em> argument 
73e0: 73 75 70 70 6c 69 65 73 20 74 68 65 20 6d 65 73  supplies the mes
73f0: 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65  sage, if any, ge
7400: 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c 63  nerated..  by <c
7410: 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43  ode>X509_STORE_C
7420: 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f  TX_get_error()</
7430: 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c  code>.</li>..  <
7440: 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72  /ul>..</dd>..<br
7450: 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64  >..</dl>.    </d
7460: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b  d>.</dl>.</block
7470: 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65  quote>..<p>.Refe
7480: 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61  rence implementa
7490: 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63  tions of these c
74a0: 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f  allbacks are pro
74b0: 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73  vided in the.dis
74c0: 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74  tribution as <st
74d0: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61  rong>tls::callba
74e0: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74  ck</strong>, <st
74f0: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f  rong>tls::passwo
7500: 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64  rd</strong>,.and
7510: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61   <strong>tls::va
7520: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
7530: 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 69  strong> respecti
7540: 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 74  vely.  Note that
7550: 20 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73   these are.<em>s
7560: 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65  ample</em> imple
7570: 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e  mentations only.
7580: 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c    In a more real
7590: 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74  istic deployment
75a0: 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69  .you would speci
75b0: 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c  fy your own call
75c0: 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20  back scripts on 
75d0: 65 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c  each TLS channel
75e0: 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f   using the.<stro
75f0: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72  ng>-command</str
7600: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70  ong>, <strong>-p
7610: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e  assword</strong>
7620: 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76  , and <strong>-v
7630: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c  alidate_command<
7640: 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73  /strong> options
7650: 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20  ..</p>..<p>.The 
7660: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72  default behavior
7670: 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e   when the <stron
7680: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
7690: 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e  ng> and <strong>
76a0: 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e  -validate_comman
76b0: 64 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f  d</strong>.optio
76c0: 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69  ns are not speci
76d0: 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 20  fied is for TLS 
76e0: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61  to process the a
76f0: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72  ssociated librar
7700: 79 20 63 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 65  y callbacks.inte
7710: 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61  rnally. The defa
7720: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65  ult behavior whe
7730: 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 70  n the <strong>-p
7740: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e  assword</strong>
7750: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 0a 73   option is not.s
7760: 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20  pecified is for 
7770: 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74  TLS to process t
7780: 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69  he associated li
7790: 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20  brary callbacks 
77a0: 62 79 20 61 74 74 65 6d 70 74 69 6e 67 0a 74 6f  by attempting.to
77b0: 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c   call <strong>tl
77c0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72  s::password</str
77d0: 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 72  ong>..The differ
77e0: 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 65  ence between the
77f0: 73 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 73  se two behaviors
7800: 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63   is a consequenc
7810: 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67  e of maintaining
7820: 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77  .compatibility w
7830: 69 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 6c  ith earlier impl
7840: 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70  ementations..</p
7850: 3e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f  >..<p>.The <stro
7860: 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73  ng>tls::debug</s
7870: 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20  trong> variable 
7880: 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64  provides some ad
7890: 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c  ditional.control
78a0: 20 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65   over these refe
78b0: 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e  rence callbacks.
78c0: 20 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a    Its value is z
78d0: 65 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a  ero by default..
78e0: 48 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72  Higher values pr
78f0: 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e  oduce more diagn
7900: 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e  ostic output, an
7910: 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63  d will also forc
7920: 65 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74  e the.verify met
7930: 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74  hod in <strong>t
7940: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74  ls::callback</st
7950: 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20  rong> to accept 
7960: 74 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c  the.certificate,
7970: 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73   even when it is
7980: 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a   invalid..</p>..
7990: 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65  <p>.<em>.The use
79a0: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63   of the referenc
79b0: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72  e callbacks <str
79c0: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63  ong>tls::callbac
79d0: 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72  k</strong>,.<str
79e0: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  ong>tls::passwor
79f0: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 20  d</strong>, and 
7a00: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c  <strong>tls::val
7a10: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73  idate_command</s
7a20: 74 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 20 72 65  trong>.is not re
7a30: 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79  commended.  They
7a40: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20   may be removed 
7a50: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65  from future rele
7a60: 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e  ases..</em>.</p>
7a70: 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75  ..<p>.<em>.The u
7a80: 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62  se of the variab
7a90: 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  le <strong>tls::
7aa0: 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69  debug</strong> i
7ab0: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65  s not recommende
7ac0: 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d  d..It may be rem
7ad0: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65  oved from future
7ae0: 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e   releases..</em>
7af0: 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  .</p>..<h3><a na
7b00: 6d 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47  me="DEBUG">DEBUG
7b10: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b  </a></h3>..TLS k
7b20: 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62  ey logging can b
7b30: 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74  e enabled by set
7b40: 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e  ting the environ
7b50: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62  ment variable.<b
7b60: 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f  >SSLKEYLOGFILE</
7b70: 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f  b> to the name o
7b80: 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f  f the file to lo
7b90: 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65  g to. Then whene
7ba0: 76 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 65  ver TLS.key mate
7bb0: 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65  rial is generate
7bc0: 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74  d or received it
7bd0: 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20   will be logged 
7be0: 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69  to the file. Thi
7bf0: 73 0a 69 73 20 75 73 65 66 75 6c 20 66 6f 72 20  s.is useful for 
7c00: 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61  logging key data
7c10: 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67   for network log
7c20: 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73  ging tools to us
7c30: 65 20 74 6f 0a 64 65 63 72 79 70 74 20 74 68 65  e to.decrypt the
7c40: 20 64 61 74 61 2e 0a 0a 3c 68 33 3e 3c 61 20 6e   data...<h3><a n
7c50: 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50  ame="HTTPS EXAMP
7c60: 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c  LE">HTTPS EXAMPL
7c70: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54  E</a></h3>..<p>T
7c80: 68 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73  his example uses
7c90: 20 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72   a sample server
7ca0: 2e 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69  .pem provided wi
7cb0: 74 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61  th the TLS relea
7cc0: 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20  se,.courtesy of 
7cd0: 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e  the <strong>Open
7ce0: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f  SSL</strong> pro
7cf0: 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e  ject.</p>..<pre>
7d00: 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72  <code>.package r
7d10: 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b  equire http.pack
7d20: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a  age require tls.
7d30: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20  .http::register 
7d40: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20  https 443 [list 
7d50: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61  ::tls::socket -a
7d60: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72  utoservername tr
7d70: 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65  ue -require true
7d80: 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c   -cadir /etc/ssl
7d90: 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b  /certs]..set tok
7da0: 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68   [http::geturl h
7db0: 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74  ttps://www.tcl.t
7dc0: 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65  k/].</code></pre
7dd0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
7de0: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52  SPECIAL CONSIDER
7df0: 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20  ATIONS">SPECIAL 
7e00: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f  CONSIDERATIONS</
7e10: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20  a></h3>..<p>The 
7e20: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20  capabilities of 
7e30: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e  this package can
7e40: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79   vary enormously
7e50: 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20   based upon how 
7e60: 79 6f 75 72 0a 4f 70 65 6e 53 53 4c 20 6c 69 62  your.OpenSSL lib
7e70: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75  rary was configu
7e80: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e  red and built. N
7e90: 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20  ew versions may 
7ea0: 6f 62 73 6f 6c 65 74 65 20 6f 6c 64 65 72 0a 70  obsolete older.p
7eb0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73  rotocol versions
7ec0: 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20  , add or remove 
7ed0: 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20  ciphers, change 
7ee0: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20  default values, 
7ef0: 65 74 63 2e 20 55 73 65 20 74 68 65 0a 3c 73 74  etc. Use the.<st
7f00: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72  rong>tls::cipher
7f10: 73 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c  s</strong> and <
7f20: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74  strong>tls::prot
7f30: 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 63  ocols</strong> c
7f40: 6f 6d 6d 61 6e 64 73 20 74 6f 0a 6f 62 74 61 69  ommands to.obtai
7f50: 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20  n the supported 
7f60: 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c  versions.</p>..<
7f70: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20  h3><a name="SEE 
7f80: 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f  ALSO">SEE ALSO</
7f90: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72  a></h3>..<p><str
7fa0: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ong>socket</stro
7fb0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c  ng>, <strong>fil
7fc0: 65 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67  eevent, </strong
7fd0: 3e 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f  ><a.href="http:/
7fe0: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67  /www.openssl.org
7ff0: 2f 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53  /"><strong>OpenS
8000: 53 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c  SL</strong></a><
8010: 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e  /p>..<hr>..<pre>
8020: 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79  .Copyright &copy
8030: 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d  ; 1999 Matt Newm
8040: 61 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63  an..Copyright &c
8050: 6f 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69  opy; 2004 Starfi
8060: 73 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72  sh Systems..</pr
8070: 65 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d  e>.</body>.</htm
8080: 6c 3e 0a                                         l>.