Hex Artifact Content

Artifact 025b4f00d8270d402c52d705084f89a7046dec0a989d6aa7df27158e54e84040:


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 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d  pe ?options?</em
0560: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e  ></dd>..    <dd>
0570: 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 62 3e 20  <b>tls::md4</b> 
0580: 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64  <em>data</em></d
0590: 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74  d>..    <dd><b>t
05a0: 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20 3c 65 6d 3e  ls::md5</b> <em>
05b0: 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09  data</em></dd>..
05c0: 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a      <dd><b>tls::
05d0: 73 68 61 31 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74  sha1</b> <em>dat
05e0: 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20  a</em></dd>..   
05f0: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61   <dd><b>tls::sha
0600: 32 35 36 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74 61  256</b> <em>data
0610: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20  </em></dd>..    
0620: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 35  <dd><b>tls::sha5
0630: 31 32 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74 61 3c  12</b> <em>data<
0640: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 2f 64 6c 3e  /em></dd>..</dl>
0650: 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c  .    </dd>.    <
0660: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 4f 4d  dd><a href="#COM
0670: 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c  MANDS">COMMANDS<
0680: 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64  /a></dd>.    <dd
0690: 3e 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42  ><a href="#CALLB
06a0: 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c  ACK OPTIONS">CAL
06b0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61  LBACK OPTIONS</a
06c0: 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c  ></dd>.    <dd><
06d0: 61 20 68 72 65 66 3d 22 23 48 54 54 50 53 20 45  a href="#HTTPS E
06e0: 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58  XAMPLE">HTTPS EX
06f0: 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a 20  AMPLE</a></dd>. 
0700: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22     <dd><a href="
0710: 23 53 45 45 20 41 4c 53 4f 22 3e 53 50 45 43 49  #SEE ALSO">SPECI
0720: 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e  AL CONSIDERATION
0730: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c  S</a></dd>.    <
0740: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 45 45  dd><a href="#SEE
0750: 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c   ALSO">SEE ALSO<
0760: 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a  /a></dd>.</dl>..
0770: 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  <hr>..<h3><a nam
0780: 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61  e="NAME">NAME</a
0790: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f  ></h3>..<p><stro
07a0: 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20  ng>tls</strong> 
07b0: 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74  - binding to <st
07c0: 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74  rong>OpenSSL</st
07d0: 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74 2e 3c 2f  rong>.toolkit.</
07e0: 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d  p>..<h3><a name=
07f0: 22 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50  "SYNOPSIS">SYNOP
0800: 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70  SIS</a></h3>..<p
0810: 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75  ><b>package requ
0820: 69 72 65 20 54 63 6c 20 38 2e 35 3c 2f 62 3e 3c  ire Tcl 8.5</b><
0830: 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20 72  br>.<b>package r
0840: 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 3c 62  equire tls</b><b
0850: 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  r>.<br>.<a href=
0860: 22 23 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e  "#tls::init"><b>
0870: 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 69  tls::init</b> <i
0880: 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f  >?options?</i></
0890: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
08a0: 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62  #tls::socket"><b
08b0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
08c0: 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f   <i>?options? ho
08d0: 73 74 20 70 6f 72 74 3c 2f 69 3e 3c 62 72 3e 0a  st port</i><br>.
08e0: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73  <a href="#tls::s
08f0: 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73  ocket"><b>tls::s
0900: 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 2d 73  ocket</b> <i>?-s
0910: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f  erver command? ?
0920: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 69  options? port</i
0930: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  ></a><br>.<a hre
0940: 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22  f="#tls::status"
0950: 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c  ><b>tls::status<
0960: 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 61 6c 3f 20  /b> <i>?-local? 
0970: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
0980: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0990: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c  s::connection"><
09a0: 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f  b>tls::connectio
09b0: 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c  n</b> <i>channel
09c0: 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20  </i></a><br>.<a 
09d0: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64  href="#tls::hand
09e0: 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68  shake"><b>tls::h
09f0: 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 3e  andshake</b> <i>
0a00: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
0a10: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0a20: 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c  s::import"><b>tl
0a30: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69  s::import</b> <i
0a40: 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e  >channel ?option
0a50: 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c  s?</i></a><br>.<
0a60: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 75 6e  a href="#tls::un
0a70: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a  import"><b>tls::
0a80: 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 3e  unimport</b> <i>
0a90: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
0aa0: 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66  br>.<br>.<a href
0ab0: 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 22  ="#tls::ciphers"
0ac0: 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  ><b>tls::ciphers
0ad0: 3c 2f 62 3e 20 3c 69 3e 3f 70 72 6f 74 6f 63 6f  </b> <i>?protoco
0ae0: 6c 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75  l? ?verbose? ?su
0af0: 70 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f 61 3e  pported?</i></a>
0b00: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
0b10: 6c 73 3a 3a 64 69 67 65 73 74 73 22 3e 3c 62 3e  ls::digests"><b>
0b20: 74 6c 73 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e  tls::digests</b>
0b30: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0b40: 3d 22 23 74 6c 73 3a 3a 6d 61 63 73 22 3e 3c 62  ="#tls::macs"><b
0b50: 3e 74 6c 73 3a 3a 6d 61 63 73 3c 2f 62 3e 3c 2f  >tls::macs</b></
0b60: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
0b70: 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22  #tls::protocols"
0b80: 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  ><b>tls::protoco
0b90: 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c  ls</b></a><br>.<
0ba0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 76 65  a href="#tls::ve
0bb0: 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 76  rsion"><b>tls::v
0bc0: 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 62  ersion</b></a><b
0bd0: 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  r>.<br>.<a href=
0be0: 22 23 74 6c 73 3a 3a 64 69 67 65 73 74 22 3e 3c  "#tls::digest"><
0bf0: 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f 62  b>tls::digest</b
0c00: 3e 20 3c 69 3e 74 79 70 65 20 3f 6f 70 74 69 6f  > <i>type ?optio
0c10: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a  ns?</i></a><br>.
0c20: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 6d  <a href="#tls::m
0c30: 64 34 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c  d4"><b>tls::md4<
0c40: 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c  /b> <i>data</i><
0c50: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0c60: 22 23 74 6c 73 3a 3a 6d 64 35 22 3e 3c 62 3e 74  "#tls::md5"><b>t
0c70: 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20 3c 69 3e 64  ls::md5</b> <i>d
0c80: 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a  ata</i></a><br>.
0c90: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73  <a href="#tls::s
0ca0: 68 61 31 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61  ha1"><b>tls::sha
0cb0: 31 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69  1</b> <i>data</i
0cc0: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  ></a><br>.<a hre
0cd0: 66 3d 22 23 74 6c 73 3a 3a 73 68 61 32 35 36 22  f="#tls::sha256"
0ce0: 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 32 35 36 3c  ><b>tls::sha256<
0cf0: 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c  /b> <i>data</i><
0d00: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0d10: 22 23 74 6c 73 3a 3a 73 68 61 35 31 32 22 3e 3c  "#tls::sha512"><
0d20: 62 3e 74 6c 73 3a 3a 73 68 61 35 31 32 3c 2f 62  b>tls::sha512</b
0d30: 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61  > <i>data</i></a
0d40: 3e 3c 62 72 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e  ><br>.</p>..<h3>
0d50: 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50  <a name="DESCRIP
0d60: 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f  TION">DESCRIPTIO
0d70: 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54  N</a></h3>..<p>T
0d80: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72  his extension pr
0d90: 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 63  ovides a generic
0da0: 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68   binding to <a.h
0db0: 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e  ref="http://www.
0dc0: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70  openssl.org/">Op
0dd0: 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69  enSSL</a>, utili
0de0: 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67  zing the.<strong
0df0: 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65  >Tcl_StackChanne
0e00: 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66  l</strong>.API f
0e10: 6f 72 20 54 63 6c 20 38 2e 34 20 61 6e 64 20 68  or Tcl 8.4 and h
0e20: 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65  igher. The socke
0e30: 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74 6c  ts behave exactl
0e40: 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68  y the same.as ch
0e50: 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75  annels created u
0e60: 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74  sing Tcl's built
0e70: 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b  -in <strong>sock
0e80: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d  et</strong>.comm
0e90: 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 6f  and with additio
0ea0: 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20  nal options for 
0eb0: 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20  controlling the 
0ec0: 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70  SSL session..</p
0ed0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
0ee0: 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e  COMMANDS">COMMAN
0ef0: 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e  DS</a></h3>..<p>
0f00: 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f  Typically one wo
0f10: 75 6c 64 20 75 73 65 20 74 68 65 20 3c 73 74 72  uld use the <str
0f20: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20  ong>tls::socket 
0f30: 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64  </strong>command
0f40: 0a 77 68 69 63 68 20 70 72 6f 76 69 64 65 73 20  .which provides 
0f50: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69  compatibility wi
0f60: 74 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 63  th the native Tc
0f70: 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74  l <strong>socket
0f80: 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e  </strong>.comman
0f90: 64 2e 20 49 6e 20 73 75 63 68 20 63 61 73 65 73  d. In such cases
0fa0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d   <strong>tls::im
0fb0: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68  port</strong> sh
0fc0: 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64  ould not be.used
0fd0: 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a   directly.</p>..
0fe0: 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20  <dl>.    <dt><a 
0ff0: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22  name="tls::init"
1000: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f  ><b>tls::init </
1010: 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f  b><i>?options?</
1020: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  i></a></dt>.    
1030: 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e  <dd>Optional fun
1040: 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65  ction to set the
1050: 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73   default options
1060: 20 75 73 65 64 20 62 79 0a 09 3c 73 74 72 6f 6e   used by..<stron
1070: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73  g>tls::socket</s
1080: 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20 63  trong>. If you c
1090: 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  all <strong>tls:
10a0: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e  :import</strong>
10b0: 0a 09 64 69 72 65 63 74 6c 79 20 74 68 69 73 20  ..directly this 
10c0: 72 6f 75 74 69 6e 65 20 68 61 73 20 6e 6f 20 65  routine has no e
10d0: 66 66 65 63 74 2e 20 41 6e 79 20 6f 66 20 74 68  ffect. Any of th
10e0: 65 20 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74 20  e options..that 
10f0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63  <strong>tls::soc
1100: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63  ket</strong> acc
1110: 65 70 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a  epts can be set.
1120: 09 75 73 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d  .using this comm
1130: 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 20  and, though you 
1140: 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75  should limit you
1150: 72 20 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e  r options..to on
1160: 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f  ly TLS related o
1170: 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  nes.</dd>.    <d
1180: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20  t>&nbsp;</dt>.  
1190: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
11a0: 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74  ls::socket"><b>t
11b0: 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c  ls::socket </b><
11c0: 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f  em>?options?..ho
11d0: 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e  st port</em></a>
11e0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62  </dt>.    <dt><b
11f0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
1200: 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f  <em> ?-server co
1210: 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f  mmand? ?options?
1220: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a   port</em></dt>.
1230: 20 20 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20      <dd>This is 
1240: 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f  a helper functio
1250: 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20  n that utilizes 
1260: 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09  the underlying..
1270: 63 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e  commands (<stron
1280: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73  g>tls::import</s
1290: 74 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61  trong>). It beha
12a0: 76 65 73 0a 09 65 78 61 63 74 6c 79 20 74 68 65  ves..exactly the
12b0: 20 73 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74   same as the nat
12c0: 69 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e  ive Tcl <strong>
12d0: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a  socket</strong>.
12e0: 09 63 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20  .command except 
12f0: 74 68 61 74 20 74 68 65 20 6f 70 74 69 6f 6e 73  that the options
1300: 20 63 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79   can include any
1310: 20 6f 66 20 74 68 65 0a 09 61 70 70 6c 69 63 61   of the..applica
1320: 62 6c 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c  ble <a href="#tl
1330: 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f  s::import"><stro
1340: 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73  ng>tls:import</s
1350: 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69  trong></a>..opti
1360: 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64  ons with one add
1370: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a  itional option:.
1380: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20  <blockquote>.   
1390: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f   <dl>..<dt><stro
13a0: 6e 67 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61  ng>-autoserverna
13b0: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  me</strong> <em>
13c0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  bool</em></dt>..
13d0: 3c 64 64 3e 41 75 74 6f 6d 61 74 69 63 61 6c 6c  <dd>Automaticall
13e0: 79 20 73 65 6e 64 20 74 68 65 20 2d 73 65 72 76  y send the -serv
13f0: 65 72 6e 61 6d 65 20 61 73 20 74 68 65 20 3c 65  ername as the <e
1400: 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75  m>host</em> argu
1410: 6d 65 6e 74 0a 09 20 20 20 20 28 64 65 66 61 75  ment..    (defau
1420: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c  lt is <em>false<
1430: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c  /em>)</dd>.    <
1440: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74  /dl>.</blockquot
1450: 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  e>..    <dt><a n
1460: 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74  ame="tls::import
1470: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  "><b>tls::import
1480: 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a   </b><i>channel.
1490: 09 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f  .?options?</i></
14a0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
14b0: 53 53 4c 2d 65 6e 61 62 6c 65 20 61 20 72 65 67  SSL-enable a reg
14c0: 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c  ular Tcl channel
14d0: 20 2d 20 69 74 20 6e 65 65 64 20 6e 6f 74 20 62   - it need not b
14e0: 65 20 61 0a 09 73 6f 63 6b 65 74 2c 20 62 75 74  e a..socket, but
14f0: 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 69   must provide bi
1500: 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f  -directional flo
1510: 77 2e 20 41 6c 73 6f 0a 09 73 65 74 74 69 6e 67  w. Also..setting
1520: 20 73 65 73 73 69 6f 6e 20 70 61 72 61 6d 65 74   session paramet
1530: 65 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64  ers for SSL hand
1540: 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c  shake.</dd>..<bl
1550: 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64  ockquote>.    <d
1560: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  l>..<dt><strong>
1570: 2d 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c  -alpn</strong> <
1580: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74  em>list</em></dt
1590: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70  >..<dd>List of p
15a0: 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65  rotocols to offe
15b0: 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61  r during Applica
15c0: 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20  tion-Layer..    
15d0: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61  Protocol Negotia
15e0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72  tion (ALPN). For
15f0: 20 65 78 61 6d 70 6c 65 3a 20 3c 65 6d 3e 68 32   example: <em>h2
1600: 3c 2f 65 6d 3e 20 61 6e 64 0a 09 20 20 20 20 3c  </em> and..    <
1610: 65 6d 3e 68 74 74 70 2f 31 2e 31 3c 2f 65 6d 3e  em>http/1.1</em>
1620: 2c 20 62 75 74 20 6e 6f 74 20 3c 65 6d 3e 68 33  , but not <em>h3
1630: 3c 2f 65 6d 3e 20 6f 72 20 3c 65 6d 3e 71 75 69  </em> or <em>qui
1640: 63 3c 2f 65 6d 3e 2e 3c 2f 64 64 3e 0a 09 3c 64  c</em>.</dd>..<d
1650: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 72  t><strong>-cadir
1660: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69  </strong> <em>di
1670: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  r</em></dt>..<dd
1680: 3e 53 65 74 20 74 68 65 20 43 41 20 63 65 72 74  >Set the CA cert
1690: 69 66 69 63 61 74 65 73 20 70 61 74 68 2e 20 54  ificates path. T
16a0: 68 65 20 64 65 66 61 75 6c 74 20 64 69 72 65 63  he default direc
16b0: 74 6f 72 79 20 69 73 20 70 6c 61 74 66 6f 72 6d  tory is platform
16c0: 0a 09 20 20 20 20 73 70 65 63 69 66 69 63 20 61  ..    specific a
16d0: 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 74  nd can be set at
16e0: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54   compile time. T
16f0: 68 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72  his can be overr
1700: 69 64 64 65 6e 0a 09 20 20 20 20 76 69 61 20 74  idden..    via t
1710: 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 44  he <b>SSL_CERT_D
1720: 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65  IR</b> environme
1730: 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 64  nt variable.</dd
1740: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
1750: 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e  cafile </strong>
1760: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d  <em>filename</em
1770: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20  ></dt>..<dd>Set 
1780: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
1790: 61 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63  authority (CA) c
17a0: 65 72 74 69 66 69 63 61 74 65 73 20 66 69 6c 65  ertificates file
17b0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 0a 09 20  . The default.. 
17c0: 20 20 20 69 73 20 74 68 65 20 63 65 72 74 2e 70     is the cert.p
17d0: 65 6d 20 66 69 6c 65 20 69 6e 20 74 68 65 20 4f  em file in the O
17e0: 70 73 6e 53 53 4c 20 64 69 72 65 63 74 6f 72 79  psnSSL directory
17f0: 2e 20 54 68 69 73 20 63 61 6e 20 61 6c 73 6f 20  . This can also 
1800: 62 65 0a 09 20 20 20 20 6f 76 65 72 72 69 64 64  be..    overridd
1810: 65 6e 20 76 69 61 20 74 68 65 20 3c 62 3e 53 53  en via the <b>SS
1820: 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20  L_CERT_FILE</b> 
1830: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  environment vari
1840: 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  able.</dd>..<dt>
1850: 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c  <strong>-certfil
1860: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66  e</strong> <em>f
1870: 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74  ilename</em></dt
1880: 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74  >..<dd>Specify t
1890: 68 65 20 66 69 6c 65 6e 61 6d 65 20 77 69 74 68  he filename with
18a0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
18b0: 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 09 3c   to use.</dd>..<
18c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74  dt><strong>-cert
18d0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69  </strong> <em>fi
18e0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
18f0: 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68  ..<dd>Specify th
1900: 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20 61 20  e contents of a 
1910: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75  certificate to u
1920: 73 65 2c 20 61 73 20 61 20 44 45 52 0a 09 20 20  se, as a DER..  
1930: 20 20 65 6e 63 6f 64 65 64 20 62 69 6e 61 72 79    encoded binary
1940: 20 76 61 6c 75 65 20 28 58 2e 35 30 39 20 44 45   value (X.509 DE
1950: 52 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  R).</dd>..<dt><s
1960: 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73  trong>-cipher</s
1970: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e  trong> <em>strin
1980: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  g</em></dt>..<dd
1990: 3e 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 73  >List of ciphers
19a0: 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 20   to use. String 
19b0: 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 29  is a colon (":")
19c0: 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 0a   separated list.
19d0: 09 20 20 20 20 6f 66 20 63 69 70 68 65 72 73 20  .    of ciphers 
19e0: 6f 72 20 63 69 70 68 65 72 20 73 75 69 74 65 73  or cipher suites
19f0: 2e 20 43 69 70 68 65 72 20 73 75 69 74 65 73 20  . Cipher suites 
1a00: 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 0a  can be combined.
1a10: 09 20 20 20 20 75 73 69 6e 67 20 74 68 65 20 3c  .    using the <
1a20: 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74 65  b>+</b> characte
1a30: 72 2e 20 50 72 65 66 69 78 65 73 20 63 61 6e 20  r. Prefixes can 
1a40: 62 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d 61  be used to perma
1a50: 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72 65 6d 6f  nently..    remo
1a60: 76 65 20 28 22 21 22 29 2c 20 64 65 6c 65 74 65  ve ("!"), delete
1a70: 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 20   ("-"), or move 
1a80: 61 20 63 79 70 68 65 72 20 74 6f 20 74 68 65 20  a cypher to the 
1a90: 65 6e 64 20 6f 66 0a 09 20 20 20 20 74 68 65 20  end of..    the 
1aa0: 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b 65 79 77  list ("+"). Keyw
1ab0: 6f 72 64 73 20 3c 62 3e 40 53 54 52 45 4e 47 54  ords <b>@STRENGT
1ac0: 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61  H</b> (sort by a
1ad0: 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20 20 6b 65  lgorithm..    ke
1ae0: 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62 3e 40 53  y length), <b>@S
1af0: 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 69 3e 6e  ECLEVEL=</b><i>n
1b00: 3c 2f 69 3e 20 28 73 65 74 20 73 65 63 75 72 69  </i> (set securi
1b10: 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09 20 20 20  ty level to..   
1b20: 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44 45 46 41   n), and <b>DEFA
1b30: 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65 66  ULT</b> (use def
1b40: 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73 74  ault cipher list
1b50: 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 29  , at start only)
1b60: 0a 09 20 20 20 20 63 61 6e 20 61 6c 73 6f 20 62  ..    can also b
1b70: 65 20 73 70 65 63 69 66 69 65 64 2e 20 53 65 65  e specified. See
1b80: 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75 6d 65 6e   OpenSSL documen
1b90: 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66  tation for the f
1ba0: 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74 20 6f 66  ull..    list of
1bb0: 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 20 28   valid values. (
1bc0: 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 61 72 6c  TLS 1.2 and earl
1bd0: 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09  ier only)</dd>..
1be0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70  <dt><strong>-cip
1bf0: 68 65 72 73 75 69 74 65 73 3c 2f 73 74 72 6f 6e  hersuites</stron
1c00: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
1c10: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73  m></dt>..<dd>Lis
1c20: 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74  t of cipher suit
1c30: 65 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e  es to use. Strin
1c40: 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a  g is a colon (":
1c50: 22 29 0a 09 20 20 20 20 73 65 70 61 72 61 74 65  ")..    separate
1c60: 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  d list of cipher
1c70: 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 28 54   suite names. (T
1c80: 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f 64 64  LS 1.3 only)</dd
1c90: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
1ca0: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e  command</strong>
1cb0: 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65   <em>callback</e
1cc0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c  m></dt>..<dd>Cal
1cd0: 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20  lback to invoke 
1ce0: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
1cf0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e  s during the han
1d00: 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 54 68 69  dshake...    Thi
1d10: 73 20 69 73 20 75 73 65 64 20 74 6f 20 70 61 73  s is used to pas
1d20: 73 20 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61  s errors and tra
1d30: 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e  cing information
1d40: 2c 20 61 6e 64 0a 09 20 20 20 20 69 74 20 63 61  , and..    it ca
1d50: 6e 20 61 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69  n allow Tcl scri
1d60: 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74  pts to perform t
1d70: 68 65 69 72 20 6f 77 6e 20 63 65 72 74 69 66 69  heir own certifi
1d80: 63 61 74 65 0a 09 20 20 20 20 76 61 6c 69 64 61  cate..    valida
1d90: 74 69 6f 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66  tion in place of
1da0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c   the default val
1db0: 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64  idation provided
1dc0: 20 62 79 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c   by..    OpenSSL
1dd0: 2e 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23  . See <a href="#
1de0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53  CALLBACK OPTIONS
1df0: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f  ">CALLBACK OPTIO
1e00: 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20  NS</a>..    for 
1e10: 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69  further discussi
1e20: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  on.</dd>..<dt><s
1e30: 74 72 6f 6e 67 3e 2d 64 68 70 61 72 61 6d 73 20  trong>-dhparams 
1e40: 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c  </strong><em>fil
1e50: 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  ename</em></dt>.
1e60: 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65  .<dd>Specify the
1e70: 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20   Diffie-Hellman 
1e80: 70 61 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e  parameters file.
1e90: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
1ea0: 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 74 72  ng>-keyfile</str
1eb0: 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d  ong> <em>filenam
1ec0: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
1ed0: 3e 53 70 65 63 69 66 79 20 74 68 65 20 70 72 69  >Specify the pri
1ee0: 76 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28  vate key file. (
1ef0: 64 65 66 61 75 6c 74 20 69 73 0a 09 20 20 20 20  default is..    
1f00: 76 61 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69  value of -certfi
1f10: 6c 65 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  le)</dd>..<dt><s
1f20: 74 72 6f 6e 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f  trong>-key</stro
1f30: 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65  ng> <em>filename
1f40: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1f50: 53 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76  Specify the priv
1f60: 61 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61  ate key to use a
1f70: 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20  s a DER encoded 
1f80: 76 61 6c 75 65 20 28 50 4b 43 53 23 31 20 44 45  value (PKCS#1 DE
1f90: 52 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  R)</dd>..<dt><st
1fa0: 72 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72  rong>-model</str
1fb0: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  ong> <em>channel
1fc0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1fd0: 46 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e  Force this chann
1fe0: 65 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65 20  el to share the 
1ff0: 73 61 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67  same <em><strong
2000: 3e 53 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67  >SSL_CTX</strong
2010: 3e 3c 2f 65 6d 3e 0a 09 20 20 20 20 73 74 72 75  ></em>..    stru
2020: 63 74 75 72 65 20 61 73 20 74 68 65 20 73 70 65  cture as the spe
2030: 63 69 66 69 65 64 20 3c 65 6d 3e 63 68 61 6e 6e  cified <em>chann
2040: 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a 09 20 20  el</em>, and..  
2050: 20 20 74 68 65 72 65 66 6f 72 65 20 73 68 61 72    therefore shar
2060: 65 20 63 61 6c 6c 62 61 63 6b 73 20 65 74 63 2e  e callbacks etc.
2070: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
2080: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74  ng>-password</st
2090: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61  rong> <em>callba
20a0: 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ck</em></dt>..<d
20b0: 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e  d>Callback to in
20c0: 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53  voke when OpenSS
20d0: 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 69  L needs to obtai
20e0: 6e 20 61 20 70 61 73 73 77 6f 72 64 2c 0a 09 20  n a password,.. 
20f0: 20 20 20 74 79 70 69 63 61 6c 6c 79 20 74 6f 20     typically to 
2100: 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61  unlock the priva
2110: 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74  te key of a cert
2120: 69 66 69 63 61 74 65 2e 20 54 68 65 0a 09 20 20  ificate. The..  
2130: 20 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c    callback shoul
2140: 64 20 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e  d return a strin
2150: 67 20 77 68 69 63 68 20 72 65 70 72 65 73 65 6e  g which represen
2160: 74 73 20 74 68 65 20 70 61 73 73 77 6f 72 64 0a  ts the password.
2170: 09 20 20 20 20 74 6f 20 62 65 20 75 73 65 64 2e  .    to be used.
2180: 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43   See <a href="#C
2190: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22  ALLBACK OPTIONS"
21a0: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  >CALLBACK OPTION
21b0: 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66  S</a>..    for f
21c0: 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f  urther discussio
21d0: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  n.</dd>..<dt><st
21e0: 72 6f 6e 67 3e 2d 70 6f 73 74 5f 68 61 6e 64 73  rong>-post_hands
21f0: 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  hake</strong> <e
2200: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
2210: 0a 09 3c 64 64 3e 41 6c 6c 6f 77 20 70 6f 73 74  ..<dd>Allow post
2220: 2d 68 61 6e 64 73 68 61 6b 65 20 74 69 63 6b 65  -handshake ticke
2230: 74 20 75 70 64 61 74 65 73 2e 3c 2f 64 64 3e 0a  t updates.</dd>.
2240: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65  .<dt><strong>-re
2250: 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c  quest </strong><
2260: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
2270: 3e 0a 09 3c 64 64 3e 52 65 71 75 65 73 74 20 61  >..<dd>Request a
2280: 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f   certificate fro
2290: 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 53 53  m peer during SS
22a0: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20  L handshake...  
22b0: 20 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65    (default is <e
22c0: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64  m>true</em>)</dd
22d0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
22e0: 72 65 71 75 69 72 65 3c 2f 73 74 72 6f 6e 67 3e  require</strong>
22f0: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
2300: 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 69 72 65  dt>..<dd>Require
2310: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69   a valid certifi
2320: 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64  cate from peer d
2330: 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68  uring SSL handsh
2340: 61 6b 65 2e 0a 09 20 20 20 20 49 66 20 74 68 69  ake...    If thi
2350: 73 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65  s is set to true
2360: 2c 20 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d  , then <strong>-
2370: 72 65 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e  request</strong>
2380: 20 6d 75 73 74 0a 09 20 20 20 20 61 6c 73 6f 20   must..    also 
2390: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20  be set to true. 
23a0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
23b0: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e  false</em>)</dd>
23c0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73  ..<dt><strong>-s
23d0: 65 63 75 72 69 74 79 6c 65 76 65 6c 3c 2f 73 74  ecuritylevel</st
23e0: 72 6f 6e 67 3e 20 3c 65 6d 3e 69 6e 74 65 67 65  rong> <em>intege
23f0: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  r</em></dt>..<dd
2400: 3e 53 65 74 20 73 65 63 75 72 69 74 79 20 6c 65  >Set security le
2410: 76 65 6c 2e 20 4d 75 73 74 20 62 65 20 30 20 74  vel. Must be 0 t
2420: 6f 20 35 2e 20 54 68 65 20 73 65 63 75 72 69 74  o 5. The securit
2430: 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a  y level affects.
2440: 09 20 20 20 20 63 69 70 68 65 72 20 73 75 69 74  .    cipher suit
2450: 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67  e encryption alg
2460: 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 74  orithms, support
2470: 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a 09  ed ECC curves,..
2480: 20 20 20 20 73 75 70 70 6f 72 74 65 64 20 73 69      supported si
2490: 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68  gnature algorith
24a0: 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72  ms, DH parameter
24b0: 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63   sizes, certific
24c0: 61 74 65 0a 09 20 20 20 20 6b 65 79 20 73 69 7a  ate..    key siz
24d0: 65 73 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65  es and signature
24e0: 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65   algorithms. The
24f0: 20 64 65 66 61 75 6c 74 20 69 73 20 31 2e 0a 09   default is 1...
2500: 20 20 20 20 4c 65 76 65 6c 20 33 20 61 6e 64 20      Level 3 and 
2510: 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73  higher disable s
2520: 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69  upport for sessi
2530: 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 20 6f  on tickets and o
2540: 6e 6c 79 0a 09 20 20 20 20 61 63 63 65 70 74 20  nly..    accept 
2550: 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 68  cipher suites th
2560: 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61  at provide forwa
2570: 72 64 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 3e  rd secrecy.</dd>
2580: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73  ..<dt><strong>-s
2590: 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c  erver</strong> <
25a0: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
25b0: 3e 0a 09 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65  >..<dd>Handshake
25c0: 20 61 73 20 73 65 72 76 65 72 20 69 66 20 74 72   as server if tr
25d0: 75 65 2c 20 65 6c 73 65 20 68 61 6e 64 73 68 61  ue, else handsha
25e0: 6b 65 20 61 73 0a 09 20 20 20 20 63 6c 69 65 6e  ke as..    clien
25f0: 74 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  t. (default is <
2600: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f  em>false</em>)</
2610: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2620: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74  >-servername</st
2630: 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f  rong> <em>host</
2640: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70  em></dt>..<dd>Sp
2650: 65 63 69 66 79 20 73 65 72 76 65 72 20 68 6f 73  ecify server hos
2660: 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61 76 61 69  tname. Only avai
2670: 6c 61 62 6c 65 20 69 66 20 74 68 65 20 4f 70 65  lable if the Ope
2680: 6e 53 53 4c 20 6c 69 62 72 61 72 79 0a 09 20 20  nSSL library..  
2690: 20 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73    the package is
26a0: 20 6c 69 6e 6b 65 64 20 61 67 61 69 6e 73 74 20   linked against 
26b0: 73 75 70 70 6f 72 74 73 20 74 68 65 20 54 4c 53  supports the TLS
26c0: 20 68 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e 73   hostname extens
26d0: 69 6f 6e 0a 09 20 20 20 20 66 6f 72 20 27 53 65  ion..    for 'Se
26e0: 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61  rver Name Indica
26f0: 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 65  tion' (SNI). Use
2700: 20 74 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f 67   to name the log
2710: 69 63 61 6c 20 68 6f 73 74 0a 09 20 20 20 20 77  ical host..    w
2720: 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 20 74 6f  e are talking to
2730: 20 61 6e 64 20 65 78 70 65 63 74 69 6e 67 20 61   and expecting a
2740: 20 63 65 72 74 69 66 69 63 61 74 65 20 66 6f 72   certificate for
2750: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
2760: 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f 69 64 3c  ong>-session_id<
2770: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
2780: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
2790: 64 64 3e 53 65 73 73 69 6f 6e 20 69 64 20 74 6f  dd>Session id to
27a0: 20 72 65 73 75 6d 65 20 73 65 73 73 69 6f 6e 2e   resume session.
27b0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
27c0: 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67  ng>-ssl2</strong
27d0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
27e0: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65  /dt>..<dd>Enable
27f0: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20   use of SSL v2. 
2800: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2810: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e  false</em>)</dd>
2820: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73  ..<dt><strong>-s
2830: 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d  sl3 </strong><em
2840: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
2850: 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20  .<dd>Enable use 
2860: 6f 66 20 53 53 4c 20 76 33 2e 20 28 64 65 66 61  of SSL v3. (defa
2870: 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65  ult is <em>false
2880: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74  </em>)</dd>..<dt
2890: 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f  >-<strong>tls1</
28a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
28b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
28c0: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
28d0: 53 20 76 31 2e 20 28 64 65 66 61 75 6c 74 20 69  S v1. (default i
28e0: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29  s <em>true</em>)
28f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72  </dd>..<dt>-<str
2900: 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 6f  ong>tls1.1</stro
2910: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
2920: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62  ></dt>..<dd>Enab
2930: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31  le use of TLS v1
2940: 2e 31 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  .1 (default is <
2950: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64  em>true</em>)</d
2960: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67  d>..<dt>-<strong
2970: 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e  >tls1.2</strong>
2980: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
2990: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20  dt>..<dd>Enable 
29a0: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 20  use of TLS v1.2 
29b0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
29c0: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
29d0: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c  .<dt>-<strong>tl
29e0: 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  s1.3</strong> <e
29f0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
2a00: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65  ..<dd>Enable use
2a10: 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 28 64 65   of TLS v1.3 (de
2a20: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75  fault is <em>tru
2a30: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64  e</em>)</dd>..<d
2a40: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64  t><strong>-valid
2a50: 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  atecommand</stro
2a60: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b  ng> <em>callback
2a70: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
2a80: 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f  Callback to invo
2a90: 6b 65 20 74 6f 20 76 65 72 69 66 79 20 6f 72 20  ke to verify or 
2aa0: 76 61 6c 69 64 61 74 65 20 70 72 6f 74 6f 63 6f  validate protoco
2ab0: 6c 20 63 6f 6e 66 69 67 0a 09 20 20 20 20 70 61  l config..    pa
2ac0: 72 61 6d 65 74 65 72 73 20 64 75 72 69 6e 67 20  rameters during 
2ad0: 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67  the protocol neg
2ae0: 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20  otiation phase. 
2af0: 53 65 65 0a 09 20 20 20 20 3c 61 20 68 72 65 66  See..    <a href
2b00: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  ="#CALLBACK OPTI
2b10: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
2b20: 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66  TIONS</a>..    f
2b30: 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75  or further discu
2b40: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20  ssion.</dd>.    
2b50: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f  </dl>.</blockquo
2b60: 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20  te>..    <dt><a 
2b70: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75 6e 69 6d 70  name="tls::unimp
2b80: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69  ort"><b>tls::uni
2b90: 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61  mport </b><i>cha
2ba0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  nnel</i></a></dt
2bb0: 3e 0a 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64  >.    <dd>Provid
2bc0: 65 64 20 66 6f 72 20 73 79 6d 6d 65 74 72 79 20  ed for symmetry 
2bd0: 74 6f 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  to <strong>tls::
2be0: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2c  import</strong>,
2bf0: 20 74 68 69 73 0a 20 20 20 20 20 20 75 6e 73 74   this.      unst
2c00: 61 63 6b 73 20 74 68 65 20 53 53 4c 2d 65 6e 61  acks the SSL-ena
2c10: 62 6c 69 6e 67 20 6f 66 20 61 20 72 65 67 75 6c  bling of a regul
2c20: 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 2e 20  ar Tcl channel. 
2c30: 20 41 6e 20 65 72 72 6f 72 0a 20 20 20 20 20 20   An error.      
2c40: 69 73 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53  is thrown if TLS
2c50: 20 69 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20   is not the top 
2c60: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20  stacked channel 
2c70: 74 79 70 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  type.</dd>.    <
2c80: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20  dt>&nbsp;</dt>. 
2c90: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
2ca0: 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 3e  tls::handshake">
2cb0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 68 61 6e  <strong>tls::han
2cc0: 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20  dshake</strong> 
2cd0: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  <em>channel</em>
2ce0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
2cf0: 64 3e 46 6f 72 63 65 73 20 68 61 6e 64 73 68 61  d>Forces handsha
2d00: 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 65  ke to take place
2d10: 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 30 20  , and returns 0 
2d20: 69 66 0a 09 68 61 6e 64 73 68 61 6b 65 20 69 73  if..handshake is
2d30: 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65   still in progre
2d40: 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67  ss (non-blocking
2d50: 29 2c 20 6f 72 20 31 20 69 66 0a 09 74 68 65 20  ), or 1 if..the 
2d60: 68 61 6e 64 73 68 61 6b 65 20 77 61 73 20 73 75  handshake was su
2d70: 63 63 65 73 73 66 75 6c 2e 20 49 66 20 74 68 65  ccessful. If the
2d80: 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65   handshake faile
2d90: 64 0a 09 74 68 69 73 20 72 6f 75 74 69 6e 65 20  d..this routine 
2da0: 77 69 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72  will throw an er
2db0: 72 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  ror.</dd>.    <d
2dc0: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20  t>&nbsp;</dt>.  
2dd0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
2de0: 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72  ls::status"><str
2df0: 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c  ong>tls::status<
2e00: 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d  /strong>.    <em
2e10: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65  >?-local? channe
2e20: 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  l</em></a></dt>.
2e30: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
2e40: 74 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 74  the current stat
2e50: 75 73 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  us of the certif
2e60: 69 63 61 74 65 20 66 6f 72 20 61 6e 20 53 53 4c  icate for an SSL
2e70: 0a 09 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72  ..channel. The r
2e80: 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20  esult is a list 
2e90: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69  of key-value pai
2ea0: 72 73 20 64 65 73 63 72 69 62 69 6e 67 0a 09 74  rs describing..t
2eb0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 20  he certificate. 
2ec0: 49 66 20 74 68 65 20 72 65 73 75 6c 74 20 69 73  If the result is
2ed0: 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 74   an empty list t
2ee0: 68 65 6e 20 74 68 65 0a 09 53 53 4c 20 68 61 6e  hen the..SSL han
2ef0: 64 73 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79  dshake has not y
2f00: 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e 20 49 66  et completed. If
2f10: 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d 3e   <em>-local</em>
2f20: 20 69 73 0a 09 73 70 65 63 69 66 69 65 64 2c 20   is..specified, 
2f30: 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63  then the local c
2f40: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 75 73  ertificate is us
2f50: 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71  ed.</dd>.<blockq
2f60: 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74  uote>..<b>SSL St
2f70: 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c  atus</b>.    <dl
2f80: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61  >..<dt><strong>a
2f90: 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  lpn</strong> <em
2fa0: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f  >protocol</em></
2fb0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f  dt>..<dd>The pro
2fc0: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61  tocol selected a
2fd0: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e  fter Application
2fe0: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a  -Layer Protocol.
2ff0: 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e  .    Negotiation
3000: 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c   (ALPN).</dd>..<
3010: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65  dt><strong>ciphe
3020: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  r</strong> <em>c
3030: 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  ipher</em></dt>.
3040: 09 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74  .<dd>The current
3050: 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62   cipher in use b
3060: 65 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e  etween the clien
3070: 74 20 61 6e 64 0a 09 20 20 20 20 73 65 72 76 65  t and..    serve
3080: 72 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f 64 64 3e  r channels.</dd>
3090: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65  ..<dt><strong>pe
30a0: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  ername</strong> 
30b0: 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64  <em>name</em></d
30c0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 65 65 72  t>..<dd>The peer
30d0: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65  name from the ce
30e0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a  rtificate.</dd>.
30f0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f  .<dt><strong>pro
3100: 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c  tocol</strong> <
3110: 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c  em>version</em><
3120: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72  /dt>..<dd>The pr
3130: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75  otocol version u
3140: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e  sed for the conn
3150: 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c  ection:..    SSL
3160: 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54  2, SSL3, TLS1, T
3170: 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54  LS1.1, TLS1.2, T
3180: 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77  LS1.3, or unknow
3190: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  n.</dd>..<dt><st
31a0: 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f  rong>sbits</stro
31b0: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f  ng> <em>n</em></
31c0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d  dt>..<dd>The num
31d0: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64  ber of bits used
31e0: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e   for the session
31f0: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   key.</dd>..<dt>
3200: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72  <strong>signatur
3210: 65 48 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f  eHashAlgorithm</
3220: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f  strong> <em>algo
3230: 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  rithm</em></dt>.
3240: 09 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75  .<dd>The signatu
3250: 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68  re hash algorith
3260: 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  m.</dd>..<dt><st
3270: 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 54 79  rong>signatureTy
3280: 70 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  pe</strong> <em>
3290: 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  type</em></dt>..
32a0: 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72  <dd>The signatur
32b0: 65 20 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64  e type value.</d
32c0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
32d0: 76 65 72 69 66 79 44 65 70 74 68 3c 2f 73 74 72  verifyDepth</str
32e0: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c  ong> <em>n</em><
32f0: 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 69 6d 75  /dt>..<dd>Maximu
3300: 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 20  m depth for the 
3310: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69  certificate chai
3320: 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 0a  n verification..
3330: 09 20 20 20 20 44 65 66 61 75 6c 74 20 69 73 20  .    Default is 
3340: 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c  -1, to check all
3350: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
3360: 6f 6e 67 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f  ong>verifyMode</
3370: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74  strong> <em>list
3380: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
3390: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63  List of certific
33a0: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
33b0: 20 6d 6f 64 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64   modes.</dd>..<d
33c0: 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79  t><strong>verify
33d0: 52 65 73 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20  Result</strong> 
33e0: 3c 65 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c  <em>result</em><
33f0: 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66  /dt>..<dd>Certif
3400: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69  icate verificati
3410: 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a  on result.</dd>.
3420: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f  .<dt><strong>ca_
3430: 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c  names</strong> <
3440: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74  em>list</em></dt
3450: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74  >..<dd>List of t
3460: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
3470: 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20  uthorities used 
3480: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65  to create the ce
3490: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a  rtificate.</dd>.
34a0: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63      </dl>.</bloc
34b0: 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75  kquote>.<blockqu
34c0: 6f 74 65 3e 0a 09 3c 62 3e 43 65 72 74 69 66 69  ote>..<b>Certifi
34d0: 63 61 74 65 20 53 74 61 74 75 73 3c 2f 62 3e 0a  cate Status</b>.
34e0: 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73      <dl>..<dt><s
34f0: 74 72 6f 6e 67 3e 61 6c 6c 3c 2f 73 74 72 6f 6e  trong>all</stron
3500: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
3510: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 44 75 6d  m></dt>..<dd>Dum
3520: 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69  p of all certifi
3530: 63 61 74 65 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a  cate info.</dd>.
3540: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65  ..<dt><strong>ve
3550: 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rsion</strong> <
3560: 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64  em>value</em></d
3570: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 65 72 74  t>..<dd>The cert
3580: 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e  ificate version.
3590: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
35a0: 6e 67 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c  ng>serialNumber<
35b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f  /strong> <em>n</
35c0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
35d0: 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20  e serial number 
35e0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
35f0: 74 65 20 61 73 20 68 65 78 20 73 74 72 69 6e 67  te as hex string
3600: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
3610: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 3c 2f 73  ong>signature</s
3620: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72  trong> <em>algor
3630: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  ithm</em></dt>..
3640: 3c 64 64 3e 43 69 70 68 65 72 20 61 6c 67 6f 72  <dd>Cipher algor
3650: 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65  ithm used for ce
3660: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
3670: 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ure.</dd>..<dt><
3680: 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73  strong>issuer</s
3690: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65  trong> <em>dn</e
36a0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
36b0: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e   distinguished n
36c0: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20  ame (DN) of the 
36d0: 63 65 72 74 69 66 69 63 61 74 65 20 69 73 73 75  certificate issu
36e0: 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  er.</dd>..<dt><s
36f0: 74 72 6f 6e 67 3e 6e 6f 74 42 65 66 6f 72 65 3c  trong>notBefore<
3700: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74  /strong> <em>dat
3710: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
3720: 3e 54 68 65 20 62 65 67 69 6e 20 64 61 74 65 20  >The begin date 
3730: 66 6f 72 20 74 68 65 20 76 61 6c 69 64 69 74 79  for the validity
3740: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63   of the certific
3750: 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ate.</dd>..<dt><
3760: 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74 65 72 3c  strong>notAfter<
3770: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74  /strong> <em>dat
3780: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
3790: 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e 20  >The expiration 
37a0: 64 61 74 65 20 66 6f 72 20 74 68 65 20 63 65 72  date for the cer
37b0: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09  tificate.</dd>..
37c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a  <dt><strong>subj
37d0: 65 63 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ect</strong> <em
37e0: 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  >dn</em></dt>..<
37f0: 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69  dd>The distingui
3800: 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f  shed name (DN) o
3810: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
3820: 65 20 73 75 62 6a 65 63 74 2e 0a 09 20 20 20 20  e subject...    
3830: 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20  Fields include: 
3840: 43 6f 6d 6d 6f 6e 20 4e 61 6d 65 20 28 43 4e 29  Common Name (CN)
3850: 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28  , Organization (
3860: 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 0a 09 20 20  O), Locality..  
3870: 20 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53    or City (L), S
3880: 74 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65  tate or Province
3890: 20 28 53 29 2c 20 61 6e 64 20 43 6f 75 6e 74 72   (S), and Countr
38a0: 79 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 64 64 3e  y Name (C).</dd>
38b0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73  ..<dt><strong>is
38c0: 73 75 65 72 55 6e 69 71 75 65 49 44 3c 2f 73 74  suerUniqueID</st
38d0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67  rong> <em>string
38e0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
38f0: 54 68 65 20 69 73 73 75 65 72 20 75 6e 69 71 75  The issuer uniqu
3900: 65 20 69 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  e id.</dd>..<dt>
3910: 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 55  <strong>subjectU
3920: 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e  niqueID</strong>
3930: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
3940: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73  </dt>..<dd>The s
3950: 75 62 6a 65 63 74 20 75 6e 69 71 75 65 20 69 64  ubject unique id
3960: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74  .</dd>...<dt><st
3970: 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e 73 69  rong>num_extensi
3980: 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ons</strong> <em
3990: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  >n</em></dt>..<d
39a0: 64 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74  d>Number of cert
39b0: 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f  ificate extensio
39c0: 6e 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ns.</dd>..<dt><s
39d0: 74 72 6f 6e 67 3e 65 78 74 65 6e 73 69 6f 6e 73  trong>extensions
39e0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69  </strong> <em>li
39f0: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  st</em></dt>..<d
3a00: 64 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66  d>List of certif
3a10: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20  icate extension 
3a20: 6e 61 6d 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74  names.</dd>..<dt
3a30: 3e 3c 73 74 72 6f 6e 67 3e 61 75 74 68 6f 72 69  ><strong>authori
3a40: 74 79 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c  tyKeyIdentifier<
3a50: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
3a60: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
3a70: 64 64 3e 28 41 4b 49 29 20 4b 65 79 20 69 64 65  dd>(AKI) Key ide
3a80: 6e 74 69 66 69 65 72 20 6f 66 20 74 68 65 20 49  ntifier of the I
3a90: 73 73 75 69 6e 67 20 43 41 20 63 65 72 74 69 66  ssuing CA certif
3aa0: 69 63 61 74 65 20 74 68 61 74 20 73 69 67 6e 65  icate that signe
3ab0: 64 0a 09 20 20 20 20 74 68 65 20 53 53 4c 20 63  d..    the SSL c
3ac0: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 65  ertificate as he
3ad0: 78 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20 76  x string. This v
3ae0: 61 6c 75 65 20 6d 61 74 63 68 65 73 20 74 68 65  alue matches the
3af0: 20 53 4b 49 0a 09 20 20 20 20 76 61 6c 75 65 20   SKI..    value 
3b00: 6f 66 20 74 68 65 20 49 6e 74 65 72 6d 65 64 69  of the Intermedi
3b10: 61 74 65 20 43 41 20 63 65 72 74 69 66 69 63 61  ate CA certifica
3b20: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  te.</dd>..<dt><s
3b30: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 4b 65 79  trong>subjectKey
3b40: 49 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f  Identifier</stro
3b50: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ng> <em>string</
3b60: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 53  em></dt>..<dd>(S
3b70: 4b 49 29 20 48 61 73 68 20 6f 66 20 74 68 65 20  KI) Hash of the 
3b80: 70 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64  public key insid
3b90: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  e the certificat
3ba0: 65 20 61 73 20 68 65 78 0a 09 20 20 20 73 74 72  e as hex..   str
3bb0: 69 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64 65  ing. Used to ide
3bc0: 6e 74 69 66 79 20 63 65 72 74 69 66 69 63 61 74  ntify certificat
3bd0: 65 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20  es that contain 
3be0: 61 20 70 61 72 74 69 63 75 6c 61 72 0a 09 20 20  a particular..  
3bf0: 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 64 64   public key.</dd
3c00: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
3c10: 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 73  ubjectAltName</s
3c20: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c  trong> <em>list<
3c30: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c  /em></dt>..<dd>L
3c40: 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 68  ist of all of th
3c50: 65 20 61 6c 74 65 72 6e 61 74 69 76 65 20 64 6f  e alternative do
3c60: 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 20  main names, sub 
3c70: 64 6f 6d 61 69 6e 73 2c 0a 09 20 20 20 20 61 6e  domains,..    an
3c80: 64 20 49 50 20 61 64 64 72 65 73 73 65 73 20 74  d IP addresses t
3c90: 68 61 74 20 61 72 65 20 73 65 63 75 72 65 64 20  hat are secured 
3ca0: 62 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61  by the certifica
3cb0: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  te.</dd>..<dt><s
3cc0: 74 72 6f 6e 67 3e 6f 63 73 70 3c 2f 73 74 72 6f  trong>ocsp</stro
3cd0: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d  ng> <em>list</em
3ce0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74  ></dt>..<dd>List
3cf0: 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43   of all Online C
3d00: 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75  ertificate Statu
3d10: 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50  s Protocol (OCSP
3d20: 29 20 55 52 4c 73 2e 3c 2f 64 64 3e 0a 0a 09 3c  ) URLs.</dd>...<
3d30: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 69  dt><strong>certi
3d40: 66 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20  ficate</strong> 
3d50: 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64  <em>cert</em></d
3d60: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 50 45 4d 20  t>..<dd>The PEM 
3d70: 65 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69 63  encoded certific
3d80: 61 74 65 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e  ate.</dd>...<dt>
3d90: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72  <strong>signatur
3da0: 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f  eAlgorithm</stro
3db0: 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68  ng> <em>algorith
3dc0: 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  m</em></dt>..<dd
3dd0: 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68  >Cipher algorith
3de0: 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69  m used for certi
3df0: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
3e00: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
3e10: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 56 61 6c  ong>signatureVal
3e20: 75 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ue</strong> <em>
3e30: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
3e40: 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74  ..<dd>Certificat
3e50: 65 20 73 69 67 6e 61 74 75 72 65 20 61 73 20 68  e signature as h
3e60: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a  ex string.</dd>.
3e70: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67  .<dt><strong>sig
3e80: 6e 61 74 75 72 65 44 69 67 65 73 74 3c 2f 73 74  natureDigest</st
3e90: 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f  rong> <em>versio
3ea0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
3eb0: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67  >Certificate sig
3ec0: 6e 69 6e 67 20 64 69 67 65 73 74 2e 3c 2f 64 64  ning digest.</dd
3ed0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70  >..<dt><strong>p
3ee0: 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68  ublicKeyAlgorith
3ef0: 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61  m</strong> <em>a
3f00: 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64  lgorithm</em></d
3f10: 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63  t>..<dd>Certific
3f20: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75  ate signature pu
3f30: 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74  blic key algorit
3f40: 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  hm.</dd>..<dt><s
3f50: 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 3c  trong>publicKey<
3f60: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
3f70: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
3f80: 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  dd>Certificate s
3f90: 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20  ignature public 
3fa0: 6b 65 79 20 61 73 20 68 65 78 20 73 74 72 69 6e  key as hex strin
3fb0: 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  g.</dd>..<dt><st
3fc0: 72 6f 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e  rong>bits</stron
3fd0: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64  g> <em>n</em></d
3fe0: 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f  t>..<dd>Number o
3ff0: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  f bits used for 
4000: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  certificate sign
4010: 61 74 75 72 65 20 6b 65 79 3c 2f 64 64 3e 0a 09  ature key</dd>..
4020: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 6c 66  <dt><strong>self
4030: 5f 73 69 67 6e 65 64 3c 2f 73 74 72 6f 6e 67 3e  _signed</strong>
4040: 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d   <em>boolean</em
4050: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 49 73 20 63  ></dt>..<dd>Is c
4060: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
4070: 74 75 72 65 20 73 65 6c 66 20 73 69 67 6e 65 64  ture self signed
4080: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74  .</dd>...<dt><st
4090: 72 6f 6e 67 3e 73 68 61 31 5f 68 61 73 68 3c 2f  rong>sha1_hash</
40a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68  strong> <em>hash
40b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
40c0: 54 68 65 20 53 48 41 31 20 68 61 73 68 20 6f 66  The SHA1 hash of
40d0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
40e0: 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c   as hex string.<
40f0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4100: 67 3e 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 73  g>sha256_hash</s
4110: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c  trong> <em>hash<
4120: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
4130: 68 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f  he SHA256 hash o
4140: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
4150: 65 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e  e as hex string.
4160: 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a  </dd>.    </dl>.
4170: 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20  </blockquote>.. 
4180: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
4190: 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22  tls::connection"
41a0: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f  ><strong>tls::co
41b0: 6e 6e 65 63 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67  nnection</strong
41c0: 3e 0a 20 20 20 20 3c 65 6d 3e 63 68 61 6e 6e 65  >.    <em>channe
41d0: 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  l</em></a></dt>.
41e0: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
41f0: 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e  the current conn
4200: 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66  ection status of
4210: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e   an SSL channel.
4220: 20 54 68 65 0a 09 72 65 73 75 6c 74 20 69 73 20   The..result is 
4230: 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61  a list of key-va
4240: 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69  lue pairs descri
4250: 62 69 6e 67 20 74 68 65 0a 09 63 6f 6e 6e 65 63  bing the..connec
4260: 74 65 64 20 70 65 65 72 2e 3c 2f 64 64 3e 0a 3c  ted peer.</dd>.<
4270: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e  blockquote>..<b>
4280: 53 53 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20  SSL Status</b>. 
4290: 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74     <dl>..<dt><st
42a0: 72 6f 6e 67 3e 73 74 61 74 65 3c 2f 73 74 72 6f  rong>state</stro
42b0: 6e 67 3e 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65  ng> <em>state</e
42c0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 74 61  m></dt>..<dd>Sta
42d0: 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63  te of the connec
42e0: 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  tion.</dd>..<dt>
42f0: 3c 73 74 72 6f 6e 67 3e 73 65 72 76 65 72 6e 61  <strong>serverna
4300: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  me</strong> <em>
4310: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
4320: 3c 64 64 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20  <dd>The name of 
4330: 74 68 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f  the connected to
4340: 20 73 65 72 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c   server.</dd>..<
4350: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f  dt><strong>proto
4360: 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  col</strong> <em
4370: 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64  >version</em></d
4380: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74  t>..<dd>The prot
4390: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65  ocol version use
43a0: 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63  d for the connec
43b0: 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c  tion:..    SSL2,
43c0: 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53   SSL3, TLS1, TLS
43d0: 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53  1.1, TLS1.2, TLS
43e0: 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e  1.3, or unknown.
43f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4400: 6e 67 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e  ng>renegotiation
4410: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
4420: 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  olean</em></dt>.
4430: 09 3c 64 64 3e 57 68 65 74 68 65 72 20 70 72 6f  .<dd>Whether pro
4440: 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74  tocol renegotiat
4450: 69 6f 6e 20 69 73 20 73 75 70 70 6f 72 74 65 64  ion is supported
4460: 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c   or not.</dd>..<
4470: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 75 72  dt><strong>secur
4480: 69 74 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67  itylevel</strong
4490: 3e 20 3c 65 6d 3e 6c 65 76 65 6c 3c 2f 65 6d 3e  > <em>level</em>
44a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73  </dt>..<dd>The s
44b0: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73  ecurity level us
44c0: 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e  ed for selection
44d0: 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79   of ciphers, key
44e0: 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 64 64 3e   size, etc.</dd>
44f0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65  ..<dt><strong>se
4500: 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 73 74  ssion_reused</st
4510: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61  rong> <em>boolea
4520: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
4530: 3e 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73  >Whether the ses
4540: 73 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 65  sion has been re
4550: 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64  used or not.</dd
4560: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69  >..<dt><strong>i
4570: 73 5f 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67  s_server</strong
4580: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65  > <em>boolean</e
4590: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65  m></dt>..<dd>Whe
45a0: 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74  ther the connect
45b0: 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65  ion is configure
45c0: 64 20 61 73 20 61 20 73 65 72 76 65 72 20 28 31  d as a server (1
45d0: 29 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e  ) or client (0).
45e0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
45f0: 6e 67 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f  ng>compression</
4600: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65  strong> <em>mode
4610: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4620: 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68  Compression meth
4630: 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  od.</dd>..<dt><s
4640: 74 72 6f 6e 67 3e 65 78 70 61 6e 73 69 6f 6e 3c  trong>expansion<
4650: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64  /strong> <em>mod
4660: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
4670: 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f  >Expansion metho
4680: 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c  d.</dd>.    </dl
4690: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >.</blockquote>.
46a0: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62  <blockquote>..<b
46b0: 3e 43 69 70 68 65 72 20 49 6e 66 6f 3c 2f 62 3e  >Cipher Info</b>
46c0: 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c  .    <dl>..<dt><
46d0: 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73  strong>cipher</s
46e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65  trong> <em>ciphe
46f0: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  r</em></dt>..<dd
4700: 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70  >The current cip
4710: 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74  her in use for t
4720: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f  he connection.</
4730: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4740: 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f  >standard_name</
4750: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65  strong> <em>name
4760: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4770: 54 68 65 20 73 74 61 6e 64 61 72 64 20 52 46 43  The standard RFC
4780: 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e   name of cipher.
4790: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
47a0: 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e  ng>bits</strong>
47b0: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e   <em>n</em></dt>
47c0: 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72  ..<dd>The number
47d0: 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69   of processed bi
47e0: 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68  ts used for ciph
47f0: 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  er.</dd>..<dt><s
4800: 74 72 6f 6e 67 3e 73 65 63 72 65 74 5f 62 69 74  trong>secret_bit
4810: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  s</strong> <em>n
4820: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4830: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65  The number of se
4840: 63 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66  cret bits used f
4850: 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a  or cipher.</dd>.
4860: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e  .<dt><strong>min
4870: 5f 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67  _version</strong
4880: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65  > <em>version</e
4890: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
48a0: 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f   minimum protoco
48b0: 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69  l version for ci
48c0: 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  pher.</dd>..<dt>
48d0: 3c 73 74 72 6f 6e 67 3e 69 64 3c 2f 73 74 72 6f  <strong>id</stro
48e0: 6e 67 3e 20 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c  ng> <em>id</em><
48f0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 4f 70  /dt>..<dd>The Op
4900: 65 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e  enSSL cipher id.
4910: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4920: 6e 67 3e 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f  ng>description</
4930: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69  strong> <em>stri
4940: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ng</em></dt>..<d
4950: 64 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 70  d>A text descrip
4960: 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68  tion of the ciph
4970: 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  er.</dd>.    </d
4980: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
4990: 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c  .<blockquote>..<
49a0: 62 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f  b>Session Info</
49b0: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74  b>.    <dl>..<dt
49c0: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
49d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
49e0: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  col</em></dt>..<
49f0: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  dd>The protocol 
4a00: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41  selected after A
4a10: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72  pplication-Layer
4a20: 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e   Protocol..    N
4a30: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e  egotiation (ALPN
4a40: 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  ).</dd>..<dt><st
4a50: 72 6f 6e 67 3e 72 65 73 75 6d 61 62 6c 65 3c 2f  rong>resumable</
4a60: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
4a70: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ean</em></dt>..<
4a80: 64 64 3e 43 61 6e 20 74 68 65 20 73 65 73 73 69  dd>Can the sessi
4a90: 6f 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72  on be resumed or
4aa0: 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   not.</dd>..<dt>
4ab0: 3c 73 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 69  <strong>start_ti
4ac0: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  me</strong> <em>
4ad0: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74  seconds</em></dt
4ae0: 3e 0a 09 3c 64 64 3e 54 69 6d 65 20 73 69 6e 63  >..<dd>Time sinc
4af0: 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65  e session starte
4b00: 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e  d in seconds sin
4b10: 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09  ce epoch.</dd>..
4b20: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d 65  <dt><strong>time
4b30: 6f 75 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  out</strong> <em
4b40: 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64  >seconds</em></d
4b50: 74 3e 0a 09 3c 64 64 3e 4d 61 78 20 64 75 72 61  t>..<dd>Max dura
4b60: 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20  tion of session 
4b70: 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72  in seconds befor
4b80: 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e  e time-out.</dd>
4b90: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69  ..<dt><strong>li
4ba0: 66 65 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  fetime</strong> 
4bb0: 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e  <em>seconds</em>
4bc0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73 73 69  </dt>..<dd>Sessi
4bd0: 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69  on ticket lifeti
4be0: 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e  me hint in secon
4bf0: 64 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ds.</dd>..<dt><s
4c00: 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 69 64  trong>session_id
4c10: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69  </strong> <em>bi
4c20: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e  nary_string</em>
4c30: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75  </dt>..<dd>Uniqu
4c40: 65 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72  e session id for
4c50: 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67   use in resuming
4c60: 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64   the session.</d
4c70: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4c80: 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f  session_ticket</
4c90: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61  strong> <em>bina
4ca0: 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f  ry_string</em></
4cb0: 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20  dt>..<dd>Unique 
4cc0: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66  session ticket f
4cd0: 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69  or use in resumi
4ce0: 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c  ng the session.<
4cf0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4d00: 67 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74  g>ticket_app_dat
4d10: 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  a</strong> <em>b
4d20: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d  inary_string</em
4d30: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71  ></dt>..<dd>Uniq
4d40: 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65  ue session ticke
4d50: 74 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61  t application da
4d60: 74 61 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ta.</dd>..<dt><s
4d70: 74 72 6f 6e 67 3e 6d 61 73 74 65 72 5f 6b 65 79  trong>master_key
4d80: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69  </strong> <em>bi
4d90: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e  nary_string</em>
4da0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75  </dt>..<dd>Uniqu
4db0: 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72  e session master
4dc0: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   key.</dd>..<dt>
4dd0: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f  <strong>session_
4de0: 63 61 63 68 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f  cache_mode</stro
4df0: 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d  ng> <em>mode</em
4e00: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 72 76  ></dt>..<dd>Serv
4e10: 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63  er cache mode (c
4e20: 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f  lient, server, o
4e30: 72 20 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 20  r both).</dd>.  
4e40: 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71    </dl>.</blockq
4e50: 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c  uote>..    <dt><
4e60: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 69 70  a name="tls::cip
4e70: 68 65 72 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  hers"><strong>tl
4e80: 73 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f  s::ciphers</stro
4e90: 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 70 72 6f  ng>.    <em>?pro
4ea0: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f  tocol? ?verbose?
4eb0: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d   ?supported?</em
4ec0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  ></a></dt>.    <
4ed0: 64 64 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 61  dd>Without any a
4ee0: 72 67 73 2c 20 72 65 74 75 72 6e 73 20 61 20 6c  rgs, returns a l
4ef0: 69 73 74 20 6f 66 20 61 6c 6c 20 63 69 70 68 65  ist of all ciphe
4f00: 72 73 2e 20 57 69 74 68 0a 09 3c 65 6d 3e 70 72  rs. With..<em>pr
4f10: 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c 20 6f 6e 6c  otocol</em>, onl
4f20: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75  y the ciphers su
4f30: 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74  pported for that
4f40: 20 70 72 6f 74 6f 63 6f 6c 0a 09 61 72 65 20 72   protocol..are r
4f50: 65 74 75 72 6e 65 64 20 77 68 65 72 65 20 3c 65  eturned where <e
4f60: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 20  m>protocol</em> 
4f70: 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 3c  must be one of <
4f80: 62 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 0a 09 74  b>ssl2, ssl3,..t
4f90: 6c 73 31 2c 20 74 6c 73 31 2e 31 2c 20 74 6c 73  ls1, tls1.1, tls
4fa0: 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 3e 74  1.2,</b> or <b>t
4fb0: 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 3c 65  ls1.3</b>. If <e
4fc0: 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e 20 69  m>verbose</em> i
4fd0: 73 0a 09 73 70 65 63 69 66 69 65 64 20 61 73 20  s..specified as 
4fe0: 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62  true then a verb
4ff0: 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61  ose, human reada
5000: 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74 75  ble list is retu
5010: 72 6e 65 64 0a 09 77 69 74 68 20 61 64 64 69 74  rned..with addit
5020: 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f  ional informatio
5030: 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e  n on the cipher.
5040: 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72 74 65   If <em>supporte
5050: 64 3c 2f 65 6d 3e 0a 09 69 73 20 73 70 65 63 69  d</em>..is speci
5060: 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 68  fied as true, th
5070: 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68  en only the ciph
5080: 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f  ers supported fo
5090: 72 20 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 6c 6c  r protocol..will
50a0: 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64 3e   be listed.</dd>
50b0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
50c0: 65 3d 22 74 6c 73 3a 3a 64 69 67 65 73 74 73 22  e="tls::digests"
50d0: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 69  ><strong>tls::di
50e0: 67 65 73 74 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f  gests</strong></
50f0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
5100: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
5110: 66 20 74 68 65 20 68 61 73 68 20 61 6c 67 6f 72  f the hash algor
5120: 69 74 68 6d 73 20 66 6f 72 20 3c 62 3e 74 6c 73  ithms for <b>tls
5130: 3a 3a 64 69 67 65 73 74 3c 2f 62 3e 20 63 6f 6d  ::digest</b> com
5140: 6d 61 6e 64 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20  mand.</dd>..    
5150: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
5160: 3a 3a 6d 61 63 73 22 3e 3c 73 74 72 6f 6e 67 3e  ::macs"><strong>
5170: 74 6c 73 3a 3a 6d 61 63 73 3c 2f 73 74 72 6f 6e  tls::macs</stron
5180: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  g></a></dt>.    
5190: 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69  <dd>Returns a li
51a0: 73 74 20 6f 66 20 74 68 65 20 61 76 61 69 6c 61  st of the availa
51b0: 62 6c 65 20 4d 65 73 73 61 67 65 20 41 75 74 68  ble Message Auth
51c0: 65 6e 74 69 63 61 74 69 6f 6e 20 43 6f 64 65 73  entication Codes
51d0: 20 28 4d 41 43 29 20 66 6f 72 0a 09 74 68 65 20   (MAC) for..the 
51e0: 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f  <b>tls::digest</
51f0: 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 64 64 3e  b> command.</dd>
5200: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
5210: 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  e="tls::protocol
5220: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  s"><strong>tls::
5230: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e  protocols</stron
5240: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  g></a></dt>.    
5250: 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69  <dd>Returns a li
5260: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20  st of supported 
5270: 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64  protocols. Valid
5280: 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c 62   values are:..<b
5290: 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73  >ssl2</b>, <b>ss
52a0: 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c  l3</b>, <b>tls1<
52b0: 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f  /b>, <b>tls1.1</
52c0: 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62  b>, <b>tls1.2</b
52d0: 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31 2e  >,..and <b>tls1.
52e0: 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73  3</b>. Exact lis
52f0: 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65  t depends on Ope
5300: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64  nSSL version and
5310: 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66  ..compile time f
5320: 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20  lags.</dd>..    
5330: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
5340: 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 6f  ::version"><stro
5350: 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c  ng>tls::version<
5360: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74  /strong></a></dt
5370: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e  >.    <dd>Return
5380: 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65  s the OpenSSL ve
5390: 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 64  rsion string.</d
53a0: 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 20 20 20  d>..    <br>.   
53b0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c   <dt><a name="tl
53c0: 73 3a 3a 64 69 67 65 73 74 22 3e 3c 73 74 72 6f  s::digest"><stro
53d0: 6e 67 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f  ng>tls::digest</
53e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65  strong> <em>type
53f0: 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f 0a 09 3f 2d   ?-bin|-hex?..?-
5400: 6b 65 79 20 68 6d 61 63 5f 6b 65 79 3f 20 5b 2d  key hmac_key? [-
5410: 66 69 6c 65 20 66 69 6c 65 6e 61 6d 65 20 7c 20  file filename | 
5420: 2d 63 6f 6d 6d 61 6e 64 20 63 6d 64 4e 61 6d 65  -command cmdName
5430: 20 7c 20 2d 63 68 61 6e 20 63 68 61 6e 6e 65 6c   | -chan channel
5440: 49 64 20 7c 20 3f 2d 64 61 74 61 3f 20 64 61 74  Id | ?-data? dat
5450: 61 5d 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e  a]</em></a></dt>
5460: 0a 20 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61  .    <dd>Calcula
5470: 74 65 20 74 68 65 20 6d 65 73 73 61 67 65 20 64  te the message d
5480: 69 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61  igest for <em>da
5490: 74 61 3c 2f 65 6d 3e 20 6f 72 20 66 69 6c 65 20  ta</em> or file 
54a0: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d  <em>filename</em
54b0: 3e 0a 09 75 73 69 6e 67 20 3c 65 6d 3e 74 79 70  >..using <em>typ
54c0: 65 3c 2f 65 6d 3e 20 68 61 73 68 20 61 6c 67 6f  e</em> hash algo
54d0: 72 69 74 68 6d 2e 20 52 65 74 75 72 6e 73 20 76  rithm. Returns v
54e0: 61 6c 75 65 20 61 73 20 61 20 68 65 78 20 73 74  alue as a hex st
54f0: 72 69 6e 67 0a 09 28 64 65 66 61 75 6c 74 29 20  ring..(default) 
5500: 6f 72 20 61 73 20 61 20 62 69 6e 61 72 79 20 76  or as a binary v
5510: 61 6c 75 65 20 77 69 74 68 20 3c 62 3e 2d 62 69  alue with <b>-bi
5520: 6e 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 55 73  n</b> option. Us
5530: 65 20 3c 62 3e 2d 6b 65 79 3c 2f 62 3e 20 74 6f  e <b>-key</b> to
5540: 0a 09 73 65 74 20 74 68 65 20 6b 65 79 20 61 6e  ..set the key an
5550: 64 20 72 65 74 75 72 6e 20 61 20 48 61 73 68 65  d return a Hashe
5560: 64 20 4d 65 73 73 61 67 65 20 41 75 74 68 65 6e  d Message Authen
5570: 74 69 63 61 74 69 6f 6e 20 43 6f 64 65 20 28 48  tication Code (H
5580: 4d 41 43 29 2e 0a 09 54 6f 20 73 61 6c 74 20 61  MAC)...To salt a
5590: 20 70 61 73 73 77 6f 72 64 2c 20 61 70 70 65 6e   password, appen
55a0: 64 20 6f 72 20 70 72 65 70 65 6e 64 20 74 68 65  d or prepend the
55b0: 20 73 61 6c 74 20 64 61 74 61 20 74 6f 20 74 68   salt data to th
55c0: 65 20 70 61 73 73 77 6f 72 64 2e 0a 09 41 72 67  e password...Arg
55d0: 75 6d 65 6e 74 20 3c 65 6d 3e 74 79 70 65 3c 2f  ument <em>type</
55e0: 65 6d 3e 20 63 61 6e 20 62 65 20 61 6e 79 20 4f  em> can be any O
55f0: 70 65 6e 53 53 4c 20 73 75 70 70 6f 72 74 65 64  penSSL supported
5600: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 20   hash algorithm 
5610: 69 6e 63 6c 75 64 69 6e 67 3a 0a 09 3c 62 3e 6d  including:..<b>m
5620: 64 34 3c 2f 62 3e 2c 20 3c 62 3e 6d 64 35 3c 2f  d4</b>, <b>md5</
5630: 62 3e 2c 20 3c 62 3e 73 68 61 31 3c 2f 62 3e 2c  b>, <b>sha1</b>,
5640: 20 3c 62 3e 73 68 61 32 35 36 3c 2f 62 3e 2c 20   <b>sha256</b>, 
5650: 3c 62 3e 73 68 61 35 31 32 3c 2f 62 3e 2c 0a 09  <b>sha512</b>,..
5660: 3c 62 3e 73 68 61 33 2d 32 35 36 3c 2f 62 3e 2c  <b>sha3-256</b>,
5670: 20 65 74 63 2e 20 53 65 65 20 3c 62 3e 74 6c 73   etc. See <b>tls
5680: 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e 20 63 6f  ::digests</b> co
5690: 6d 6d 61 6e 64 20 66 6f 72 20 61 20 66 75 6c 6c  mmand for a full
56a0: 20 6c 69 73 74 2e 0a 09 3c 62 72 3e 0a 09 55 73   list...<br>..Us
56b0: 69 6e 67 20 74 68 65 20 3c 62 3e 2d 63 68 61 6e  ing the <b>-chan
56c0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2c 20 61 20 73  </b> option, a s
56d0: 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 69  tacked channel i
56e0: 73 20 63 72 65 61 74 65 64 20 61 6e 64 20 64 61  s created and da
56f0: 74 61 0a 09 72 65 61 64 20 66 72 6f 6d 20 74 68  ta..read from th
5700: 65 20 63 68 61 6e 6e 65 6c 20 69 73 20 75 73 65  e channel is use
5710: 64 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 20 61  d to calculate a
5720: 20 6d 65 73 73 61 67 65 20 64 69 67 65 73 74 20   message digest 
5730: 77 69 74 68 20 74 68 65 0a 09 72 65 73 75 6c 74  with the..result
5740: 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 74   returned with t
5750: 68 65 20 6c 61 73 74 20 72 65 61 64 20 6f 70 65  he last read ope
5760: 72 61 74 69 6f 6e 20 62 65 66 6f 72 65 20 45 4f  ration before EO
5770: 46 2e 0a 09 3c 62 72 3e 0a 09 55 73 69 6e 67 20  F...<br>..Using 
5780: 74 68 65 20 3c 62 3e 2d 63 6f 6d 6d 61 6e 64 3c  the <b>-command<
5790: 2f 62 3e 20 6f 70 74 69 6f 6e 2c 20 61 20 6e 65  /b> option, a ne
57a0: 77 20 63 6f 6d 6d 61 6e 64 20 3c 65 6d 3e 63 6d  w command <em>cm
57b0: 64 4e 61 6d 65 3c 2f 65 6d 3e 20 69 73 0a 09 63  dName</em> is..c
57c0: 72 65 61 74 65 64 20 61 6e 64 20 72 65 74 75 72  reated and retur
57d0: 6e 65 64 2e 20 54 6f 20 61 64 64 20 64 61 74 61  ned. To add data
57e0: 20 74 6f 20 74 68 65 20 68 61 73 68 2c 20 63 61   to the hash, ca
57f0: 6c 6c 20 26 71 75 6f 74 3b 3c 65 6d 3e 63 6d 64  ll &quot;<em>cmd
5800: 4e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 62 3e 75 70  Name</em>..<b>up
5810: 64 61 74 65 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74  date</b> <em>dat
5820: 61 3c 2f 65 6d 3e 26 71 75 6f 74 3b 2c 20 77 68  a</em>&quot;, wh
5830: 65 72 65 20 64 61 74 61 20 69 73 20 74 68 65 20  ere data is the 
5840: 64 61 74 61 20 74 6f 20 61 64 64 2e 20 57 68 65  data to add. Whe
5850: 6e 20 64 6f 6e 65 2c 0a 09 63 61 6c 6c 20 26 71  n done,..call &q
5860: 75 6f 74 3b 3c 65 6d 3e 63 6d 64 4e 61 6d 65 3c  uot;<em>cmdName<
5870: 2f 65 6d 3e 20 3c 62 3e 66 69 6e 61 6c 69 7a 65  /em> <b>finalize
5880: 3c 2f 62 3e 26 71 75 6f 74 3b 20 74 6f 20 72 65  </b>&quot; to re
5890: 74 75 72 6e 20 74 68 65 0a 09 6d 65 73 73 61 67  turn the..messag
58a0: 65 20 64 69 67 65 73 74 2e 0a 09 3c 2f 64 64 3e  e digest...</dd>
58b0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
58c0: 65 3d 22 74 6c 73 3a 3a 6d 64 34 22 3e 3c 73 74  e="tls::md4"><st
58d0: 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 73  rong>tls::md4</s
58e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c  trong> <em>data<
58f0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
5900: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68    <dd>Returns th
5910: 65 20 4d 44 34 20 6d 65 73 73 61 67 65 2d 64 69  e MD4 message-di
5920: 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74  gest for <em>dat
5930: 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 78 20  a</em> as a hex 
5940: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20  string.</dd>..  
5950: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
5960: 6c 73 3a 3a 6d 64 35 22 3e 3c 73 74 72 6f 6e 67  ls::md5"><strong
5970: 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 73 74 72 6f 6e  >tls::md5</stron
5980: 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e  g> <em>data</em>
5990: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
59a0: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4d 44  d>Returns the MD
59b0: 35 20 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74  5 message-digest
59c0: 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65   for <em>data</e
59d0: 6d 3e 20 61 73 20 61 20 68 65 78 20 73 74 72 69  m> as a hex stri
59e0: 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64  ng.</dd>..    <d
59f0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
5a00: 73 68 61 31 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  sha1"><strong>tl
5a10: 73 3a 3a 73 68 61 31 3c 2f 73 74 72 6f 6e 67 3e  s::sha1</strong>
5a20: 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f   <em>data</em></
5a30: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
5a40: 52 65 74 75 72 6e 73 20 74 68 65 20 53 48 41 31  Returns the SHA1
5a50: 20 73 65 63 75 72 65 20 68 61 73 68 20 61 6c 67   secure hash alg
5a60: 6f 72 69 74 68 6d 20 64 69 67 65 73 74 20 66 6f  orithm digest fo
5a70: 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20  r <em>data</em> 
5a80: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e  as a hex string.
5a90: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c  </dd>..    <dt><
5aa0: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 68 61  a name="tls::sha
5ab0: 32 35 36 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  256"><strong>tls
5ac0: 3a 3a 73 68 61 32 35 36 3c 2f 73 74 72 6f 6e 67  ::sha256</strong
5ad0: 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c  > <em>data</em><
5ae0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  /a></dt>.    <dd
5af0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 53 48 41  >Returns the SHA
5b00: 2d 32 20 53 48 41 32 35 36 20 73 65 63 75 72 65  -2 SHA256 secure
5b10: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 20   hash algorithm 
5b20: 64 69 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64  digest for <em>d
5b30: 61 74 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65  ata</em> as a he
5b40: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a  x string.</dd>..
5b50: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
5b60: 22 74 6c 73 3a 3a 73 68 61 35 31 32 22 3e 3c 73  "tls::sha512"><s
5b70: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 68 61 35 31  trong>tls::sha51
5b80: 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64  2</strong> <em>d
5b90: 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74  ata</em></a></dt
5ba0: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e  >.    <dd>Return
5bb0: 73 20 74 68 65 20 53 48 41 2d 32 20 53 48 41 35  s the SHA-2 SHA5
5bc0: 31 32 20 73 65 63 75 72 65 20 68 61 73 68 20 61  12 secure hash a
5bd0: 6c 67 6f 72 69 74 68 6d 20 64 69 67 65 73 74 20  lgorithm digest 
5be0: 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d  for <em>data</em
5bf0: 3e 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e  > as a hex strin
5c00: 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c  g.</dd>.</dl>..<
5c10: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c  h3><a name="CALL
5c20: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41  BACK OPTIONS">CA
5c30: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f  LLBACK OPTIONS</
5c40: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20  a></h3>..<p>.As 
5c50: 69 6e 64 69 63 61 74 65 64 20 61 62 6f 76 65 2c  indicated above,
5c60: 20 69 6e 64 69 76 69 64 75 61 6c 20 63 68 61 6e   individual chan
5c70: 6e 65 6c 73 20 63 61 6e 20 62 65 20 67 69 76 65  nels can be give
5c80: 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c  n their own call
5c90: 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20  backs.to handle 
5ca0: 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f  intermediate pro
5cb0: 63 65 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f  cessing by the O
5cc0: 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20  penSSL library, 
5cd0: 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e  using the.<stron
5ce0: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
5cf0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61  ng>, <strong>-pa
5d00: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c  ssword</strong>,
5d10: 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 2d 76 61   and.<strong>-va
5d20: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
5d30: 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 20  strong> options 
5d40: 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72  passed to either
5d50: 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a   of.<strong>tls:
5d60: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e  :socket</strong>
5d70: 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a   or <strong>tls:
5d80: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e  :import</strong>
5d90: 2e 0a 49 66 20 74 68 65 20 63 61 6c 6c 62 61 63  ..If the callbac
5da0: 6b 20 67 65 6e 65 72 61 74 65 73 20 61 6e 20 65  k generates an e
5db0: 72 72 6f 72 2c 20 74 68 65 20 3c 62 3e 62 67 65  rror, the <b>bge
5dc0: 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64  rror</b> command
5dd0: 20 77 69 74 68 20 62 65 0a 69 6e 76 6f 6b 65 64   with be.invoked
5de0: 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72 20   with the error 
5df0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 0a 3c 2f 70  information..</p
5e00: 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >..<blockquote>.
5e10: 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73  <dl>..    <dt><s
5e20: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  trong>-command</
5e30: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c  strong> <em>call
5e40: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  back</em></dt>. 
5e50: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73     <dd>..Invokes
5e60: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c   the specified <
5e70: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
5e80: 20 73 63 72 69 70 74 20 61 74 20 73 65 76 65 72   script at sever
5e90: 61 6c 20 70 6f 69 6e 74 73 0a 09 64 75 72 69 6e  al points..durin
5ea0: 67 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 68 61  g the OpenSSL ha
5eb0: 6e 64 73 68 61 6b 65 20 61 6e 64 20 75 73 65 2e  ndshake and use.
5ec0: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74   See below for t
5ed0: 68 65 20 70 6f 73 73 69 62 6c 65 0a 09 61 72 67  he possible..arg
5ee0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f  uments passed to
5ef0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63   the callback sc
5f00: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74  ript. Values ret
5f10: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 0a 09  urned from the..
5f20: 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 69 67 6e  callback are ign
5f30: 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62  ored....<br>..<b
5f40: 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e  r>...<dl>...<dt>
5f50: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f  ..  <strong>erro
5f60: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  r</strong> <em>c
5f70: 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f  hannel message</
5f80: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
5f90: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73  ..  The <em>mess
5fa0: 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e  age</em> argumen
5fb0: 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72  t contains an er
5fc0: 72 6f 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65  ror message gene
5fd0: 72 61 74 65 64 0a 09 20 20 62 79 20 74 68 65 20  rated..  by the 
5fe0: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e  OpenSSL function
5ff0: 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 73 6f   <code>ERR_reaso
6000: 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29  n_error_string()
6010: 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64 64 3e 0a  </code>...</dd>.
6020: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20  ..<br>...<dt>.. 
6030: 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f 3c 2f 73   <strong>info</s
6040: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
6050: 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d  el major minor m
6060: 65 73 73 61 67 65 20 74 79 70 65 3c 2f 65 6d 3e  essage type</em>
6070: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20  ..</dt>..<dd>.. 
6080: 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61   This form of ca
6090: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
60a0: 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  d by the OpenSSL
60b0: 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f   function..  <co
60c0: 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69  de>SSL_CTX_set_i
60d0: 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f  nfo_callback()</
60e0: 63 6f 64 65 3e 20 64 75 72 69 6e 67 20 63 6f 6e  code> during con
60f0: 6e 65 63 74 69 6f 6e 20 73 65 74 75 70 0a 09 20  nection setup.. 
6100: 20 61 6e 64 20 75 73 65 2e 0a 09 20 20 3c 62 72   and use...  <br
6110: 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20 3c 6c 69  >..  <ul>..  <li
6120: 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73  >Possible values
6130: 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f   for <em>major</
6140: 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64  em> are:..  <cod
6150: 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c 65  e>handshake, ale
6160: 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 63  rt, connect, acc
6170: 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e  ept</code>.</li>
6180: 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65  ..  <li>Possible
6190: 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e   values for <em>
61a0: 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a  minor</em> are:.
61b0: 09 20 20 3c 63 6f 64 65 3e 73 74 61 72 74 2c 20  .  <code>start, 
61c0: 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77 72 69 74  done, read, writ
61d0: 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74 3c 2f 63  e, loop, exit</c
61e0: 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c  ode>.</li>..  <l
61f0: 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67  i>The <em>messag
6200: 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20  e</em> argument 
6210: 69 73 20 61 20 64 65 73 63 72 69 70 74 69 76 65  is a descriptive
6220: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61   string which ma
6230: 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 65  y..  be generate
6240: 64 20 65 69 74 68 65 72 20 62 79 20 3c 63 6f 64  d either by <cod
6250: 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69  e>SSL_state_stri
6260: 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e  ng_long()</code>
6270: 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e   or by..  <code>
6280: 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73  SSL_alert_desc_s
6290: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f  tring_long()</co
62a0: 64 65 3e 2c 20 64 65 70 65 6e 64 69 6e 67 20 6f  de>, depending o
62b0: 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c 2f  n the context.</
62c0: 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f 72 20 61  li>..  <li>For a
62d0: 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69  lerts, the possi
62e0: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c  ble values for <
62f0: 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 61 72 65  em>type</em> are
6300: 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61 72 6e 69  :..  <code>warni
6310: 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e 64 20 75  ng, fatal, and u
6320: 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e 2e 20 46  nknown</code>. F
6330: 6f 72 20 6f 74 68 65 72 73 2c 0a 09 20 20 3c 63  or others,..  <c
6340: 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f 64 65 3e 20  ode>info</code> 
6350: 69 73 20 75 73 65 64 2e 3c 2f 6c 69 3e 0a 09 20  is used.</li>.. 
6360: 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a 09   </ul>..</dd>...
6370: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e  <dt>..  <strong>
6380: 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f 6e 67 3e  message</strong>
6390: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 69 72   <em>channel dir
63a0: 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63  ection version c
63b0: 6f 6e 74 65 6e 74 5f 74 79 70 65 20 64 61 74 61  ontent_type data
63c0: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64  </em>..</dt>..<d
63d0: 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20  d>..  This form 
63e0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69  of callback is i
63f0: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70  nvoked by the Op
6400: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09  enSSL function..
6410: 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 65 74 5f    <code>SSL_set_
6420: 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f  msg_callback()</
6430: 63 6f 64 65 3e 20 77 68 65 6e 65 76 65 72 20 61  code> whenever a
6440: 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e 74   message is sent
6450: 20 6f 72 0a 09 20 20 72 65 63 65 69 76 65 64 2e   or..  received.
6460: 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69   It is only avai
6470: 6c 61 62 6c 65 20 77 68 65 6e 0a 09 20 20 4f 70  lable when..  Op
6480: 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65  enSSL is complie
6490: 64 20 77 69 74 68 20 74 68 65 20 3c 65 6d 3e 65  d with the <em>e
64a0: 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 3c  nable-ssl-trace<
64b0: 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 0a 09 20 20  /em> option...  
64c0: 57 68 65 72 65 20 3c 65 6d 3e 64 69 72 65 63 74  Where <em>direct
64d0: 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 53 65 6e 74  ion</em> is Sent
64e0: 20 6f 72 20 52 65 63 65 69 76 65 64 2c 20 3c 65   or Received, <e
64f0: 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 20 69  m>version</em> i
6500: 73 20 74 68 65 0a 09 20 20 70 72 6f 74 6f 63 6f  s the..  protoco
6510: 6c 20 76 65 72 73 69 6f 6e 2c 20 3c 65 6d 3e 63  l version, <em>c
6520: 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 65 6d 3e  ontent_type</em>
6530: 20 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 20   is the message 
6540: 63 6f 6e 74 65 6e 74 20 74 79 70 65 2c 0a 09 20  content type,.. 
6550: 20 61 6e 64 20 3c 65 6d 3e 64 61 74 61 3c 2f 65   and <em>data</e
6560: 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20  m> is more info 
6570: 6f 6e 20 74 68 65 20 6d 65 73 73 61 67 65 20 66  on the message f
6580: 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65 3e 53 53  rom the <code>SS
6590: 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65 3e 20 41  L_trace</code> A
65a0: 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e  PI...</dd>..<br>
65b0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
65c0: 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f 73 74 72 6f  ng>session</stro
65d0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20  ng> <em>channel 
65e0: 73 65 73 73 69 6f 6e 5f 69 64 20 74 69 63 6b 65  session_id ticke
65f0: 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a  t lifetime</em>.
6600: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20  .</dt>..<dd>..  
6610: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  This form of cal
6620: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
6630: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   by the OpenSSL 
6640: 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64  function..  <cod
6650: 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73  e>SSL_CTX_sess_s
6660: 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 63 6f 64  et_new_cb()</cod
6670: 65 3e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d  e>...  Where <em
6680: 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e  >session_id</em>
6690: 20 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 20   is the current 
66a0: 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69  session identifi
66b0: 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69 63 6b 65  er,..  <em>ticke
66c0: 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 73 65  t</em> is the se
66d0: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66  ssion ticket inf
66e0: 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69 66 65 74  o, and <em>lifet
66f0: 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74  ime</em>..  is t
6700: 68 65 20 74 68 65 20 74 69 63 6b 65 74 20 6c 69  he the ticket li
6710: 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64  fetime in second
6720: 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a  s...</dd>..<br>.
6730: 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e  .</dl>.    </dd>
6740: 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20 20 20 20  ..    <br>..    
6750: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73  <dt><strong>-pas
6760: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  sword</strong> <
6770: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
6780: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09  </dt>.    <dd>..
6790: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63  Invokes the spec
67a0: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61  ified <em>callba
67b0: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 77  ck</em> script w
67c0: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64  hen OpenSSL need
67d0: 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20 61 20 70  s to..obtain a p
67e0: 61 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c  assword. See bel
67f0: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69  ow for the possi
6800: 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61  ble arguments pa
6810: 73 73 65 64 20 74 6f 0a 09 74 68 65 20 63 61 6c  ssed to..the cal
6820: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 53 65  lback script. Se
6830: 65 20 62 65 6c 6f 77 20 66 6f 72 20 76 61 6c 69  e below for vali
6840: 64 20 72 65 74 75 72 6e 20 76 61 6c 75 65 73 2e  d return values.
6850: 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09  ...<br>..<br>...
6860: 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  <dl>...<dt>..  <
6870: 73 74 72 6f 6e 67 3e 70 61 73 73 77 6f 72 64 3c  strong>password<
6880: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 77 66  /strong> <em>rwf
6890: 6c 61 67 20 73 69 7a 65 3c 2f 65 6d 3e 0a 09 3c  lag size</em>..<
68a0: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 49 6e  /dt>..<dd>..  In
68b0: 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 69  voked when loadi
68c0: 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 20  ng or storing a 
68d0: 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65 20  PEM certificate 
68e0: 77 69 74 68 20 65 6e 63 72 79 70 74 69 6f 6e 2e  with encryption.
68f0: 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 72 77  ..  Where <em>rw
6900: 66 6c 61 67 3c 2f 65 6d 3e 20 69 73 20 30 20 66  flag</em> is 0 f
6910: 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79  or reading/decry
6920: 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 0a 09  ption or 1 for..
6930: 20 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70    writing/encryp
6940: 74 69 6f 6e 20 28 63 61 6e 20 70 72 6f 6d 70 74  tion (can prompt
6950: 20 75 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 6d   user to confirm
6960: 29 20 61 6e 64 0a 09 20 20 3c 65 6d 3e 73 69 7a  ) and..  <em>siz
6970: 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d 61  e</em> is the ma
6980: 78 20 70 61 73 73 77 6f 72 64 20 6c 65 6e 67 74  x password lengt
6990: 68 20 69 6e 20 62 79 74 65 73 2e 0a 09 20 20 54  h in bytes...  T
69a0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75  he callback shou
69b0: 6c 64 20 72 65 74 75 72 6e 20 74 68 65 20 70 61  ld return the pa
69c0: 73 73 77 6f 72 64 20 61 73 20 61 20 73 74 72 69  ssword as a stri
69d0: 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 20 20 20 20 3c  ng...</dd>.    <
69e0: 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a  /dd>..    <br>..
69f0: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67  .    <dt><strong
6a00: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e  >-validatecomman
6a10: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  d</strong> <em>c
6a20: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74  allback</em></dt
6a30: 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f  >.    <dd>..Invo
6a40: 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 65  kes the specifie
6a50: 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  d <em>callback</
6a60: 65 6d 3e 20 73 63 72 69 70 74 20 64 75 72 69 6e  em> script durin
6a70: 67 20 68 61 6e 64 73 68 61 6b 65 20 69 6e 0a 09  g handshake in..
6a80: 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74  order to validat
6a90: 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 76  e the provided v
6aa0: 61 6c 75 65 28 73 29 2e 20 53 65 65 20 62 65 6c  alue(s). See bel
6ab0: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69  ow for the possi
6ac0: 62 6c 65 0a 09 61 72 67 75 6d 65 6e 74 73 20 70  ble..arguments p
6ad0: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c  assed to the cal
6ae0: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 0a 09 54  lback script...T
6af0: 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c  o reject the val
6b00: 75 65 20 61 6e 64 20 61 62 6f 72 74 20 63 6f 6e  ue and abort con
6b10: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c  nection, the cal
6b20: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74  lback should ret
6b30: 75 72 6e 20 30 2e 0a 09 54 6f 20 61 63 63 65 70  urn 0...To accep
6b40: 74 20 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20  t the value and 
6b50: 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e  continue the con
6b60: 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75  nection, it shou
6b70: 6c 64 20 72 65 74 75 72 6e 20 31 2e 0a 09 54 6f  ld return 1...To
6b80: 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c 75   reject the valu
6b90: 65 2c 20 62 75 74 20 63 6f 6e 74 69 6e 75 65 20  e, but continue 
6ba0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20  the connection, 
6bb0: 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e  it should return
6bc0: 20 32 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e   2....<br>..<br>
6bd0: 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09  ...<dl>...<dt>..
6be0: 20 20 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f    <strong>alpn</
6bf0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e  strong> <em>chan
6c00: 6e 65 6c 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74  nel protocol mat
6c10: 63 68 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  ch</em>..</dt>..
6c20: 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76  <dd>..  For serv
6c30: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f  ers, this form o
6c40: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
6c50: 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63  voked when the c
6c60: 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 20 20 65 78  lient ALPN..  ex
6c70: 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69  tension is recei
6c80: 76 65 64 2e 20 49 66 20 3c 65 6d 3e 6d 61 74 63  ved. If <em>matc
6c90: 68 3c 2f 65 6d 3e 20 69 73 20 74 72 75 65 2c 20  h</em> is true, 
6ca0: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d  <em>protocol</em
6cb0: 3e 0a 09 20 20 69 73 20 74 68 65 20 66 69 72 73  >..  is the firs
6cc0: 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 73  t <b>-alpn</b> s
6cd0: 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f  pecified protoco
6ce0: 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 74 68 65 20  l common to the 
6cf0: 62 6f 74 68 20 74 68 65 0a 09 20 20 63 6c 69 65  both the..  clie
6d00: 6e 74 20 61 6e 64 20 73 65 72 76 65 72 2e 20 49  nt and server. I
6d10: 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74  f not, the first
6d20: 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65   client specifie
6d30: 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 0a 09 20  d protocol is.. 
6d40: 20 75 73 65 64 2e 20 43 61 6c 6c 65 64 20 61 66   used. Called af
6d50: 74 65 72 20 68 65 6c 6c 6f 20 61 6e 64 20 41 4c  ter hello and AL
6d60: 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c  PN callbacks...<
6d70: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64  /dd>...<br>...<d
6d80: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 68 65  t>..  <strong>he
6d90: 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  llo</strong> <em
6da0: 3e 63 68 61 6e 6e 65 6c 20 73 65 72 76 65 72 6e  >channel servern
6db0: 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a  ame</em>..</dt>.
6dc0: 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72  .<dd>..  For ser
6dd0: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20  vers, this form 
6de0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69  of callback is i
6df0: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c  nvoked during cl
6e00: 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 20 20 6d 65  ient hello..  me
6e10: 73 73 61 67 65 20 70 72 6f 63 65 73 73 69 6e 67  ssage processing
6e20: 2e 20 49 74 20 69 73 20 75 73 65 64 20 74 6f 20  . It is used to 
6e30: 73 65 6c 65 63 74 20 61 6e 20 61 70 70 72 6f 70  select an approp
6e40: 72 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74  riate certificat
6e50: 65 20 74 6f 0a 09 20 20 70 72 65 73 65 6e 74 2c  e to..  present,
6e60: 20 61 6e 64 20 6d 61 6b 65 20 6f 74 68 65 72 20   and make other 
6e70: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64  configuration ad
6e80: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61  justments releva
6e90: 6e 74 20 74 6f 20 74 68 61 74 0a 09 20 20 73 65  nt to that..  se
6ea0: 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74  rver name and it
6eb0: 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e  s configuration.
6ec0: 20 43 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 53   Called before S
6ed0: 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c  NI and ALPN call
6ee0: 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09  backs...</dd>...
6ef0: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  <br>...<dt>..  <
6f00: 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 72 6f  strong>sni</stro
6f10: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20  ng> <em>channel 
6f20: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a  servername</em>.
6f30: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20  .</dt>..<dd>..  
6f40: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
6f50: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
6f60: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68  ck is invoked wh
6f70: 65 6e 20 74 68 65 20 53 4e 49 20 65 78 74 65 6e  en the SNI exten
6f80: 73 69 6f 6e 0a 09 20 20 66 72 6f 6d 20 74 68 65  sion..  from the
6f90: 20 63 6c 69 65 6e 74 20 69 73 20 72 65 63 65 69   client is recei
6fa0: 76 65 64 2e 20 57 68 65 72 65 20 3c 65 6d 3e 73  ved. Where <em>s
6fb0: 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 20 69  ervername</em> i
6fc0: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 09 20 20  s the client..  
6fd0: 70 72 6f 76 69 64 65 64 20 73 65 72 76 65 72 20  provided server 
6fe0: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 3c 62  name from the <b
6ff0: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e  >-servername</b>
7000: 20 6f 70 74 69 6f 6e 2e 20 54 68 69 73 20 69 73   option. This is
7010: 0a 09 20 20 75 73 65 64 20 77 68 65 6e 20 61 20  ..  used when a 
7020: 73 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20  server supports 
7030: 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20  multiple names, 
7040: 73 6f 20 74 68 65 20 72 69 67 68 74 20 63 65 72  so the right cer
7050: 74 69 66 69 63 61 74 65 0a 09 20 20 63 61 6e 20  tificate..  can 
7060: 62 65 20 75 73 65 64 2e 20 43 61 6c 6c 65 64 20  be used. Called 
7070: 61 66 74 65 72 20 68 65 6c 6c 6f 20 63 61 6c 6c  after hello call
7080: 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72 65 20  back but before 
7090: 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 2e 0a 09  ALPN callback...
70a0: 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c  </dd>...<br>...<
70b0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 76  dt>..  <strong>v
70c0: 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c  erify</strong> <
70d0: 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70 74 68  em>channel depth
70e0: 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72   cert status err
70f0: 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  or</em>..</dt>..
7100: 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72  <dd>..  This for
7110: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
7120: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e   invoked by Open
7130: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63  SSL when a new c
7140: 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 69 73  ertificate..  is
7150: 20 72 65 63 65 69 76 65 64 20 66 72 6f 6d 20 74   received from t
7160: 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f  he peer. It allo
7170: 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 6f  ws the client to
7180: 20 63 68 65 63 6b 20 74 68 65 0a 09 20 20 63 65   check the..  ce
7190: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69  rtificate verifi
71a0: 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 73 20 61  cation results a
71b0: 6e 64 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65  nd choose whethe
71c0: 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65 0a 09 20  r to continue.. 
71d0: 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69 73 20 63   or not. It is c
71e0: 61 6c 6c 65 64 20 66 6f 72 20 65 61 63 68 20 63  alled for each c
71f0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68  ertificate in th
7200: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68  e certificate ch
7210: 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20  ain...  <ul>..  
7220: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 64 65 70 74  <li>The <em>dept
7230: 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20  h</em> argument 
7240: 69 73 20 61 6e 20 69 6e 74 65 67 65 72 20 72 65  is an integer re
7250: 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 0a 09  presenting the..
7260: 20 20 63 75 72 72 65 6e 74 20 64 65 70 74 68 20    current depth 
7270: 6f 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61  on the certifica
7280: 74 65 20 63 68 61 69 6e 2c 20 77 69 74 68 0a 09  te chain, with..
7290: 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e    <code>0</code>
72a0: 20 61 73 20 74 68 65 20 70 65 65 72 20 63 65 72   as the peer cer
72b0: 74 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67  tificate and hig
72c0: 68 65 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67  her values going
72d0: 0a 09 20 20 75 70 20 74 6f 20 74 68 65 20 43 65  ..  up to the Ce
72e0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
72f0: 69 74 79 20 28 43 41 29 2e 3c 2f 6c 69 3e 0a 09  ity (CA).</li>..
7300: 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 63 65    <li>The <em>ce
7310: 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74  rt</em> argument
7320: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65   is a list of ke
7330: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73 69  y-value pairs si
7340: 6d 69 6c 61 72 0a 09 20 20 74 6f 20 74 68 6f 73  milar..  to thos
7350: 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a 09 20  e returned by.. 
7360: 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a   <a href="#tls::
7370: 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e  status"><strong>
7380: 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72  tls::status</str
7390: 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c 69 3e 0a 09  ong></a>.</li>..
73a0: 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 73 74    <li>The <em>st
73b0: 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  atus</em> argume
73c0: 6e 74 20 69 73 20 61 6e 20 62 6f 6f 6c 65 61 6e  nt is an boolean
73d0: 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68   representing th
73e0: 65 0a 09 20 20 76 61 6c 69 64 69 74 79 20 6f 66  e..  validity of
73f0: 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 65 72   the current cer
7400: 74 69 66 69 63 61 74 65 2e 0a 09 20 20 41 20 76  tificate...  A v
7410: 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 30 3c  alue of <code>0<
7420: 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65  /code> means the
7430: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20   certificate is 
7440: 64 65 65 6d 65 64 20 69 6e 76 61 6c 69 64 2e 0a  deemed invalid..
7450: 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63  .  A value of <c
7460: 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20 6d 65 61  ode>1</code> mea
7470: 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61  ns the certifica
7480: 74 65 20 69 73 20 64 65 65 6d 65 64 20 76 61 6c  te is deemed val
7490: 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e  id.</li>..  <li>
74a0: 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72 3c 2f 65  The <em>error</e
74b0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 73 75 70 70  m> argument supp
74c0: 6c 69 65 73 20 74 68 65 20 6d 65 73 73 61 67 65  lies the message
74d0: 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 61  , if any, genera
74e0: 74 65 64 0a 09 20 20 62 79 20 3c 63 6f 64 65 3e  ted..  by <code>
74f0: 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67  X509_STORE_CTX_g
7500: 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63 6f 64 65  et_error()</code
7510: 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 2f 75 6c 3e  >.</li>..  </ul>
7520: 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a 09 3c  ..</dd>..<br>..<
7530: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c  /dl>.    </dd>.<
7540: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74  /dl>.</blockquot
7550: 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e 63  e>..<p>.Referenc
7560: 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e  e implementation
7570: 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62  s of these callb
7580: 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65  acks are provide
7590: 64 20 69 6e 20 74 68 65 0a 64 69 73 74 72 69 62  d in the.distrib
75a0: 75 74 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e 67  ution as <strong
75b0: 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f  >tls::callback</
75c0: 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67  strong>, <strong
75d0: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f  >tls::password</
75e0: 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64 20 3c 73 74  strong>,.and <st
75f0: 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 61  rong>tls::valida
7600: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  te_command</stro
7610: 6e 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c 79  ng> respectively
7620: 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65  .  Note that the
7630: 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70 6c  se are.<em>sampl
7640: 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74  e</em> implement
7650: 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20 20 49 6e  ations only.  In
7660: 20 61 20 6d 6f 72 65 20 72 65 61 6c 69 73 74 69   a more realisti
7670: 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f 75  c deployment.you
7680: 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79   would specify y
7690: 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b  our own callback
76a0: 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68   scripts on each
76b0: 20 54 4c 53 20 63 68 61 6e 6e 65 6c 20 75 73 69   TLS channel usi
76c0: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d  ng the.<strong>-
76d0: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e  command</strong>
76e0: 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77  , <strong>-passw
76f0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e  ord</strong>, an
7700: 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64  d <strong>-valid
7710: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72  ate_command</str
7720: 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f  ong> options..</
7730: 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64 65 66 61  p>..<p>.The defa
7740: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65  ult behavior whe
7750: 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 63  n the <strong>-c
7760: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20  ommand</strong> 
7770: 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c  and <strong>-val
7780: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73  idate_command</s
7790: 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f 6e 73 20 61  trong>.options a
77a0: 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64  re not specified
77b0: 20 69 73 20 66 6f 72 20 54 4c 53 20 74 6f 20 70   is for TLS to p
77c0: 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63  rocess the assoc
77d0: 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61  iated library ca
77e0: 6c 6c 62 61 63 6b 73 0a 69 6e 74 65 72 6e 61 6c  llbacks.internal
77f0: 6c 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ly. The default 
7800: 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68  behavior when th
7810: 65 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77  e <strong>-passw
7820: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74  ord</strong> opt
7830: 69 6f 6e 20 69 73 20 6e 6f 74 0a 73 70 65 63 69  ion is not.speci
7840: 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 20  fied is for TLS 
7850: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61  to process the a
7860: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72  ssociated librar
7870: 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 20 61  y callbacks by a
7880: 74 74 65 6d 70 74 69 6e 67 0a 74 6f 20 63 61 6c  ttempting.to cal
7890: 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70  l <strong>tls::p
78a0: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e  assword</strong>
78b0: 2e 0a 54 68 65 20 64 69 66 66 65 72 65 6e 63 65  ..The difference
78c0: 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20 74   between these t
78d0: 77 6f 20 62 65 68 61 76 69 6f 72 73 20 69 73 20  wo behaviors is 
78e0: 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66  a consequence of
78f0: 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d   maintaining.com
7900: 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20  patibility with 
7910: 65 61 72 6c 69 65 72 20 69 6d 70 6c 65 6d 65 6e  earlier implemen
7920: 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c  tations..</p>..<
7930: 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e 67 3e 74  p>.The <strong>t
7940: 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e  ls::debug</stron
7950: 67 3e 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76  g> variable prov
7960: 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69  ides some additi
7970: 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20 6f 76 65  onal.control ove
7980: 72 20 74 68 65 73 65 20 72 65 66 65 72 65 6e 63  r these referenc
7990: 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20 20 49 74  e callbacks.  It
79a0: 73 20 76 61 6c 75 65 20 69 73 20 7a 65 72 6f 20  s value is zero 
79b0: 62 79 20 64 65 66 61 75 6c 74 2e 0a 48 69 67 68  by default..High
79c0: 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63  er values produc
79d0: 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74 69  e more diagnosti
79e0: 63 20 6f 75 74 70 75 74 2c 20 61 6e 64 20 77 69  c output, and wi
79f0: 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68  ll also force th
7a00: 65 0a 76 65 72 69 66 79 20 6d 65 74 68 6f 64 20  e.verify method 
7a10: 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  in <strong>tls::
7a20: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67  callback</strong
7a30: 3e 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a  > to accept the.
7a40: 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 65  certificate, eve
7a50: 6e 20 77 68 65 6e 20 69 74 20 69 73 20 69 6e 76  n when it is inv
7a60: 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a  alid..</p>..<p>.
7a70: 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20  <em>.The use of 
7a80: 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63 61  the reference ca
7a90: 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f 6e 67 3e  llbacks <strong>
7aa0: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73  tls::callback</s
7ab0: 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72 6f 6e 67 3e  trong>,.<strong>
7ac0: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73  tls::password</s
7ad0: 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 3c 73 74 72  trong>, and <str
7ae0: 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74  ong>tls::validat
7af0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  e_command</stron
7b00: 67 3e 0a 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d  g>.is not recomm
7b10: 65 6e 64 65 64 2e 20 20 54 68 65 79 20 6d 61 79  ended.  They may
7b20: 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d   be removed from
7b30: 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73   future releases
7b40: 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 70  ..</em>.</p>..<p
7b50: 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f  >.<em>.The use o
7b60: 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c  f the variable <
7b70: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75  strong>tls::debu
7b80: 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f  g</strong> is no
7b90: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49  t recommended..I
7ba0: 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64  t may be removed
7bb0: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c   from future rel
7bc0: 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70  eases..</em>.</p
7bd0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
7be0: 44 45 42 55 47 22 3e 44 45 42 55 47 3c 2f 61 3e  DEBUG">DEBUG</a>
7bf0: 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b 65 79 20 6c  </h3>..TLS key l
7c00: 6f 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e  ogging can be en
7c10: 61 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67  abled by setting
7c20: 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74   the environment
7c30: 20 76 61 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c   variable.<b>SSL
7c40: 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74  KEYLOGFILE</b> t
7c50: 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68  o the name of th
7c60: 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f  e file to log to
7c70: 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20  . Then whenever 
7c80: 54 4c 53 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c  TLS.key material
7c90: 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72   is generated or
7ca0: 20 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c   received it wil
7cb0: 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74  l be logged to t
7cc0: 68 65 20 66 69 6c 65 2e 20 54 68 69 73 0a 69 73  he file. This.is
7cd0: 20 75 73 65 66 75 6c 20 66 6f 72 20 6c 6f 67 67   useful for logg
7ce0: 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72  ing key data for
7cf0: 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67   network logging
7d00: 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f   tools to use to
7d10: 0a 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74  .decrypt the dat
7d20: 61 2e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d  a...<h3><a name=
7d30: 22 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e  "HTTPS EXAMPLE">
7d40: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61  HTTPS EXAMPLE</a
7d50: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20  ></h3>..<p>This 
7d60: 65 78 61 6d 70 6c 65 20 75 73 65 73 20 61 20 73  example uses a s
7d70: 61 6d 70 6c 65 20 73 65 72 76 65 72 2e 70 65 6d  ample server.pem
7d80: 20 70 72 6f 76 69 64 65 64 20 77 69 74 68 20 74   provided with t
7d90: 68 65 20 54 4c 53 20 72 65 6c 65 61 73 65 2c 0a  he TLS release,.
7da0: 63 6f 75 72 74 65 73 79 20 6f 66 20 74 68 65 20  courtesy of the 
7db0: 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c  <strong>OpenSSL<
7dc0: 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a 65 63 74  /strong> project
7dd0: 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c 63 6f 64  .</p>..<pre><cod
7de0: 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  e>.package requi
7df0: 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20  re http.package 
7e00: 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 68 74 74  require tls..htt
7e10: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70  p::register http
7e20: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c  s 443 [list ::tl
7e30: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73  s::socket -autos
7e40: 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 20 2d  ervername true -
7e50: 72 65 71 75 69 72 65 20 74 72 75 65 20 2d 63 61  require true -ca
7e60: 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72  dir /etc/ssl/cer
7e70: 74 73 5d 0a 0a 73 65 74 20 74 6f 6b 20 5b 68 74  ts]..set tok [ht
7e80: 74 70 3a 3a 67 65 74 75 72 6c 20 68 74 74 70 73  tp::geturl https
7e90: 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 5d 0a  ://www.tcl.tk/].
7ea0: 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a 0a 3c  </code></pre>..<
7eb0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 50 45 43  h3><a name="SPEC
7ec0: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f  IAL CONSIDERATIO
7ed0: 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53  NS">SPECIAL CONS
7ee0: 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f  IDERATIONS</a></
7ef0: 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63 61 70 61  h3>..<p>The capa
7f00: 62 69 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73  bilities of this
7f10: 20 70 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72   package can var
7f20: 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73  y enormously bas
7f30: 65 64 20 75 70 6f 6e 20 68 6f 77 20 79 6f 75 72  ed upon how your
7f40: 0a 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79  .OpenSSL library
7f50: 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20   was configured 
7f60: 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65 77 20 76  and built. New v
7f70: 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f  ersions may obso
7f80: 6c 65 74 65 20 6f 6c 64 65 72 0a 70 72 6f 74 6f  lete older.proto
7f90: 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64  col versions, ad
7fa0: 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68  d or remove ciph
7fb0: 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61  ers, change defa
7fc0: 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 2e  ult values, etc.
7fd0: 20 55 73 65 20 74 68 65 0a 3c 73 74 72 6f 6e 67   Use the.<strong
7fe0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 73  >tls::ciphers</s
7ff0: 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f  trong> and <stro
8000: 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  ng>tls::protocol
8010: 73 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61  s</strong> comma
8020: 6e 64 73 20 74 6f 0a 6f 62 74 61 69 6e 20 74 68  nds to.obtain th
8030: 65 20 73 75 70 70 6f 72 74 65 64 20 76 65 72 73  e supported vers
8040: 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c  ions.</p>..<h3><
8050: 61 20 6e 61 6d 65 3d 22 53 45 45 20 41 4c 53 4f  a name="SEE ALSO
8060: 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f  ">SEE ALSO</a></
8070: 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e  h3>..<p><strong>
8080: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 2c  socket</strong>,
8090: 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65 65 76 65   <strong>fileeve
80a0: 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e 3c 61 0a  nt, </strong><a.
80b0: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77  href="http://www
80c0: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c  .openssl.org/"><
80d0: 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f  strong>OpenSSL</
80e0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a  strong></a></p>.
80f0: 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70  .<hr>..<pre>.Cop
8100: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39  yright &copy; 19
8110: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 0a  99 Matt Newman..
8120: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
8130: 20 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53   2004 Starfish S
8140: 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65 3e 0a 3c  ystems..</pre>.<
8150: 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a     /body>.</html>.