Hex Artifact Content

Artifact ec2fb13fcb20e7b73f53b363f85c5034cb1bbca25022bd1008ce3c0e552d426f:


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 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e  s::protocols</b>
04b0: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c  </dd>..    <dd><
04c0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f  b>tls::version</
04d0: 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74  b></dd>..    <dt
04e0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20  >&nbsp;</dt>..  
04f0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 68 61    <dd><b>tls::ha
0500: 73 68 3c 2f 62 3e 20 3c 65 6d 3e 74 79 70 65 20  sh</b> <em>type 
0510: 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09  data</em></dd>..
0520: 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a      <dd><b>tls::
0530: 68 61 73 68 65 73 3c 2f 62 3e 3c 2f 64 64 3e 0a  hashes</b></dd>.
0540: 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a  .    <dd><b>tls:
0550: 3a 6d 64 34 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74  :md4</b> <em>dat
0560: 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20  a</em></dd>..   
0570: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 35   <dd><b>tls::md5
0580: 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65  </b> <em>data</e
0590: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64  m></dd>..    <dd
05a0: 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f 62  ><b>tls::sha1</b
05b0: 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c  > <em>data</em><
05c0: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62  /dd>..    <dd><b
05d0: 3e 74 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 62 3e  >tls::sha256</b>
05e0: 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f   <em>data</em></
05f0: 64 64 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c  dd>..</dl>.    <
0600: 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20  /dd>.    <dd><a 
0610: 68 72 65 66 3d 22 23 43 4f 4d 4d 41 4e 44 53 22  href="#COMMANDS"
0620: 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 64  >COMMANDS</a></d
0630: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72  d>.    <dd><a hr
0640: 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50  ef="#CALLBACK OP
0650: 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20  TIONS">CALLBACK 
0660: 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e  OPTIONS</a></dd>
0670: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66  .    <dd><a href
0680: 3d 22 23 48 54 54 50 53 20 45 58 41 4d 50 4c 45  ="#HTTPS EXAMPLE
0690: 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c  ">HTTPS EXAMPLE<
06a0: 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64  /a></dd>.    <dd
06b0: 3e 3c 61 20 68 72 65 66 3d 22 23 53 45 45 20 41  ><a href="#SEE A
06c0: 4c 53 4f 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e  LSO">SPECIAL CON
06d0: 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c  SIDERATIONS</a><
06e0: 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20  /dd>.    <dd><a 
06f0: 68 72 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22  href="#SEE ALSO"
0700: 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 64  >SEE ALSO</a></d
0710: 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a  d>.</dl>..<hr>..
0720: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 4e 41 4d  <h3><a name="NAM
0730: 45 22 3e 4e 41 4d 45 3c 2f 61 3e 3c 2f 68 33 3e  E">NAME</a></h3>
0740: 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  ..<p><strong>tls
0750: 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62 69 6e 64  </strong> - bind
0760: 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 4f  ing to <strong>O
0770: 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 0a  penSSL</strong>.
0780: 74 6f 6f 6c 6b 69 74 2e 3c 2f 70 3e 0a 0a 3c 68  toolkit.</p>..<h
0790: 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 59 4e 4f 50  3><a name="SYNOP
07a0: 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61  SIS">SYNOPSIS</a
07b0: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 3e 70 61  ></h3>..<p><b>pa
07c0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 54 63  ckage require Tc
07d0: 6c 20 38 2e 35 3c 2f 62 3e 3c 62 72 3e 0a 3c 62  l 8.5</b><br>.<b
07e0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
07f0: 20 74 6c 73 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72   tls</b><br>.<br
0800: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  >.<a href="#tls:
0810: 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69  :init"><b>tls::i
0820: 6e 69 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69  nit</b> <i>?opti
0830: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  ons?</i></a><br>
0840: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0850: 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a  socket"><b>tls::
0860: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 6f  socket</b> <i>?o
0870: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72  ptions? host por
0880: 74 3c 2f 69 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  t</i><br>.<a hre
0890: 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22  f="#tls::socket"
08a0: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  ><b>tls::socket<
08b0: 2f 62 3e 20 3c 69 3e 3f 2d 73 65 72 76 65 72 20  /b> <i>?-server 
08c0: 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e  command? ?option
08d0: 73 3f 20 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c  s? port</i></a><
08e0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
08f0: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c  s::status"><b>tl
0900: 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 69  s::status</b> <i
0910: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65  >?-local? channe
0920: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61  l</i></a><br>.<a
0930: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 6f 6e   href="#tls::con
0940: 6e 65 63 74 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a  nection"><b>tls:
0950: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20  :connection</b> 
0960: 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  <i>channel</i></
0970: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
0980: 23 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22  #tls::handshake"
0990: 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61  ><b>tls::handsha
09a0: 6b 65 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65  ke</b> <i>channe
09b0: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61  l</i></a><br>.<a
09c0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70   href="#tls::imp
09d0: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70  ort"><b>tls::imp
09e0: 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e  ort</b> <i>chann
09f0: 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e  el ?options?</i>
0a00: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0a10: 3d 22 23 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74  ="#tls::unimport
0a20: 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f  "><b>tls::unimpo
0a30: 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65  rt</b> <i>channe
0a40: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 62  l</i></a><br>.<b
0a50: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  r>.<a href="#tls
0a60: 3a 3a 63 69 70 68 65 72 73 22 3e 3c 62 3e 74 6c  ::ciphers"><b>tl
0a70: 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c  s::ciphers</b> <
0a80: 69 3e 3f 70 72 6f 74 6f 63 6f 6c 3f 20 3f 76 65  i>?protocol? ?ve
0a90: 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f 72 74 65  rbose? ?supporte
0aa0: 64 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c  d?</i></a><br>.<
0ab0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 70 72  a href="#tls::pr
0ac0: 6f 74 6f 63 6f 6c 73 22 3e 3c 62 3e 74 6c 73 3a  otocols"><b>tls:
0ad0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f  :protocols</b></
0ae0: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
0af0: 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c  #tls::version"><
0b00: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f  b>tls::version</
0b10: 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a  b></a><br>.<br>.
0b20: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68  <a href="#tls::h
0b30: 61 73 68 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 73  ash"><b>tls::has
0b40: 68 3c 2f 62 3e 20 3c 69 3e 74 79 70 65 20 64 61  h</b> <i>type da
0b50: 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c  ta</i></a><br>.<
0b60: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61  a href="#tls::ha
0b70: 73 68 65 73 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61  shes"><b>tls::ha
0b80: 73 68 65 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e  shes</b></a><br>
0b90: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0ba0: 6d 64 34 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34  md4"><b>tls::md4
0bb0: 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e  </b> <i>data</i>
0bc0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0bd0: 3d 22 23 74 6c 73 3a 3a 6d 64 35 22 3e 3c 62 3e  ="#tls::md5"><b>
0be0: 74 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20 3c 69 3e  tls::md5</b> <i>
0bf0: 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  data</i></a><br>
0c00: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0c10: 73 68 61 31 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68  sha1"><b>tls::sh
0c20: 61 31 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f  a1</b> <i>data</
0c30: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72  i></a><br>.<a hr
0c40: 65 66 3d 22 23 74 6c 73 3a 3a 73 68 61 32 35 36  ef="#tls::sha256
0c50: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 32 35 36  "><b>tls::sha256
0c60: 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e  </b> <i>data</i>
0c70: 3c 2f 61 3e 3c 62 72 3e 0a 3c 2f 70 3e 0a 0a 3c  </a><br>.</p>..<
0c80: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43  h3><a name="DESC
0c90: 52 49 50 54 49 4f 4e 22 3e 44 45 53 43 52 49 50  RIPTION">DESCRIP
0ca0: 54 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  TION</a></h3>..<
0cb0: 70 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e  p>This extension
0cc0: 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65   provides a gene
0cd0: 72 69 63 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c  ric binding to <
0ce0: 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77  a.href="http://w
0cf0: 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22  ww.openssl.org/"
0d00: 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74  >OpenSSL</a>, ut
0d10: 69 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72  ilizing the.<str
0d20: 6f 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61  ong>Tcl_StackCha
0d30: 6e 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50  nnel</strong>.AP
0d40: 49 20 66 6f 72 20 54 63 6c 20 38 2e 34 20 61 6e  I for Tcl 8.4 an
0d50: 64 20 68 69 67 68 65 72 2e 20 54 68 65 20 73 6f  d higher. The so
0d60: 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 78 61  ckets behave exa
0d70: 63 74 6c 79 20 74 68 65 20 73 61 6d 65 0a 61 73  ctly the same.as
0d80: 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65   channels create
0d90: 64 20 75 73 69 6e 67 20 54 63 6c 27 73 20 62 75  d using Tcl's bu
0da0: 69 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73  ilt-in <strong>s
0db0: 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63  ocket</strong>.c
0dc0: 6f 6d 6d 61 6e 64 20 77 69 74 68 20 61 64 64 69  ommand with addi
0dd0: 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66  tional options f
0de0: 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74  or controlling t
0df0: 68 65 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a  he SSL session..
0e00: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  </p>..<h3><a nam
0e10: 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d  e="COMMANDS">COM
0e20: 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  MANDS</a></h3>..
0e30: 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65  <p>Typically one
0e40: 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c   would use the <
0e50: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b  strong>tls::sock
0e60: 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d  et </strong>comm
0e70: 61 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69 64  and.which provid
0e80: 65 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79  es compatibility
0e90: 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 65   with the native
0ea0: 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63   Tcl <strong>soc
0eb0: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d  ket</strong>.com
0ec0: 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63 61  mand. In such ca
0ed0: 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ses <strong>tls:
0ee0: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e  :import</strong>
0ef0: 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75   should not be.u
0f00: 73 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70  sed directly.</p
0f10: 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e  >..<dl>.    <dt>
0f20: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e  <a name="tls::in
0f30: 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74  it"><b>tls::init
0f40: 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73   </b><i>?options
0f50: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20  ?</i></a></dt>. 
0f60: 20 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20     <dd>Optional 
0f70: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20  function to set 
0f80: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69  the default opti
0f90: 6f 6e 73 20 75 73 65 64 20 62 79 0a 09 3c 73 74  ons used by..<st
0fa0: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  rong>tls::socket
0fb0: 3c 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f  </strong>. If yo
0fc0: 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74  u call <strong>t
0fd0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
0fe0: 6e 67 3e 0a 09 64 69 72 65 63 74 6c 79 20 74 68  ng>..directly th
0ff0: 69 73 20 72 6f 75 74 69 6e 65 20 68 61 73 20 6e  is routine has n
1000: 6f 20 65 66 66 65 63 74 2e 20 41 6e 79 20 6f 66  o effect. Any of
1010: 20 74 68 65 20 6f 70 74 69 6f 6e 73 0a 09 74 68   the options..th
1020: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  at <strong>tls::
1030: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20  socket</strong> 
1040: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73  accepts can be s
1050: 65 74 0a 09 75 73 69 6e 67 20 74 68 69 73 20 63  et..using this c
1060: 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20 79  ommand, though y
1070: 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20  ou should limit 
1080: 79 6f 75 72 20 6f 70 74 69 6f 6e 73 0a 09 74 6f  your options..to
1090: 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65   only TLS relate
10a0: 64 20 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20  d ones.</dd>.   
10b0: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e   <dt>&nbsp;</dt>
10c0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
10d0: 3d 22 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c  ="tls::socket"><
10e0: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f  b>tls::socket </
10f0: 62 3e 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a  b><em>?options?.
1100: 09 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c  .host port</em><
1110: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74  /a></dt>.    <dt
1120: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  ><b>tls::socket<
1130: 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72  /b><em> ?-server
1140: 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f   command? ?optio
1150: 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64  ns? port</em></d
1160: 74 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 73 20  t>.    <dd>This 
1170: 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63  is a helper func
1180: 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a  tion that utiliz
1190: 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e  es the underlyin
11a0: 67 0a 09 63 6f 6d 6d 61 6e 64 73 20 28 3c 73 74  g..commands (<st
11b0: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  rong>tls::import
11c0: 3c 2f 73 74 72 6f 6e 67 3e 29 2e 20 49 74 20 62  </strong>). It b
11d0: 65 68 61 76 65 73 0a 09 65 78 61 63 74 6c 79 20  ehaves..exactly 
11e0: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20  the same as the 
11f0: 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72 6f  native Tcl <stro
1200: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  ng>socket</stron
1210: 67 3e 0a 09 63 6f 6d 6d 61 6e 64 20 65 78 63 65  g>..command exce
1220: 70 74 20 74 68 61 74 20 74 68 65 20 6f 70 74 69  pt that the opti
1230: 6f 6e 73 20 63 61 6e 20 69 6e 63 6c 75 64 65 20  ons can include 
1240: 61 6e 79 20 6f 66 20 74 68 65 0a 09 61 70 70 6c  any of the..appl
1250: 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d 22  icable <a href="
1260: 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73  #tls::import"><s
1270: 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74  trong>tls:import
1280: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f  </strong></a>..o
1290: 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20  ptions with one 
12a0: 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f  additional optio
12b0: 6e 3a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  n:.<blockquote>.
12c0: 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73      <dl>..<dt><s
12d0: 74 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 76 65  trong>-autoserve
12e0: 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rname</strong> <
12f0: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
1300: 3e 0a 09 3c 64 64 3e 41 75 74 6f 6d 61 74 69 63  >..<dd>Automatic
1310: 61 6c 6c 79 20 73 65 6e 64 20 74 68 65 20 2d 73  ally send the -s
1320: 65 72 76 65 72 6e 61 6d 65 20 61 73 20 74 68 65  ervername as the
1330: 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 20 61   <em>host</em> a
1340: 72 67 75 6d 65 6e 74 0a 09 20 20 20 20 28 64 65  rgument..    (de
1350: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c  fault is <em>fal
1360: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20  se</em>)</dd>.  
1370: 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71    </dl>.</blockq
1380: 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c  uote>..    <dt><
1390: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70  a name="tls::imp
13a0: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70  ort"><b>tls::imp
13b0: 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e  ort </b><i>chann
13c0: 65 6c 0a 09 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69  el..?options?</i
13d0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  ></a></dt>.    <
13e0: 64 64 3e 53 53 4c 2d 65 6e 61 62 6c 65 20 61 20  dd>SSL-enable a 
13f0: 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e  regular Tcl chan
1400: 6e 65 6c 20 2d 20 69 74 20 6e 65 65 64 20 6e 6f  nel - it need no
1410: 74 20 62 65 20 61 0a 09 73 6f 63 6b 65 74 2c 20  t be a..socket, 
1420: 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65  but must provide
1430: 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20   bi-directional 
1440: 66 6c 6f 77 2e 20 41 6c 73 6f 0a 09 73 65 74 74  flow. Also..sett
1450: 69 6e 67 20 73 65 73 73 69 6f 6e 20 70 61 72 61  ing session para
1460: 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20 68  meters for SSL h
1470: 61 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 0a  andshake.</dd>..
1480: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20  <blockquote>.   
1490: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f   <dl>..<dt><stro
14a0: 6e 67 3e 2d 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67  ng>-alpn</strong
14b0: 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c  > <em>list</em><
14c0: 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f  /dt>..<dd>List o
14d0: 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f  f protocols to o
14e0: 66 66 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c  ffer during Appl
14f0: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20  ication-Layer.. 
1500: 20 20 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f     Protocol Nego
1510: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20  tiation (ALPN). 
1520: 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 65 6d  For example: <em
1530: 3e 68 32 3c 2f 65 6d 3e 20 61 6e 64 0a 09 20 20  >h2</em> and..  
1540: 20 20 3c 65 6d 3e 68 74 74 70 2f 31 2e 31 3c 2f    <em>http/1.1</
1550: 65 6d 3e 2c 20 62 75 74 20 6e 6f 74 20 3c 65 6d  em>, but not <em
1560: 3e 68 33 3c 2f 65 6d 3e 20 6f 72 20 3c 65 6d 3e  >h3</em> or <em>
1570: 71 75 69 63 3c 2f 65 6d 3e 2e 3c 2f 64 64 3e 0a  quic</em>.</dd>.
1580: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61  .<dt><strong>-ca
1590: 64 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  dir</strong> <em
15a0: 3e 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  >dir</em></dt>..
15b0: 3c 64 64 3e 53 65 74 20 74 68 65 20 43 41 20 63  <dd>Set the CA c
15c0: 65 72 74 69 66 69 63 61 74 65 73 20 70 61 74 68  ertificates path
15d0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 64 69  . The default di
15e0: 72 65 63 74 6f 72 79 20 69 73 20 70 6c 61 74 66  rectory is platf
15f0: 6f 72 6d 0a 09 20 20 20 20 73 70 65 63 69 66 69  orm..    specifi
1600: 63 20 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74  c and can be set
1610: 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65   at compile time
1620: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76  . This can be ov
1630: 65 72 72 69 64 64 65 6e 0a 09 20 20 20 20 76 69  erridden..    vi
1640: 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52  a the <b>SSL_CER
1650: 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f  T_DIR</b> enviro
1660: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c  nment variable.<
1670: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
1680: 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f  g>-cafile </stro
1690: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c  ng><em>filename<
16a0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
16b0: 65 74 20 74 68 65 20 63 65 72 74 69 66 69 63 61  et the certifica
16c0: 74 65 20 61 75 74 68 6f 72 69 74 79 20 28 43 41  te authority (CA
16d0: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 66  ) certificates f
16e0: 69 6c 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74  ile. The default
16f0: 0a 09 20 20 20 20 69 73 20 74 68 65 20 63 65 72  ..    is the cer
1700: 74 2e 70 65 6d 20 66 69 6c 65 20 69 6e 20 74 68  t.pem file in th
1710: 65 20 4f 70 73 6e 53 53 4c 20 64 69 72 65 63 74  e OpsnSSL direct
1720: 6f 72 79 2e 20 54 68 69 73 20 63 61 6e 20 61 6c  ory. This can al
1730: 73 6f 20 62 65 0a 09 20 20 20 20 6f 76 65 72 72  so be..    overr
1740: 69 64 64 65 6e 20 76 69 61 20 74 68 65 20 3c 62  idden via the <b
1750: 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f  >SSL_CERT_FILE</
1760: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76  b> environment v
1770: 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c  ariable.</dd>..<
1780: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74  dt><strong>-cert
1790: 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  file</strong> <e
17a0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c  m>filename</em><
17b0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66  /dt>..<dd>Specif
17c0: 79 20 74 68 65 20 66 69 6c 65 6e 61 6d 65 20 77  y the filename w
17d0: 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69 63  ith the certific
17e0: 61 74 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e  ate to use.</dd>
17f0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63  ..<dt><strong>-c
1800: 65 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ert</strong> <em
1810: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f  >filename</em></
1820: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79  dt>..<dd>Specify
1830: 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66   the contents of
1840: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 74   a certificate t
1850: 6f 20 75 73 65 2c 20 61 73 20 61 20 44 45 52 0a  o use, as a DER.
1860: 09 20 20 20 20 65 6e 63 6f 64 65 64 20 62 69 6e  .    encoded bin
1870: 61 72 79 20 76 61 6c 75 65 20 28 58 2e 35 30 39  ary value (X.509
1880: 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74   DER).</dd>..<dt
1890: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72  ><strong>-cipher
18a0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74  </strong> <em>st
18b0: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  ring</em></dt>..
18c0: 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 69 70 68  <dd>List of ciph
18d0: 65 72 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69  ers to use. Stri
18e0: 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22  ng is a colon ("
18f0: 3a 22 29 20 73 65 70 61 72 61 74 65 64 20 6c 69  :") separated li
1900: 73 74 0a 09 20 20 20 20 6f 66 20 63 69 70 68 65  st..    of ciphe
1910: 72 73 20 6f 72 20 63 69 70 68 65 72 20 73 75 69  rs or cipher sui
1920: 74 65 73 2e 20 43 69 70 68 65 72 20 73 75 69 74  tes. Cipher suit
1930: 65 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e  es can be combin
1940: 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74 68  ed..    using th
1950: 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61  e <b>+</b> chara
1960: 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20 63  cter. Prefixes c
1970: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 65  an be used to pe
1980: 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72  rmanently..    r
1990: 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65 6c  emove ("!"), del
19a0: 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f  ete ("-"), or mo
19b0: 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20 74  ve a cypher to t
19c0: 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 74  he end of..    t
19d0: 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b  he list ("+"). K
19e0: 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 45  eywords <b>@STRE
19f0: 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62  NGTH</b> (sort b
1a00: 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20  y algorithm..   
1a10: 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62   key length), <b
1a20: 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c  >@SECLEVEL=</b><
1a30: 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 63  i>n</i> (set sec
1a40: 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09  urity level to..
1a50: 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44      n), and <b>D
1a60: 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20  EFAULT</b> (use 
1a70: 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c  default cipher l
1a80: 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e  ist, at start on
1a90: 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c 73  ly)..    can als
1aa0: 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e 20  o be specified. 
1ab0: 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75  See OpenSSL docu
1ac0: 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68  mentation for th
1ad0: 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74  e full..    list
1ae0: 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73   of valid values
1af0: 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 65  . (TLS 1.2 and e
1b00: 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64  arlier only)</dd
1b10: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
1b20: 63 69 70 68 65 72 73 75 69 74 65 73 3c 2f 73 74  ciphersuites</st
1b30: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67  rong> <em>string
1b40: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1b50: 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73  List of cipher s
1b60: 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53 74  uites to use. St
1b70: 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20  ring is a colon 
1b80: 28 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61 72  (":")..    separ
1b90: 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70  ated list of cip
1ba0: 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e  her suite names.
1bb0: 20 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c   (TLS 1.3 only)<
1bc0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
1bd0: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
1be0: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b  ng> <em>callback
1bf0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1c00: 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f  Callback to invo
1c10: 6b 65 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f  ke at several po
1c20: 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 20  ints during the 
1c30: 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20  handshake...    
1c40: 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20  This is used to 
1c50: 70 61 73 73 20 65 72 72 6f 72 73 20 61 6e 64 20  pass errors and 
1c60: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74  tracing informat
1c70: 69 6f 6e 2c 20 61 6e 64 0a 09 20 20 20 20 69 74  ion, and..    it
1c80: 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c 20 73   can allow Tcl s
1c90: 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72  cripts to perfor
1ca0: 6d 20 74 68 65 69 72 20 6f 77 6e 20 63 65 72 74  m their own cert
1cb0: 69 66 69 63 61 74 65 0a 09 20 20 20 20 76 61 6c  ificate..    val
1cc0: 69 64 61 74 69 6f 6e 20 69 6e 20 70 6c 61 63 65  idation in place
1cd0: 20 6f 66 20 74 68 65 20 64 65 66 61 75 6c 74 20   of the default 
1ce0: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69  validation provi
1cf0: 64 65 64 20 62 79 0a 09 20 20 20 20 4f 70 65 6e  ded by..    Open
1d00: 53 53 4c 2e 20 53 65 65 20 3c 61 20 68 72 65 66  SSL. See <a href
1d10: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  ="#CALLBACK OPTI
1d20: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
1d30: 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66  TIONS</a>..    f
1d40: 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75  or further discu
1d50: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ssion.</dd>..<dt
1d60: 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72 61  ><strong>-dhpara
1d70: 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e  ms </strong><em>
1d80: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64  filename</em></d
1d90: 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20  t>..<dd>Specify 
1da0: 74 68 65 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d  the Diffie-Hellm
1db0: 61 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 69  an parameters fi
1dc0: 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  le.</dd>..<dt><s
1dd0: 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f  trong>-keyfile</
1de0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65  strong> <em>file
1df0: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
1e00: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20  <dd>Specify the 
1e10: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65  private key file
1e20: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 0a 09 20  . (default is.. 
1e30: 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 65 72     value of -cer
1e40: 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 09 3c 64 74  tfile)</dd>..<dt
1e50: 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 3c 2f 73  ><strong>-key</s
1e60: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e  trong> <em>filen
1e70: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ame</em></dt>..<
1e80: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 70  dd>Specify the p
1e90: 72 69 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73  rivate key to us
1ea0: 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64  e as a DER encod
1eb0: 65 64 20 76 61 6c 75 65 20 28 50 4b 43 53 23 31  ed value (PKCS#1
1ec0: 20 44 45 52 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e   DER)</dd>..<dt>
1ed0: 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f  <strong>-model</
1ee0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e  strong> <em>chan
1ef0: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  nel</em></dt>..<
1f00: 64 64 3e 46 6f 72 63 65 20 74 68 69 73 20 63 68  dd>Force this ch
1f10: 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74  annel to share t
1f20: 68 65 20 73 61 6d 65 20 3c 65 6d 3e 3c 73 74 72  he same <em><str
1f30: 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c 2f 73 74 72  ong>SSL_CTX</str
1f40: 6f 6e 67 3e 3c 2f 65 6d 3e 0a 09 20 20 20 20 73  ong></em>..    s
1f50: 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65 20  tructure as the 
1f60: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 68  specified <em>ch
1f70: 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a  annel</em>, and.
1f80: 09 20 20 20 20 74 68 65 72 65 66 6f 72 65 20 73  .    therefore s
1f90: 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73 20 65  hare callbacks e
1fa0: 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  tc.</dd>..<dt><s
1fb0: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c  trong>-password<
1fc0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c  /strong> <em>cal
1fd0: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  lback</em></dt>.
1fe0: 09 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f  .<dd>Callback to
1ff0: 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65   invoke when Ope
2000: 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62  nSSL needs to ob
2010: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2c  tain a password,
2020: 0a 09 20 20 20 20 74 79 70 69 63 61 6c 6c 79 20  ..    typically 
2030: 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72  to unlock the pr
2040: 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63  ivate key of a c
2050: 65 72 74 69 66 69 63 61 74 65 2e 20 54 68 65 0a  ertificate. The.
2060: 09 20 20 20 20 63 61 6c 6c 62 61 63 6b 20 73 68  .    callback sh
2070: 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74  ould return a st
2080: 72 69 6e 67 20 77 68 69 63 68 20 72 65 70 72 65  ring which repre
2090: 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f  sents the passwo
20a0: 72 64 0a 09 20 20 20 20 74 6f 20 62 65 20 75 73  rd..    to be us
20b0: 65 64 2e 20 53 65 65 20 3c 61 20 68 72 65 66 3d  ed. See <a href=
20c0: 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f  "#CALLBACK OPTIO
20d0: 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54  NS">CALLBACK OPT
20e0: 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f  IONS</a>..    fo
20f0: 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73  r further discus
2100: 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  sion.</dd>..<dt>
2110: 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74 5f 68 61  <strong>-post_ha
2120: 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e  ndshake</strong>
2130: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
2140: 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f 77 20 70  dt>..<dd>Allow p
2150: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 74 69  ost-handshake ti
2160: 63 6b 65 74 20 75 70 64 61 74 65 73 2e 3c 2f 64  cket updates.</d
2170: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
2180: 2d 72 65 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e  -request </stron
2190: 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  g><em>bool</em><
21a0: 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 65 73  /dt>..<dd>Reques
21b0: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
21c0: 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67  from peer during
21d0: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a   SSL handshake..
21e0: 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73  .    (default is
21f0: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c   <em>true</em>)<
2200: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
2210: 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 6f  g>-require</stro
2220: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
2230: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75  ></dt>..<dd>Requ
2240: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74  ire a valid cert
2250: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65  ificate from pee
2260: 72 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e  r during SSL han
2270: 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 49 66 20  dshake...    If 
2280: 74 68 69 73 20 69 73 20 73 65 74 20 74 6f 20 74  this is set to t
2290: 72 75 65 2c 20 74 68 65 6e 20 3c 73 74 72 6f 6e  rue, then <stron
22a0: 67 3e 2d 72 65 71 75 65 73 74 3c 2f 73 74 72 6f  g>-request</stro
22b0: 6e 67 3e 20 6d 75 73 74 0a 09 20 20 20 20 61 6c  ng> must..    al
22c0: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75  so be set to tru
22d0: 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  e. (default is <
22e0: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f  em>false</em>)</
22f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2300: 3e 2d 73 65 63 75 72 69 74 79 6c 65 76 65 6c 3c  >-securitylevel<
2310: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 6e 74  /strong> <em>int
2320: 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  eger</em></dt>..
2330: 3c 64 64 3e 53 65 74 20 73 65 63 75 72 69 74 79  <dd>Set security
2340: 20 6c 65 76 65 6c 2e 20 4d 75 73 74 20 62 65 20   level. Must be 
2350: 30 20 74 6f 20 35 2e 20 54 68 65 20 73 65 63 75  0 to 5. The secu
2360: 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63  rity level affec
2370: 74 73 0a 09 20 20 20 20 63 69 70 68 65 72 20 73  ts..    cipher s
2380: 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20  uite encryption 
2390: 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70  algorithms, supp
23a0: 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 73  orted ECC curves
23b0: 2c 0a 09 20 20 20 20 73 75 70 70 6f 72 74 65 64  ,..    supported
23c0: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
23d0: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65  ithms, DH parame
23e0: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69  ter sizes, certi
23f0: 66 69 63 61 74 65 0a 09 20 20 20 20 6b 65 79 20  ficate..    key 
2400: 73 69 7a 65 73 20 61 6e 64 20 73 69 67 6e 61 74  sizes and signat
2410: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20  ure algorithms. 
2420: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 31  The default is 1
2430: 2e 0a 09 20 20 20 20 4c 65 76 65 6c 20 33 20 61  ...    Level 3 a
2440: 6e 64 20 68 69 67 68 65 72 20 64 69 73 61 62 6c  nd higher disabl
2450: 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65  e support for se
2460: 73 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e  ssion tickets an
2470: 64 20 6f 6e 6c 79 0a 09 20 20 20 20 61 63 63 65  d only..    acce
2480: 70 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73  pt cipher suites
2490: 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f   that provide fo
24a0: 72 77 61 72 64 20 73 65 63 72 65 63 79 2e 3c 2f  rward secrecy.</
24b0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
24c0: 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67  >-server</strong
24d0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
24e0: 2f 64 74 3e 0a 09 3c 64 64 3e 48 61 6e 64 73 68  /dt>..<dd>Handsh
24f0: 61 6b 65 20 61 73 20 73 65 72 76 65 72 20 69 66  ake as server if
2500: 20 74 72 75 65 2c 20 65 6c 73 65 20 68 61 6e 64   true, else hand
2510: 73 68 61 6b 65 20 61 73 0a 09 20 20 20 20 63 6c  shake as..    cl
2520: 69 65 6e 74 2e 20 28 64 65 66 61 75 6c 74 20 69  ient. (default i
2530: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e  s <em>false</em>
2540: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  )</dd>..<dt><str
2550: 6f 6e 67 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c  ong>-servername<
2560: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73  /strong> <em>hos
2570: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  t</em></dt>..<dd
2580: 3e 53 70 65 63 69 66 79 20 73 65 72 76 65 72 20  >Specify server 
2590: 68 6f 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61  hostname. Only a
25a0: 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68 65 20  vailable if the 
25b0: 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 0a  OpenSSL library.
25c0: 09 20 20 20 20 74 68 65 20 70 61 63 6b 61 67 65  .    the package
25d0: 20 69 73 20 6c 69 6e 6b 65 64 20 61 67 61 69 6e   is linked again
25e0: 73 74 20 73 75 70 70 6f 72 74 73 20 74 68 65 20  st supports the 
25f0: 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 74  TLS hostname ext
2600: 65 6e 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72 20  ension..    for 
2610: 27 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64  'Server Name Ind
2620: 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20  ication' (SNI). 
2630: 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 20  Use to name the 
2640: 6c 6f 67 69 63 61 6c 20 68 6f 73 74 0a 09 20 20  logical host..  
2650: 20 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67    we are talking
2660: 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74 69 6e   to and expectin
2670: 67 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  g a certificate 
2680: 66 6f 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  for.</dd>..<dt><
2690: 73 74 72 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f  strong>-session_
26a0: 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  id</strong> <em>
26b0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
26c0: 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69 64  ..<dd>Session id
26d0: 20 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73 69   to resume sessi
26e0: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  on.</dd>..<dt><s
26f0: 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72  trong>-ssl2</str
2700: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65  ong> <em>bool</e
2710: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61  m></dt>..<dd>Ena
2720: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
2730: 32 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  2. (default is <
2740: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f  em>false</em>)</
2750: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2760: 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e  >-ssl3 </strong>
2770: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
2780: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75  t>..<dd>Enable u
2790: 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 64  se of SSL v3. (d
27a0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61  efault is <em>fa
27b0: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09  lse</em>)</dd>..
27c0: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73  <dt>-<strong>tls
27d0: 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  1</strong> <em>b
27e0: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ool</em></dt>..<
27f0: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  dd>Enable use of
2800: 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75 6c   TLS v1. (defaul
2810: 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65  t is <em>true</e
2820: 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c  m>)</dd>..<dt>-<
2830: 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73  strong>tls1.1</s
2840: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
2850: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45  /em></dt>..<dd>E
2860: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53  nable use of TLS
2870: 20 76 31 2e 31 20 28 64 65 66 61 75 6c 74 20 69   v1.1 (default i
2880: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29  s <em>true</em>)
2890: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72  </dd>..<dt>-<str
28a0: 6f 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f  ong>tls1.2</stro
28b0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ng> <em>bool</em
28c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62  ></dt>..<dd>Enab
28d0: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31  le use of TLS v1
28e0: 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  .2 (default is <
28f0: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64  em>true</em>)</d
2900: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67  d>..<dt>-<strong
2910: 3e 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e  >tls1.3</strong>
2920: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
2930: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20  dt>..<dd>Enable 
2940: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20  use of TLS v1.3 
2950: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2960: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2970: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61  .<dt><strong>-va
2980: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73  lidatecommand</s
2990: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62  trong> <em>callb
29a0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ack</em></dt>..<
29b0: 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69  dd>Callback to i
29c0: 6e 76 6f 6b 65 20 74 6f 20 76 65 72 69 66 79 20  nvoke to verify 
29d0: 6f 72 20 76 61 6c 69 64 61 74 65 20 70 72 6f 74  or validate prot
29e0: 6f 63 6f 6c 20 63 6f 6e 66 69 67 0a 09 20 20 20  ocol config..   
29f0: 20 70 61 72 61 6d 65 74 65 72 73 20 64 75 72 69   parameters duri
2a00: 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20  ng the protocol 
2a10: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73  negotiation phas
2a20: 65 2e 20 53 65 65 0a 09 20 20 20 20 3c 61 20 68  e. See..    <a h
2a30: 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f  ref="#CALLBACK O
2a40: 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b  PTIONS">CALLBACK
2a50: 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20   OPTIONS</a>..  
2a60: 20 20 66 6f 72 20 66 75 72 74 68 65 72 20 64 69    for further di
2a70: 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20  scussion.</dd>. 
2a80: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b     </dl>.</block
2a90: 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e  quote>..    <dt>
2aa0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75 6e  <a name="tls::un
2ab0: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a  import"><b>tls::
2ac0: 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e  unimport </b><i>
2ad0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
2ae0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72 6f  /dt>.    <dd>Pro
2af0: 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65 74  vided for symmet
2b00: 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74 6c  ry to <strong>tl
2b10: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
2b20: 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20 75  g>, this.      u
2b30: 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c 2d  nstacks the SSL-
2b40: 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72 65  enabling of a re
2b50: 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65  gular Tcl channe
2b60: 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20 20  l.  An error.   
2b70: 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20     is thrown if 
2b80: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74  TLS is not the t
2b90: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  op stacked chann
2ba0: 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 20 20  el type.</dd>.  
2bb0: 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74    <dt>&nbsp;</dt
2bc0: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  >.    <dt><a nam
2bd0: 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b  e="tls::handshak
2be0: 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  e"><strong>tls::
2bf0: 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e  handshake</stron
2c00: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f  g> <em>channel</
2c10: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20  em></a></dt>.   
2c20: 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e 64   <dd>Forces hand
2c30: 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c  shake to take pl
2c40: 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e 73  ace, and returns
2c50: 20 30 20 69 66 0a 09 68 61 6e 64 73 68 61 6b 65   0 if..handshake
2c60: 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f   is still in pro
2c70: 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b  gress (non-block
2c80: 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 0a 09 74  ing), or 1 if..t
2c90: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73  he handshake was
2ca0: 20 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20   successful. If 
2cb0: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61  the handshake fa
2cc0: 69 6c 65 64 0a 09 74 68 69 73 20 72 6f 75 74 69  iled..this routi
2cd0: 6e 65 20 77 69 6c 6c 20 74 68 72 6f 77 20 61 6e  ne will throw an
2ce0: 20 65 72 72 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20   error.</dd>.   
2cf0: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e   <dt>&nbsp;</dt>
2d00: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
2d10: 3d 22 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c  ="tls::status"><
2d20: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74  strong>tls::stat
2d30: 75 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20  us</strong>.    
2d40: 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61  <em>?-local? cha
2d50: 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64  nnel</em></a></d
2d60: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72  t>.    <dd>Retur
2d70: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73  ns the current s
2d80: 74 61 74 75 73 20 6f 66 20 74 68 65 20 63 65 72  tatus of the cer
2d90: 74 69 66 69 63 61 74 65 20 66 6f 72 20 61 6e 20  tificate for an 
2da0: 53 53 4c 0a 09 63 68 61 6e 6e 65 6c 2e 20 54 68  SSL..channel. Th
2db0: 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69  e result is a li
2dc0: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20  st of key-value 
2dd0: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67  pairs describing
2de0: 0a 09 74 68 65 20 63 65 72 74 69 66 69 63 61 74  ..the certificat
2df0: 65 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c 74  e. If the result
2e00: 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69 73   is an empty lis
2e10: 74 20 74 68 65 6e 20 74 68 65 0a 09 53 53 4c 20  t then the..SSL 
2e20: 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f  handshake has no
2e30: 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e  t yet completed.
2e40: 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f   If <em>-local</
2e50: 65 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65  em> is..specifie
2e60: 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61  d, then the loca
2e70: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  l certificate is
2e80: 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f   used.</dd>.<blo
2e90: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c  ckquote>..<b>SSL
2ea0: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20   Status</b>.    
2eb0: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  <dl>..<dt><stron
2ec0: 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20  g>alpn</strong> 
2ed0: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d  <em>protocol</em
2ee0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
2ef0: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65  protocol selecte
2f00: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74  d after Applicat
2f10: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63  ion-Layer Protoc
2f20: 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74  ol..    Negotiat
2f30: 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e  ion (ALPN).</dd>
2f40: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69  ..<dt><strong>ci
2f50: 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  pher</strong> <e
2f60: 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64  m>cipher</em></d
2f70: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 72 72  t>..<dd>The curr
2f80: 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73  ent cipher in us
2f90: 65 20 62 65 74 77 65 65 6e 20 74 68 65 20 63 6c  e between the cl
2fa0: 69 65 6e 74 20 61 6e 64 0a 09 20 20 20 20 73 65  ient and..    se
2fb0: 72 76 65 72 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f  rver channels.</
2fc0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
2fd0: 3e 70 65 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e  >peername</stron
2fe0: 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e  g> <em>name</em>
2ff0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70  </dt>..<dd>The p
3000: 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65  eername from the
3010: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3020: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3030: 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67  protocol</strong
3040: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65  > <em>version</e
3050: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3060: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
3070: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63  n used for the c
3080: 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20  onnection:..    
3090: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31  SSL2, SSL3, TLS1
30a0: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32  , TLS1.1, TLS1.2
30b0: 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b  , TLS1.3, or unk
30c0: 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  nown.</dd>..<dt>
30d0: 3c 73 74 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73  <strong>sbits</s
30e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
30f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20  ></dt>..<dd>The 
3100: 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75  number of bits u
3110: 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73  sed for the sess
3120: 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c  ion key.</dd>..<
3130: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61  dt><strong>signa
3140: 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68  tureHashAlgorith
3150: 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61  m</strong> <em>a
3160: 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64  lgorithm</em></d
3170: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e  t>..<dd>The sign
3180: 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72  ature hash algor
3190: 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  ithm.</dd>..<dt>
31a0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72  <strong>signatur
31b0: 65 54 79 70 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  eType</strong> <
31c0: 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64 74  em>type</em></dt
31d0: 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e 61  >..<dd>The signa
31e0: 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 2e  ture type value.
31f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3200: 6e 67 3e 76 65 72 69 66 79 44 65 70 74 68 3c 2f  ng>verifyDepth</
3210: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65  strong> <em>n</e
3220: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78  m></dt>..<dd>Max
3230: 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74  imum depth for t
3240: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63  he certificate c
3250: 68 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f  hain verificatio
3260: 6e 2e 0a 09 20 20 20 20 44 65 66 61 75 6c 74 20  n...    Default 
3270: 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20  is -1, to check 
3280: 61 6c 6c 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  all.</dd>..<dt><
3290: 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 4d 6f 64  strong>verifyMod
32a0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c  e</strong> <em>l
32b0: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ist</em></dt>..<
32c0: 64 64 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69  dd>List of certi
32d0: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74  ficate verificat
32e0: 69 6f 6e 20 6d 6f 64 65 73 2e 3c 2f 64 64 3e 0a  ion modes.</dd>.
32f0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72  .<dt><strong>ver
3300: 69 66 79 52 65 73 75 6c 74 3c 2f 73 74 72 6f 6e  ifyResult</stron
3310: 67 3e 20 3c 65 6d 3e 72 65 73 75 6c 74 3c 2f 65  g> <em>result</e
3320: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72  m></dt>..<dd>Cer
3330: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63  tificate verific
3340: 61 74 69 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64  ation result.</d
3350: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3360: 63 61 5f 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e 67  ca_names</strong
3370: 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c  > <em>list</em><
3380: 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f  /dt>..<dd>List o
3390: 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  f the Certificat
33a0: 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75 73  e Authorities us
33b0: 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68 65  ed to create the
33c0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
33d0: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62  d>.    </dl>.</b
33e0: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63  lockquote>.<bloc
33f0: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 65 72 74  kquote>..<b>Cert
3400: 69 66 69 63 61 74 65 20 53 74 61 74 75 73 3c 2f  ificate Status</
3410: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74  b>.    <dl>..<dt
3420: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 6c 3c 2f 73 74  ><strong>all</st
3430: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67  rong> <em>string
3440: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
3450: 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72 74  Dump of all cert
3460: 69 66 69 63 61 74 65 20 69 6e 66 6f 2e 3c 2f 64  ificate info.</d
3470: 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  d>...<dt><strong
3480: 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67  >version</strong
3490: 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e  > <em>value</em>
34a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63  </dt>..<dd>The c
34b0: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 73 69  ertificate versi
34c0: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  on.</dd>..<dt><s
34d0: 74 72 6f 6e 67 3e 73 65 72 69 61 6c 4e 75 6d 62  trong>serialNumb
34e0: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
34f0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
3500: 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d 62  >The serial numb
3510: 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  er of the certif
3520: 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72  icate as hex str
3530: 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ing.</dd>..<dt><
3540: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65  strong>signature
3550: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c  </strong> <em>al
3560: 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74  gorithm</em></dt
3570: 3e 0a 09 3c 64 64 3e 43 69 70 68 65 72 20 61 6c  >..<dd>Cipher al
3580: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72  gorithm used for
3590: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67   certificate sig
35a0: 6e 61 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64  nature.</dd>..<d
35b0: 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72  t><strong>issuer
35c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e  </strong> <em>dn
35d0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
35e0: 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65  The distinguishe
35f0: 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74  d name (DN) of t
3600: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69  he certificate i
3610: 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ssuer.</dd>..<dt
3620: 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65 66 6f  ><strong>notBefo
3630: 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  re</strong> <em>
3640: 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  date</em></dt>..
3650: 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64 61  <dd>The begin da
3660: 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69 64  te for the valid
3670: 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 74 69  ity of the certi
3680: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64  ficate.</dd>..<d
3690: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74  t><strong>notAft
36a0: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
36b0: 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  date</em></dt>..
36c0: 3c 64 64 3e 54 68 65 20 65 78 70 69 72 61 74 69  <dd>The expirati
36d0: 6f 6e 20 64 61 74 65 20 66 6f 72 20 74 68 65 20  on date for the 
36e0: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64  certificate.</dd
36f0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
3700: 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 3e 20  ubject</strong> 
3710: 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  <em>dn</em></dt>
3720: 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e  ..<dd>The distin
3730: 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e  guished name (DN
3740: 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  ) of the certifi
3750: 63 61 74 65 20 73 75 62 6a 65 63 74 2e 0a 09 20  cate subject... 
3760: 20 20 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64     Fields includ
3770: 65 3a 20 43 6f 6d 6d 6f 6e 20 4e 61 6d 65 20 28  e: Common Name (
3780: 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f  CN), Organizatio
3790: 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 0a  n (O), Locality.
37a0: 09 20 20 20 20 6f 72 20 43 69 74 79 20 28 4c 29  .    or City (L)
37b0: 2c 20 53 74 61 74 65 20 6f 72 20 50 72 6f 76 69  , State or Provi
37c0: 6e 63 65 20 28 53 29 2c 20 61 6e 64 20 43 6f 75  nce (S), and Cou
37d0: 6e 74 72 79 20 4e 61 6d 65 20 28 43 29 2e 3c 2f  ntry Name (C).</
37e0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
37f0: 3e 69 73 73 75 65 72 55 6e 69 71 75 65 49 44 3c  >issuerUniqueID<
3800: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
3810: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
3820: 64 64 3e 54 68 65 20 69 73 73 75 65 72 20 75 6e  dd>The issuer un
3830: 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e 0a 09 3c  ique id.</dd>..<
3840: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65  dt><strong>subje
3850: 63 74 55 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f  ctUniqueID</stro
3860: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ng> <em>string</
3870: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
3880: 65 20 73 75 62 6a 65 63 74 20 75 6e 69 71 75 65  e subject unique
3890: 20 69 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e   id.</dd>...<dt>
38a0: 3c 73 74 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65  <strong>num_exte
38b0: 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20  nsions</strong> 
38c0: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  <em>n</em></dt>.
38d0: 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 20 63  .<dd>Number of c
38e0: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e  ertificate exten
38f0: 73 69 6f 6e 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74  sions.</dd>..<dt
3900: 3e 3c 73 74 72 6f 6e 67 3e 65 78 74 65 6e 73 69  ><strong>extensi
3910: 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ons</strong> <em
3920: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >list</em></dt>.
3930: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 65 72  .<dd>List of cer
3940: 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 69  tificate extensi
3950: 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 64 64 3e 0a 09  on names.</dd>..
3960: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 75 74 68  <dt><strong>auth
3970: 6f 72 69 74 79 4b 65 79 49 64 65 6e 74 69 66 69  orityKeyIdentifi
3980: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
3990: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
39a0: 0a 09 3c 64 64 3e 28 41 4b 49 29 20 4b 65 79 20  ..<dd>(AKI) Key 
39b0: 69 64 65 6e 74 69 66 69 65 72 20 6f 66 20 74 68  identifier of th
39c0: 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 65 72  e Issuing CA cer
39d0: 74 69 66 69 63 61 74 65 20 74 68 61 74 20 73 69  tificate that si
39e0: 67 6e 65 64 0a 09 20 20 20 20 74 68 65 20 53 53  gned..    the SS
39f0: 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  L certificate as
3a00: 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 68 69   hex string. Thi
3a10: 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20  s value matches 
3a20: 74 68 65 20 53 4b 49 0a 09 20 20 20 20 76 61 6c  the SKI..    val
3a30: 75 65 20 6f 66 20 74 68 65 20 49 6e 74 65 72 6d  ue of the Interm
3a40: 65 64 69 61 74 65 20 43 41 20 63 65 72 74 69 66  ediate CA certif
3a50: 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74  icate.</dd>..<dt
3a60: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74  ><strong>subject
3a70: 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 73  KeyIdentifier</s
3a80: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e  trong> <em>strin
3a90: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  g</em></dt>..<dd
3aa0: 3e 28 53 4b 49 29 20 48 61 73 68 20 6f 66 20 74  >(SKI) Hash of t
3ab0: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69 6e  he public key in
3ac0: 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66 69  side the certifi
3ad0: 63 61 74 65 20 61 73 20 68 65 78 0a 09 20 20 20  cate as hex..   
3ae0: 73 74 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20  string. Used to 
3af0: 69 64 65 6e 74 69 66 79 20 63 65 72 74 69 66 69  identify certifi
3b00: 63 61 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61  cates that conta
3b10: 69 6e 20 61 20 70 61 72 74 69 63 75 6c 61 72 0a  in a particular.
3b20: 09 20 20 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c  .   public key.<
3b30: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3b40: 67 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65  g>subjectAltName
3b50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69  </strong> <em>li
3b60: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  st</em></dt>..<d
3b70: 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66  d>List of all of
3b80: 20 74 68 65 20 61 6c 74 65 72 6e 61 74 69 76 65   the alternative
3b90: 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73   domain names, s
3ba0: 75 62 20 64 6f 6d 61 69 6e 73 2c 0a 09 20 20 20  ub domains,..   
3bb0: 20 61 6e 64 20 49 50 20 61 64 64 72 65 73 73 65   and IP addresse
3bc0: 73 20 74 68 61 74 20 61 72 65 20 73 65 63 75 72  s that are secur
3bd0: 65 64 20 62 79 20 74 68 65 20 63 65 72 74 69 66  ed by the certif
3be0: 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74  icate.</dd>..<dt
3bf0: 3e 3c 73 74 72 6f 6e 67 3e 6f 63 73 70 3c 2f 73  ><strong>ocsp</s
3c00: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c  trong> <em>list<
3c10: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c  /em></dt>..<dd>L
3c20: 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e  ist of all Onlin
3c30: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74  e Certificate St
3c40: 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f  atus Protocol (O
3c50: 43 53 50 29 20 55 52 4c 73 2e 3c 2f 64 64 3e 0a  CSP) URLs.</dd>.
3c60: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 65  ..<dt><strong>ce
3c70: 72 74 69 66 69 63 61 74 65 3c 2f 73 74 72 6f 6e  rtificate</stron
3c80: 67 3e 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e  g> <em>cert</em>
3c90: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 50  </dt>..<dd>The P
3ca0: 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 74 69  EM encoded certi
3cb0: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 0a 09 3c  ficate.</dd>...<
3cc0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61  dt><strong>signa
3cd0: 74 75 72 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 73  tureAlgorithm</s
3ce0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72  trong> <em>algor
3cf0: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  ithm</em></dt>..
3d00: 3c 64 64 3e 43 69 70 68 65 72 20 61 6c 67 6f 72  <dd>Cipher algor
3d10: 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65  ithm used for ce
3d20: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
3d30: 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ure.</dd>..<dt><
3d40: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65  strong>signature
3d50: 56 61 6c 75 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  Value</strong> <
3d60: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f  em>string</em></
3d70: 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69  dt>..<dd>Certifi
3d80: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 61  cate signature a
3d90: 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64  s hex string.</d
3da0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3db0: 73 69 67 6e 61 74 75 72 65 44 69 67 65 73 74 3c  signatureDigest<
3dc0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72  /strong> <em>ver
3dd0: 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  sion</em></dt>..
3de0: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20  <dd>Certificate 
3df0: 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 2e 3c  signing digest.<
3e00: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3e10: 67 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72  g>publicKeyAlgor
3e20: 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ithm</strong> <e
3e30: 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e  m>algorithm</em>
3e40: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69  </dt>..<dd>Certi
3e50: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
3e60: 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f   public key algo
3e70: 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74  rithm.</dd>..<dt
3e80: 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b  ><strong>publicK
3e90: 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ey</strong> <em>
3ea0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
3eb0: 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74  ..<dd>Certificat
3ec0: 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c  e signature publ
3ed0: 69 63 20 6b 65 79 20 61 73 20 68 65 78 20 73 74  ic key as hex st
3ee0: 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  ring.</dd>..<dt>
3ef0: 3c 73 74 72 6f 6e 67 3e 62 69 74 73 3c 2f 73 74  <strong>bits</st
3f00: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e  rong> <em>n</em>
3f10: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62 65  </dt>..<dd>Numbe
3f20: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66  r of bits used f
3f30: 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73  or certificate s
3f40: 69 67 6e 61 74 75 72 65 20 6b 65 79 3c 2f 64 64  ignature key</dd
3f50: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
3f60: 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 73 74 72 6f  elf_signed</stro
3f70: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c  ng> <em>boolean<
3f80: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 49  /em></dt>..<dd>I
3f90: 73 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69  s certificate si
3fa0: 67 6e 61 74 75 72 65 20 73 65 6c 66 20 73 69 67  gnature self sig
3fb0: 6e 65 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e  ned.</dd>...<dt>
3fc0: 3c 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68 61 73  <strong>sha1_has
3fd0: 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68  h</strong> <em>h
3fe0: 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ash</em></dt>..<
3ff0: 64 64 3e 54 68 65 20 53 48 41 31 20 68 61 73 68  dd>The SHA1 hash
4000: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63   of the certific
4010: 61 74 65 20 61 73 20 68 65 78 20 73 74 72 69 6e  ate as hex strin
4020: 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  g.</dd>..<dt><st
4030: 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 61 73 68  rong>sha256_hash
4040: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61  </strong> <em>ha
4050: 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  sh</em></dt>..<d
4060: 64 3e 54 68 65 20 53 48 41 32 35 36 20 68 61 73  d>The SHA256 has
4070: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  h of the certifi
4080: 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72 69  cate as hex stri
4090: 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64  ng.</dd>.    </d
40a0: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e  l>.</blockquote>
40b0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
40c0: 65 3d 22 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  e="tls::connecti
40d0: 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  on"><strong>tls:
40e0: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 73 74 72  :connection</str
40f0: 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 63 68 61  ong>.    <em>cha
4100: 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64  nnel</em></a></d
4110: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72  t>.    <dd>Retur
4120: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63  ns the current c
4130: 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73  onnection status
4140: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e   of an SSL chann
4150: 65 6c 2e 20 54 68 65 0a 09 72 65 73 75 6c 74 20  el. The..result 
4160: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79  is a list of key
4170: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73  -value pairs des
4180: 63 72 69 62 69 6e 67 20 74 68 65 0a 09 63 6f 6e  cribing the..con
4190: 6e 65 63 74 65 64 20 70 65 65 72 2e 3c 2f 64 64  nected peer.</dd
41a0: 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09  >.<blockquote>..
41b0: 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 62  <b>SSL Status</b
41c0: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e  >.    <dl>..<dt>
41d0: 3c 73 74 72 6f 6e 67 3e 73 74 61 74 65 3c 2f 73  <strong>state</s
41e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 61 74 65  trong> <em>state
41f0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4200: 53 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e  State of the con
4210: 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c  nection.</dd>..<
4220: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 76 65  dt><strong>serve
4230: 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rname</strong> <
4240: 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74  em>name</em></dt
4250: 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 61 6d 65 20  >..<dd>The name 
4260: 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 65 64  of the connected
4270: 20 74 6f 20 73 65 72 76 65 72 2e 3c 2f 64 64 3e   to server.</dd>
4280: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72  ..<dt><strong>pr
4290: 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20  otocol</strong> 
42a0: 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e  <em>version</em>
42b0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70  </dt>..<dd>The p
42c0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20  rotocol version 
42d0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e  used for the con
42e0: 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53  nection:..    SS
42f0: 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20  L2, SSL3, TLS1, 
4300: 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20  TLS1.1, TLS1.2, 
4310: 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f  TLS1.3, or unkno
4320: 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  wn.</dd>..<dt><s
4330: 74 72 6f 6e 67 3e 72 65 6e 65 67 6f 74 69 61 74  trong>renegotiat
4340: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ion</strong> <em
4350: 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64  >boolean</em></d
4360: 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20  t>..<dd>Whether 
4370: 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74  protocol renegot
4380: 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f 72  iation is suppor
4390: 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e  ted or not.</dd>
43a0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65  ..<dt><strong>se
43b0: 63 75 72 69 74 79 6c 65 76 65 6c 3c 2f 73 74 72  curitylevel</str
43c0: 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 65 6c 3c 2f  ong> <em>level</
43d0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
43e0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
43f0: 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74   used for select
4400: 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20  ion of ciphers, 
4410: 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f  key size, etc.</
4420: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4430: 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c  >session_reused<
4440: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f  /strong> <em>boo
4450: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  lean</em></dt>..
4460: 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20  <dd>Whether the 
4470: 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e  session has been
4480: 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c   reused or not.<
4490: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
44a0: 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f 73 74 72  g>is_server</str
44b0: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e  ong> <em>boolean
44c0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
44d0: 57 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e  Whether the conn
44e0: 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67  ection is config
44f0: 75 72 65 64 20 61 73 20 61 20 73 65 72 76 65 72  ured as a server
4500: 20 28 31 29 20 6f 72 20 63 6c 69 65 6e 74 20 28   (1) or client (
4510: 30 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  0).</dd>..<dt><s
4520: 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 73 73 69 6f  trong>compressio
4530: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d  n</strong> <em>m
4540: 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ode</em></dt>..<
4550: 64 64 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d  dd>Compression m
4560: 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ethod.</dd>..<dt
4570: 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 61 6e 73 69  ><strong>expansi
4580: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  on</strong> <em>
4590: 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  mode</em></dt>..
45a0: 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65  <dd>Expansion me
45b0: 74 68 6f 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  thod.</dd>.    <
45c0: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74  /dl>.</blockquot
45d0: 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  e>.<blockquote>.
45e0: 09 3c 62 3e 43 69 70 68 65 72 20 49 6e 66 6f 3c  .<b>Cipher Info<
45f0: 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64  /b>.    <dl>..<d
4600: 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72  t><strong>cipher
4610: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69  </strong> <em>ci
4620: 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  pher</em></dt>..
4630: 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20  <dd>The current 
4640: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f  cipher in use fo
4650: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
4660: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
4670: 6f 6e 67 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d  ong>standard_nam
4680: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  e</strong> <em>n
4690: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ame</em></dt>..<
46a0: 64 64 3e 54 68 65 20 73 74 61 6e 64 61 72 64 20  dd>The standard 
46b0: 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68  RFC name of ciph
46c0: 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  er.</dd>..<dt><s
46d0: 74 72 6f 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f  trong>bits</stro
46e0: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f  ng> <em>n</em></
46f0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d  dt>..<dd>The num
4700: 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 65 64  ber of processed
4710: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63   bits used for c
4720: 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74  ipher.</dd>..<dt
4730: 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 72 65 74 5f  ><strong>secret_
4740: 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  bits</strong> <e
4750: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  m>n</em></dt>..<
4760: 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66  dd>The number of
4770: 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73 65   secret bits use
4780: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64  d for cipher.</d
4790: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
47a0: 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f 73 74 72  min_version</str
47b0: 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e  ong> <em>version
47c0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
47d0: 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74  The minimum prot
47e0: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72  ocol version for
47f0: 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c   cipher.</dd>..<
4800: 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 64 3c 2f 73  dt><strong>id</s
4810: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 64 3c 2f 65  trong> <em>id</e
4820: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
4830: 20 4f 70 65 6e 53 53 4c 20 63 69 70 68 65 72 20   OpenSSL cipher 
4840: 69 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  id.</dd>..<dt><s
4850: 74 72 6f 6e 67 3e 64 65 73 63 72 69 70 74 69 6f  trong>descriptio
4860: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  n</strong> <em>s
4870: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
4880: 09 3c 64 64 3e 41 20 74 65 78 74 20 64 65 73 63  .<dd>A text desc
4890: 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63  ription of the c
48a0: 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20  ipher.</dd>.    
48b0: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f  </dl>.</blockquo
48c0: 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e  te>.<blockquote>
48d0: 0a 09 3c 62 3e 53 65 73 73 69 6f 6e 20 49 6e 66  ..<b>Session Inf
48e0: 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09  o</b>.    <dl>..
48f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e  <dt><strong>alpn
4900: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72  </strong> <em>pr
4910: 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  otocol</em></dt>
4920: 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63  ..<dd>The protoc
4930: 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65  ol selected afte
4940: 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61  r Application-La
4950: 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20  yer Protocol..  
4960: 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41    Negotiation (A
4970: 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  LPN).</dd>..<dt>
4980: 3c 73 74 72 6f 6e 67 3e 72 65 73 75 6d 61 62 6c  <strong>resumabl
4990: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  e</strong> <em>b
49a0: 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  oolean</em></dt>
49b0: 0a 09 3c 64 64 3e 43 61 6e 20 74 68 65 20 73 65  ..<dd>Can the se
49c0: 73 73 69 6f 6e 20 62 65 20 72 65 73 75 6d 65 64  ssion be resumed
49d0: 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c   or not.</dd>..<
49e0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 72 74  dt><strong>start
49f0: 5f 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  _time</strong> <
4a00: 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c  em>seconds</em><
4a10: 2f 64 74 3e 0a 09 3c 64 64 3e 54 69 6d 65 20 73  /dt>..<dd>Time s
4a20: 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61  ince session sta
4a30: 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20  rted in seconds 
4a40: 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64  since epoch.</dd
4a50: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74  >..<dt><strong>t
4a60: 69 6d 65 6f 75 74 3c 2f 73 74 72 6f 6e 67 3e 20  imeout</strong> 
4a70: 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e  <em>seconds</em>
4a80: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 20 64  </dt>..<dd>Max d
4a90: 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 73 69  uration of sessi
4aa0: 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 62 65  on in seconds be
4ab0: 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f  fore time-out.</
4ac0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4ad0: 3e 6c 69 66 65 74 69 6d 65 3c 2f 73 74 72 6f 6e  >lifetime</stron
4ae0: 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f  g> <em>seconds</
4af0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65  em></dt>..<dd>Se
4b00: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66  ssion ticket lif
4b10: 65 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65  etime hint in se
4b20: 63 6f 6e 64 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74  conds.</dd>..<dt
4b30: 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e  ><strong>session
4b40: 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  _id</strong> <em
4b50: 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f  >binary_string</
4b60: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e  em></dt>..<dd>Un
4b70: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 69 64 20  ique session id 
4b80: 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d  for use in resum
4b90: 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e  ing the session.
4ba0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4bb0: 6e 67 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65  ng>session_ticke
4bc0: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  t</strong> <em>b
4bd0: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d  inary_string</em
4be0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71  ></dt>..<dd>Uniq
4bf0: 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65  ue session ticke
4c00: 74 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73  t for use in res
4c10: 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f  uming the sessio
4c20: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  n.</dd>..<dt><st
4c30: 72 6f 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70 5f  rong>ticket_app_
4c40: 64 61 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  data</strong> <e
4c50: 6d 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  m>binary_string<
4c60: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55  /em></dt>..<dd>U
4c70: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69  nique session ti
4c80: 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e  cket application
4c90: 20 64 61 74 61 2e 3c 2f 64 64 3e 0a 09 3c 64 74   data.</dd>..<dt
4ca0: 3e 3c 73 74 72 6f 6e 67 3e 6d 61 73 74 65 72 5f  ><strong>master_
4cb0: 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  key</strong> <em
4cc0: 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f  >binary_string</
4cd0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e  em></dt>..<dd>Un
4ce0: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73  ique session mas
4cf0: 74 65 72 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c  ter key.</dd>..<
4d00: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69  dt><strong>sessi
4d10: 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64 65 3c 2f 73  on_cache_mode</s
4d20: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c  trong> <em>mode<
4d30: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
4d40: 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64 65  erver cache mode
4d50: 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 72   (client, server
4d60: 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 64 64 3e  , or both).</dd>
4d70: 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f  .    </dl>.</blo
4d80: 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64  ckquote>..    <d
4d90: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
4da0: 63 69 70 68 65 72 73 22 3e 3c 73 74 72 6f 6e 67  ciphers"><strong
4db0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 73  >tls::ciphers</s
4dc0: 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f  trong>.    <em>?
4dd0: 70 72 6f 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f  protocol? ?verbo
4de0: 73 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c  se? ?supported?<
4df0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
4e00: 20 20 3c 64 64 3e 57 69 74 68 6f 75 74 20 61 6e    <dd>Without an
4e10: 79 20 61 72 67 73 2c 20 72 65 74 75 72 6e 73 20  y args, returns 
4e20: 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 63 69  a list of all ci
4e30: 70 68 65 72 73 2e 20 57 69 74 68 0a 09 3c 65 6d  phers. With..<em
4e40: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c 20  >protocol</em>, 
4e50: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73  only the ciphers
4e60: 20 73 75 70 70 6f 72 74 74 65 64 20 66 6f 72 20   supportted for 
4e70: 74 68 61 74 20 70 72 6f 74 6f 63 6f 6c 0a 09 61  that protocol..a
4e80: 72 65 20 72 65 74 75 72 6e 65 64 20 77 68 65 72  re returned wher
4e90: 65 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  e <em>protocol</
4ea0: 65 6d 3e 20 6d 75 73 74 20 62 65 20 6f 6e 65 20  em> must be one 
4eb0: 6f 66 20 3c 62 3e 73 73 6c 32 2c 20 73 73 6c 33  of <b>ssl2, ssl3
4ec0: 2c 0a 09 74 6c 73 31 2c 20 74 6c 73 31 2e 31 2c  ,..tls1, tls1.1,
4ed0: 20 74 6c 73 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20   tls1.2,</b> or 
4ee0: 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49  <b>tls1.3</b>. I
4ef0: 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65  f <em>verbose</e
4f00: 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65 64  m> is..specified
4f10: 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 20   as true then a 
4f20: 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72  verbose, human r
4f30: 65 61 64 61 62 6c 65 20 6c 69 73 74 20 69 73 20  eadable list is 
4f40: 72 65 74 75 72 6e 65 64 0a 09 77 69 74 68 20 61  returned..with a
4f50: 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d  dditional inform
4f60: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70  ation on the cip
4f70: 68 65 72 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70  her. If <em>supp
4f80: 6f 72 74 65 64 3c 2f 65 6d 3e 0a 09 69 73 20 73  orted</em>..is s
4f90: 70 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65  pecified as true
4fa0: 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20  , then only the 
4fb0: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65  ciphers supporte
4fc0: 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 0a 09  d for protocol..
4fd0: 77 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c  will be listed.<
4fe0: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
4ff0: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74   name="tls::prot
5000: 6f 63 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74  ocols"><strong>t
5010: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73  ls::protocols</s
5020: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  trong></a></dt>.
5030: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
5040: 61 20 6c 69 73 74 20 6f 66 20 73 75 70 70 6f 72  a list of suppor
5050: 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56  ted protocols. V
5060: 61 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a  alid values are:
5070: 0a 09 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c  ..<b>ssl2</b>, <
5080: 62 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74  b>ssl3</b>, <b>t
5090: 6c 73 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31  ls1</b>, <b>tls1
50a0: 2e 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e  .1</b>, <b>tls1.
50b0: 32 3c 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74  2</b>,..and <b>t
50c0: 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74  ls1.3</b>. Exact
50d0: 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e   list depends on
50e0: 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e   OpenSSL version
50f0: 20 61 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69   and..compile ti
5100: 6d 65 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a  me flags.</dd>..
5110: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
5120: 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c  "tls::version"><
5130: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73  strong>tls::vers
5140: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e  ion</strong></a>
5150: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65  </dt>.    <dd>Re
5160: 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53  turns the OpenSS
5170: 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67  L version string
5180: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e  .</dd>..    <br>
5190: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
51a0: 3d 22 74 6c 73 3a 3a 68 61 73 68 22 3e 3c 73 74  ="tls::hash"><st
51b0: 72 6f 6e 67 3e 74 6c 73 3a 3a 68 61 73 68 3c 2f  rong>tls::hash</
51c0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65  strong> <em>type
51d0: 20 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f   data</em></a></
51e0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61 6c 63  dt>.    <dd>Calc
51f0: 75 6c 61 74 65 20 74 68 65 20 68 61 73 68 20 66  ulate the hash f
5200: 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e  or <em>data</em>
5210: 20 75 73 69 6e 67 20 3c 65 6d 3e 74 79 70 65 3c   using <em>type<
5220: 2f 65 6d 3e 20 64 69 67 65 73 74 2e 0a 09 52 65  /em> digest...Re
5230: 74 75 72 6e 73 20 76 61 6c 75 65 20 61 73 20 61  turns value as a
5240: 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 79 70   hex string. Typ
5250: 65 20 63 61 6d 20 62 65 20 61 6e 79 20 4f 70 65  e cam be any Ope
5260: 6e 53 53 4c 20 73 75 70 70 6f 72 74 65 64 0a 09  nSSL supported..
5270: 68 61 73 68 20 64 69 67 65 73 74 20 69 6e 63 6c  hash digest incl
5280: 75 64 69 6e 67 3a 20 3c 62 3e 6d 64 34 3c 2f 62  uding: <b>md4</b
5290: 3e 2c 20 3c 62 3e 6d 64 35 3c 2f 62 3e 2c 20 3c  >, <b>md5</b>, <
52a0: 62 3e 73 68 61 31 3c 2f 62 3e 2c 0a 09 73 68 61  b>sha1</b>,..sha
52b0: 32 20 28 3c 62 3e 73 68 61 32 32 34 3c 2f 62 3e  2 (<b>sha224</b>
52c0: 2c 20 3c 62 3e 73 68 61 32 35 36 3c 2f 62 3e 2c  , <b>sha256</b>,
52d0: 20 3c 62 3e 73 68 61 33 38 34 3c 2f 62 3e 2c 20   <b>sha384</b>, 
52e0: 3c 62 3e 73 68 61 35 31 32 3c 2f 62 3e 2c 0a 09  <b>sha512</b>,..
52f0: 3c 62 3e 73 68 61 35 31 32 2d 32 32 34 3c 2f 62  <b>sha512-224</b
5300: 3e 2c 20 61 6e 64 20 3c 62 3e 73 68 61 35 31 32  >, and <b>sha512
5310: 2d 32 35 36 3c 2f 62 3e 29 2c 0a 09 73 68 61 33  -256</b>),..sha3
5320: 20 28 3c 62 3e 73 68 61 33 2d 32 32 34 3c 2f 62   (<b>sha3-224</b
5330: 3e 2c 20 3c 62 3e 73 68 61 33 2d 32 35 36 3c 2f  >, <b>sha3-256</
5340: 62 3e 2c 20 3c 62 3e 73 68 61 33 2d 33 38 34 3c  b>, <b>sha3-384<
5350: 2f 62 3e 2c 20 61 6e 64 20 3c 62 3e 73 68 61 33  /b>, and <b>sha3
5360: 2d 35 31 32 3c 2f 62 3e 29 2c 20 65 74 63 2e 3c  -512</b>), etc.<
5370: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
5380: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 73 68   name="tls::hash
5390: 65 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  es"><strong>tls:
53a0: 3a 68 61 73 68 65 73 3c 2f 73 74 72 6f 6e 67 3e  :hashes</strong>
53b0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
53c0: 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74  d>Returns a list
53d0: 20 6f 66 20 74 68 65 20 76 61 6c 69 64 20 68 61   of the valid ha
53e0: 73 68 20 64 69 67 65 73 74 73 2e 3c 2f 64 64 3e  sh digests.</dd>
53f0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  ..    <dt><a nam
5400: 65 3d 22 74 6c 73 3a 3a 6d 64 34 22 3e 3c 73 74  e="tls::md4"><st
5410: 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 73  rong>tls::md4</s
5420: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c  trong> <em>data<
5430: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
5440: 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 65 20    <dd>Calculate 
5450: 74 68 65 20 68 61 73 68 20 66 6f 72 20 3c 65 6d  the hash for <em
5460: 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 73 69 6e 67  >data</em> using
5470: 20 74 68 65 20 4d 44 34 20 6d 65 73 73 61 67 65   the MD4 message
5480: 2d 64 69 67 65 73 74 20 61 6c 67 6f 72 69 74 68  -digest algorith
5490: 6d 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74  m.</dd>..    <dt
54a0: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 6d  ><a name="tls::m
54b0: 64 35 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  d5"><strong>tls:
54c0: 3a 6d 64 35 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  :md5</strong> <e
54d0: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c  m>data</em></a><
54e0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61 6c  /dt>.    <dd>Cal
54f0: 63 75 6c 61 74 65 20 74 68 65 20 68 61 73 68 20  culate the hash 
5500: 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d  for <em>data</em
5510: 3e 20 75 73 69 6e 67 20 74 68 65 20 4d 44 35 20  > using the MD5 
5520: 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74 20 61  message-digest a
5530: 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 0a  lgorithm.</dd>..
5540: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
5550: 22 74 6c 73 3a 3a 73 68 61 31 22 3e 3c 73 74 72  "tls::sha1"><str
5560: 6f 6e 67 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f 73  ong>tls::sha1</s
5570: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c  trong> <em>data<
5580: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
5590: 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 65 20    <dd>Calculate 
55a0: 74 68 65 20 68 61 73 68 20 66 6f 72 20 3c 65 6d  the hash for <em
55b0: 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 73 69 6e 67  >data</em> using
55c0: 20 74 68 65 20 53 48 41 2d 31 20 73 65 63 75 72   the SHA-1 secur
55d0: 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d  e hash algorithm
55e0: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e  .</dd>..    <dt>
55f0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 68  <a name="tls::sh
5600: 61 32 35 36 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  a256"><strong>tl
5610: 73 3a 3a 73 68 61 32 35 36 3c 2f 73 74 72 6f 6e  s::sha256</stron
5620: 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e  g> <em>data</em>
5630: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
5640: 64 3e 43 61 6c 63 75 6c 61 74 65 20 74 68 65 20  d>Calculate the 
5650: 68 61 73 68 20 66 6f 72 20 3c 65 6d 3e 64 61 74  hash for <em>dat
5660: 61 3c 2f 65 6d 3e 20 75 73 69 6e 67 20 74 68 65  a</em> using the
5670: 20 53 48 41 2d 32 20 53 48 41 2d 32 35 36 20 73   SHA-2 SHA-256 s
5680: 65 63 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72  ecure hash algor
5690: 69 74 68 6d 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  ithm.</dd>.</dl>
56a0: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43  ..<h3><a name="C
56b0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22  ALLBACK OPTIONS"
56c0: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  >CALLBACK OPTION
56d0: 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 0a  S</a></h3>..<p>.
56e0: 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 62 6f  As indicated abo
56f0: 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20 63  ve, individual c
5700: 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20 67  hannels can be g
5710: 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 63  iven their own c
5720: 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64  allbacks.to hand
5730: 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20  le intermediate 
5740: 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 68  processing by th
5750: 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72  e OpenSSL librar
5760: 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 74  y, using the.<st
5770: 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73  rong>-command</s
5780: 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e  trong>, <strong>
5790: 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e  -password</stron
57a0: 67 3e 2c 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e  g>, and.<strong>
57b0: 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e  -validate_comman
57c0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f  d</strong> optio
57d0: 6e 73 20 70 61 73 73 65 64 20 74 6f 20 65 69 74  ns passed to eit
57e0: 68 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74  her of.<strong>t
57f0: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ls::socket</stro
5800: 6e 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74  ng> or <strong>t
5810: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
5820: 6e 67 3e 2e 0a 49 66 20 74 68 65 20 63 61 6c 6c  ng>..If the call
5830: 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20 61  back generates a
5840: 6e 20 65 72 72 6f 72 2c 20 74 68 65 20 3c 62 3e  n error, the <b>
5850: 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d  bgerror</b> comm
5860: 61 6e 64 20 77 69 74 68 20 62 65 0a 69 6e 76 6f  and with be.invo
5870: 6b 65 64 20 77 69 74 68 20 74 68 65 20 65 72 72  ked with the err
5880: 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 0a  or information..
5890: 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74  </p>..<blockquot
58a0: 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74  e>.<dl>..    <dt
58b0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e  ><strong>-comman
58c0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  d</strong> <em>c
58d0: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74  allback</em></dt
58e0: 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f  >.    <dd>..Invo
58f0: 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 65  kes the specifie
5900: 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  d <em>callback</
5910: 65 6d 3e 20 73 63 72 69 70 74 20 61 74 20 73 65  em> script at se
5920: 76 65 72 61 6c 20 70 6f 69 6e 74 73 0a 09 64 75  veral points..du
5930: 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 4c  ring the OpenSSL
5940: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 75   handshake and u
5950: 73 65 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f  se. See below fo
5960: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 09  r the possible..
5970: 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64  arguments passed
5980: 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b   to the callback
5990: 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 73 20   script. Values 
59a0: 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68  returned from th
59b0: 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 20  e..callback are 
59c0: 69 67 6e 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e 0a  ignored....<br>.
59d0: 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c  .<br>...<dl>...<
59e0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65  dt>..  <strong>e
59f0: 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  rror</strong> <e
5a00: 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67  m>channel messag
5a10: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c  e</em>..</dt>..<
5a20: 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d  dd>..  The <em>m
5a30: 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75  essage</em> argu
5a40: 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e  ment contains an
5a50: 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 67   error message g
5a60: 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 74  enerated..  by t
5a70: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
5a80: 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65  ion <code>ERR_re
5a90: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e  ason_error_strin
5aa0: 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64  g()</code>...</d
5ab0: 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e  d>...<br>...<dt>
5ac0: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f  ..  <strong>info
5ad0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
5ae0: 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f  annel major mino
5af0: 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f  r message type</
5b00: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
5b10: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66  ..  This form of
5b20: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
5b30: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e  oked by the Open
5b40: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20  SSL function..  
5b50: 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65  <code>SSL_CTX_se
5b60: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28  t_info_callback(
5b70: 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e 67 20  )</code> during 
5b80: 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 65 74 75 70  connection setup
5b90: 0a 09 20 20 61 6e 64 20 75 73 65 2e 0a 09 20 20  ..  and use...  
5ba0: 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20  <br>..  <ul>..  
5bb0: 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c  <li>Possible val
5bc0: 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f  ues for <em>majo
5bd0: 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c  r</em> are:..  <
5be0: 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20  code>handshake, 
5bf0: 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20  alert, connect, 
5c00: 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f  accept</code>.</
5c10: 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69  li>..  <li>Possi
5c20: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c  ble values for <
5c30: 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72  em>minor</em> ar
5c40: 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73 74 61 72  e:..  <code>star
5c50: 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77  t, done, read, w
5c60: 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74  rite, loop, exit
5c70: 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20  </code>.</li>.. 
5c80: 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 73   <li>The <em>mes
5c90: 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  sage</em> argume
5ca0: 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 70 74  nt is a descript
5cb0: 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 63 68  ive string which
5cc0: 20 6d 61 79 0a 09 20 20 62 65 20 67 65 6e 65 72   may..  be gener
5cd0: 61 74 65 64 20 65 69 74 68 65 72 20 62 79 20 3c  ated either by <
5ce0: 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73  code>SSL_state_s
5cf0: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f  tring_long()</co
5d00: 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f  de> or by..  <co
5d10: 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73  de>SSL_alert_des
5d20: 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c  c_string_long()<
5d30: 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e 64 69 6e  /code>, dependin
5d40: 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74  g on the context
5d50: 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f  .</li>..  <li>Fo
5d60: 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f  r alerts, the po
5d70: 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f  ssible values fo
5d80: 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20  r <em>type</em> 
5d90: 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61  are:..  <code>wa
5da0: 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e  rning, fatal, an
5db0: 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e  d unknown</code>
5dc0: 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 0a 09 20  . For others,.. 
5dd0: 20 3c 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f 64   <code>info</cod
5de0: 65 3e 20 69 73 20 75 73 65 64 2e 3c 2f 6c 69 3e  e> is used.</li>
5df0: 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e  ..  </ul>..</dd>
5e00: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
5e10: 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f  ng>message</stro
5e20: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20  ng> <em>channel 
5e30: 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69 6f  direction versio
5e40: 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 64  n content_type d
5e50: 61 74 61 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a  ata</em>..</dt>.
5e60: 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f  .<dd>..  This fo
5e70: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
5e80: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65  s invoked by the
5e90: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
5ea0: 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73  n..  <code>SSL_s
5eb0: 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28  et_msg_callback(
5ec0: 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76 65  )</code> wheneve
5ed0: 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 73  r a message is s
5ee0: 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 65 69 76  ent or..  receiv
5ef0: 65 64 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 61  ed. It is only a
5f00: 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a 09 20  vailable when.. 
5f10: 20 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70   OpenSSL is comp
5f20: 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 3c 65  lied with the <e
5f30: 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61  m>enable-ssl-tra
5f40: 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 0a  ce</em> option..
5f50: 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 64 69 72  .  Where <em>dir
5f60: 65 63 74 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 53  ection</em> is S
5f70: 65 6e 74 20 6f 72 20 52 65 63 65 69 76 65 64 2c  ent or Received,
5f80: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d   <em>version</em
5f90: 3e 20 69 73 20 74 68 65 0a 09 20 20 70 72 6f 74  > is the..  prot
5fa0: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2c 20 3c 65  ocol version, <e
5fb0: 6d 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f  m>content_type</
5fc0: 65 6d 3e 20 69 73 20 74 68 65 20 6d 65 73 73 61  em> is the messa
5fd0: 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65 2c  ge content type,
5fe0: 0a 09 20 20 61 6e 64 20 3c 65 6d 3e 64 61 74 61  ..  and <em>data
5ff0: 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e  </em> is more in
6000: 66 6f 20 6f 6e 20 74 68 65 20 6d 65 73 73 61 67  fo on the messag
6010: 65 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65  e from the <code
6020: 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65  >SSL_trace</code
6030: 3e 20 41 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09 3c  > API...</dd>..<
6040: 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73  br>...<dt>..  <s
6050: 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f 73  trong>session</s
6060: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
6070: 65 6c 20 73 65 73 73 69 6f 6e 5f 69 64 20 74 69  el session_id ti
6080: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65  cket lifetime</e
6090: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a  m>..</dt>..<dd>.
60a0: 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20  .  This form of 
60b0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
60c0: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53  ked by the OpenS
60d0: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c  SL function..  <
60e0: 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73  code>SSL_CTX_ses
60f0: 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f  s_set_new_cb()</
6100: 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 65 20  code>...  Where 
6110: 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f  <em>session_id</
6120: 65 6d 3e 20 69 73 20 74 68 65 20 63 75 72 72 65  em> is the curre
6130: 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74  nt session ident
6140: 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69  ifier,..  <em>ti
6150: 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65  cket</em> is the
6160: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20   session ticket 
6170: 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69  info, and <em>li
6180: 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69  fetime</em>..  i
6190: 73 20 74 68 65 20 74 68 65 20 74 69 63 6b 65 74  s the the ticket
61a0: 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63   lifetime in sec
61b0: 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62  onds...</dd>..<b
61c0: 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f  r>..</dl>.    </
61d0: 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20  dd>..    <br>.. 
61e0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d     <dt><strong>-
61f0: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67  password</strong
6200: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  > <em>callback</
6210: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  em></dt>.    <dd
6220: 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73  >..Invokes the s
6230: 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c  pecified <em>cal
6240: 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70  lback</em> scrip
6250: 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e  t when OpenSSL n
6260: 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20  eeds to..obtain 
6270: 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20  a password. See 
6280: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
6290: 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73  ssible arguments
62a0: 20 70 61 73 73 65 64 20 74 6f 0a 09 74 68 65 20   passed to..the 
62b0: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e  callback script.
62c0: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 76   See below for v
62d0: 61 6c 69 64 20 72 65 74 75 72 6e 20 76 61 6c 75  alid return valu
62e0: 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e  es....<br>..<br>
62f0: 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09  ...<dl>...<dt>..
6300: 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 77 6f    <strong>passwo
6310: 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  rd</strong> <em>
6320: 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 6d 3e  rwflag size</em>
6330: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20  ..</dt>..<dd>.. 
6340: 20 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f   Invoked when lo
6350: 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67  ading or storing
6360: 20 61 20 50 45 4d 20 63 65 72 74 69 66 69 63 61   a PEM certifica
6370: 74 65 20 77 69 74 68 20 65 6e 63 72 79 70 74 69  te with encrypti
6380: 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d  on...  Where <em
6390: 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 73 20  >rwflag</em> is 
63a0: 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65  0 for reading/de
63b0: 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f  cryption or 1 fo
63c0: 72 0a 09 20 20 77 72 69 74 69 6e 67 2f 65 6e 63  r..  writing/enc
63d0: 72 79 70 74 69 6f 6e 20 28 63 61 6e 20 70 72 6f  ryption (can pro
63e0: 6d 70 74 20 75 73 65 72 20 74 6f 20 63 6f 6e 66  mpt user to conf
63f0: 69 72 6d 29 20 61 6e 64 0a 09 20 20 3c 65 6d 3e  irm) and..  <em>
6400: 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65  size</em> is the
6410: 20 6d 61 78 20 70 61 73 73 77 6f 72 64 20 6c 65   max password le
6420: 6e 67 74 68 20 69 6e 20 62 79 74 65 73 2e 0a 09  ngth in bytes...
6430: 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73    The callback s
6440: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 68 65  hould return the
6450: 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 20 73   password as a s
6460: 74 72 69 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 20 20  tring...</dd>.  
6470: 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72    </dd>..    <br
6480: 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72  >...    <dt><str
6490: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d  ong>-validatecom
64a0: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  mand</strong> <e
64b0: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c  m>callback</em><
64c0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49  /dt>.    <dd>..I
64d0: 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69  nvokes the speci
64e0: 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63  fied <em>callbac
64f0: 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 64 75  k</em> script du
6500: 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 20 69  ring handshake i
6510: 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 61 6c 69  n..order to vali
6520: 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 64 65  date the provide
6530: 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65 65 20  d value(s). See 
6540: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
6550: 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 6e 74  ssible..argument
6560: 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20  s passed to the 
6570: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e  callback script.
6580: 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20  ..To reject the 
6590: 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 20  value and abort 
65a0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20  connection, the 
65b0: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20  callback should 
65c0: 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f 20 61 63  return 0...To ac
65d0: 63 65 70 74 20 74 68 65 20 76 61 6c 75 65 20 61  cept the value a
65e0: 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20  nd continue the 
65f0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73  connection, it s
6600: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e 0a  hould return 1..
6610: 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76  .To reject the v
6620: 61 6c 75 65 2c 20 62 75 74 20 63 6f 6e 74 69 6e  alue, but contin
6630: 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  ue the connectio
6640: 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74  n, it should ret
6650: 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e 0a 09 3c  urn 2....<br>..<
6660: 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74  br>...<dl>...<dt
6670: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 61 6c 70  >..  <strong>alp
6680: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  n</strong> <em>c
6690: 68 61 6e 6e 65 6c 20 70 72 6f 74 6f 63 6f 6c 20  hannel protocol 
66a0: 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 3c 2f 64 74  match</em>..</dt
66b0: 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73  >..<dd>..  For s
66c0: 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72  ervers, this for
66d0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
66e0: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68   invoked when th
66f0: 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 20  e client ALPN.. 
6700: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65   extension is re
6710: 63 65 69 76 65 64 2e 20 49 66 20 3c 65 6d 3e 6d  ceived. If <em>m
6720: 61 74 63 68 3c 2f 65 6d 3e 20 69 73 20 74 72 75  atch</em> is tru
6730: 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c  e, <em>protocol<
6740: 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 20 66  /em>..  is the f
6750: 69 72 73 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f 62  irst <b>-alpn</b
6760: 3e 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74  > specified prot
6770: 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 74  ocol common to t
6780: 68 65 20 62 6f 74 68 20 74 68 65 0a 09 20 20 63  he both the..  c
6790: 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72  lient and server
67a0: 2e 20 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 69  . If not, the fi
67b0: 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 69  rst client speci
67c0: 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73  fied protocol is
67d0: 0a 09 20 20 75 73 65 64 2e 20 43 61 6c 6c 65 64  ..  used. Called
67e0: 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 61 6e 64   after hello and
67f0: 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e   ALPN callbacks.
6800: 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a  ..</dd>...<br>..
6810: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67  .<dt>..  <strong
6820: 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20  >hello</strong> 
6830: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 73 65 72 76  <em>channel serv
6840: 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64  ername</em>..</d
6850: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20  t>..<dd>..  For 
6860: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
6870: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
6880: 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67  s invoked during
6890: 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 20   client hello.. 
68a0: 20 6d 65 73 73 61 67 65 20 70 72 6f 63 65 73 73   message process
68b0: 69 6e 67 2e 20 49 74 20 69 73 20 75 73 65 64 20  ing. It is used 
68c0: 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 70  to select an app
68d0: 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69  ropriate certifi
68e0: 63 61 74 65 20 74 6f 0a 09 20 20 70 72 65 73 65  cate to..  prese
68f0: 6e 74 2c 20 61 6e 64 20 6d 61 6b 65 20 6f 74 68  nt, and make oth
6900: 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  er configuration
6910: 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c   adjustments rel
6920: 65 76 61 6e 74 20 74 6f 20 74 68 61 74 0a 09 20  evant to that.. 
6930: 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64   server name and
6940: 20 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69   its configurati
6950: 6f 6e 2e 20 43 61 6c 6c 65 64 20 62 65 66 6f 72  on. Called befor
6960: 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63  e SNI and ALPN c
6970: 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 3e  allbacks...</dd>
6980: 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09  ...<br>...<dt>..
6990: 20 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73    <strong>sni</s
69a0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
69b0: 65 6c 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65  el servername</e
69c0: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a  m>..</dt>..<dd>.
69d0: 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c 20  .  For servers, 
69e0: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  this form of cal
69f0: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
6a00: 20 77 68 65 6e 20 74 68 65 20 53 4e 49 20 65 78   when the SNI ex
6a10: 74 65 6e 73 69 6f 6e 0a 09 20 20 66 72 6f 6d 20  tension..  from 
6a20: 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 72 65  the client is re
6a30: 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 3c 65  ceived. Where <e
6a40: 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d  m>servername</em
6a50: 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a  > is the client.
6a60: 09 20 20 70 72 6f 76 69 64 65 64 20 73 65 72 76  .  provided serv
6a70: 65 72 20 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65  er name from the
6a80: 20 3c 62 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c   <b>-servername<
6a90: 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69 73  /b> option. This
6aa0: 20 69 73 0a 09 20 20 75 73 65 64 20 77 68 65 6e   is..  used when
6ab0: 20 61 20 73 65 72 76 65 72 20 73 75 70 70 6f 72   a server suppor
6ac0: 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65  ts multiple name
6ad0: 73 2c 20 73 6f 20 74 68 65 20 72 69 67 68 74 20  s, so the right 
6ae0: 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 63  certificate..  c
6af0: 61 6e 20 62 65 20 75 73 65 64 2e 20 43 61 6c 6c  an be used. Call
6b00: 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 63  ed after hello c
6b10: 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 6f  allback but befo
6b20: 72 65 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b  re ALPN callback
6b30: 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a  ...</dd>...<br>.
6b40: 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e  ..<dt>..  <stron
6b50: 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67  g>verify</strong
6b60: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65  > <em>channel de
6b70: 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20  pth cert status 
6b80: 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74  error</em>..</dt
6b90: 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20  >..<dd>..  This 
6ba0: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
6bb0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f   is invoked by O
6bc0: 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65  penSSL when a ne
6bd0: 77 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20  w certificate.. 
6be0: 20 69 73 20 72 65 63 65 69 76 65 64 20 66 72 6f   is received fro
6bf0: 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 20 61  m the peer. It a
6c00: 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74  llows the client
6c10: 20 74 6f 20 63 68 65 63 6b 20 74 68 65 0a 09 20   to check the.. 
6c20: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72   certificate ver
6c30: 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74  ification result
6c40: 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 65  s and choose whe
6c50: 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65  ther to continue
6c60: 0a 09 20 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69  ..  or not. It i
6c70: 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63  s called for eac
6c80: 68 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e  h certificate in
6c90: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
6ca0: 20 63 68 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e 0a   chain...  <ul>.
6cb0: 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 64  .  <li>The <em>d
6cc0: 65 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  epth</em> argume
6cd0: 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65 72  nt is an integer
6ce0: 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68   representing th
6cf0: 65 0a 09 20 20 63 75 72 72 65 6e 74 20 64 65 70  e..  current dep
6d00: 74 68 20 6f 6e 20 74 68 65 20 63 65 72 74 69 66  th on the certif
6d10: 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 69 74  icate chain, wit
6d20: 68 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f  h..  <code>0</co
6d30: 64 65 3e 20 61 73 20 74 68 65 20 70 65 65 72 20  de> as the peer 
6d40: 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 20  certificate and 
6d50: 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 67 6f  higher values go
6d60: 69 6e 67 0a 09 20 20 75 70 20 74 6f 20 74 68 65  ing..  up to the
6d70: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
6d80: 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f 6c 69  hority (CA).</li
6d90: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d  >..  <li>The <em
6da0: 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d  >cert</em> argum
6db0: 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66  ent is a list of
6dc0: 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73   key-value pairs
6dd0: 20 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20 74   similar..  to t
6de0: 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79  hose returned by
6df0: 0a 09 20 20 3c 61 20 68 72 65 66 3d 22 23 74 6c  ..  <a href="#tl
6e00: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f  s::status"><stro
6e10: 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f  ng>tls::status</
6e20: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c 69  strong></a>.</li
6e30: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d  >..  <li>The <em
6e40: 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67  >status</em> arg
6e50: 75 6d 65 6e 74 20 69 73 20 61 6e 20 62 6f 6f 6c  ument is an bool
6e60: 65 61 6e 20 72 65 70 72 65 73 65 6e 74 69 6e 67  ean representing
6e70: 20 74 68 65 0a 09 20 20 76 61 6c 69 64 69 74 79   the..  validity
6e80: 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20   of the current 
6e90: 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09 20 20  certificate...  
6ea0: 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65  A value of <code
6eb0: 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20  >0</code> means 
6ec0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
6ed0: 69 73 20 64 65 65 6d 65 64 20 69 6e 76 61 6c 69  is deemed invali
6ee0: 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66  d...  A value of
6ef0: 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20   <code>1</code> 
6f00: 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 66  means the certif
6f10: 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 20  icate is deemed 
6f20: 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20 3c  valid.</li>..  <
6f30: 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72  li>The <em>error
6f40: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 73  </em> argument s
6f50: 75 70 70 6c 69 65 73 20 74 68 65 20 6d 65 73 73  upplies the mess
6f60: 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e  age, if any, gen
6f70: 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c 63 6f  erated..  by <co
6f80: 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54  de>X509_STORE_CT
6f90: 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63  X_get_error()</c
6fa0: 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 2f  ode>.</li>..  </
6fb0: 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e  ul>..</dd>..<br>
6fc0: 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64  ..</dl>.    </dd
6fd0: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71  >.</dl>.</blockq
6fe0: 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72  uote>..<p>.Refer
6ff0: 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74  ence implementat
7000: 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61  ions of these ca
7010: 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76  llbacks are prov
7020: 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73 74  ided in the.dist
7030: 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 72  ribution as <str
7040: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63  ong>tls::callbac
7050: 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72  k</strong>, <str
7060: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  ong>tls::passwor
7070: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64 20  d</strong>,.and 
7080: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c  <strong>tls::val
7090: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73  idate_command</s
70a0: 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 69 76  trong> respectiv
70b0: 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 74 20  ely.  Note that 
70c0: 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61  these are.<em>sa
70d0: 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d  mple</em> implem
70e0: 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20  entations only. 
70f0: 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c 69   In a more reali
7100: 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a  stic deployment.
7110: 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66  you would specif
7120: 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62  y your own callb
7130: 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65  ack scripts on e
7140: 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c 20  ach TLS channel 
7150: 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e  using the.<stron
7160: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
7170: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61  ng>, <strong>-pa
7180: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c  ssword</strong>,
7190: 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61   and <strong>-va
71a0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
71b0: 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 2e  strong> options.
71c0: 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64  .</p>..<p>.The d
71d0: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20  efault behavior 
71e0: 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67  when the <strong
71f0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  >-command</stron
7200: 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d  g> and <strong>-
7210: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
7220: 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f 6e  </strong>.option
7230: 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66  s are not specif
7240: 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 20 74  ied is for TLS t
7250: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73  o process the as
7260: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79  sociated library
7270: 20 63 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 65 72   callbacks.inter
7280: 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 75  nally. The defau
7290: 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e  lt behavior when
72a0: 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 70 61   the <strong>-pa
72b0: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20  ssword</strong> 
72c0: 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 0a 73 70  option is not.sp
72d0: 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20 54  ecified is for T
72e0: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
72f0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
7300: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62  rary callbacks b
7310: 79 20 61 74 74 65 6d 70 74 69 6e 67 0a 74 6f 20  y attempting.to 
7320: 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  call <strong>tls
7330: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f  ::password</stro
7340: 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 65  ng>..The differe
7350: 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 73  nce between thes
7360: 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 73 20  e two behaviors 
7370: 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65  is a consequence
7380: 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a   of maintaining.
7390: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69  compatibility wi
73a0: 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 6c 65  th earlier imple
73b0: 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e  mentations..</p>
73c0: 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e  ..<p>.The <stron
73d0: 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74  g>tls::debug</st
73e0: 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 70  rong> variable p
73f0: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64  rovides some add
7400: 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20  itional.control 
7410: 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65 72  over these refer
7420: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20  ence callbacks. 
7430: 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a 65   Its value is ze
7440: 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a 48  ro by default..H
7450: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f  igher values pro
7460: 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f  duce more diagno
7470: 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e 64  stic output, and
7480: 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65   will also force
7490: 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74 68   the.verify meth
74a0: 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c  od in <strong>tl
74b0: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72  s::callback</str
74c0: 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20 74  ong> to accept t
74d0: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20  he.certificate, 
74e0: 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73 20  even when it is 
74f0: 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c  invalid..</p>..<
7500: 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20  p>.<em>.The use 
7510: 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 65  of the reference
7520: 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f   callbacks <stro
7530: 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b  ng>tls::callback
7540: 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72 6f  </strong>,.<stro
7550: 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64  ng>tls::password
7560: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 3c  </strong>, and <
7570: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69  strong>tls::vali
7580: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74  date_command</st
7590: 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 20 72 65 63  rong>.is not rec
75a0: 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 20  ommended.  They 
75b0: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66  may be removed f
75c0: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61  rom future relea
75d0: 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a  ses..</em>.</p>.
75e0: 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73  .<p>.<em>.The us
75f0: 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c  e of the variabl
7600: 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64  e <strong>tls::d
7610: 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73  ebug</strong> is
7620: 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64   not recommended
7630: 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f  ..It may be remo
7640: 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20  ved from future 
7650: 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a  releases..</em>.
7660: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  </p>..<h3><a nam
7670: 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47 3c  e="DEBUG">DEBUG<
7680: 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b 65  /a></h3>..TLS ke
7690: 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 65  y logging can be
76a0: 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74 74   enabled by sett
76b0: 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d  ing the environm
76c0: 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 3e  ent variable.<b>
76d0: 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62  SSLKEYLOGFILE</b
76e0: 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66  > to the name of
76f0: 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67   the file to log
7700: 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65 76   to. Then whenev
7710: 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 65 72  er TLS.key mater
7720: 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65 64  ial is generated
7730: 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74 20   or received it 
7740: 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20 74  will be logged t
7750: 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69 73  o the file. This
7760: 0a 69 73 20 75 73 65 66 75 6c 20 66 6f 72 20 6c  .is useful for l
7770: 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61 20  ogging key data 
7780: 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67  for network logg
7790: 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65  ing tools to use
77a0: 20 74 6f 0a 64 65 63 72 79 70 74 20 74 68 65 20   to.decrypt the 
77b0: 64 61 74 61 2e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  data...<h3><a na
77c0: 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 4c  me="HTTPS EXAMPL
77d0: 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45  E">HTTPS EXAMPLE
77e0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68  </a></h3>..<p>Th
77f0: 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73 20  is example uses 
7800: 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72 2e  a sample server.
7810: 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69 74  pem provided wit
7820: 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61 73  h the TLS releas
7830: 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20 74  e,.courtesy of t
7840: 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53  he <strong>OpenS
7850: 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a  SL</strong> proj
7860: 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c  ect.</p>..<pre><
7870: 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65  code>.package re
7880: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61  quire http.packa
7890: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a  ge require tls..
78a0: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68  http::register h
78b0: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a  ttps 443 [list :
78c0: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75  :tls::socket -au
78d0: 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72 75  toservername tru
78e0: 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65 20  e -require true 
78f0: 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f  -cadir /etc/ssl/
7900: 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b 20  certs]..set tok 
7910: 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68 74  [http::geturl ht
7920: 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b  tps://www.tcl.tk
7930: 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e  /].</code></pre>
7940: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53  ..<h3><a name="S
7950: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41  PECIAL CONSIDERA
7960: 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20 43  TIONS">SPECIAL C
7970: 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61  ONSIDERATIONS</a
7980: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63  ></h3>..<p>The c
7990: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74  apabilities of t
79a0: 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20  his package can 
79b0: 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20  vary enormously 
79c0: 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 79  based upon how y
79d0: 6f 75 72 0a 4f 70 65 6e 53 53 4c 20 6c 69 62 72  our.OpenSSL libr
79e0: 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 72  ary was configur
79f0: 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65  ed and built. Ne
7a00: 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f  w versions may o
7a10: 62 73 6f 6c 65 74 65 20 6f 6c 64 65 72 0a 70 72  bsolete older.pr
7a20: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c  otocol versions,
7a30: 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 63   add or remove c
7a40: 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20 64  iphers, change d
7a50: 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 65  efault values, e
7a60: 74 63 2e 20 55 73 65 20 74 68 65 0a 3c 73 74 72  tc. Use the.<str
7a70: 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  ong>tls::ciphers
7a80: 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73  </strong> and <s
7a90: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f  trong>tls::proto
7aa0: 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f  cols</strong> co
7ab0: 6d 6d 61 6e 64 73 20 74 6f 0a 6f 62 74 61 69 6e  mmands to.obtain
7ac0: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 76   the supported v
7ad0: 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68  ersions.</p>..<h
7ae0: 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 41  3><a name="SEE A
7af0: 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61  LSO">SEE ALSO</a
7b00: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f  ></h3>..<p><stro
7b10: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  ng>socket</stron
7b20: 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65  g>, <strong>file
7b30: 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e  event, </strong>
7b40: 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a.href="http://
7b50: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
7b60: 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53  "><strong>OpenSS
7b70: 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f  L</strong></a></
7b80: 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a  p>..<hr>..<pre>.
7b90: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
7ba0: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61   1999 Matt Newma
7bb0: 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f  n..Copyright &co
7bc0: 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73  py; 2004 Starfis
7bd0: 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65  h Systems..</pre
7be0: 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c  >.</body>.</html
7bf0: 3e 0a                                            >.