Hex Artifact Content

Artifact 25e640356c4eab6763321f25336cdc059c67c749eaf7f6889e08e2ce8685bac8:

Wiki page [Documentation] by bohagan on 2025-10-12 19:07:31.
0000: 44 20 32 30 32 35 2d 31 30 2d 31 32 54 31 39 3a  D 2025-10-12T19:
0010: 30 37 3a 33 31 2e 30 32 39 0a 4c 20 44 6f 63 75  07:31.029.L Docu
0020: 6d 65 6e 74 61 74 69 6f 6e 0a 50 20 30 38 36 37  mentation.P 0867
0030: 65 31 36 63 62 31 66 32 33 35 36 62 38 61 37 31  e16cb1f2356b8a71
0040: 35 61 32 65 62 65 30 66 33 37 36 37 63 36 33 31  5a2ebe0f3767c631
0050: 35 34 38 34 36 30 35 35 36 33 66 66 34 36 62 62  5484605563ff46bb
0060: 38 64 37 31 62 34 62 30 31 64 30 33 0a 55 20 62  8d71b4b01d03.U b
0070: 6f 68 61 67 61 6e 0a 57 20 35 36 34 33 36 0a 3c  ohagan.W 56436.<
0080: 74 69 74 6c 65 3e 74 6c 73 20 2d 20 54 63 6c 20  title>tls - Tcl 
0090: 54 4c 53 20 65 78 74 65 6e 73 69 6f 6e 3c 2f 74  TLS extension</t
00a0: 69 74 6c 65 3e 0d 0a 0d 0a 3c 68 31 20 63 6c 61  itle>....<h1 cla
00b0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 69 74  ss="doctools_tit
00c0: 6c 65 22 3e 74 6c 73 28 6e 29 20 32 2e 30 62 32  le">tls(n) 2.0b2
00d0: 20 74 6c 73 20 26 71 75 6f 74 3b 54 63 6c 20 54   tls &quot;Tcl T
00e0: 4c 53 20 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f  LS extension&quo
00f0: 74 3b 3c 2f 68 31 3e 0d 0a 3c 64 69 76 20 69 64  t;</h1>..<div id
0100: 3d 22 6e 61 6d 65 22 20 63 6c 61 73 73 3d 22 64  ="name" class="d
0110: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
0120: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61  ><h2><a name="na
0130: 6d 65 22 3e 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32  me">Name</a></h2
0140: 3e 0d 0a 3c 70 3e 74 6c 73 20 2d 20 62 69 6e 64  >..<p>tls - bind
0150: 69 6e 67 20 74 6f 20 74 68 65 20 4f 70 65 6e 53  ing to the OpenS
0160: 53 4c 20 6c 69 62 72 61 72 79 20 66 6f 72 20 65  SL library for e
0170: 6e 63 72 79 70 74 65 64 20 73 6f 63 6b 65 74 20  ncrypted socket 
0180: 61 6e 64 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20  and I/O channel 
0190: 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 3c 2f  communications</
01a0: 70 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76  p>..</div>..<div
01b0: 20 69 64 3d 22 74 6f 63 22 20 63 6c 61 73 73 3d   id="toc" class=
01c0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
01d0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
01e0: 74 6f 63 22 3e 54 61 62 6c 65 20 4f 66 20 43 6f  toc">Table Of Co
01f0: 6e 74 65 6e 74 73 3c 2f 61 3e 3c 2f 68 32 3e 0d  ntents</a></h2>.
0200: 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<ul class="doct
0210: 6f 6f 6c 73 5f 74 6f 63 22 3e 0d 0a 3c 6c 69 20  ools_toc">..<li 
0220: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0230: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0240: 3d 22 23 74 6f 63 22 3e 54 61 62 6c 65 20 4f 66  ="#toc">Table Of
0250: 20 43 6f 6e 74 65 6e 74 73 3c 2f 61 3e 3c 2f 6c   Contents</a></l
0260: 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  i>..<li class="d
0270: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
0280: 3e 3c 61 20 68 72 65 66 3d 22 23 73 79 6e 6f 70  ><a href="#synop
0290: 73 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f 61  sis">Synopsis</a
02a0: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73  ></li>..<li clas
02b0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
02c0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
02d0: 65 63 74 69 6f 6e 31 22 3e 44 65 73 63 72 69 70  ection1">Descrip
02e0: 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c  tion</a></li>..<
02f0: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0300: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  ls_section"><a h
0310: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 32 22 3e  ref="#section2">
0320: 43 6f 6d 70 61 74 69 62 69 6c 69 74 79 3c 2f 61  Compatibility</a
0330: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73  ></li>..<li clas
0340: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
0350: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0360: 65 63 74 69 6f 6e 33 22 3e 43 6f 6d 6d 61 6e 64  ection3">Command
0370: 73 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20  s</a></li>..<li 
0380: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0390: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
03a0: 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65 72  ="#section4">Cer
03b0: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
03c0: 69 6f 6e 3c 2f 61 3e 0d 0a 3c 75 6c 3e 0d 0a 3c  ion</a>..<ul>..<
03d0: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
03e0: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
03f0: 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74  a href="#subsect
0400: 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65  ion1">PKI and Ce
0410: 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f  rtificates</a></
0420: 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  li>..<li class="
0430: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74  doctools_subsect
0440: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0450: 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d  ubsection2">Summ
0460: 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c  ary of command l
0470: 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c  ine options</a><
0480: 2f 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73 3d  /li>..<li class=
0490: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63  "doctools_subsec
04a0: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
04b0: 73 75 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65  subsection3">Whe
04c0: 6e 20 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69  n are command li
04d0: 6e 65 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65  ne options neede
04e0: 64 3f 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75  d?</a></li>..</u
04f0: 6c 3e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20 63  l>..</li>..<li c
0500: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0510: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0520: 22 23 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c  "#section5">Call
0530: 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e  back Options</a>
0540: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 20 63 6c 61 73  ..<ul>..<li clas
0550: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
0560: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0570: 22 23 73 75 62 73 65 63 74 69 6f 6e 34 22 3e 56  "#subsection4">V
0580: 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d 6d 61 6e  alues for Comman
0590: 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f  d Callback</a></
05a0: 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  li>..<li class="
05b0: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74  doctools_subsect
05c0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
05d0: 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 61 6c 75  ubsection5">Valu
05e0: 65 73 20 66 6f 72 20 50 61 73 73 77 6f 72 64 20  es for Password 
05f0: 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69  Callback</a></li
0600: 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  >..<li class="do
0610: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f  ctools_subsectio
0620: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62  n"><a href="#sub
0630: 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65 73  section6">Values
0640: 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43 6f   for Validate Co
0650: 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  mmand Callback</
0660: 61 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a  a></li>..</ul>..
0670: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73  </li>..<li class
0680: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
0690: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  on"><a href="#se
06a0: 63 74 69 6f 6e 36 22 3e 44 65 62 75 67 3c 2f 61  ction6">Debug</a
06b0: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73  ></li>..<li clas
06c0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
06d0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
06e0: 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d 70 6c 65  ection7">Example
06f0: 73 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20  s</a></li>..<li 
0700: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0710: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0720: 3d 22 23 73 65 63 74 69 6f 6e 38 22 3e 53 70 65  ="#section8">Spe
0730: 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 61 74 69  cial Considerati
0740: 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c  ons</a></li>..<l
0750: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0760: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0770: 65 66 3d 22 23 73 65 63 74 69 6f 6e 39 22 3e 45  ef="#section9">E
0780: 72 72 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f 61  rror Messages</a
0790: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73  ></li>..<li clas
07a0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
07b0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
07c0: 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73  ee-also">See Als
07d0: 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 20  o</a></li>..<li 
07e0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
07f0: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0800: 3d 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79  ="#keywords">Key
0810: 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a  words</a></li>..
0820: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0830: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0840: 68 72 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22  href="#category"
0850: 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c  >Category</a></l
0860: 69 3e 0d 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  i>..<li class="d
0870: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
0880: 3e 3c 61 20 68 72 65 66 3d 22 23 63 6f 70 79 72  ><a href="#copyr
0890: 69 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c  ight">Copyright<
08a0: 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d  /a></li>..</ul>.
08b0: 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76 20 69 64  .</div>..<div id
08c0: 3d 22 73 79 6e 6f 70 73 69 73 22 20 63 6c 61 73  ="synopsis" clas
08d0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
08e0: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
08f0: 3d 22 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e 6f  ="synopsis">Syno
0900: 70 73 69 73 3c 2f 61 3e 3c 2f 68 32 3e 0d 0a 3c  psis</a></h2>..<
0910: 64 69 76 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  div class="docto
0920: 6f 6c 73 5f 73 79 6e 6f 70 73 69 73 22 3e 0d 0a  ols_synopsis">..
0930: 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <ul class="docto
0940: 6f 6c 73 5f 72 65 71 75 69 72 65 6d 65 6e 74 73  ols_requirements
0950: 22 3e 0d 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20  ">..<li>package 
0960: 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73  require <b class
0970: 3d 22 70 6b 67 6e 61 6d 65 22 3e 54 63 6c 20 38  ="pkgname">Tcl 8
0980: 2e 35 2d 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c  .5-</b></li>..<l
0990: 69 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  i>package requir
09a0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e  e <b class="pkgn
09b0: 61 6d 65 22 3e 74 6c 73 20 32 2e 30 62 32 3c 2f  ame">tls 2.0b2</
09c0: 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a  b></li>..</ul>..
09d0: 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <ul class="docto
09e0: 6f 6c 73 5f 73 79 6e 74 61 78 22 3e 0d 0a 3c 6c  ols_syntax">..<l
09f0: 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 22 3e 3c  i><a href="#1"><
0a00: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
0a10: 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 61  s::init</b> <spa
0a20: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
0a30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
0a40: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  ption</i>?</span
0a50: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
0a60: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
0a70: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f  rg">value</i>?</
0a80: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
0a90: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
0aa0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20  s="arg">-option 
0ab0: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f  value ...</i>?</
0ac0: 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a  span></a></li>..
0ad0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 32 22  <li><a href="#2"
0ae0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
0af0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
0b00: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
0b10: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
0b20: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
0b30: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
0b40: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
0b50: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
0b60: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
0b70: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
0b80: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
0b90: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
0ba0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
0bb0: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69  ss="arg">host</i
0bc0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
0bd0: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c  >port</i></a></l
0be0: 69 3e 0d 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  i>..<li><a href=
0bf0: 22 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  "#3"><b class="c
0c00: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
0c10: 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  /b> <b class="op
0c20: 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62  tion">-server</b
0c30: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
0c40: 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70  >command</i> <sp
0c50: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
0c60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
0c70: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
0c80: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
0c90: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
0ca0: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
0cb0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
0cc0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
0cd0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
0ce0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
0cf0: 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d  /span> <i class=
0d00: 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f  "arg">port</i></
0d10: 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 61 20  a></li>..<li><a 
0d20: 68 72 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c 61  href="#4"><b cla
0d30: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d  ss="cmd">tls::im
0d40: 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  port</b> <i clas
0d50: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
0d60: 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /i> <span class=
0d70: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
0d80: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
0d90: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
0da0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
0db0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
0dc0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
0dd0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
0de0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
0df0: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
0e00: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61  .</i>?</span></a
0e10: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 61 20 68  ></li>..<li><a h
0e20: 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73  ref="#5"><b clas
0e30: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61  s="cmd">tls::sta
0e40: 72 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c 61  rttls</b> <i cla
0e50: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
0e60: 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  </i> <span class
0e70: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
0e80: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f  ="arg">-option</
0e90: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
0ea0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
0eb0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c   class="arg">val
0ec0: 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  ue</i>?</span> <
0ed0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
0ee0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
0ef0: 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e  >-option value .
0f00: 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f  ..</i>?</span></
0f10: 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 61 20  a></li>..<li><a 
0f20: 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63 6c 61  href="#6"><b cla
0f30: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61  ss="cmd">tls::ha
0f40: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63  ndshake</b> <i c
0f50: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
0f60: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0d  el</i></a></li>.
0f70: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 37  .<li><a href="#7
0f80: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
0f90: 3e 74 6c 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f  >tls::shutdown</
0fa0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
0fb0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
0fc0: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 61 20 68  ></li>..<li><a h
0fd0: 72 65 66 3d 22 23 38 22 3e 3c 62 20 63 6c 61 73  ref="#8"><b clas
0fe0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69  s="cmd">tls::uni
0ff0: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  mport</b> <i cla
1000: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
1010: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c  </i></a></li>..<
1020: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 39 22 3e  li><a href="#9">
1030: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1040: 6c 73 3a 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e 20  ls::unstack</b> 
1050: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
1060: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f  hannel</i></a></
1070: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  li>..<li><a href
1080: 3d 22 23 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d  ="#10"><b class=
1090: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75  "cmd">tls::statu
10a0: 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  s</b> <span clas
10b0: 73 3d 22 6f 70 74 22 3e 3f 3c 62 20 63 6c 61 73  s="opt">?<b clas
10c0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61  s="option">-loca
10d0: 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  l</b>?</span> <i
10e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
10f0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69  nnel</i></a></li
1100: 3e 0d 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  >..<li><a href="
1110: 23 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  #11"><b class="c
1120: 6d 64 22 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74  md">tls::connect
1130: 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ion</b> <i class
1140: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
1150: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  i></a></li>..<li
1160: 3e 3c 61 20 68 72 65 66 3d 22 23 31 32 22 3e 3c  ><a href="#12"><
1170: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1180: 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c  s::ciphers</b> <
1190: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
11a0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
11b0: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f  >protocol</i>?</
11c0: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
11d0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
11e0: 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c  s="arg">verbose<
11f0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1200: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1210: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75  i class="arg">su
1220: 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70  pported</i>?</sp
1230: 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c  an></a></li>..<l
1240: 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 33 22 3e  i><a href="#13">
1250: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1260: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
1270: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  ></a></li>..<li>
1280: 3c 61 20 68 72 65 66 3d 22 23 31 34 22 3e 3c 62  <a href="#14"><b
1290: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
12a0: 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61  ::version</b></a
12b0: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c  ></li>..</ul>..<
12c0: 2f 64 69 76 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c  /div>..</div>..<
12d0: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 31  div id="section1
12e0: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
12f0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
1300: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 31  a name="section1
1310: 22 3e 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61  ">Description</a
1320: 3e 3c 2f 68 32 3e 0d 0a 3c 70 3e 54 68 69 73 20  ></h2>..<p>This 
1330: 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64  extension provid
1340: 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 63  es TCL script ac
1350: 63 65 73 73 20 74 6f 20 53 65 63 75 72 65 20 53  cess to Secure S
1360: 6f 63 6b 65 74 20 4c 61 79 65 72 20 28 53 53 4c  ocket Layer (SSL
1370: 29 0d 0a 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e  )..communication
1380: 73 20 75 73 69 6e 67 20 74 68 65 20 54 72 61 6e  s using the Tran
1390: 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65 63 75  sport Layer Secu
13a0: 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f 74 6f  rity (TLS) proto
13b0: 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64 65 73  col. It provides
13c0: 20 61 0d 0a 67 65 6e 65 72 69 63 20 62 69 6e 64   a..generic bind
13d0: 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 3d 22  ing to <a href="
13e0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e  https://www.open
13f0: 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53  ssl.org/">OpenSS
1400: 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67  L</a>, utilizing
1410: 20 74 68 65 0d 0a 3c 62 20 63 6c 61 73 73 3d 22   the..<b class="
1420: 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74 61 63  syscmd">Tcl_Stac
1430: 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49  kChannel</b> API
1440: 20 69 6e 20 54 43 4c 20 38 2e 34 20 6f 72 20 6c   in TCL 8.4 or l
1450: 61 74 65 72 2e 20 54 68 65 73 65 20 73 6f 63 6b  ater. These sock
1460: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74  ets behave exact
1470: 6c 79 0d 0a 74 68 65 20 73 61 6d 65 20 61 73 20  ly..the same as 
1480: 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64  channels created
1490: 20 75 73 69 6e 67 20 74 68 65 20 62 75 69 6c 74   using the built
14a0: 2d 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 73 79  -in <b class="sy
14b0: 73 63 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e  scmd">socket</b>
14c0: 20 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 0d 0a 70   command, but..p
14d0: 72 6f 76 69 64 65 20 61 64 64 69 74 69 6f 6e 61  rovide additiona
14e0: 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f  l options for co
14f0: 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53  ntrolling the SS
1500: 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c 2f  L/TLS session.</
1510: 70 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76  p>..</div>..<div
1520: 20 69 64 3d 22 73 65 63 74 69 6f 6e 32 22 20 63   id="section2" c
1530: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
1540: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e  ection"><h2><a n
1550: 61 6d 65 3d 22 73 65 63 74 69 6f 6e 32 22 3e 43  ame="section2">C
1560: 6f 6d 70 61 74 69 62 69 6c 69 74 79 3c 2f 61 3e  ompatibility</a>
1570: 3c 2f 68 32 3e 0d 0a 3c 70 3e 54 68 69 73 20 65  </h2>..<p>This e
1580: 78 74 65 6e 73 69 6f 6e 20 69 73 20 63 6f 6d 70  xtension is comp
1590: 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e  atible with Open
15a0: 53 53 4c 20 31 2e 31 2e 31 20 6f 72 20 6c 61 74  SSL 1.1.1 or lat
15b0: 65 72 2e 20 49 74 20 72 65 71 75 69 72 65 73 20  er. It requires 
15c0: 54 63 6c 0d 0a 76 65 72 73 69 6f 6e 20 38 2e 35  Tcl..version 8.5
15d0: 20 6f 72 20 6c 61 74 65 72 20 61 6e 64 20 77 69   or later and wi
15e0: 6c 6c 20 77 6f 72 6b 20 77 69 74 68 20 54 63 6c  ll work with Tcl
15f0: 20 39 2e 30 2e 3c 2f 70 3e 0d 0a 3c 2f 64 69 76   9.0.</p>..</div
1600: 3e 0d 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  >..<div id="sect
1610: 69 6f 6e 33 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion3" class="doc
1620: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
1630: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
1640: 69 6f 6e 33 22 3e 43 6f 6d 6d 61 6e 64 73 3c 2f  ion3">Commands</
1650: 61 3e 3c 2f 68 32 3e 0d 0a 3c 70 3e 54 68 65 20  a></h2>..<p>The 
1660: 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 74 68  following are th
1670: 65 20 63 6f 6d 6d 61 6e 64 73 20 70 72 6f 76 69  e commands provi
1680: 64 65 64 20 62 79 20 74 68 65 20 54 63 4c 54 4c  ded by the TcLTL
1690: 53 20 70 61 63 6b 61 67 65 2e 20 53 65 65 0d 0a  S package. See..
16a0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
16b0: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
16c0: 73 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d 70 6c  section7">Exampl
16d0: 65 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f  es</a></span> fo
16e0: 72 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 20  r example usage 
16f0: 61 6e 64 20 74 68 65 20 26 71 75 6f 74 3b 3c 62  and the &quot;<b
1700: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 64 65   class="file">de
1710: 6d 6f 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 64 69  mos</b>&quot; di
1720: 72 65 63 74 6f 72 79 20 66 6f 72 0d 0a 6d 6f 72  rectory for..mor
1730: 65 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 2e  e example usage.
1740: 3c 2f 70 3e 0d 0a 3c 64 6c 20 63 6c 61 73 73 3d  </p>..<dl class=
1750: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69  "doctools_defini
1760: 74 69 6f 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 61 20  tions">..<dt><a 
1770: 6e 61 6d 65 3d 22 31 22 3e 3c 62 20 63 6c 61 73  name="1"><b clas
1780: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6e 69  s="cmd">tls::ini
1790: 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  t</b> <span clas
17a0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
17b0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
17c0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
17d0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
17e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
17f0: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1800: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1810: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1820: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1830: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
1840: 2f 61 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /a></dt>..<dd><p
1850: 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74 69  >Optional functi
1860: 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20 64 65  on to set the de
1870: 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75 73  fault options us
1880: 65 64 20 62 79 20 3c 62 20 63 6c 61 73 73 3d 22  ed by <b class="
1890: 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  cmd">tls::socket
18a0: 3c 2f 62 3e 2e 20 49 66 20 79 6f 75 0d 0a 63 61  </b>. If you..ca
18b0: 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  ll <b class="cmd
18c0: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
18d0: 3e 20 64 69 72 65 63 74 6c 79 2c 20 74 68 65 20  > directly, the 
18e0: 76 61 6c 75 65 73 20 73 65 74 20 62 79 20 74 68  values set by th
18f0: 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76 65 20  is command have 
1900: 6e 6f 20 65 66 66 65 63 74 2e 0d 0a 54 68 69 73  no effect...This
1910: 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74   command support
1920: 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61 6d  s all of the sam
1930: 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65  e options as the
1940: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
1950: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
1960: 63 6f 6d 6d 61 6e 64 2c 0d 0a 74 68 6f 75 67 68  command,..though
1970: 20 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69   you should limi
1980: 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74  t your options t
1990: 6f 20 6f 6e 6c 79 20 74 68 65 20 54 4c 53 20 72  o only the TLS r
19a0: 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e  elated ones.</p>
19b0: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 61 20 6e 61  </dd>..<dt><a na
19c0: 6d 65 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d  me="2"><b class=
19d0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
19e0: 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  t</b> <span clas
19f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1a00: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1a10: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1a20: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1a30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1a40: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1a50: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1a60: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1a70: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1a80: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  ...</i>?</span> 
1a90: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68  <i class="arg">h
1aa0: 6f 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73  ost</i> <i class
1ab0: 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c  ="arg">port</i><
1ac0: 2f 61 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /a></dt>..<dd><p
1ad0: 3e 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65  >This is a helpe
1ae0: 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20  r function that 
1af0: 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64  utilizes the und
1b00: 65 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73  erlying commands
1b10: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d   <b class="syscm
1b20: 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 0d 0a 61  d">socket</b>..a
1b30: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  nd <b class="cmd
1b40: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
1b50: 3e 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20  > to create the 
1b60: 63 6f 6e 6e 65 63 74 69 6f 6e 2e 20 49 74 20 62  connection. It b
1b70: 65 68 61 76 65 73 20 74 68 65 20 73 61 6d 65 20  ehaves the same 
1b80: 61 73 20 74 68 65 0d 0a 6e 61 74 69 76 65 20 54  as the..native T
1b90: 43 4c 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73  CL <b class="sys
1ba0: 63 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20  cmd">socket</b> 
1bb0: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73  command, but als
1bc0: 6f 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 3c  o supports the <
1bd0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1be0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 0d 0a 63  s::import</b>..c
1bf0: 6f 6d 6d 61 6e 64 20 6f 70 74 69 6f 6e 73 20 77  ommand options w
1c00: 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e  ith one addition
1c10: 61 6c 20 6f 70 74 69 6f 6e 2e 20 49 74 20 72 65  al option. It re
1c20: 74 75 72 6e 73 20 74 68 65 20 63 68 61 6e 6e 65  turns the channe
1c30: 6c 20 68 61 6e 64 6c 65 20 69 64 0d 0a 66 6f 72  l handle id..for
1c40: 20 74 68 65 20 6e 65 77 20 73 6f 63 6b 65 74 2e   the new socket.
1c50: 20 41 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69   Additional opti
1c60: 6f 6e 73 20 61 72 65 3a 3c 2f 70 3e 0d 0a 3c 64  ons are:</p>..<d
1c70: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
1c80: 73 5f 6f 70 74 69 6f 6e 73 22 3e 0d 0a 3c 64 74  s_options">..<dt
1c90: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
1ca0: 6e 22 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61  n">-autoserverna
1cb0: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
1cc0: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f  "arg">bool</i></
1cd0: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 49 66 20 3c  dt>..<dd><p>If <
1ce0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
1cf0: 74 72 75 65 3c 2f 62 3e 2c 20 61 75 74 6f 6d 61  true</b>, automa
1d00: 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20  tically set the 
1d10: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
1d20: 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62  ">-servername</b
1d30: 3e 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 74 68  > argument to th
1d40: 65 0d 0a 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e  e..<em>host</em>
1d50: 20 61 72 67 75 6d 65 6e 74 2e 20 50 72 69 6f 72   argument. Prior
1d60: 20 74 6f 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20   to TclTLS 2.0, 
1d70: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
1d80: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
1d90: 66 61 6c 73 65 3c 2f 62 3e 2e 0d 0a 53 74 61 72  false</b>...Star
1da0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32  ting in TclTLS 2
1db0: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20  .0, the default 
1dc0: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
1dd0: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 75 6e 6c  st">true</b> unl
1de0: 65 73 73 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  ess <b class="op
1df0: 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d  tion">-servernam
1e00: 65 3c 2f 62 3e 0d 0a 69 73 20 61 6c 73 6f 20 73  e</b>..is also s
1e10: 70 65 63 69 66 69 65 64 2e 3c 2f 70 3e 3c 2f 64  pecified.</p></d
1e20: 64 3e 0d 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0d 0a  d>..</dl></dd>..
1e30: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 33 22 3e  <dt><a name="3">
1e40: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1e50: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c  ls::socket</b> <
1e60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
1e70: 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20  >-server</b> <i 
1e80: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6d 6d  class="arg">comm
1e90: 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c  and</i> <span cl
1ea0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
1eb0: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f  ass="arg">-optio
1ec0: 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  n</i>?</span> <s
1ed0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1ee0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1ef0: 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  value</i>?</span
1f00: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1f10: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1f20: 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75  rg">-option valu
1f30: 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  e ...</i>?</span
1f40: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1f50: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64  >port</i></a></d
1f60: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 53 61 6d 65 20  t>..<dd><p>Same 
1f70: 61 73 20 70 72 65 76 69 6f 75 73 20 63 6f 6d 6d  as previous comm
1f80: 61 6e 64 2c 20 62 75 74 20 69 6e 73 74 65 61 64  and, but instead
1f90: 20 63 72 65 61 74 65 73 20 61 20 73 65 72 76 65   creates a serve
1fa0: 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c 69  r socket for cli
1fb0: 65 6e 74 73 20 74 6f 0d 0a 63 6f 6e 6e 65 63 74  ents to..connect
1fc0: 20 74 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74 68   to just like th
1fd0: 65 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 3d 22  e Tcl <b class="
1fe0: 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 20 2d  syscmd">socket -
1ff0: 73 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d 6d 61  server</b> comma
2000: 6e 64 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74  nd. It returns t
2010: 68 65 0d 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64  he..channel hand
2020: 6c 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65  le id for the ne
2030: 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f 64  w socket.</p></d
2040: 64 3e 0d 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  d>..<dt><a name=
2050: 22 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  "4"><b class="cm
2060: 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  d">tls::import</
2070: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
2080: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73  ">channel</i> <s
2090: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
20a0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
20b0: 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70  -option</i>?</sp
20c0: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  an> <span class=
20d0: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
20e0: 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f  "arg">value</i>?
20f0: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
2100: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
2110: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f  ass="arg">-optio
2120: 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f  n value ...</i>?
2130: 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e  </span></a></dt>
2140: 0d 0a 3c 64 64 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  ..<dd></dd>..<dt
2150: 3e 3c 61 20 6e 61 6d 65 3d 22 35 22 3e 3c 62 20  ><a name="5"><b 
2160: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
2170: 3a 73 74 61 72 74 74 6c 73 3c 2f 62 3e 20 3c 69  :starttls</b> <i
2180: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
2190: 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63  nnel</i> <span c
21a0: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
21b0: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69  lass="arg">-opti
21c0: 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  on</i>?</span> <
21d0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
21e0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
21f0: 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61  >value</i>?</spa
2200: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
2210: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2220: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c  arg">-option val
2230: 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61  ue ...</i>?</spa
2240: 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  n></a></dt>..<dd
2250: 3e 3c 70 3e 53 74 61 72 74 20 54 4c 53 20 65 6e  ><p>Start TLS en
2260: 63 72 79 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20  cryption on TCL 
2270: 63 68 61 6e 6e 65 6c 20 3c 69 20 63 6c 61 73 73  channel <i class
2280: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
2290: 69 3e 20 76 69 61 20 61 20 73 74 61 63 6b 65 64  i> via a stacked
22a0: 20 63 68 61 6e 6e 65 6c 2e 20 49 74 0d 0a 6e 65   channel. It..ne
22b0: 65 64 20 6e 6f 74 20 62 65 20 61 20 73 6f 63 6b  ed not be a sock
22c0: 65 74 2c 20 62 75 74 20 6d 75 73 74 20 70 72 6f  et, but must pro
22d0: 76 69 64 65 20 62 69 2d 64 69 72 65 63 74 69 6f  vide bi-directio
22e0: 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f 20 73  nal flow. Also s
22f0: 65 74 73 20 73 65 73 73 69 6f 6e 0d 0a 70 61 72  ets session..par
2300: 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20  ameters for SSL 
2310: 68 61 6e 64 73 68 61 6b 65 2e 20 56 61 6c 69 64  handshake. Valid
2320: 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 3c 2f 70   options are:</p
2330: 3e 0d 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  >..<dl class="do
2340: 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e  ctools_options">
2350: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
2360: 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62  option">-alpn</b
2370: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2380: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  >list</i></dt>..
2390: 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 70  <dd><p>List of p
23a0: 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65  rotocols to offe
23b0: 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61  r during Applica
23c0: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f  tion-Layer Proto
23d0: 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0d  col Negotiation.
23e0: 0a 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61  .(ALPN). For exa
23f0: 6d 70 6c 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22  mple: <b class="
2400: 63 6f 6e 73 74 22 3e 68 32 3c 2f 62 3e 20 61 6e  const">h2</b> an
2410: 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  d <b class="cons
2420: 74 22 3e 68 74 74 70 2f 31 2e 31 3c 2f 62 3e 2c  t">http/1.1</b>,
2430: 20 62 75 74 20 6e 6f 74 20 3c 62 20 63 6c 61 73   but not <b clas
2440: 73 3d 22 63 6f 6e 73 74 22 3e 68 33 3c 2f 62 3e  s="const">h3</b>
2450: 20 6f 72 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 63   or..<b class="c
2460: 6f 6e 73 74 22 3e 71 75 69 63 3c 2f 62 3e 2e 20  onst">quic</b>. 
2470: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e  This option is n
2480: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
2490: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  8.</p></dd>..<dt
24a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
24b0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69  n">-cadir</b> <i
24c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72   class="arg">dir
24d0: 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0d  ectory</i></dt>.
24e0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
24f0: 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20  s the directory 
2500: 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66  where the Certif
2510: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
2520: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
2530: 73 20 61 72 65 0d 0a 73 74 6f 72 65 64 2e 20 54  s are..stored. T
2540: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c  he default is pl
2550: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20  atform specific 
2560: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61  and can be set a
2570: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20  t compile time. 
2580: 54 68 65 0d 0a 64 65 66 61 75 6c 74 20 6c 6f 63  The..default loc
2590: 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65  ation can be ove
25a0: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c  rridden by the <
25b0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
25c0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c  e">SSL_CERT_DIR<
25d0: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0d  /b> environment.
25e0: 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c  .variable. See <
25f0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
2600: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
2610: 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69  ection4">Certifi
2620: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
2630: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
2640: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e  ore details.</p>
2650: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  </dd>..<dt><b cl
2660: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
2670: 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  file</b> <i clas
2680: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65  s="arg">filename
2690: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
26a0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
26b0: 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 43 65  file with the Ce
26c0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
26d0: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69  ity (CA) certifi
26e0: 63 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0d  cates to use in.
26f0: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
2700: 22 3e 50 45 4d 3c 2f 62 3e 20 66 69 6c 65 20 66  ">PEM</b> file f
2710: 6f 72 6d 61 74 2e 20 54 68 65 20 64 65 66 61 75  ormat. The defau
2720: 6c 74 20 69 73 20 26 71 75 6f 74 3b 3c 62 20 63  lt is &quot;<b c
2730: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63 65 72 74  lass="file">cert
2740: 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20  .pem</b>&quot;, 
2750: 69 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c 0d 0a  in the OpenSSL..
2760: 64 69 72 65 63 74 6f 72 79 2e 20 54 68 65 20 64  directory. The d
2770: 65 66 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20  efault file can 
2780: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79  be overridden by
2790: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76   the <b class="v
27a0: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52  ariable">SSL_CER
27b0: 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72  T_FILE</b> envir
27c0: 6f 6e 6d 65 6e 74 0d 0a 76 61 72 69 61 62 6c 65  onment..variable
27d0: 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73  . See <span clas
27e0: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
27f0: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e  ref="#section4">
2800: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69  Certificate Vali
2810: 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e  dation</a></span
2820: 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69  > for more detai
2830: 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  ls.</p></dd>..<d
2840: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
2850: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e  on">-castore</b>
2860: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
2870: 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64  URI</i></dt>..<d
2880: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
2890: 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75  he Uniform Resou
28a0: 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28  rce Identifier (
28b0: 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72  URI) for the Cer
28c0: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
28d0: 74 79 0d 0a 28 43 41 29 20 73 74 6f 72 65 2c 20  ty..(CA) store, 
28e0: 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73  which may be a s
28f0: 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20  ingle container 
2900: 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20  or a catalog of 
2910: 63 6f 6e 74 61 69 6e 65 72 73 2e 0d 0a 53 74 61  containers...Sta
2920: 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53  rting with OpenS
2930: 53 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e  SL 3.2 on MS Win
2940: 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 71 75  dows, set to &qu
2950: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  ot;<b class="con
2960: 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e  st">org.openssl.
2970: 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26  winstore://</b>&
2980: 71 75 6f 74 3b 0d 0a 74 6f 20 75 73 65 20 74 68  quot;..to use th
2990: 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69  e built-in MS Wi
29a0: 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74  ndows Certificat
29b0: 65 20 53 74 6f 72 65 2e 0d 0a 53 65 65 20 3c 73  e Store...See <s
29c0: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
29d0: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
29e0: 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63  ction4">Certific
29f0: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f  ate Validation</
2a00: 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f  a></span> for mo
2a10: 72 65 20 64 65 74 61 69 6c 73 2e 0d 0a 54 68 69  re details...Thi
2a20: 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20  s option is new 
2a30: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
2a40: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62  /p></dd>..<dt><b
2a50: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
2a60: 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 3c 69  -certfile</b> <i
2a70: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c   class="arg">fil
2a80: 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  ename</i></dt>..
2a90: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
2aa0: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65   the name of the
2ab0: 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 63   file with the c
2ac0: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73  ertificate to us
2ad0: 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0d  e in PEM format.
2ae0: 0a 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 63  .as the local (c
2af0: 6c 69 65 6e 74 20 6f 72 20 73 65 72 76 65 72 29  lient or server)
2b00: 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 49 74   certificate. It
2b10: 20 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74   also contains t
2b20: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f  he public key.</
2b30: 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20  p></dd>..<dt><b 
2b40: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
2b50: 63 65 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  cert</b> <i clas
2b60: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
2b70: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
2b80: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 65  Specifies the ce
2b90: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65  rtificate to use
2ba0: 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65   as a DER encode
2bb0: 64 20 73 74 72 69 6e 67 20 28 58 2e 35 30 39 20  d string (X.509 
2bc0: 44 45 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  DER).</p></dd>..
2bd0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
2be0: 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72 3c 2f 62  tion">-cipher</b
2bf0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2c00: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  >string</i></dt>
2c10: 0d 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  ..<dd><p>Specifi
2c20: 65 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63  es the list of c
2c30: 69 70 68 65 72 73 20 74 6f 20 75 73 65 20 66 6f  iphers to use fo
2c40: 72 20 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 61  r TLS 1.2 and ea
2c50: 72 6c 69 65 72 20 63 6f 6e 6e 65 63 74 69 6f 6e  rlier connection
2c60: 73 2e 0d 0a 53 74 72 69 6e 67 20 69 73 20 61 20  s...String is a 
2c70: 63 6f 6c 6f 6e 20 26 71 75 6f 74 3b 3c 62 20 63  colon &quot;<b c
2c80: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f  lass="const">:</
2c90: 62 3e 26 71 75 6f 74 3b 20 73 65 70 61 72 61 74  b>&quot; separat
2ca0: 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65  ed list of ciphe
2cb0: 72 73 2e 0d 0a 43 69 70 68 65 72 73 20 63 61 6e  rs...Ciphers can
2cc0: 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 75 73 69   be combined usi
2cd0: 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 3c 62 20  ng the &quot;<b 
2ce0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c  class="const">+<
2cf0: 2f 62 3e 26 71 75 6f 74 3b 20 63 68 61 72 61 63  /b>&quot; charac
2d00: 74 65 72 2e 0d 0a 50 72 65 66 69 78 65 73 20 63  ter...Prefixes c
2d10: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 65  an be used to pe
2d20: 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d 6f 76 65  rmanently remove
2d30: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
2d40: 22 63 6f 6e 73 74 22 3e 21 3c 2f 62 3e 26 71 75  "const">!</b>&qu
2d50: 6f 74 3b 2c 20 64 65 6c 65 74 65 20 26 71 75 6f  ot;, delete &quo
2d60: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  t;<b class="cons
2d70: 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20  t">-</b>&quot;, 
2d80: 6f 72 0d 0a 6d 6f 76 65 20 74 6f 20 74 68 65 20  or..move to the 
2d90: 65 6e 64 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61  end &quot;<b cla
2da0: 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c 2f 62 3e  ss="const">+</b>
2db0: 26 71 75 6f 74 3b 20 61 20 73 70 65 63 69 66 69  &quot; a specifi
2dc0: 65 64 20 63 69 70 68 65 72 2e 0d 0a 4b 65 79 77  ed cipher...Keyw
2dd0: 6f 72 64 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  ords <b class="c
2de0: 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47 54 48 3c  onst">@STRENGTH<
2df0: 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67  /b> (sort by alg
2e00: 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 74  orithm key lengt
2e10: 68 29 2c 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 63  h),..<b class="c
2e20: 6f 6e 73 74 22 3e 40 53 45 43 4c 45 56 45 4c 3d  onst">@SECLEVEL=
2e30: 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20 28  </b><em>n</em> (
2e40: 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76  set security lev
2e50: 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0d 0a 3c  el to n), and..<
2e60: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
2e70: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65  DEFAULT</b> (use
2e80: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20   default cipher 
2e90: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f  list, at start o
2ea0: 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 65  nly) can also be
2eb0: 20 73 70 65 63 69 66 69 65 64 2e 0d 0a 53 65 65   specified...See
2ec0: 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74   the <a href="ht
2ed0: 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73  tps://docs.opens
2ee0: 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61  sl.org/master/ma
2ef0: 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65  n1/openssl-ciphe
2f00: 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65  rs/#options">Ope
2f10: 6e 53 53 4c 3c 2f 61 3e 0d 0a 64 6f 63 75 6d 65  nSSL</a>..docume
2f20: 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20  ntation for the 
2f30: 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c  full list of val
2f40: 69 64 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f  id values.</p></
2f50: 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  dd>..<dt><b clas
2f60: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68  s="option">-ciph
2f70: 65 72 73 75 69 74 65 73 3c 2f 62 3e 20 3c 69 20  ersuites</b> <i 
2f80: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
2f90: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  ng</i></dt>..<dd
2fa0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
2fb0: 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  e list of cipher
2fc0: 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 20 66   suites to use f
2fd0: 6f 72 20 54 4c 53 20 31 2e 33 20 61 73 20 61 20  or TLS 1.3 as a 
2fe0: 63 6f 6c 6f 6e 0d 0a 26 71 75 6f 74 3b 3c 62 20  colon..&quot;<b 
2ff0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c  class="const">:<
3000: 2f 62 3e 26 71 75 6f 74 3b 20 73 65 70 61 72 61  /b>&quot; separa
3010: 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68  ted list of ciph
3020: 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20  er suite names. 
3030: 53 65 65 20 74 68 65 0d 0a 3c 61 20 68 72 65 66  See the..<a href
3040: 3d 22 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f  ="https://docs.o
3050: 70 65 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65  penssl.org/maste
3060: 72 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63  r/man1/openssl-c
3070: 69 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22  iphers/#options"
3080: 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 0d 0a 64 6f  >OpenSSL</a>..do
3090: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20  cumentation for 
30a0: 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66  the full list of
30b0: 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 0d 0a   valid values...
30c0: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e  This option is n
30d0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
30e0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  8.</p></dd>..<dt
30f0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3100: 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20  n">-command</b> 
3110: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
3120: 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e  allback</i></dt>
3130: 0d 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  ..<dd><p>Specifi
3140: 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20  es the callback 
3150: 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65 20 69 6e  command to be in
3160: 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c  voked at several
3170: 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74   points during t
3180: 68 65 0d 0a 68 61 6e 64 73 68 61 6b 65 20 74 6f  he..handshake to
3190: 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 74 72   pass errors, tr
31a0: 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f  acing informatio
31b0: 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f 6c 20  n, and protocol 
31c0: 6d 65 73 73 61 67 65 73 2e 0d 0a 53 65 65 20 3c  messages...See <
31d0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
31e0: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
31f0: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63  ection5">Callbac
3200: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73  k Options</a></s
3210: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e  pan> for more in
3220: 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  fo.</p></dd>..<d
3230: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3240: 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f 62  on">-dhparams</b
3250: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
3260: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >filename</i></d
3270: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  t>..<dd><p>Speci
3280: 66 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d  fies the Diffie-
3290: 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72  Hellman (DH) par
32a0: 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70  ameters file.</p
32b0: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
32c0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b  lass="option">-k
32d0: 65 79 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c  eyfile</b> <i cl
32e0: 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61  ass="arg">filena
32f0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  me</i></dt>..<dd
3300: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
3310: 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 69  e private key fi
3320: 6c 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  le. The default 
3330: 69 73 20 74 6f 20 75 73 65 20 74 68 65 20 66 69  is to use the fi
3340: 6c 65 0d 0a 73 70 65 63 69 66 69 65 64 20 62 79  le..specified by
3350: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
3360: 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65  ption">-certfile
3370: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e  </b> option.</p>
3380: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  </dd>..<dt><b cl
3390: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65  ass="option">-ke
33a0: 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  y</b> <i class="
33b0: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
33c0: 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 53 70 65  /dt>..<dd><p>Spe
33d0: 63 69 66 69 65 73 20 74 68 65 20 70 72 69 76 61  cifies the priva
33e0: 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73  te key to use as
33f0: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73   a DER encoded s
3400: 74 72 69 6e 67 20 28 50 4b 43 53 23 31 20 44 45  tring (PKCS#1 DE
3410: 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  R).</p></dd>..<d
3420: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3430: 6f 6e 22 3e 2d 6d 6f 64 65 6c 3c 2f 62 3e 20 3c  on">-model</b> <
3440: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
3450: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  annel</i></dt>..
3460: 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 20 74 68 69  <dd><p>Force thi
3470: 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61  s channel to sha
3480: 72 65 20 74 68 65 20 73 61 6d 65 20 3c 69 20 63  re the same <i c
3490: 6c 61 73 73 3d 22 74 65 72 6d 22 3e 53 53 4c 5f  lass="term">SSL_
34a0: 43 54 58 3c 2f 69 3e 20 73 74 72 75 63 74 75 72  CTX</i> structur
34b0: 65 20 61 73 20 74 68 65 0d 0a 73 70 65 63 69 66  e as the..specif
34c0: 69 65 64 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  ied <i class="ar
34d0: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2c 20  g">channel</i>, 
34e0: 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 73 68  and therefore sh
34f0: 61 72 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c 6c  are config, call
3500: 62 61 63 6b 73 2c 20 65 74 63 2e 3c 2f 70 3e 3c  backs, etc.</p><
3510: 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  /dd>..<dt><b cla
3520: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73  ss="option">-pas
3530: 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  sword</b> <i cla
3540: 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61 63  ss="arg">callbac
3550: 6b 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  k</i></dt>..<dd>
3560: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
3570: 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e   callback comman
3580: 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e  d to invoke when
3590: 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 74   OpenSSL needs t
35a0: 6f 20 6f 62 74 61 69 6e 20 61 0d 0a 70 61 73 73  o obtain a..pass
35b0: 77 6f 72 64 2e 20 54 68 69 73 20 69 73 20 74 79  word. This is ty
35c0: 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 6f 20  pically used to 
35d0: 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61  unlock the priva
35e0: 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74  te key of a cert
35f0: 69 66 69 63 61 74 65 2e 0d 0a 54 68 65 20 63 61  ificate...The ca
3600: 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65  llback should re
3610: 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 20  turn a password 
3620: 73 74 72 69 6e 67 2e 20 54 68 69 73 20 6f 70 74  string. This opt
3630: 69 6f 6e 20 68 61 73 20 63 68 61 6e 67 65 64 20  ion has changed 
3640: 66 6f 72 0d 0a 54 63 6c 54 4c 53 20 31 2e 38 2e  for..TclTLS 1.8.
3650: 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73   See <span class
3660: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
3670: 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e 43  ef="#section5">C
3680: 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c  allback Options<
3690: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
36a0: 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64  ore info.</p></d
36b0: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
36c0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f  ="option">-post_
36d0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69  handshake</b> <i
36e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
36f0: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  l</i></dt>..<dd>
3700: 3c 70 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61  <p>Allow post-ha
3710: 6e 64 73 68 61 6b 65 20 73 65 73 73 69 6f 6e 20  ndshake session 
3720: 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e 20  ticket updates. 
3730: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e  This option is n
3740: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
3750: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  8.</p></dd>..<dt
3760: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3770: 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20  n">-request</b> 
3780: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
3790: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64  ool</i></dt>..<d
37a0: 64 3e 3c 70 3e 52 65 71 75 65 73 74 20 61 20 63  d><p>Request a c
37b0: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20  ertificate from 
37c0: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20  the peer during 
37d0: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b  the SSL handshak
37e0: 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 65  e. This is neede
37f0: 64 0d 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69  d..to do Certifi
3800: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e  cate Validation.
3810: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c   Starting in Tcl
3820: 54 4c 53 20 31 2e 38 2c 20 74 68 65 20 64 65 66  TLS 1.8, the def
3830: 61 75 6c 74 20 69 73 0d 0a 3c 62 20 63 6c 61 73  ault is..<b clas
3840: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f  s="const">true</
3850: 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f  b> for client co
3860: 6e 6e 65 63 74 69 6f 6e 73 2e 20 53 74 61 72 74  nnections. Start
3870: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e  ing in TclTLS 2.
3880: 30 2c 20 69 66 20 73 65 74 20 74 6f 0d 0a 3c 62  0, if set to..<b
3890: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66   class="const">f
38a0: 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 20 3c 62 20  alse</b> and <b 
38b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
38c0: 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73 20 3c  require</b> is <
38d0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
38e0: 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e 20 74  true</b>, then t
38f0: 68 69 73 20 77 69 6c 6c 20 62 65 0d 0a 6f 76 65  his will be..ove
3900: 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63 6c  rridden to <b cl
3910: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
3920: 3c 2f 62 3e 2e 0d 0a 53 65 65 20 3c 73 70 61 6e  </b>...See <span
3930: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22   class="sectref"
3940: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69  ><a href="#secti
3950: 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65  on4">Certificate
3960: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c   Validation</a><
3970: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20  /span> for more 
3980: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  details.</p></dd
3990: 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  >..<dt><b class=
39a0: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72  "option">-requir
39b0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
39c0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
39d0: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69  t>..<dd><p>Requi
39e0: 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 69  re a valid certi
39f0: 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20  ficate from the 
3a00: 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20  peer during the 
3a10: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 49  SSL handshake. I
3a20: 66 20 74 68 69 73 20 69 73 0d 0a 73 65 74 20 74  f this is..set t
3a30: 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 62 20  o true, then <b 
3a40: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
3a50: 72 65 71 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74  request</b> must
3a60: 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20   also be set to 
3a70: 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 65  true and a eithe
3a80: 72 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  r..<b class="opt
3a90: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c  ion">-cadir</b>,
3aa0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
3ab0: 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c 20  n">-cafile</b>, 
3ac0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3ad0: 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 2c 20  ">-castore</b>, 
3ae0: 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65  or a platform de
3af0: 66 61 75 6c 74 0d 0a 6d 75 73 74 20 62 65 20 70  fault..must be p
3b00: 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72  rovided in order
3b10: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61   to validate aga
3b20: 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61 75 6c  inst. The defaul
3b30: 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 20  t in TclTLS 1.8 
3b40: 61 6e 64 0d 0a 65 61 72 6c 69 65 72 20 76 65 72  and..earlier ver
3b50: 73 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c 61 73  sions is <b clas
3b60: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c  s="const">false<
3b70: 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c  /b> since not al
3b80: 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65  l platforms have
3b90: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f   certificates to
3ba0: 0d 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e  ..validate again
3bb0: 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d  st in a form com
3bc0: 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65  patible with Ope
3bd0: 6e 53 53 4c 2e 20 53 74 61 72 74 69 6e 67 20 69  nSSL. Starting i
3be0: 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 0d 0a 74  n TclTLS 2.0,..t
3bf0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
3c00: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
3c10: 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65  rue</b> for clie
3c20: 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 0d  nt connections..
3c30: 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73  .See <span class
3c40: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
3c50: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43  ef="#section4">C
3c60: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
3c70: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e  ation</a></span>
3c80: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c   for more detail
3c90: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  s.</p></dd>..<dt
3ca0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3cb0: 6e 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76  n">-security_lev
3cc0: 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  el</b> <i class=
3cd0: 22 61 72 67 22 3e 69 6e 74 65 67 65 72 3c 2f 69  "arg">integer</i
3ce0: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 53  ></dt>..<dd><p>S
3cf0: 70 65 63 69 66 69 65 73 20 74 68 65 20 73 65 63  pecifies the sec
3d00: 75 72 69 74 79 20 6c 65 76 65 6c 20 28 76 61 6c  urity level (val
3d10: 75 65 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 2e  ue from 0 to 5).
3d20: 20 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65   The security le
3d30: 76 65 6c 20 61 66 66 65 63 74 73 0d 0a 74 68 65  vel affects..the
3d40: 20 61 6c 6c 6f 77 65 64 20 63 69 70 68 65 72 20   allowed cipher 
3d50: 73 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e  suite encryption
3d60: 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70   algorithms, sup
3d70: 70 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65  ported ECC curve
3d80: 73 2c 0d 0a 73 75 70 70 6f 72 74 65 64 20 73 69  s,..supported si
3d90: 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68  gnature algorith
3da0: 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72  ms, DH parameter
3db0: 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63   sizes, certific
3dc0: 61 74 65 20 6b 65 79 20 73 69 7a 65 73 0d 0a 61  ate key sizes..a
3dd0: 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67  nd signature alg
3de0: 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66  orithms. The def
3df0: 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20  ault is 1 prior 
3e00: 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 61  to OpenSSL 3.2 a
3e10: 6e 64 20 32 0d 0a 74 68 65 72 65 61 66 74 65 72  nd 2..thereafter
3e20: 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69  . Level 3 and hi
3e30: 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70  gher disable sup
3e40: 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e  port for session
3e50: 20 74 69 63 6b 65 74 73 20 61 6e 64 0d 0a 6f 6e   tickets and..on
3e60: 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 65 72  ly accept cipher
3e70: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f   suites that pro
3e80: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63  vide forward sec
3e90: 72 65 63 79 2e 0d 0a 54 68 69 73 20 6f 70 74 69  recy...This opti
3ea0: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  on is new for Tc
3eb0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
3ec0: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
3ed0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65  ="option">-serve
3ee0: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
3ef0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
3f00: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  t>..<dd><p>Speci
3f10: 66 69 65 73 20 77 68 65 74 68 65 72 20 74 6f 20  fies whether to 
3f20: 61 63 74 20 61 73 20 61 20 73 65 72 76 65 72 20  act as a server 
3f30: 61 6e 64 20 72 65 73 70 6f 6e 64 20 77 69 74 68  and respond with
3f40: 20 61 20 73 65 72 76 65 72 20 68 61 6e 64 73 68   a server handsh
3f50: 61 6b 65 20 77 68 65 6e 20 61 0d 0a 63 6c 69 65  ake when a..clie
3f60: 6e 74 20 63 6f 6e 6e 65 63 74 73 20 61 6e 64 20  nt connects and 
3f70: 70 72 6f 76 69 64 65 73 20 61 20 63 6c 69 65 6e  provides a clien
3f80: 74 20 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 65  t handshake. The
3f90: 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63   default is <b c
3fa0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c  lass="const">fal
3fb0: 73 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e  se</b>.</p></dd>
3fc0: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
3fd0: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e  option">-servern
3fe0: 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ame</b> <i class
3ff0: 3d 22 61 72 67 22 3e 68 6f 73 74 6e 61 6d 65 3c  ="arg">hostname<
4000: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
4010: 3e 53 70 65 63 69 66 79 20 74 68 65 20 70 65 65  >Specify the pee
4020: 72 27 73 20 68 6f 73 74 6e 61 6d 65 2e 20 54 68  r's hostname. Th
4030: 69 73 20 69 73 20 75 73 65 64 20 74 6f 20 73 65  is is used to se
4040: 74 20 74 68 65 20 54 4c 53 20 53 65 72 76 65 72  t the TLS Server
4050: 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e   Name Indication
4060: 0d 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 69 6f  ..(SNI) extensio
4070: 6e 2e 20 53 65 74 20 74 68 69 73 20 74 6f 20 74  n. Set this to t
4080: 68 65 20 65 78 70 65 63 74 65 64 20 73 65 72 76  he expected serv
4090: 65 72 6e 61 6d 65 20 69 6e 20 74 68 65 20 73 65  ername in the se
40a0: 72 76 65 72 27 73 20 63 65 72 74 69 66 69 63 61  rver's certifica
40b0: 74 65 0d 0a 6f 72 20 6f 6e 65 20 6f 66 20 74 68  te..or one of th
40c0: 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72 6e  e Subject Altern
40d0: 61 74 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 2e  ate Names (SAN).
40e0: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c   Starting in Tcl
40f0: 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 20 77 69  TLS 2.0, this wi
4100: 6c 6c 0d 0a 64 65 66 61 75 6c 74 20 74 6f 20 74  ll..default to t
4110: 68 65 20 68 6f 73 74 20 66 72 6f 6d 20 74 68 65  he host from the
4120: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
4130: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
4140: 63 6f 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c 2f 64 64  command.</p></dd
4150: 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  >..<dt><b class=
4160: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f  "option">-sessio
4170: 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  n_id</b> <i clas
4180: 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73  s="arg">binary_s
4190: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  tring</i></dt>..
41a0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
41b0: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 69 64 20   the session id 
41c0: 74 6f 20 72 65 73 75 6d 65 20 61 20 73 65 73 73  to resume a sess
41d0: 69 6f 6e 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74  ion. Not support
41e0: 65 64 20 79 65 74 2e 0d 0a 54 68 69 73 20 6f 70  ed yet...This op
41f0: 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20  tion is new for 
4200: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
4210: 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  /dd>..<dt><b cla
4220: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c  ss="option">-ssl
4230: 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  2</b> <i class="
4240: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
4250: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c  t>..<dd><p>Enabl
4260: 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e  e use of SSL v2.
4270: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  The default is <
4280: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4290: 66 61 6c 73 65 3c 2f 62 3e 2e 0d 0a 4f 70 65 6e  false</b>...Open
42a0: 53 53 4c 20 31 2e 31 2b 20 6e 6f 20 6c 6f 6e 67  SSL 1.1+ no long
42b0: 65 72 20 73 75 70 70 6f 72 74 73 20 53 53 4c 20  er supports SSL 
42c0: 76 32 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 20  v2, so this may 
42d0: 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 65 66 66  not have any eff
42e0: 65 63 74 2e 0d 0a 53 65 65 20 74 68 65 20 3c 62  ect...See the <b
42f0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
4300: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20  ::protocols</b> 
4310: 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70  command for supp
4320: 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e  orted protocols.
4330: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
4340: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4350: 3e 2d 73 73 6c 33 3c 2f 62 3e 20 3c 69 20 63 6c  >-ssl3</b> <i cl
4360: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f  ass="arg">bool</
4370: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
4380: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53  Enable use of SS
4390: 4c 20 76 33 2e 20 54 68 65 20 64 65 66 61 75 6c  L v3. The defaul
43a0: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
43b0: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e  onst">false</b>.
43c0: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c   Starting in Tcl
43d0: 54 4c 53 20 31 2e 38 2c 0d 0a 75 73 65 20 6f 66  TLS 1.8,..use of
43e0: 20 53 53 4c 20 76 33 20 69 66 20 6f 6e 6c 79 20   SSL v3 if only 
43f0: 61 76 61 69 6c 61 62 6c 65 20 76 69 61 20 61 20  available via a 
4400: 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74  compile time opt
4410: 69 6f 6e 2e 0d 0a 53 65 65 20 74 68 65 20 3c 62  ion...See the <b
4420: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
4430: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20  ::protocols</b> 
4440: 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70  command for supp
4450: 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e  orted protocols.
4460: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
4470: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4480: 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69 20 63 6c  >-tls1</b> <i cl
4490: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f  ass="arg">bool</
44a0: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
44b0: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
44c0: 53 20 76 31 2e 20 53 74 61 72 74 69 6e 67 20 69  S v1. Starting i
44d0: 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68  n TclTLS 2.0, th
44e0: 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20  e default is <b 
44f0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61  class="const">fa
4500: 6c 73 65 3c 2f 62 3e 2e 0d 0a 4e 6f 74 65 3a 20  lse</b>...Note: 
4510: 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20 53 48  TLS 1.0 needs SH
4520: 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77  A1 to operate, w
4530: 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61  hich is only ava
4540: 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69  ilable in securi
4550: 74 79 20 6c 65 76 65 6c 0d 0a 30 20 66 6f 72 20  ty level..0 for 
4560: 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53  Open SSL 3.0+. S
4570: 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ee the <b class=
4580: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69  "option">-securi
4590: 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 6f 70 74  ty_level</b> opt
45a0: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  ion.</p></dd>..<
45b0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
45c0: 69 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e  ion">-tls1.1</b>
45d0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
45e0: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c  bool</i></dt>..<
45f0: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65  dd><p>Enable use
4600: 20 6f 66 20 54 4c 53 20 76 31 2e 31 2e 20 53 74   of TLS v1.1. St
4610: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
4620: 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c   2.0, the defaul
4630: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
4640: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e  onst">false</b>.
4650: 0d 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 31 20  ..Note: TLS 1.1 
4660: 6e 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f 70  needs SHA1 to op
4670: 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 20  erate, which is 
4680: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69  only available i
4690: 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  n security level
46a0: 0d 0a 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c  ..0 for Open SSL
46b0: 20 33 2e 30 2b 2e 20 53 65 65 20 74 68 65 20 3c   3.0+. See the <
46c0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
46d0: 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c  >-security_level
46e0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e  </b> option.</p>
46f0: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  </dd>..<dt><b cl
4700: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c  ass="option">-tl
4710: 73 31 2e 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  s1.2</b> <i clas
4720: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
4730: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 45 6e  </dt>..<dd><p>En
4740: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20  able use of TLS 
4750: 76 31 2e 32 2e 20 54 68 65 20 64 65 66 61 75 6c  v1.2. The defaul
4760: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
4770: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c  onst">true</b>.<
4780: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62  /p></dd>..<dt><b
4790: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
47a0: 2d 74 6c 73 31 2e 33 3c 2f 62 3e 20 3c 69 20 63  -tls1.3</b> <i c
47b0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
47c0: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
47d0: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
47e0: 4c 53 20 76 31 2e 33 2e 20 54 68 65 20 64 65 66  LS v1.3. The def
47f0: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4800: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62  ="const">true</b
4810: 3e 2e 20 54 68 69 73 20 69 73 20 6f 6e 6c 79 20  >. This is only 
4820: 61 76 61 69 6c 61 62 6c 65 0d 0a 73 74 61 72 74  available..start
4830: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ing with OpenSSL
4840: 20 31 2e 31 2e 31 20 61 6e 64 20 54 63 6c 54 4c   1.1.1 and TclTL
4850: 53 20 31 2e 37 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.7.</p></dd>.
4860: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4870: 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65  ption">-validate
4880: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63  command</b> <i c
4890: 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62  lass="arg">callb
48a0: 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64  ack</i></dt>..<d
48b0: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
48c0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d  he callback comm
48d0: 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f  and to invoke to
48e0: 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 65   validate the pe
48f0: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 73 0d  er certificates.
4900: 0a 61 6e 64 20 6f 74 68 65 72 20 63 6f 6e 66 69  .and other confi
4910: 67 20 69 6e 66 6f 20 64 75 72 69 6e 67 20 74 68  g info during th
4920: 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74  e protocol negot
4930: 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20 54 68  iation phase. Th
4940: 69 73 20 63 61 6e 20 62 65 20 75 73 65 64 0d 0a  is can be used..
4950: 62 79 20 54 43 4c 20 73 63 72 69 70 74 73 20 74  by TCL scripts t
4960: 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 20  o perform their 
4970: 6f 77 6e 20 43 65 72 74 69 66 69 63 61 74 65 20  own Certificate 
4980: 56 61 6c 69 64 61 74 69 6f 6e 20 74 6f 20 73 75  Validation to su
4990: 70 70 6c 65 6d 65 6e 74 20 74 68 65 0d 0a 64 65  pplement the..de
49a0: 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e  fault validation
49b0: 20 70 72 6f 76 69 64 65 64 20 62 79 20 4f 70 65   provided by Ope
49c0: 6e 53 53 4c 2e 20 54 68 65 20 73 63 72 69 70 74  nSSL. The script
49d0: 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61 20 62   must return a b
49e0: 6f 6f 6c 65 61 6e 20 74 72 75 65 0d 0a 74 6f 20  oolean true..to 
49f0: 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e 65 67  continue the neg
4a00: 6f 74 69 61 74 69 6f 6e 2e 20 53 65 65 20 3c 73  otiation. See <s
4a10: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
4a20: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
4a30: 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b  ction5">Callback
4a40: 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70   Options</a></sp
4a50: 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66  an> for more inf
4a60: 6f 2e 0d 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20  o...This option 
4a70: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
4a80: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.8.</p></dd>.
4a90: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  .</dl></dd>..<dt
4aa0: 3e 3c 61 20 6e 61 6d 65 3d 22 36 22 3e 3c 62 20  ><a name="6"><b 
4ab0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
4ac0: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c  :handshake</b> <
4ad0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
4ae0: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64  annel</i></a></d
4af0: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65  t>..<dd><p>Force
4b00: 73 20 74 68 65 20 54 4c 53 20 6e 65 67 6f 74 69  s the TLS negoti
4b10: 61 74 69 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20  ation handshake 
4b20: 74 6f 20 74 61 6b 65 20 70 6c 61 63 65 20 69 6d  to take place im
4b30: 6d 65 64 69 61 74 65 6c 79 2c 20 61 6e 64 20 72  mediately, and r
4b40: 65 74 75 72 6e 73 20 30 0d 0a 69 66 20 68 61 6e  eturns 0..if han
4b50: 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c 20  dshake is still 
4b60: 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e  in progress (non
4b70: 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31  -blocking), or 1
4b80: 20 69 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b   if the handshak
4b90: 65 20 77 61 73 0d 0a 73 75 63 63 65 73 73 66 75  e was..successfu
4ba0: 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68  l. If the handsh
4bb0: 61 6b 65 20 66 61 69 6c 65 64 2c 20 61 6e 20 65  ake failed, an e
4bc0: 72 72 6f 72 20 77 69 6c 6c 20 62 65 20 72 65 74  rror will be ret
4bd0: 75 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  urned.</p></dd>.
4be0: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 37 22  .<dt><a name="7"
4bf0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
4c00: 74 6c 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f 62  tls::shutdown</b
4c10: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4c20: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
4c30: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 2f 64 64 3e  </dt>..<dd></dd>
4c40: 0d 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 38  ..<dt><a name="8
4c50: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
4c60: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f  >tls::unimport</
4c70: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4c80: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
4c90: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 2f 64 64  ></dt>..<dd></dd
4ca0: 3e 0d 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  >..<dt><a name="
4cb0: 39 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  9"><b class="cmd
4cc0: 22 3e 74 6c 73 3a 3a 75 6e 73 74 61 63 6b 3c 2f  ">tls::unstack</
4cd0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4ce0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
4cf0: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54  ></dt>..<dd><p>T
4d00: 68 69 73 20 74 65 72 6d 69 6e 61 74 65 73 20 74  his terminates t
4d10: 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 73 69  he SSL/TLS sessi
4d20: 6f 6e 20 62 79 20 73 65 6e 64 69 6e 67 20 74 68  on by sending th
4d30: 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65 5f 6e 6f  e &quot;close_no
4d40: 74 69 66 79 26 71 75 6f 74 3b 20 6d 65 73 73 61  tify&quot; messa
4d50: 67 65 20 61 6e 64 0d 0a 72 65 6d 6f 76 65 73 20  ge and..removes 
4d60: 74 68 65 20 74 6f 70 20 6c 65 76 65 6c 20 73 74  the top level st
4d70: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 66 72  acked channel fr
4d80: 6f 6d 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  om <i class="arg
4d90: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2c 20 62  ">channel</i>, b
4da0: 75 74 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 63  ut it does not c
4db0: 6c 6f 73 65 0d 0a 74 68 65 20 73 6f 63 6b 65 74  lose..the socket
4dc0: 2e 20 49 74 20 69 73 20 74 68 65 20 63 6f 6d 70  . It is the comp
4dd0: 6c 69 6d 65 6e 74 20 74 6f 20 3c 62 20 63 6c 61  liment to <b cla
4de0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d  ss="cmd">tls::im
4df0: 70 6f 72 74 3c 2f 62 3e 20 62 79 20 65 6e 64 69  port</b> by endi
4e00: 6e 67 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f 66  ng encryption of
4e10: 0d 0a 61 20 54 43 4c 20 63 68 61 6e 6e 65 6c 2e  ..a TCL channel.
4e20: 20 41 6e 20 65 72 72 6f 72 20 69 73 20 74 68 72   An error is thr
4e30: 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f  own if TLS is no
4e40: 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65  t the top stacke
4e50: 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c  d channel type.<
4e60: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 61  /p></dd>..<dt><a
4e70: 20 6e 61 6d 65 3d 22 31 30 22 3e 3c 62 20 63 6c   name="10"><b cl
4e80: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73  ass="cmd">tls::s
4e90: 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70 61 6e 20  tatus</b> <span 
4ea0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 62 20  class="opt">?<b 
4eb0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4ec0: 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e  local</b>?</span
4ed0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4ee0: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
4ef0: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 52 65  </dt>..<dd><p>Re
4f00: 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e  turns the curren
4f10: 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53  t status of an S
4f20: 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20  SL channel. The 
4f30: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74  result is a list
4f40: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 0d 0a 70   of key-value..p
4f50: 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20  airs describing 
4f60: 74 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69  the SSL, certifi
4f70: 63 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66  cate, and certif
4f80: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69  icate verificati
4f90: 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 0d 0a 74  on status. If..t
4fa0: 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65  he SSL handshake
4fb0: 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d   has not yet com
4fc0: 70 6c 65 74 65 64 2c 20 61 6e 20 65 6d 70 74 79  pleted, an empty
4fd0: 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65   list is returne
4fe0: 64 2e 20 49 66 20 74 68 65 0d 0a 3c 62 20 63 6c  d. If the..<b cl
4ff0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f  ass="option">-lo
5000: 63 61 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69  cal</b> option i
5010: 73 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 65  s specified, the
5020: 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 74  n the local cert
5030: 69 66 69 63 61 74 65 20 69 73 20 75 73 65 64 2e  ificate is used.
5040: 0d 0a 52 65 74 75 72 6e 65 64 20 76 61 6c 75 65  ..Returned value
5050: 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0d 0a  s include:</p>..
5060: 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 70  <p>SSL Status</p
5070: 3e 0d 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  >..<dl class="do
5080: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
5090: 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  ns">..<dt><b cla
50a0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c  ss="variable">al
50b0: 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  pn</b> <i class=
50c0: 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  "arg">protocol</
50d0: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
50e0: 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c  The protocol sel
50f0: 65 63 74 65 64 20 61 66 74 65 72 20 41 70 70 6c  ected after Appl
5100: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72  ication-Layer Pr
5110: 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69  otocol Negotiati
5120: 6f 6e 20 28 41 4c 50 4e 29 2e 0d 0a 54 68 69 73  on (ALPN)...This
5130: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
5140: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
5150: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
5160: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5170: 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  cipher</b> <i cl
5180: 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65 72  ass="arg">cipher
5190: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
51a0: 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69  p>The current ci
51b0: 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20  pher in use for 
51c0: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e  the session.</p>
51d0: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  </dd>..<dt><b cl
51e0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70  ass="variable">p
51f0: 65 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63  eername</b> <i c
5200: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c  lass="arg">name<
5210: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
5220: 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 20 66 72  >The peername fr
5230: 6f 6d 20 74 68 65 20 63 65 72 74 69 66 69 63 61  om the certifica
5240: 74 65 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20  te...This value 
5250: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
5260: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.8.</p></dd>.
5270: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5280: 61 72 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f  ariable">protoco
5290: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  l</b> <i class="
52a0: 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e  arg">version</i>
52b0: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68  </dt>..<dd><p>Th
52c0: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69  e protocol versi
52d0: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  on used for the 
52e0: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32  connection: SSL2
52f0: 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c  , SSL3, TLS1, TL
5300: 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 0d 0a 54  S1.1, TLS1.2,..T
5310: 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77  LS1.3, or unknow
5320: 6e 2e 20 54 68 69 73 20 76 61 6c 75 65 20 69 73  n. This value is
5330: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
5340: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  1.8.</p></dd>..<
5350: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5360: 69 61 62 6c 65 22 3e 73 62 69 74 73 3c 2f 62 3e  iable">sbits</b>
5370: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5380: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  n</i></dt>..<dd>
5390: 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66  <p>The number of
53a0: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 74   bits used for t
53b0: 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c  he session key.<
53c0: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62  /p></dd>..<dt><b
53d0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
53e0: 22 3e 73 69 67 6e 61 74 75 72 65 48 61 73 68 41  ">signatureHashA
53f0: 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20  lgorithm</b> <i 
5400: 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f  class="arg">algo
5410: 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  rithm</i></dt>..
5420: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e 61  <dd><p>The signa
5430: 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69  ture hash algori
5440: 74 68 6d 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65  thm...This value
5450: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
5460: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
5470: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
5480: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
5490: 75 72 65 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63  ureType</b> <i c
54a0: 6c 61 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c  lass="arg">type<
54b0: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
54c0: 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74  >The signature t
54d0: 79 70 65 20 76 61 6c 75 65 2e 0d 0a 54 68 69 73  ype value...This
54e0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
54f0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
5500: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
5510: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5520: 76 65 72 69 66 79 44 65 70 74 68 3c 2f 62 3e 20  verifyDepth</b> 
5530: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
5540: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
5550: 70 3e 4d 61 78 69 6d 75 6d 20 64 65 70 74 68 20  p>Maximum depth 
5560: 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63  for the certific
5570: 61 74 65 20 63 68 61 69 6e 20 76 65 72 69 66 69  ate chain verifi
5580: 63 61 74 69 6f 6e 2e 20 44 65 66 61 75 6c 74 20  cation. Default 
5590: 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20  is -1, to check 
55a0: 61 6c 6c 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65  all...This value
55b0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
55c0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
55d0: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
55e0: 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79  variable">verify
55f0: 4d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  Mode</b> <i clas
5600: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e  s="arg">list</i>
5610: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 4c 69  </dt>..<dd><p>Li
5620: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  st of certificat
5630: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 6d  e verification m
5640: 6f 64 65 73 2e 0d 0a 54 68 69 73 20 76 61 6c 75  odes...This valu
5650: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
5660: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
5670: 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  >..<dt><b class=
5680: 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66  "variable">verif
5690: 79 52 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20 63  yResult</b> <i c
56a0: 6c 61 73 73 3d 22 61 72 67 22 3e 72 65 73 75 6c  lass="arg">resul
56b0: 74 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  t</i></dt>..<dd>
56c0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 76  <p>Certificate v
56d0: 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75  erification resu
56e0: 6c 74 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20  lt...This value 
56f0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
5700: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.8.</p></dd>.
5710: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5720: 61 72 69 61 62 6c 65 22 3e 63 61 5f 6e 61 6d 65  ariable">ca_name
5730: 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  s</b> <i class="
5740: 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64  arg">list</i></d
5750: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20  t>..<dd><p>List 
5760: 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61  of the Certifica
5770: 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75  te Authorities u
5780: 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68  sed to create th
5790: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0d 0a  e certificate...
57a0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
57b0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
57c0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f 64 6c  .</p></dd>..</dl
57d0: 3e 0d 0a 3c 70 3e 43 65 72 74 69 66 69 63 61 74  >..<p>Certificat
57e0: 65 20 53 74 61 74 75 73 3c 2f 70 3e 0d 0a 3c 64  e Status</p>..<d
57f0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
5800: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0d  s_definitions">.
5810: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5820: 61 72 69 61 62 6c 65 22 3e 61 6c 6c 3c 2f 62 3e  ariable">all</b>
5830: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5840: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0d  string</i></dt>.
5850: 0a 3c 64 64 3e 3c 70 3e 44 75 6d 70 20 6f 66 20  .<dd><p>Dump of 
5860: 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20  all certificate 
5870: 69 6e 66 6f 2e 0d 0a 54 68 69 73 20 76 61 6c 75  info...This valu
5880: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
5890: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
58a0: 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  >..<dt><b class=
58b0: 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 73 69  "variable">versi
58c0: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
58d0: 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3c  "arg">value</i><
58e0: 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65  /dt>..<dd><p>The
58f0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72   certificate ver
5900: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  sion.</p></dd>..
5910: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5920: 72 69 61 62 6c 65 22 3e 73 65 72 69 61 6c 4e 75  riable">serialNu
5930: 6d 62 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  mber</b> <i clas
5940: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
5950: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
5960: 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 65  The serial numbe
5970: 72 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  r of the certifi
5980: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74  cate as a hex st
5990: 72 69 6e 67 2e 0d 0a 54 68 69 73 20 76 61 6c 75  ring...This valu
59a0: 65 20 77 61 73 20 63 68 61 6e 67 65 64 20 66 72  e was changed fr
59b0: 6f 6d 20 73 65 72 69 61 6c 20 69 6e 20 54 63 6c  om serial in Tcl
59c0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
59d0: 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  >..<dt><b class=
59e0: 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61  "variable">signa
59f0: 74 75 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ture</b> <i clas
5a00: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68  s="arg">algorith
5a10: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  m</i></dt>..<dd>
5a20: 3c 70 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69  <p>Cipher algori
5a30: 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72  thm used for cer
5a40: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
5a50: 72 65 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20  re...This value 
5a60: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
5a70: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.8.</p></dd>.
5a80: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5a90: 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72 3c  ariable">issuer<
5aa0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5ab0: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
5ac0: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64  t>..<dd><p>The d
5ad0: 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d  istinguished nam
5ae0: 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65  e (DN) of the ce
5af0: 72 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72  rtificate issuer
5b00: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e  .</p></dd>..<dt>
5b10: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5b20: 6c 65 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62  le">notBefore</b
5b30: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5b40: 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  >date</i></dt>..
5b50: 3c 64 64 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e  <dd><p>The begin
5b60: 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65  ning date of the
5b70: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c   certificate val
5b80: 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  idity.</p></dd>.
5b90: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5ba0: 61 72 69 61 62 6c 65 22 3e 6e 6f 74 41 66 74 65  ariable">notAfte
5bb0: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
5bc0: 61 72 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64  arg">date</i></d
5bd0: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65  t>..<dd><p>The e
5be0: 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 6f  xpiration date o
5bf0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
5c00: 65 20 76 61 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c  e validity.</p><
5c10: 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  /dd>..<dt><b cla
5c20: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75  ss="variable">su
5c30: 62 6a 65 63 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  bject</b> <i cla
5c40: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
5c50: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
5c60: 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68  >The distinguish
5c70: 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20  ed name (DN) of 
5c80: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
5c90: 73 75 62 6a 65 63 74 2e 20 46 69 65 6c 64 73 20  subject. Fields 
5ca0: 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e 0d  include: Common.
5cb0: 0a 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61  .Name (CN), Orga
5cc0: 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f  nization (O), Lo
5cd0: 63 61 6c 69 74 79 20 6f 72 20 43 69 74 79 20 28  cality or City (
5ce0: 4c 29 2c 20 53 74 61 74 65 20 6f 72 20 50 72 6f  L), State or Pro
5cf0: 76 69 6e 63 65 20 28 53 29 2c 20 61 6e 64 0d 0a  vince (S), and..
5d00: 43 6f 75 6e 74 72 79 20 4e 61 6d 65 20 28 43 29  Country Name (C)
5d10: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e  .</p></dd>..<dt>
5d20: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5d30: 6c 65 22 3e 69 73 73 75 65 72 55 6e 69 71 75 65  le">issuerUnique
5d40: 49 44 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ID</b> <i class=
5d50: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
5d60: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68  </dt>..<dd><p>Th
5d70: 65 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 20  e issuer unique 
5d80: 69 64 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20  id...This value 
5d90: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
5da0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.8.</p></dd>.
5db0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5dc0: 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74  ariable">subject
5dd0: 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20  UniqueID</b> <i 
5de0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
5df0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  ng</i></dt>..<dd
5e00: 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65 63 74 20  ><p>The subject 
5e10: 75 6e 69 71 75 65 20 69 64 2e 0d 0a 54 68 69 73  unique id...This
5e20: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
5e30: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
5e40: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
5e50: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5e60: 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f  num_extensions</
5e70: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5e80: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64  ">n</i></dt>..<d
5e90: 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 63  d><p>Number of c
5ea0: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e  ertificate exten
5eb0: 73 69 6f 6e 73 2e 0d 0a 54 68 69 73 20 76 61 6c  sions...This val
5ec0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5ed0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5ee0: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
5ef0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 65 78 74 65  ="variable">exte
5f00: 6e 73 69 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c  nsions</b> <i cl
5f10: 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f  ass="arg">list</
5f20: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
5f30: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63  List of certific
5f40: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61  ate extension na
5f50: 6d 65 73 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65  mes...This value
5f60: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
5f70: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
5f80: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
5f90: 76 61 72 69 61 62 6c 65 22 3e 61 75 74 68 6f 72  variable">author
5fa0: 69 74 79 4b 65 79 49 64 65 6e 74 69 66 69 65 72  ityKeyIdentifier
5fb0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5fc0: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
5fd0: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 41 75 74 68  dt>..<dd><p>Auth
5fe0: 6f 72 69 74 79 20 4b 65 79 20 49 64 65 6e 74 69  ority Key Identi
5ff0: 66 69 65 72 20 28 41 4b 49 29 20 6f 66 20 74 68  fier (AKI) of th
6000: 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 65 72  e Issuing CA cer
6010: 74 69 66 69 63 61 74 65 20 74 68 61 74 20 73 69  tificate that si
6020: 67 6e 65 64 20 74 68 65 0d 0a 53 53 4c 20 63 65  gned the..SSL ce
6030: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68  rtificate as a h
6040: 65 78 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20  ex string. This 
6050: 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20 74 68  value matches th
6060: 65 20 53 4b 49 20 76 61 6c 75 65 20 6f 66 20 74  e SKI value of t
6070: 68 65 0d 0a 49 6e 74 65 72 6d 65 64 69 61 74 65  he..Intermediate
6080: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 2e   CA certificate.
6090: 0d 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
60a0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
60b0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  .8.</p></dd>..<d
60c0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
60d0: 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 4b 65 79  able">subjectKey
60e0: 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c  Identifier</b> <
60f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74  i class="arg">st
6100: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c  ring</i></dt>..<
6110: 64 64 3e 3c 70 3e 53 75 62 6a 65 63 74 20 4b 65  dd><p>Subject Ke
6120: 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b  y Identifier (SK
6130: 49 29 20 68 61 73 68 20 6f 66 20 74 68 65 20 70  I) hash of the p
6140: 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65  ublic key inside
6150: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
6160: 20 61 73 20 61 0d 0a 68 65 78 20 73 74 72 69 6e   as a..hex strin
6170: 67 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74  g. Used to ident
6180: 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73  ify certificates
6190: 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20   that contain a 
61a0: 70 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69  particular publi
61b0: 63 20 6b 65 79 2e 0d 0a 54 68 69 73 20 76 61 6c  c key...This val
61c0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
61d0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
61e0: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
61f0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a  ="variable">subj
6200: 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 3c  ectAltName</b> <
6210: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69  i class="arg">li
6220: 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  st</i></dt>..<dd
6230: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20  ><p>List of all 
6240: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41  of the Subject A
6250: 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73  lternative Names
6260: 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67   (SAN) including
6270: 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73   domain names, s
6280: 75 62 0d 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64  ub..domains, and
6290: 20 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68   IP addresses th
62a0: 61 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62  at are secured b
62b0: 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  y the certificat
62c0: 65 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20 69  e...This value i
62d0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
62e0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a   1.8.</p></dd>..
62f0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6300: 72 69 61 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e  riable">ocsp</b>
6310: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6320: 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c  list</i></dt>..<
6330: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c  dd><p>List of al
6340: 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69  l Online Certifi
6350: 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74  cate Status Prot
6360: 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73  ocol (OCSP) URLs
6370: 20 74 68 61 74 20 63 61 6e 20 62 65 20 75 73 65   that can be use
6380: 64 20 74 6f 0d 0a 63 68 65 63 6b 20 74 68 65 20  d to..check the 
6390: 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 69 73  validity of this
63a0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 0d 0a 54   certificate...T
63b0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
63c0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
63d0: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
63e0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
63f0: 65 22 3e 63 65 72 74 69 66 69 63 61 74 65 3c 2f  e">certificate</
6400: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6410: 22 3e 63 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0d  ">cert</i></dt>.
6420: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 50 45 4d 20  .<dd><p>The PEM 
6430: 65 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69 63  encoded certific
6440: 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  ate.</p></dd>..<
6450: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6460: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65  iable">signature
6470: 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69  Algorithm</b> <i
6480: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67   class="arg">alg
6490: 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0d  orithm</i></dt>.
64a0: 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 20 61  .<dd><p>Cipher a
64b0: 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f  lgorithm used fo
64c0: 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  r the certificat
64d0: 65 20 73 69 67 6e 61 74 75 72 65 2e 0d 0a 54 68  e signature...Th
64e0: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20  is value is new 
64f0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
6500: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62  /p></dd>..<dt><b
6510: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6520: 22 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65  ">signatureValue
6530: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6540: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
6550: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 43 65 72 74  dt>..<dd><p>Cert
6560: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
6570: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e  e as a hex strin
6580: 67 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20 69  g...This value i
6590: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
65a0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a   1.8.</p></dd>..
65b0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
65c0: 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72  riable">signatur
65d0: 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63  eDigest</b> <i c
65e0: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69  lass="arg">versi
65f0: 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  on</i></dt>..<dd
6600: 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20  ><p>Certificate 
6610: 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20 61  signing digest a
6620: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 0d  s a hex string..
6630: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
6640: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
6650: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  8.</p></dd>..<dt
6660: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6670: 62 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79 41 6c  ble">publicKeyAl
6680: 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63  gorithm</b> <i c
6690: 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72  lass="arg">algor
66a0: 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c  ithm</i></dt>..<
66b0: 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74  dd><p>Certificat
66c0: 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c  e signature publ
66d0: 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d  ic key algorithm
66e0: 2e 0d 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  ...This value is
66f0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
6700: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  1.8.</p></dd>..<
6710: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6720: 69 61 62 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79  iable">publicKey
6730: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6740: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
6750: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 43 65 72 74  dt>..<dd><p>Cert
6760: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
6770: 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 73 20  e public key as 
6780: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 0d 0a 54  a hex string...T
6790: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
67a0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
67b0: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
67c0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
67d0: 65 22 3e 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63  e">bits</b> <i c
67e0: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e  lass="arg">n</i>
67f0: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 4e 75  </dt>..<dd><p>Nu
6800: 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65  mber of bits use
6810: 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74  d for certificat
6820: 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 79 2e  e signature key.
6830: 0d 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
6840: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
6850: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  .8.</p></dd>..<d
6860: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6870: 61 62 6c 65 22 3e 73 65 6c 66 5f 73 69 67 6e 65  able">self_signe
6880: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
6890: 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e  arg">boolean</i>
68a0: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 57 68  </dt>..<dd><p>Wh
68b0: 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 66  ether the certif
68c0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
68d0: 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 0d  is self signed..
68e0: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
68f0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
6900: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  8.</p></dd>..<dt
6910: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6920: 62 6c 65 22 3e 73 68 61 31 5f 68 61 73 68 3c 2f  ble">sha1_hash</
6930: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6940: 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0d  ">hash</i></dt>.
6950: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 53 48 41 31  .<dd><p>The SHA1
6960: 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72   hash of the cer
6970: 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65  tificate as a he
6980: 78 20 73 74 72 69 6e 67 2e 0d 0a 54 68 69 73 20  x string...This 
6990: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
69a0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
69b0: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  </dd>..<dt><b cl
69c0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
69d0: 68 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20 3c  ha256_hash</b> <
69e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61  i class="arg">ha
69f0: 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  sh</i></dt>..<dd
6a00: 3e 3c 70 3e 54 68 65 20 53 48 41 32 35 36 20 68  ><p>The SHA256 h
6a10: 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69  ash of the certi
6a20: 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20  ficate as a hex 
6a30: 73 74 72 69 6e 67 2e 0d 0a 54 68 69 73 20 76 61  string...This va
6a40: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
6a50: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
6a60: 64 64 3e 0d 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0d  dd>..</dl></dd>.
6a70: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 31  .<dt><a name="11
6a80: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
6a90: 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e  >tls::connection
6aa0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6ab0: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  rg">channel</i><
6ac0: 2f 61 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /a></dt>..<dd><p
6ad0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 72  >Returns the cur
6ae0: 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 20  rent connection 
6af0: 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53 4c  status of an SSL
6b00: 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65   channel. The re
6b10: 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 0d 0a  sult is a list..
6b20: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69  of key-value pai
6b30: 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 68  rs describing th
6b40: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 54  e connection...T
6b50: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e  his command is n
6b60: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
6b70: 38 2e 20 52 65 74 75 72 6e 65 64 20 76 61 6c 75  8. Returned valu
6b80: 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0d  es include:</p>.
6b90: 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f  .<p>SSL Status</
6ba0: 70 3e 0d 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64  p>..<dl class="d
6bb0: 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69  octools_definiti
6bc0: 6f 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  ons">..<dt><b cl
6bd0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6be0: 74 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tate</b> <i clas
6bf0: 73 3d 22 61 72 67 22 3e 73 74 61 74 65 3c 2f 69  s="arg">state</i
6c00: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 53  ></dt>..<dd><p>S
6c10: 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e  tate of the conn
6c20: 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ection.</p></dd>
6c30: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
6c40: 76 61 72 69 61 62 6c 65 22 3e 73 65 72 76 65 72  variable">server
6c50: 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  name</b> <i clas
6c60: 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e  s="arg">name</i>
6c70: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68  </dt>..<dd><p>Th
6c80: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f  e name of the co
6c90: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65  nnected to serve
6ca0: 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  r.</p></dd>..<dt
6cb0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6cc0: 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62  ble">protocol</b
6cd0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6ce0: 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74  >version</i></dt
6cf0: 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72  >..<dd><p>The pr
6d00: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75  otocol version u
6d10: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e  sed for the conn
6d20: 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53  ection: SSL2, SS
6d30: 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31  L3, TLS1, TLS1.1
6d40: 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33  , TLS1.2, TLS1.3
6d50: 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70  , or unknown.</p
6d60: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
6d70: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6d80: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c  renegotiation_al
6d90: 6c 6f 77 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  lowed</b> <i cla
6da0: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e  ss="arg">boolean
6db0: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
6dc0: 70 3e 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63  p>Whether protoc
6dd0: 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e  ol renegotiation
6de0: 20 69 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72   is supported or
6df0: 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a   not.</p></dd>..
6e00: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6e10: 72 69 61 62 6c 65 22 3e 73 65 63 75 72 69 74 79  riable">security
6e20: 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c  _level</b> <i cl
6e30: 61 73 73 3d 22 61 72 67 22 3e 6c 65 76 65 6c 3c  ass="arg">level<
6e40: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
6e50: 3e 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65  >The security le
6e60: 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c  vel used for sel
6e70: 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72  ection of cipher
6e80: 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63  s, key size, etc
6e90: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e  .</p></dd>..<dt>
6ea0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6eb0: 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73  le">session_reus
6ec0: 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ed</b> <i class=
6ed0: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69  "arg">boolean</i
6ee0: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 57  ></dt>..<dd><p>W
6ef0: 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 69  hether the sessi
6f00: 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 65 75 73  on has been reus
6f10: 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f  ed or not.</p></
6f20: 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  dd>..<dt><b clas
6f30: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73 5f  s="variable">is_
6f40: 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  server</b> <i cl
6f50: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61  ass="arg">boolea
6f60: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  n</i></dt>..<dd>
6f70: 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 63  <p>Whether the c
6f80: 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e  onnection is con
6f90: 66 69 67 75 72 65 64 20 61 73 20 61 20 73 65 72  figured as a ser
6fa0: 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65 6e  ver (1) or clien
6fb0: 74 20 28 30 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  t (0).</p></dd>.
6fc0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6fd0: 61 72 69 61 62 6c 65 22 3e 63 6f 6d 70 72 65 73  ariable">compres
6fe0: 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  sion</b> <i clas
6ff0: 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e  s="arg">mode</i>
7000: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 43 6f  </dt>..<dd><p>Co
7010: 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64  mpression method
7020: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e  .</p></dd>..<dt>
7030: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7040: 6c 65 22 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 62  le">expansion</b
7050: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7060: 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  >mode</i></dt>..
7070: 3c 64 64 3e 3c 70 3e 45 78 70 61 6e 73 69 6f 6e  <dd><p>Expansion
7080: 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64   method.</p></dd
7090: 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  >..<dt><b class=
70a0: 22 76 61 72 69 61 62 6c 65 22 3e 63 61 4c 69 73  "variable">caLis
70b0: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
70c0: 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64  arg">list</i></d
70d0: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20  t>..<dd><p>List 
70e0: 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41  of Certificate A
70f0: 75 74 68 6f 72 69 74 69 65 73 20 28 43 41 29 20  uthorities (CA) 
7100: 66 6f 72 20 58 2e 35 30 39 20 63 65 72 74 69 66  for X.509 certif
7110: 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  icate.</p></dd>.
7120: 0a 3c 2f 64 6c 3e 0d 0a 3c 70 3e 43 69 70 68 65  .</dl>..<p>Ciphe
7130: 72 20 49 6e 66 6f 3c 2f 70 3e 0d 0a 3c 64 6c 20  r Info</p>..<dl 
7140: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
7150: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0d 0a 3c  definitions">..<
7160: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7170: 69 61 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62  iable">cipher</b
7180: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7190: 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e  >cipher</i></dt>
71a0: 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75 72  ..<dd><p>The cur
71b0: 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75  rent cipher in u
71c0: 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65  se for the conne
71d0: 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  ction.</p></dd>.
71e0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
71f0: 61 72 69 61 62 6c 65 22 3e 73 74 61 6e 64 61 72  ariable">standar
7200: 64 5f 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c  d_name</b> <i cl
7210: 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f  ass="arg">name</
7220: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
7230: 54 68 65 20 73 74 61 6e 64 61 72 64 20 52 46 43  The standard RFC
7240: 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e   name of cipher.
7250: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
7260: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
7270: 65 22 3e 61 6c 67 6f 72 69 74 68 6d 5f 62 69 74  e">algorithm_bit
7280: 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  s</b> <i class="
7290: 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d  arg">n</i></dt>.
72a0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62  .<dd><p>The numb
72b0: 65 72 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20  er of processed 
72c0: 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69  bits used for ci
72d0: 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  pher.</p></dd>..
72e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
72f0: 72 69 61 62 6c 65 22 3e 73 65 63 72 65 74 5f 62  riable">secret_b
7300: 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  its</b> <i class
7310: 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74  ="arg">n</i></dt
7320: 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75  >..<dd><p>The nu
7330: 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62  mber of secret b
7340: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70  its used for cip
7350: 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  her.</p></dd>..<
7360: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7370: 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 65 72 73 69  iable">min_versi
7380: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
7390: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69  "arg">version</i
73a0: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54  ></dt>..<dd><p>T
73b0: 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f  he minimum proto
73c0: 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20  col version for 
73d0: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
73e0: 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  ..<dt><b class="
73f0: 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72  variable">cipher
7400: 5f 69 73 5f 61 65 61 64 3c 2f 62 3e 20 3c 69 20  _is_aead</b> <i 
7410: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
7420: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64  ean</i></dt>..<d
7430: 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65  d><p>Whether the
7440: 20 63 69 70 68 65 72 20 69 73 20 41 75 74 68 65   cipher is Authe
7450: 6e 74 69 63 61 74 65 64 20 45 6e 63 72 79 70 74  nticated Encrypt
7460: 69 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 69 61  ion with Associa
7470: 74 65 64 20 44 61 74 61 20 28 41 45 41 44 29 2e  ted Data (AEAD).
7480: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
7490: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
74a0: 65 22 3e 63 69 70 68 65 72 5f 69 64 3c 2f 62 3e  e">cipher_id</b>
74b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
74c0: 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  id</i></dt>..<dd
74d0: 3e 3c 70 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20  ><p>The OpenSSL 
74e0: 63 69 70 68 65 72 20 69 64 2e 3c 2f 70 3e 3c 2f  cipher id.</p></
74f0: 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  dd>..<dt><b clas
7500: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 64 65 73  s="variable">des
7510: 63 72 69 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20  cription</b> <i 
7520: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
7530: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  ng</i></dt>..<dd
7540: 3e 3c 70 3e 41 20 74 65 78 74 20 64 65 73 63 72  ><p>A text descr
7550: 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69  iption of the ci
7560: 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  pher.</p></dd>..
7570: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7580: 72 69 61 62 6c 65 22 3e 68 61 6e 64 73 68 61 6b  riable">handshak
7590: 65 5f 64 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20  e_digest</b> <i 
75a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
75b0: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64  ean</i></dt>..<d
75c0: 64 3e 3c 70 3e 44 69 67 65 73 74 20 75 73 65 64  d><p>Digest used
75d0: 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b   during handshak
75e0: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f 64  e.</p></dd>..</d
75f0: 6c 3e 0d 0a 3c 70 3e 53 65 73 73 69 6f 6e 20 49  l>..<p>Session I
7600: 6e 66 6f 3c 2f 70 3e 0d 0a 3c 64 6c 20 63 6c 61  nfo</p>..<dl cla
7610: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
7620: 69 6e 69 74 69 6f 6e 73 22 3e 0d 0a 3c 64 74 3e  initions">..<dt>
7630: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7640: 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20  le">alpn</b> <i 
7650: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74  class="arg">prot
7660: 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c  ocol</i></dt>..<
7670: 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63  dd><p>The protoc
7680: 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65  ol selected afte
7690: 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61  r Application-La
76a0: 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67  yer Protocol Neg
76b0: 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e  otiation (ALPN).
76c0: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
76d0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
76e0: 65 22 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 62 3e  e">resumable</b>
76f0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
7700: 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e  boolean</i></dt>
7710: 0d 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72  ..<dd><p>Whether
7720: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61 6e   the session can
7730: 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e   be resumed or n
7740: 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  ot.</p></dd>..<d
7750: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7760: 61 62 6c 65 22 3e 73 74 61 72 74 5f 74 69 6d 65  able">start_time
7770: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7780: 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c  rg">seconds</i><
7790: 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 69 6d  /dt>..<dd><p>Tim
77a0: 65 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20  e since session 
77b0: 73 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e  started in secon
77c0: 64 73 20 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c  ds since epoch.<
77d0: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62  /p></dd>..<dt><b
77e0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
77f0: 22 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69  ">timeout</b> <i
7800: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63   class="arg">sec
7810: 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c  onds</i></dt>..<
7820: 64 64 3e 3c 70 3e 4d 61 78 20 64 75 72 61 74 69  dd><p>Max durati
7830: 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e  on of session in
7840: 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20   seconds before 
7850: 74 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64  time-out.</p></d
7860: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
7870: 3d 22 76 61 72 69 61 62 6c 65 22 3e 6c 69 66 65  ="variable">life
7880: 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  time</b> <i clas
7890: 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c  s="arg">seconds<
78a0: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
78b0: 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20  >Session ticket 
78c0: 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 20 69 6e  lifetime hint in
78d0: 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64   seconds.</p></d
78e0: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
78f0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73  ="variable">sess
7900: 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c  ion_id</b> <i cl
7910: 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79  ass="arg">binary
7920: 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  _string</i></dt>
7930: 0d 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20  ..<dd><p>Unique 
7940: 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75  session id for u
7950: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74  se in resuming t
7960: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c  he session.</p><
7970: 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  /dd>..<dt><b cla
7980: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
7990: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62 3e  ssion_ticket</b>
79a0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
79b0: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69  binary_string</i
79c0: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 55  ></dt>..<dd><p>U
79d0: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69  nique session ti
79e0: 63 6b 65 74 20 66 6f 72 20 75 73 65 20 69 6e 20  cket for use in 
79f0: 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73  resuming the ses
7a00: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  sion.</p></dd>..
7a10: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7a20: 72 69 61 62 6c 65 22 3e 74 69 63 6b 65 74 5f 61  riable">ticket_a
7a30: 70 70 5f 64 61 74 61 3c 2f 62 3e 20 3c 69 20 63  pp_data</b> <i c
7a40: 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72  lass="arg">binar
7a50: 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  y_string</i></dt
7a60: 3e 0d 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65  >..<dd><p>Unique
7a70: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20   session ticket 
7a80: 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61  application data
7a90: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e  .</p></dd>..<dt>
7aa0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7ab0: 6c 65 22 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f  le">master_key</
7ac0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
7ad0: 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  ">binary_string<
7ae0: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
7af0: 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20  >Unique session 
7b00: 6d 61 73 74 65 72 20 6b 65 79 2e 3c 2f 70 3e 3c  master key.</p><
7b10: 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  /dd>..<dt><b cla
7b20: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
7b30: 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64 65  ssion_cache_mode
7b40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7b50: 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74  rg">mode</i></dt
7b60: 3e 0d 0a 3c 64 64 3e 3c 70 3e 53 65 72 76 65 72  >..<dd><p>Server
7b70: 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69   cache mode (cli
7b80: 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20  ent, server, or 
7b90: 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  both).</p></dd>.
7ba0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0d 0a 3c 64 74  .</dl></dd>..<dt
7bb0: 3e 3c 61 20 6e 61 6d 65 3d 22 31 32 22 3e 3c 62  ><a name="12"><b
7bc0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
7bd0: 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73  ::ciphers</b> <s
7be0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
7bf0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
7c00: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73  protocol</i>?</s
7c10: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
7c20: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
7c30: 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f  ="arg">verbose</
7c40: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
7c50: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
7c60: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70   class="arg">sup
7c70: 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61  ported</i>?</spa
7c80: 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  n></a></dt>..<dd
7c90: 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61 6e 79 20  ><p>Without any 
7ca0: 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72 65 74 75  options, it retu
7cb0: 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c  rns a list of al
7cc0: 6c 20 73 79 6d 6d 65 74 72 69 63 20 63 69 70 68  l symmetric ciph
7cd0: 65 72 73 20 66 6f 72 20 75 73 65 20 77 69 74 68  ers for use with
7ce0: 20 74 68 65 0d 0a 3c 69 20 63 6c 61 73 73 3d 22   the..<i class="
7cf0: 61 72 67 22 3e 2d 63 69 70 68 65 72 3c 2f 69 3e  arg">-cipher</i>
7d00: 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20 3c 69   option. With <i
7d10: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f   class="arg">pro
7d20: 74 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c 79 20  tocol</i>, only 
7d30: 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70 70  the ciphers supp
7d40: 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 0d 0a  orted for that..
7d50: 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 74  protocol are ret
7d60: 75 72 6e 65 64 2e 20 53 65 65 20 74 68 65 20 3c  urned. See the <
7d70: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
7d80: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e  s::protocols</b>
7d90: 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 65   command for the
7da0: 20 73 75 70 70 6f 72 74 65 64 0d 0a 70 72 6f 74   supported..prot
7db0: 6f 63 6f 6c 73 2e 20 49 66 20 3c 69 20 63 6c 61  ocols. If <i cla
7dc0: 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65  ss="arg">verbose
7dd0: 3c 2f 69 3e 20 69 73 20 73 70 65 63 69 66 69 65  </i> is specifie
7de0: 64 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61  d as true then a
7df0: 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20   verbose, human 
7e00: 72 65 61 64 61 62 6c 65 0d 0a 6c 69 73 74 20 69  readable..list i
7e10: 73 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20  s returned with 
7e20: 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72  additional infor
7e30: 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69  mation on the ci
7e40: 70 68 65 72 2e 20 49 66 20 3c 69 20 63 6c 61 73  pher. If <i clas
7e50: 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65  s="arg">supporte
7e60: 64 3c 2f 69 3e 0d 0a 69 73 20 73 70 65 63 69 66  d</i>..is specif
7e70: 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 68 65  ied as true, the
7e80: 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65  n only the ciphe
7e90: 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72  rs supported for
7ea0: 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62   protocol will b
7eb0: 65 20 6c 69 73 74 65 64 2e 0d 0a 54 68 65 20 3c  e listed...The <
7ec0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75  i class="arg">su
7ed0: 70 70 6f 72 74 65 64 3c 2f 69 3e 20 61 72 67 20  pported</i> arg 
7ee0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
7ef0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d  S 1.8.</p></dd>.
7f00: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 33  .<dt><a name="13
7f10: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
7f20: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
7f30: 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0d 0a 3c 64  /b></a></dt>..<d
7f40: 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 61 20 6c  d><p>Returns a l
7f50: 69 73 74 20 6f 66 20 74 68 65 20 73 75 70 70 6f  ist of the suppo
7f60: 72 74 65 64 20 53 53 4c 2f 54 4c 53 20 70 72 6f  rted SSL/TLS pro
7f70: 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20 76 61  tocols. Valid va
7f80: 6c 75 65 73 20 61 72 65 3a 0d 0a 3c 62 20 63 6c  lues are:..<b cl
7f90: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c 32  ass="const">ssl2
7fa0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
7fb0: 63 6f 6e 73 74 22 3e 73 73 6c 33 3c 2f 62 3e 2c  const">ssl3</b>,
7fc0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
7fd0: 22 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 20 63  ">tls1</b>, <b c
7fe0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73  lass="const">tls
7ff0: 31 2e 31 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  1.1</b>, <b clas
8000: 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 32  s="const">tls1.2
8010: 3c 2f 62 3e 2c 20 61 6e 64 0d 0a 3c 62 20 63 6c  </b>, and..<b cl
8020: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31  ass="const">tls1
8030: 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69  .3</b>. Exact li
8040: 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70  st depends on Op
8050: 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e  enSSL version an
8060: 64 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66  d compile time f
8070: 6c 61 67 73 2e 0d 0a 54 68 69 73 20 63 6f 6d 6d  lags...This comm
8080: 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54  and is new for T
8090: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
80a0: 64 64 3e 0d 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65  dd>..<dt><a name
80b0: 3d 22 31 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="14"><b class="
80c0: 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f  cmd">tls::versio
80d0: 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0d 0a  n</b></a></dt>..
80e0: 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74  <dd><p>Returns t
80f0: 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69  he OpenSSL versi
8100: 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f  on string.</p></
8110: 64 64 3e 0d 0a 3c 2f 64 6c 3e 0d 0a 3c 2f 64 69  dd>..</dl>..</di
8120: 76 3e 0d 0a 3c 64 69 76 20 69 64 3d 22 73 65 63  v>..<div id="sec
8130: 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 6f  tion4" class="do
8140: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
8150: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63  <h2><a name="sec
8160: 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61  tion4">Certifica
8170: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
8180: 3e 3c 2f 68 32 3e 0d 0a 3c 64 69 76 20 69 64 3d  ></h2>..<div id=
8190: 22 73 75 62 73 65 63 74 69 6f 6e 31 22 20 63 6c  "subsection1" cl
81a0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75  ass="doctools_su
81b0: 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61  bsection"><h3><a
81c0: 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f   name="subsectio
81d0: 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65 72 74  n1">PKI and Cert
81e0: 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f 68 33  ificates</a></h3
81f0: 3e 0d 0a 3c 70 3e 55 73 69 6e 67 20 74 68 65 20  >..<p>Using the 
8200: 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 61  Public Key Infra
8210: 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29 2c  structure (PKI),
8220: 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61 74   each user creat
8230: 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65 79  es a private key
8240: 20 74 68 61 74 0d 0a 6f 6e 6c 79 20 74 68 65 79   that..only they
8250: 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20   know about and 
8260: 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65  a public key the
8270: 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77  y can exchange w
8280: 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75  ith others for u
8290: 73 65 20 69 6e 0d 0a 65 6e 63 72 79 70 74 69 6e  se in..encryptin
82a0: 67 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67  g and decrypting
82b0: 20 64 61 74 61 2e 20 54 68 65 20 70 72 6f 63 65   data. The proce
82c0: 73 73 20 69 73 20 74 68 65 20 73 65 6e 64 65 72  ss is the sender
82d0: 20 65 6e 63 72 79 70 74 73 20 74 68 65 69 72 20   encrypts their 
82e0: 64 61 74 61 0d 0a 75 73 69 6e 67 20 74 68 65 69  data..using thei
82f0: 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e  r private key an
8300: 64 20 74 68 65 20 72 65 63 65 69 76 65 72 27 73  d the receiver's
8310: 20 70 75 62 6c 69 63 20 6b 65 79 2e 20 54 68 65   public key. The
8320: 20 64 61 74 61 20 69 73 20 74 68 65 6e 20 73 65   data is then se
8330: 6e 74 0d 0a 74 6f 20 74 68 65 20 72 65 63 65 69  nt..to the recei
8340: 76 65 72 2e 20 49 6e 20 61 20 73 69 6d 69 6c 61  ver. In a simila
8350: 72 20 6d 61 6e 6e 65 72 2c 20 74 68 65 20 72 65  r manner, the re
8360: 63 65 69 76 65 72 20 75 73 65 73 20 74 68 65 69  ceiver uses thei
8370: 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e  r private key an
8380: 64 0d 0a 74 68 65 20 73 65 6e 64 65 72 27 73 20  d..the sender's 
8390: 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 20 64 65  public key to de
83a0: 63 72 79 70 74 20 74 68 65 20 64 61 74 61 2e 20  crypt the data. 
83b0: 54 68 69 73 20 70 72 6f 76 69 64 65 73 20 64 61  This provides da
83c0: 74 61 20 69 6e 74 65 67 72 69 74 79 2c 20 74 6f  ta integrity, to
83d0: 0d 0a 65 6e 73 75 72 65 20 74 68 65 20 64 61 74  ..ensure the dat
83e0: 61 20 63 61 6e 27 74 20 62 65 20 76 69 65 77 65  a can't be viewe
83f0: 64 20 6f 72 20 61 6c 74 65 72 65 64 20 64 75 72  d or altered dur
8400: 69 6e 67 20 74 72 61 6e 73 70 6f 72 74 2e 20 53  ing transport. S
8410: 65 65 20 74 68 65 0d 0a 3c 62 20 63 6c 61 73 73  ee the..<b class
8420: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f  ="option">-key</
8430: 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d  b> and <b class=
8440: 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 66 69 6c  "option">-keyfil
8450: 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 66 6f  e</b> options fo
8460: 72 20 68 6f 77 20 74 6f 20 73 70 65 63 69 66 79  r how to specify
8470: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
8480: 2e 0d 0a 41 6c 73 6f 20 73 65 65 20 74 68 65 20  ...Also see the 
8490: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
84a0: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20  ">-password</b> 
84b0: 6f 70 74 69 6f 6e 20 66 6f 72 20 68 6f 77 20 74  option for how t
84c0: 6f 20 70 72 6f 76 69 64 65 20 74 68 65 20 70 61  o provide the pa
84d0: 73 73 77 6f 72 64 2e 3c 2f 70 3e 0d 0a 3c 70 3e  ssword.</p>..<p>
84e0: 49 6e 20 6f 72 64 65 72 20 74 6f 20 70 72 6f 76  In order to prov
84f0: 69 64 65 20 61 75 74 68 65 6e 74 69 63 61 74 69  ide authenticati
8500: 6f 6e 2c 20 69 2e 65 2e 20 65 6e 73 75 72 69 6e  on, i.e. ensurin
8510: 67 20 73 6f 6d 65 6f 6e 65 20 69 73 20 77 68 6f  g someone is who
8520: 20 74 68 65 79 20 73 61 79 20 74 68 65 79 0d 0a   they say they..
8530: 61 72 65 2c 20 74 68 65 20 70 75 62 6c 69 63 20  are, the public 
8540: 6b 65 79 20 61 6e 64 20 75 73 65 72 20 69 64 65  key and user ide
8550: 6e 74 69 66 69 63 61 74 69 6f 6e 20 69 6e 66 6f  ntification info
8560: 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 61 20   is stored in a 
8570: 58 2e 35 30 39 0d 0a 63 65 72 74 69 66 69 63 61  X.509..certifica
8580: 74 65 20 61 6e 64 20 74 68 61 74 20 63 65 72 74  te and that cert
8590: 69 66 69 63 61 74 65 20 69 73 20 61 75 74 68 65  ificate is authe
85a0: 6e 74 69 63 61 74 65 64 20 28 69 2e 65 2e 20 73  nticated (i.e. s
85b0: 69 67 6e 65 64 29 20 62 79 20 61 20 43 65 72 74  igned) by a Cert
85c0: 69 66 69 63 61 74 65 0d 0a 41 75 74 68 6f 72 69  ificate..Authori
85d0: 74 79 20 28 43 41 29 2e 20 55 73 65 72 73 20 63  ty (CA). Users c
85e0: 61 6e 20 74 68 65 6e 20 65 78 63 68 61 6e 67 65  an then exchange
85f0: 20 74 68 65 73 65 20 63 65 72 74 69 66 69 63 61   these certifica
8600: 74 65 73 20 64 75 72 69 6e 67 20 74 68 65 20 54  tes during the T
8610: 4c 53 0d 0a 69 6e 69 74 69 61 6c 69 7a 61 74 69  LS..initializati
8620: 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e 64 20 63  on process and c
8630: 68 65 63 6b 20 74 68 65 6d 20 61 67 61 69 6e 73  heck them agains
8640: 74 20 74 68 65 20 72 6f 6f 74 20 43 41 20 63 65  t the root CA ce
8650: 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 65 6e  rtificates to en
8660: 73 75 72 65 0d 0a 74 68 65 79 20 61 72 65 20 76  sure..they are v
8670: 61 6c 69 64 2e 20 54 68 69 73 20 69 73 20 68 61  alid. This is ha
8680: 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e 53 53 4c  ndled by OpenSSL
8690: 20 76 69 61 20 74 68 65 20 3c 62 20 63 6c 61 73   via the <b clas
86a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75  s="option">-requ
86b0: 65 73 74 3c 2f 62 3e 20 61 6e 64 0d 0a 3c 62 20  est</b> and..<b 
86c0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
86d0: 72 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70 74 69  require</b> opti
86e0: 6f 6e 73 2e 20 53 65 65 20 74 68 65 20 3c 62 20  ons. See the <b 
86f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8700: 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c  cadir</b>, <b cl
8710: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
8720: 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 0d 0a 3c 62  dir</b>, and..<b
8730: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8740: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74  -castore</b> opt
8750: 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20  ions for how to 
8760: 73 70 65 63 69 66 79 20 77 68 65 72 65 20 74 6f  specify where to
8770: 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 65 72   find the CA cer
8780: 74 69 66 69 63 61 74 65 73 2e 0d 0a 4f 70 74 69  tificates...Opti
8790: 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74  onally, in a fut
87a0: 75 72 65 20 72 65 6c 65 61 73 65 2c 20 74 68 65  ure release, the
87b0: 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 68  y can also be ch
87c0: 65 63 6b 65 64 20 61 67 61 69 6e 73 74 20 74 68  ecked against th
87d0: 65 20 43 65 72 74 69 66 69 63 61 74 65 0d 0a 52  e Certificate..R
87e0: 65 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20 28  evocation List (
87f0: 43 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64 20  CRL) of revoked 
8800: 63 65 72 74 69 66 69 63 61 74 65 73 2e 20 43 65  certificates. Ce
8810: 72 74 69 66 69 63 61 74 65 73 20 63 61 6e 20 61  rtificates can a
8820: 6c 73 6f 20 62 65 0d 0a 73 65 6c 66 2d 73 69 67  lso be..self-sig
8830: 6e 65 64 2c 20 62 75 74 20 74 68 65 79 20 61 72  ned, but they ar
8840: 65 20 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 74  e by default not
8850: 20 74 72 75 73 74 65 64 20 75 6e 6c 65 73 73 20   trusted unless 
8860: 79 6f 75 20 61 64 64 20 74 68 65 6d 20 74 6f 20  you add them to 
8870: 79 6f 75 72 0d 0a 63 65 72 74 69 66 69 63 61 74  your..certificat
8880: 65 20 73 74 6f 72 65 2e 3c 2f 70 3e 0d 0a 3c 70  e store.</p>..<p
8890: 3e 54 79 70 69 63 61 6c 6c 79 20 77 68 65 6e 20  >Typically when 
88a0: 76 69 73 69 74 69 6e 67 20 77 65 62 20 73 69 74  visiting web sit
88b0: 65 73 2c 20 6f 6e 6c 79 20 74 68 65 20 63 6c 69  es, only the cli
88c0: 65 6e 74 20 6e 65 65 64 73 20 74 6f 20 63 68 65  ent needs to che
88d0: 63 6b 20 74 68 65 20 73 65 72 76 65 72 27 73 0d  ck the server's.
88e0: 0a 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20  .certificate to 
88f0: 65 6e 73 75 72 65 20 69 74 20 69 73 20 76 61 6c  ensure it is val
8900: 69 64 2e 20 54 68 65 20 73 65 72 76 65 72 20 64  id. The server d
8910: 6f 65 73 6e 27 74 20 6e 65 65 64 20 74 6f 20 63  oesn't need to c
8920: 68 65 63 6b 20 74 68 65 20 63 6c 69 65 6e 74 0d  heck the client.
8930: 0a 63 65 72 74 69 66 69 63 61 74 65 20 75 6e 6c  .certificate unl
8940: 65 73 73 20 79 6f 75 20 6e 65 65 64 20 74 6f 20  ess you need to 
8950: 61 75 74 68 65 6e 74 69 63 61 74 65 20 77 69 74  authenticate wit
8960: 68 20 74 68 65 6d 20 74 6f 20 6c 6f 67 69 6e 2c  h them to login,
8970: 20 65 74 63 2e 20 53 65 65 20 74 68 65 0d 0a 3c   etc. See the..<
8980: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
8990: 3e 2d 63 65 72 74 3c 2f 62 3e 20 61 6e 64 20 3c  >-cert</b> and <
89a0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
89b0: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 6f  >-certfile</b> o
89c0: 70 74 69 6f 6e 73 20 69 66 20 79 6f 75 20 6e 65  ptions if you ne
89d0: 65 64 20 74 6f 20 70 72 6f 76 69 64 65 20 61 20  ed to provide a 
89e0: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e  certificate.</p>
89f0: 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76 20 69  ..</div>..<div i
8a00: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 32 22 20  d="subsection2" 
8a10: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
8a20: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e  subsection"><h3>
8a30: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74  <a name="subsect
8a40: 69 6f 6e 32 22 3e 53 75 6d 6d 61 72 79 20 6f 66  ion2">Summary of
8a50: 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70   command line op
8a60: 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 33 3e 0d 0a  tions</a></h3>..
8a70: 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  <p>The following
8a80: 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 75 73 65   options are use
8a90: 64 20 66 6f 72 20 70 65 65 72 20 63 65 72 74 69  d for peer certi
8aa0: 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f  ficate validatio
8ab0: 6e 3a 3c 2f 70 3e 0d 0a 3c 64 6c 20 63 6c 61 73  n:</p>..<dl clas
8ac0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69  s="doctools_opti
8ad0: 6f 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  ons">..<dt><b cl
8ae0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
8af0: 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  dir</b> <i class
8b00: 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72 79  ="arg">directory
8b10: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
8b20: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
8b30: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20  directory where 
8b40: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
8b50: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63  Authority (CA) c
8b60: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0d  ertificates are.
8b70: 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66  .stored. The def
8b80: 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d  ault is platform
8b90: 20 73 70 65 63 69 66 69 63 2c 20 62 75 74 20 69   specific, but i
8ba0: 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b  s usually &quot;
8bb0: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e  <b class="file">
8bc0: 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 3c 2f  /etc/ssl/certs</
8bd0: 62 3e 26 71 75 6f 74 3b 20 6f 6e 0d 0a 4c 69 6e  b>&quot; on..Lin
8be0: 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2e  ux/Unix systems.
8bf0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63   The default loc
8c00: 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65  ation can be ove
8c10: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 0d 0a  rridden by the..
8c20: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
8c30: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52  le">SSL_CERT_DIR
8c40: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
8c50: 20 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f   variable.</p></
8c60: 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  dd>..<dt><b clas
8c70: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69  s="option">-cafi
8c80: 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  le</b> <i class=
8c90: 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f  "arg">filename</
8ca0: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
8cb0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 69  Specifies the fi
8cc0: 6c 65 20 77 69 74 68 20 74 68 65 20 43 65 72 74  le with the Cert
8cd0: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74  ificate Authorit
8ce0: 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61  y (CA) certifica
8cf0: 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0d 0a 3c  tes to use in..<
8d00: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
8d10: 50 45 4d 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72  PEM</b> file for
8d20: 6d 61 74 2e 20 54 68 65 20 64 65 66 61 75 6c 74  mat. The default
8d30: 20 69 73 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61   is &quot;<b cla
8d40: 73 73 3d 22 66 69 6c 65 22 3e 63 65 72 74 2e 70  ss="file">cert.p
8d50: 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e  em</b>&quot;, in
8d60: 20 74 68 65 20 4f 70 65 6e 53 53 4c 0d 0a 64 69   the OpenSSL..di
8d70: 72 65 63 74 6f 72 79 2e 20 4f 6e 20 4c 69 6e 75  rectory. On Linu
8d80: 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2c 20  x/Unix systems, 
8d90: 74 68 69 73 20 69 73 20 75 73 75 61 6c 6c 79 20  this is usually 
8da0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
8db0: 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f 63  file">/etc/ssl/c
8dc0: 61 2d 62 75 6e 64 6c 65 2e 70 65 6d 3c 2f 62 3e  a-bundle.pem</b>
8dd0: 26 71 75 6f 74 3b 2e 0d 0a 54 68 65 20 64 65 66  &quot;...The def
8de0: 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65  ault file can be
8df0: 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74   overridden by t
8e00: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  he <b class="var
8e10: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
8e20: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  FILE</b> environ
8e30: 6d 65 6e 74 0d 0a 76 61 72 69 61 62 6c 65 2e 3c  ment..variable.<
8e40: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62  /p></dd>..<dt><b
8e50: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8e60: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 3c 69 20  -castore</b> <i 
8e70: 63 6c 61 73 73 3d 22 61 72 67 22 3e 55 52 49 3c  class="arg">URI<
8e80: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
8e90: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 55  >Specifies the U
8ea0: 6e 69 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 20  niform Resource 
8eb0: 49 64 65 6e 74 69 66 69 65 72 20 28 55 52 49 29  Identifier (URI)
8ec0: 20 66 6f 72 20 74 68 65 20 43 65 72 74 69 66 69   for the Certifi
8ed0: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 0d 0a  cate Authority..
8ee0: 28 43 41 29 20 73 74 6f 72 65 2c 20 77 68 69 63  (CA) store, whic
8ef0: 68 20 6d 61 79 20 62 65 20 61 20 73 69 6e 67 6c  h may be a singl
8f00: 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61  e container or a
8f10: 20 63 61 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74   catalog of cont
8f20: 61 69 6e 65 72 73 2e 0d 0a 53 74 61 72 74 69 6e  ainers...Startin
8f30: 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 33  g with OpenSSL 3
8f40: 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73  .2 on MS Windows
8f50: 2c 20 73 65 74 20 74 6f 20 26 71 75 6f 74 3b 3c  , set to &quot;<
8f60: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
8f70: 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e 73  org.openssl.wins
8f80: 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f 74  tore://</b>&quot
8f90: 3b 0d 0a 74 6f 20 75 73 65 20 74 68 65 20 62 75  ;..to use the bu
8fa0: 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f 77  ilt-in MS Window
8fb0: 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74  s Certificate St
8fc0: 6f 72 65 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  ore. Starting in
8fd0: 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69   TclTLS 2.0, thi
8fe0: 73 0d 0a 69 73 20 74 68 65 20 64 65 66 61 75 6c  s..is the defaul
8ff0: 74 20 69 66 20 3c 62 20 63 6c 61 73 73 3d 22 6f  t if <b class="o
9000: 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62  ption">-cadir</b
9010: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  >, <b class="opt
9020: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c  ion">-cadir</b>,
9030: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f   and <b class="o
9040: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c  ption">-castore<
9050: 2f 62 3e 20 61 72 65 0d 0a 6e 6f 74 20 73 70 65  /b> are..not spe
9060: 63 69 66 69 65 64 2e 20 54 68 69 73 20 73 74 6f  cified. This sto
9070: 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73  re only supports
9080: 20 72 6f 6f 74 20 63 65 72 74 69 66 69 63 61 74   root certificat
9090: 65 20 73 74 6f 72 65 73 2e 3c 2f 70 3e 3c 2f 64  e stores.</p></d
90a0: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
90b0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65  ="option">-reque
90c0: 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  st</b> <i class=
90d0: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f  "arg">bool</i></
90e0: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 52 65 71 75  dt>..<dd><p>Requ
90f0: 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74  est a certificat
9100: 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20  e from the peer 
9110: 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68  during the SSL h
9120: 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69  andshake. This i
9130: 73 20 6e 65 65 64 65 64 0d 0a 74 6f 20 64 6f 20  s needed..to do 
9140: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69  Certificate Vali
9150: 64 61 74 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67  dation. Starting
9160: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20   in TclTLS 1.8, 
9170: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0d 0a  the default is..
9180: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
9190: 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c  >true</b> for cl
91a0: 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73  ient connections
91b0: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63  . Starting in Tc
91c0: 6c 54 4c 53 20 32 2e 30 2c 20 69 66 20 73 65 74  lTLS 2.0, if set
91d0: 20 74 6f 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 63   to..<b class="c
91e0: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20  onst">false</b> 
91f0: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and <b class="op
9200: 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f  tion">-require</
9210: 62 3e 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  b> is <b class="
9220: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c  const">true</b>,
9230: 20 74 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20   then this will 
9240: 62 65 0d 0a 6f 76 65 72 72 69 64 64 65 6e 20 74  be..overridden t
9250: 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  o <b class="cons
9260: 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 49 6e 20  t">true</b>. In 
9270: 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c  addition, the cl
9280: 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c  ient can manuall
9290: 79 20 69 6e 73 70 65 63 74 20 61 6e 64 0d 0a 61  y inspect and..a
92a0: 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74 20  ccept or reject 
92b0: 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74 65  each certificate
92c0: 20 75 73 69 6e 67 20 74 68 65 20 3c 62 20 63 6c   using the <b cl
92d0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
92e0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
92f0: 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64  > option.</p></d
9300: 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  d>..<dt><b class
9310: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69  ="option">-requi
9320: 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  re</b> <i class=
9330: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f  "arg">bool</i></
9340: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 52 65 71 75  dt>..<dd><p>Requ
9350: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74  ire a valid cert
9360: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65  ificate from the
9370: 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65   peer during the
9380: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20   SSL handshake. 
9390: 49 66 20 74 68 69 73 20 69 73 0d 0a 73 65 74 20  If this is..set 
93a0: 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 62  to true, then <b
93b0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
93c0: 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 6d 75 73  -request</b> mus
93d0: 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f  t also be set to
93e0: 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68   true and a eith
93f0: 65 72 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  er..<b class="op
9400: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
9410: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  , <b class="opti
9420: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c  on">-cafile</b>,
9430: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9440: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 2c  n">-castore</b>,
9450: 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64   or a platform d
9460: 65 66 61 75 6c 74 0d 0a 6d 75 73 74 20 62 65 20  efault..must be 
9470: 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65  provided in orde
9480: 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67  r to validate ag
9490: 61 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61 75  ainst. The defau
94a0: 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38  lt in TclTLS 1.8
94b0: 20 61 6e 64 0d 0a 65 61 72 6c 69 65 72 20 76 65   and..earlier ve
94c0: 72 73 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c 61  rsions is <b cla
94d0: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65  ss="const">false
94e0: 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20 61  </b> since not a
94f0: 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76  ll platforms hav
9500: 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74  e certificates t
9510: 6f 0d 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69  o..validate agai
9520: 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f  nst in a form co
9530: 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70  mpatible with Op
9540: 65 6e 53 53 4c 2e 20 53 74 61 72 74 69 6e 67 20  enSSL. Starting 
9550: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 0d 0a  in TclTLS 2.0,..
9560: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
9570: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9580: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69  true</b> for cli
9590: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e  ent connections.
95a0: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f 64 6c 3e  </p></dd>..</dl>
95b0: 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76 20 69  ..</div>..<div i
95c0: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 22 20  d="subsection3" 
95d0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
95e0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e  subsection"><h3>
95f0: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74  <a name="subsect
9600: 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 63  ion3">When are c
9610: 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69  ommand line opti
9620: 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c  ons needed?</a><
9630: 2f 68 33 3e 0d 0a 3c 70 3e 49 6e 20 54 63 6c 54  /h3>..<p>In TclT
9640: 4c 53 20 31 2e 38 20 61 6e 64 20 65 61 72 6c 69  LS 1.8 and earli
9650: 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72  er versions, cer
9660: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74  tificate validat
9670: 69 6f 6e 20 69 73 0d 0a 3c 65 6d 3e 4e 4f 54 3c  ion is..<em>NOT<
9680: 2f 65 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79 20  /em> enabled by 
9690: 64 65 66 61 75 6c 74 2e 20 54 68 69 73 20 6c 69  default. This li
96a0: 6d 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20  mitation is due 
96b0: 74 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61  to the lack of a
96c0: 20 63 6f 6d 6d 6f 6e 0d 0a 63 72 6f 73 73 20 70   common..cross p
96d0: 6c 61 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65  latform database
96e0: 20 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 20   of Certificate 
96f0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 70  Authority (CA) p
9700: 72 6f 76 69 64 65 64 20 63 65 72 74 69 66 69 63  rovided certific
9710: 61 74 65 73 20 74 6f 0d 0a 76 61 6c 69 64 61 74  ates to..validat
9720: 65 20 61 67 61 69 6e 73 74 2e 20 4d 61 6e 79 20  e against. Many 
9730: 4c 69 6e 75 78 20 73 79 73 74 65 6d 73 20 6e 61  Linux systems na
9740: 74 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20 4f  tively support O
9750: 70 65 6e 53 53 4c 20 61 6e 64 20 74 68 75 73 20  penSSL and thus 
9760: 68 61 76 65 0d 0a 74 68 65 73 65 20 63 65 72 74  have..these cert
9770: 69 66 69 63 61 74 65 73 20 69 6e 73 74 61 6c 6c  ificates install
9780: 65 64 20 61 73 20 70 61 72 74 20 6f 66 20 74 68  ed as part of th
9790: 65 20 4f 53 2c 20 62 75 74 20 4d 61 63 4f 53 20  e OS, but MacOS 
97a0: 61 6e 64 20 4d 53 20 57 69 6e 64 6f 77 73 20 64  and MS Windows d
97b0: 6f 20 6e 6f 74 2e 0d 0a 53 74 61 72 69 6e 67 20  o not...Staring 
97c0: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74  in TclTLS 2.0, t
97d0: 68 65 20 64 65 66 61 75 6c 74 20 66 6f 72 20 63  he default for c
97e0: 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  lient connection
97f0: 73 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e 67  s has been chang
9800: 65 64 20 74 6f 0d 0a 72 65 71 75 69 72 65 20 63  ed to..require c
9810: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64  ertificate valid
9820: 61 74 69 6f 6e 20 62 79 20 64 65 66 61 75 6c 74  ation by default
9830: 2e 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 75 73  . In order to us
9840: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  e the <b class="
9850: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65  option">-require
9860: 3c 2f 62 3e 0d 0a 6f 70 74 69 6f 6e 2c 20 6f 6e  </b>..option, on
9870: 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69  e of the followi
9880: 6e 67 20 6d 75 73 74 20 62 65 20 74 72 75 65 3a  ng must be true:
9890: 3c 2f 70 3e 0d 0a 3c 75 6c 20 63 6c 61 73 73 3d  </p>..<ul class=
98a0: 22 64 6f 63 74 6f 6f 6c 73 5f 69 74 65 6d 69 7a  "doctools_itemiz
98b0: 65 64 22 3e 0d 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20  ed">..<li><p>On 
98c0: 4c 69 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 73  Linux and Unix s
98d0: 79 73 74 65 6d 73 20 77 69 74 68 20 4f 70 65 6e  ystems with Open
98e0: 53 53 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 74  SSL already inst
98f0: 61 6c 6c 65 64 20 6f 72 20 69 66 20 74 68 65 20  alled or if the 
9900: 43 41 0d 0a 63 65 72 74 69 66 69 63 61 74 65 73  CA..certificates
9910: 20 61 72 65 20 61 76 61 69 6c 61 62 6c 65 20 69   are available i
9920: 6e 20 50 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e  n PEM format, an
9930: 64 20 69 66 20 74 68 65 79 20 61 72 65 20 73 74  d if they are st
9940: 6f 72 65 64 20 69 6e 20 74 68 65 0d 0a 73 74 61  ored in the..sta
9950: 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c  ndard locations,
9960: 20 6f 72 20 69 66 20 74 68 65 20 3c 62 20 63 6c   or if the <b cl
9970: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53  ass="variable">S
9980: 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20  SL_CERT_DIR</b> 
9990: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  or <b class="var
99a0: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
99b0: 46 49 4c 45 3c 2f 62 3e 0d 0a 65 6e 76 69 72 6f  FILE</b>..enviro
99c0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20  nment variables 
99d0: 61 72 65 20 73 65 74 2c 20 74 68 65 6e 20 3c 62  are set, then <b
99e0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
99f0: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63  -cadir</b>, <b c
9a00: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
9a10: 61 64 69 72 3c 2f 62 3e 2c 0d 0a 61 6e 64 20 3c  adir</b>,..and <
9a20: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9a30: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61 72  >-castore</b> ar
9a40: 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c 2f 70 3e  en't needed.</p>
9a50: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 70 3e 49 66  </li>..<li><p>If
9a60: 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20   OpenSSL is not 
9a70: 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65  installed in the
9a80: 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f   default locatio
9a90: 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67  n, or when using
9aa0: 20 4d 61 63 20 4f 53 0d 0a 6f 72 20 4d 53 20 57   Mac OS..or MS W
9ab0: 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53  indows and OpenS
9ac0: 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c  SL is installed,
9ad0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76   the <b class="v
9ae0: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52  ariable">SSL_CER
9af0: 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72  T_DIR</b> and/or
9b00: 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  ..<b class="vari
9b10: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46  able">SSL_CERT_F
9b20: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d  ILE</b> environm
9b30: 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72  ent variables or
9b40: 20 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65 20   the one of the 
9b50: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9b60: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0d 0a 3c  ">-cadir</b>,..<
9b70: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9b80: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 6f 72 20  >-cadir</b>, or 
9b90: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9ba0: 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f  ">-castore</b> o
9bb0: 70 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64  ptions must be d
9bc0: 65 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e  efined.</p></li>
9bd0: 0d 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53 20 57  ..<li><p>On MS W
9be0: 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67  indows, starting
9bf0: 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c   in OpenSSL 3.2,
9c00: 20 69 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69   it is now possi
9c10: 62 6c 65 20 74 6f 20 61 63 63 65 73 73 20 74 68  ble to access th
9c20: 65 0d 0a 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64  e..built-in Wind
9c30: 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20  ows Certificate 
9c40: 53 74 6f 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53  Store from OpenS
9c50: 53 4c 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20  SL. This can be 
9c60: 75 74 69 6c 69 7a 65 64 20 62 79 0d 0a 73 65 74  utilized by..set
9c70: 74 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73  ting the <b clas
9c80: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
9c90: 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 74  ore</b> option t
9ca0: 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  o &quot;<b class
9cb0: 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65  ="const">org.ope
9cc0: 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f  nssl.winstore://
9cd0: 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0d 0a 49 6e 20  </b>&quot;...In 
9ce0: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73  TclTLS 2.0, this
9cf0: 20 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20   is the default 
9d00: 76 61 6c 75 65 20 69 66 20 3c 62 20 63 6c 61 73  value if <b clas
9d10: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69  s="option">-cadi
9d20: 72 3c 2f 62 3e 2c 0d 0a 3c 62 20 63 6c 61 73 73  r</b>,..<b class
9d30: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
9d40: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
9d50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73  ss="option">-cas
9d60: 74 6f 72 65 3c 2f 62 3e 20 61 72 65 20 6e 6f 74  tore</b> are not
9d70: 20 73 70 65 63 69 66 69 65 64 2e 3c 2f 70 3e 3c   specified.</p><
9d80: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 70 3e 49 66 20  /li>..<li><p>If 
9d90: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69  OpenSSL is not i
9da0: 6e 73 74 61 6c 6c 65 64 20 6f 72 20 74 68 65 20  nstalled or the 
9db0: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20  CA certificates 
9dc0: 61 72 65 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c  are not availabl
9dd0: 65 20 69 6e 20 50 45 4d 0d 0a 66 6f 72 6d 61 74  e in PEM..format
9de0: 2c 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69  , the CA certifi
9df0: 63 61 74 65 73 20 6d 75 73 74 20 62 65 20 64 6f  cates must be do
9e00: 77 6e 6c 6f 61 64 65 64 20 61 6e 64 20 69 6e 73  wnloaded and ins
9e10: 74 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 20  talled with the 
9e20: 75 73 65 72 0d 0a 73 6f 66 74 77 61 72 65 2e 20  user..software. 
9e30: 54 68 65 20 43 55 52 4c 20 74 65 61 6d 20 6d 61  The CURL team ma
9e40: 6b 65 73 20 74 68 65 6d 20 61 76 61 69 6c 61 62  kes them availab
9e50: 6c 65 20 61 74 0d 0a 3c 61 20 68 72 65 66 3d 22  le at..<a href="
9e60: 68 74 74 70 73 3a 2f 2f 63 75 72 6c 2e 73 65 2f  https://curl.se/
9e70: 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74 2e 68  docs/caextract.h
9e80: 74 6d 6c 22 3e 43 41 20 63 65 72 74 69 66 69 63  tml">CA certific
9e90: 61 74 65 73 20 65 78 74 72 61 63 74 65 64 0d 0a  ates extracted..
9ea0: 66 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f 61 3e  from Mozilla</a>
9eb0: 20 69 6e 20 74 68 65 20 26 71 75 6f 74 3b 3c 62   in the &quot;<b
9ec0: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63 61   class="file">ca
9ed0: 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f  cert.pem</b>&quo
9ee0: 74 3b 20 66 69 6c 65 2e 20 59 6f 75 20 6d 75 73  t; file. You mus
9ef0: 74 20 74 68 65 6e 20 65 69 74 68 65 72 20 73 65  t then either se
9f00: 74 20 74 68 65 0d 0a 3c 62 20 63 6c 61 73 73 3d  t the..<b class=
9f10: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
9f20: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f  ERT_DIR</b> and/
9f30: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  or <b class="var
9f40: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
9f50: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  FILE</b> environ
9f60: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f  ment variables o
9f70: 72 20 74 68 65 0d 0a 3c 62 20 63 6c 61 73 73 3d  r the..<b class=
9f80: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
9f90: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  /b> or <b class=
9fa0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
9fb0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 74 6f 20  </b> options to 
9fc0: 74 68 65 20 43 41 20 63 65 72 74 20 66 69 6c 65  the CA cert file
9fd0: 27 73 20 69 6e 73 74 61 6c 6c 0d 0a 6c 6f 63 61  's install..loca
9fe0: 74 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f 75 72  tion. It is your
9ff0: 20 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20   responsibility 
a000: 74 6f 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c  to keep this fil
a010: 65 20 75 70 20 74 6f 20 64 61 74 65 2e 3c 2f 70  e up to date.</p
a020: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c  ></li>..</ul>..<
a030: 2f 64 69 76 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c  /div>..</div>..<
a040: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 35  div id="section5
a050: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
a060: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
a070: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 35  a name="section5
a080: 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f  ">Callback Optio
a090: 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0d 0a 3c 70 3e  ns</a></h2>..<p>
a0a0: 41 73 20 70 72 65 76 69 6f 75 73 6c 79 20 64 65  As previously de
a0b0: 73 63 72 69 62 65 64 2c 20 65 61 63 68 20 63 68  scribed, each ch
a0c0: 61 6e 6e 65 6c 20 63 61 6e 20 62 65 20 67 69 76  annel can be giv
a0d0: 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61 6c  en their own cal
a0e0: 6c 62 61 63 6b 73 0d 0a 74 6f 20 68 61 6e 64 6c  lbacks..to handl
a0f0: 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70  e intermediate p
a100: 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 68 65  rocessing by the
a110: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79   OpenSSL library
a120: 2c 20 75 73 69 6e 67 20 74 68 65 0d 0a 3c 62 20  , using the..<b 
a130: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
a140: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c 62 20  command</b>, <b 
a150: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
a160: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e  password</b>, an
a170: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  d <b class="opti
a180: 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f  on">-validate_co
a190: 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e  mmand</b> option
a1a0: 73 0d 0a 70 61 73 73 65 64 20 74 6f 20 65 69 74  s..passed to eit
a1b0: 68 65 72 20 6f 66 20 3c 62 20 63 6c 61 73 73 3d  her of <b class=
a1c0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
a1d0: 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73  t</b> or <b clas
a1e0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70  s="cmd">tls::imp
a1f0: 6f 72 74 3c 2f 62 3e 2e 0d 0a 55 6e 6c 69 6b 65  ort</b>...Unlike
a200: 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f   previous versio
a210: 6e 73 20 6f 66 20 54 63 6c 54 4c 53 2c 20 6f 6e  ns of TclTLS, on
a220: 6c 79 20 69 66 20 74 68 65 20 63 61 6c 6c 62 61  ly if the callba
a230: 63 6b 20 67 65 6e 65 72 61 74 65 73 20 61 6e 20  ck generates an 
a240: 65 72 72 6f 72 2c 0d 0a 77 69 6c 6c 20 74 68 65  error,..will the
a250: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d   <b class="syscm
a260: 64 22 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63  d">bgerror</b> c
a270: 6f 6d 6d 61 6e 64 20 62 65 20 69 6e 76 6f 6b 65  ommand be invoke
a280: 64 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72  d with the error
a290: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 3c 2f 70   information.</p
a2a0: 3e 0d 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73  >..<div id="subs
a2b0: 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22  ection4" class="
a2c0: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74  doctools_subsect
a2d0: 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65  ion"><h3><a name
a2e0: 3d 22 73 75 62 73 65 63 74 69 6f 6e 34 22 3e 56  ="subsection4">V
a2f0: 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d 6d 61 6e  alues for Comman
a300: 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f  d Callback</a></
a310: 68 33 3e 0d 0a 3c 70 3e 54 68 65 20 63 61 6c 6c  h3>..<p>The call
a320: 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20  back for the <b 
a330: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
a340: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69  command</b> opti
a350: 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 61 74  on is invoked at
a360: 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20   several points 
a370: 64 75 72 69 6e 67 20 74 68 65 0d 0a 4f 70 65 6e  during the..Open
a380: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 6e  SSL handshake an
a390: 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69 6e 65  d during routine
a3a0: 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 53 65 65   operations. See
a3b0: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70   below for the p
a3c0: 6f 73 73 69 62 6c 65 0d 0a 61 72 67 75 6d 65 6e  ossible..argumen
a3d0: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65  ts passed to the
a3e0: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
a3f0: 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e 65  . Values returne
a400: 64 20 66 72 6f 6d 20 74 68 65 20 63 61 6c 6c 62  d from the callb
a410: 61 63 6b 20 61 72 65 0d 0a 69 67 6e 6f 72 65 64  ack are..ignored
a420: 2e 3c 2f 70 3e 0d 0a 3c 64 6c 20 63 6c 61 73 73  .</p>..<dl class
a430: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f  ="doctools_optio
a440: 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  ns">..<dt><b cla
a450: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72 6f  ss="option">erro
a460: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
a470: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d  arg">channelId m
a480: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0d  essage</i></dt>.
a490: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72  .<dd><p>This for
a4a0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
a4b0: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65   invoked wheneve
a4c0: 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72  r an error occur
a4d0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69  s during the ini
a4e0: 74 69 61 6c 0d 0a 63 6f 6e 6e 65 63 74 69 6f 6e  tial..connection
a4f0: 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20  , handshake, or 
a500: 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20  I/O operations. 
a510: 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  The <i class="ar
a520: 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 20 61  g">message</i> a
a530: 72 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0d 0a  rgument can be..
a540: 66 72 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72  from the Tcl_Err
a550: 6e 6f 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66  noMsg, OpenSSL f
a560: 75 6e 63 74 69 6f 6e 20 3c 62 20 63 6c 61 73 73  unction <b class
a570: 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 45 52 52 5f  ="function">ERR_
a580: 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72  reason_error_str
a590: 69 6e 67 28 29 3c 2f 62 3e 2c 0d 0a 6f 72 20 61  ing()</b>,..or a
a5a0: 20 63 75 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e   custom message.
a5b0: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69   This callback i
a5c0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
a5d0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a   1.8.</p></dd>..
a5e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
a5f0: 74 69 6f 6e 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c  tion">info</b> <
a600: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
a610: 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72 20 6d 69  annelId major mi
a620: 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65  nor message type
a630: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
a640: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  p>This form of c
a650: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
a660: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ed by the OpenSS
a670: 4c 20 66 75 6e 63 74 69 6f 6e 0d 0a 3c 62 20 63  L function..<b c
a680: 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e  lass="function">
a690: 53 53 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c  SSL_set_info_cal
a6a0: 6c 62 61 63 6b 28 29 3c 2f 62 3e 20 64 75 72 69  lback()</b> duri
a6b0: 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 20 63  ng the initial c
a6c0: 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68 61  onnection and ha
a6d0: 6e 64 73 68 61 6b 65 0d 0a 6f 70 65 72 61 74 69  ndshake..operati
a6e0: 6f 6e 73 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  ons. The argumen
a6f0: 74 73 20 61 72 65 3a 3c 2f 70 3e 0d 0a 3c 64 6c  ts are:</p>..<dl
a700: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
a710: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0d 0a  _definitions">..
a720: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
a730: 67 22 3e 6d 61 6a 6f 72 3c 2f 69 3e 3c 2f 64 74  g">major</i></dt
a740: 3e 0d 0a 3c 64 64 3e 3c 70 3e 4d 61 6a 6f 72 20  >..<dd><p>Major 
a750: 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65 72 72  category for err
a760: 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20  or. Valid enums 
a770: 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63  are: <b class="c
a780: 6f 6e 73 74 22 3e 68 61 6e 64 73 68 61 6b 65 3c  onst">handshake<
a790: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
a7a0: 6f 6e 73 74 22 3e 61 6c 65 72 74 3c 2f 62 3e 2c  onst">alert</b>,
a7b0: 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  ..<b class="cons
a7c0: 74 22 3e 63 6f 6e 6e 65 63 74 3c 2f 62 3e 2c 20  t">connect</b>, 
a7d0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
a7e0: 3e 61 63 63 65 70 74 3c 2f 62 3e 2e 3c 2f 70 3e  >accept</b>.</p>
a7f0: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 69 20 63 6c  </dd>..<dt><i cl
a800: 61 73 73 3d 22 61 72 67 22 3e 6d 69 6e 6f 72 3c  ass="arg">minor<
a810: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
a820: 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20  >Minor category 
a830: 66 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64  for error. Valid
a840: 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63   enums are: <b c
a850: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 74 61  lass="const">sta
a860: 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  rt</b>, <b class
a870: 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 3c 2f 62  ="const">done</b
a880: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >, <b class="con
a890: 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c 0d 0a 3c  st">read</b>,..<
a8a0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
a8b0: 77 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c  write</b>, <b cl
a8c0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f 6f 70  ass="const">loop
a8d0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
a8e0: 63 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62 3e 2e  const">exit</b>.
a8f0: 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c  </p></dd>..<dt><
a900: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65  i class="arg">me
a910: 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  ssage</i></dt>..
a920: 3c 64 64 3e 3c 70 3e 44 65 73 63 72 69 70 74 69  <dd><p>Descripti
a930: 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 69 6e  ve message strin
a940: 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 67  g which may be g
a950: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20  enerated either 
a960: 62 79 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75  by..<b class="fu
a970: 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 74 61 74  nction">SSL_stat
a980: 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c  e_string_long()<
a990: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  /b> or <b class=
a9a0: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 61  "function">SSL_a
a9b0: 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67  lert_desc_string
a9c0: 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0d 0a 64 65  _long()</b>,..de
a9d0: 70 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63  pending on the c
a9e0: 6f 6e 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  ontext.</p></dd>
a9f0: 0d 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  ..<dt><i class="
aa00: 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64  arg">type</i></d
aa10: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 61  t>..<dd><p>For a
aa20: 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69  lerts, the possi
aa30: 62 6c 65 20 76 61 6c 75 65 73 20 61 72 65 3a 20  ble values are: 
aa40: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
aa50: 3e 77 61 72 6e 69 6e 67 3c 2f 62 3e 2c 0d 0a 3c  >warning</b>,..<
aa60: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
aa70: 66 61 74 61 6c 3c 2f 62 3e 2c 20 61 6e 64 20 3c  fatal</b>, and <
aa80: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
aa90: 75 6e 6b 6e 6f 77 6e 3c 2f 62 3e 2e 20 46 6f 72  unknown</b>. For
aaa0: 20 6f 74 68 65 72 73 2c 20 3c 62 20 63 6c 61 73   others, <b clas
aab0: 73 3d 22 63 6f 6e 73 74 22 3e 69 6e 66 6f 3c 2f  s="const">info</
aac0: 62 3e 20 69 73 20 75 73 65 64 2e 0d 0a 54 68 69  b> is used...Thi
aad0: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65  s argument is ne
aae0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
aaf0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f 64 6c  .</p></dd>..</dl
ab00: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
ab10: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 6d 65  lass="option">me
ab20: 73 73 61 67 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  ssage</b> <i cla
ab30: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
ab40: 49 64 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72  Id direction ver
ab50: 73 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70  sion content_typ
ab60: 65 20 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64  e message</i></d
ab70: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  t>..<dd><p>This 
ab80: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
ab90: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74   is invoked by t
aba0: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
abb0: 69 6f 6e 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 66  ion..<b class="f
abc0: 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74  unction">SSL_set
abd0: 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c  _msg_callback()<
abe0: 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6d  /b> whenever a m
abf0: 65 73 73 61 67 65 20 69 73 20 73 65 6e 74 20 6f  essage is sent o
ac00: 72 20 72 65 63 65 69 76 65 64 20 64 75 72 69 6e  r received durin
ac10: 67 20 74 68 65 0d 0a 69 6e 69 74 69 61 6c 20 63  g the..initial c
ac20: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73  onnection, hands
ac30: 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65  hake, or I/O ope
ac40: 72 61 74 69 6f 6e 73 2e 20 49 74 20 69 73 20 6f  rations. It is o
ac50: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 77 68  nly available wh
ac60: 65 6e 0d 0a 4f 70 65 6e 53 53 4c 20 69 73 20 63  en..OpenSSL is c
ac70: 6f 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68 65  omplied with the
ac80: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
ac90: 22 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61  ">enable-ssl-tra
aca0: 63 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54  ce</b> option. T
acb0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 0d  his callback is.
acc0: 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20  .new for TclTLS 
acd0: 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  1.8. The argumen
ace0: 74 73 20 61 72 65 3a 3c 2f 70 3e 0d 0a 3c 64 6c  ts are:</p>..<dl
acf0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
ad00: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0d 0a  _definitions">..
ad10: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
ad20: 67 22 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69 3e  g">direction</i>
ad30: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 44 69  </dt>..<dd><p>Di
ad40: 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65  rection is eithe
ad50: 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  r <b class="cons
ad60: 74 22 3e 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c  t">Sent</b> or <
ad70: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
ad80: 52 65 63 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70  Received</b>.</p
ad90: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 69 20 63  ></dd>..<dt><i c
ada0: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69  lass="arg">versi
adb0: 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  on</i></dt>..<dd
adc0: 3e 3c 70 3e 56 65 72 73 69 6f 6e 20 69 73 20 74  ><p>Version is t
add0: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  he protocol vers
ade0: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  ion.</p></dd>..<
adf0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
ae00: 22 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f  ">content_type</
ae10: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
ae20: 43 6f 6e 74 65 6e 74 20 74 79 70 65 20 69 73 20  Content type is 
ae30: 74 68 65 20 6d 65 73 73 61 67 65 20 63 6f 6e 74  the message cont
ae40: 65 6e 74 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64  ent type.</p></d
ae50: 64 3e 0d 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  d>..<dt><i class
ae60: 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f  ="arg">message</
ae70: 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e  i></dt>..<dd><p>
ae80: 4d 65 73 73 61 67 65 20 69 73 20 6d 6f 72 65 20  Message is more 
ae90: 69 6e 66 6f 20 66 72 6f 6d 20 74 68 65 20 3c 62  info from the <b
aea0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 53   class="const">S
aeb0: 53 4c 5f 74 72 61 63 65 3c 2f 62 3e 20 41 50 49  SL_trace</b> API
aec0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f 64 6c  .</p></dd>..</dl
aed0: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63  ></dd>..<dt><b c
aee0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 65  lass="option">se
aef0: 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  ssion</b> <i cla
af00: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
af10: 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 65  Id session_id se
af20: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66  ssion_ticket lif
af30: 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  etime</i></dt>..
af40: 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d  <dd><p>This form
af50: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20   of callback is 
af60: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f  invoked by the O
af70: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0d  penSSL function.
af80: 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74  .<b class="funct
af90: 69 6f 6e 22 3e 53 53 4c 5f 43 54 58 5f 73 65 73  ion">SSL_CTX_ses
afa0: 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f  s_set_new_cb()</
afb0: 62 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65  b> whenever a ne
afc0: 77 20 73 65 73 73 69 6f 6e 20 69 64 20 69 73 20  w session id is 
afd0: 73 65 6e 74 20 62 79 20 74 68 65 0d 0a 73 65 72  sent by the..ser
afe0: 76 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 69  ver during the i
aff0: 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f  nitial connectio
b000: 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 20  n and handshake 
b010: 61 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e 67 20  and also during 
b020: 74 68 65 20 73 65 73 73 69 6f 6e 0d 0a 69 66 20  the session..if 
b030: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
b040: 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e 64  tion">-post_hand
b050: 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  shake</b> option
b060: 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e   is set to true.
b070: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69   This callback i
b080: 73 20 6e 65 77 20 66 6f 72 0d 0a 54 63 6c 54 4c  s new for..TclTL
b090: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d  S 1.8. The argum
b0a0: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0d 0a 3c  ents are:</p>..<
b0b0: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
b0c0: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
b0d0: 0d 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  ..<dt><i class="
b0e0: 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c  arg">session_id<
b0f0: 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70  /i></dt>..<dd><p
b100: 3e 53 65 73 73 69 6f 6e 20 49 64 20 69 73 20 74  >Session Id is t
b110: 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73 69  he current sessi
b120: 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 3c 2f 70  on identifier</p
b130: 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 69 20 63  ></dd>..<dt><i c
b140: 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69  lass="arg">sessi
b150: 6f 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64  on_ticket</i></d
b160: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 69 63 6b 65  t>..<dd><p>Ticke
b170: 74 20 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e  t is the session
b180: 20 74 69 63 6b 65 74 20 69 6e 66 6f 3c 2f 70 3e   ticket info</p>
b190: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 69 20 63 6c  </dd>..<dt><i cl
b1a0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 66 65 74 69  ass="arg">lifeti
b1b0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64  me</i></dt>..<dd
b1c0: 3e 3c 70 3e 4c 69 66 65 74 69 6d 65 20 69 73 20  ><p>Lifetime is 
b1d0: 74 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74  the ticket lifet
b1e0: 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c  ime in seconds.<
b1f0: 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f 64 6c 3e 3c  /p></dd>..</dl><
b200: 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c 61  /dd>..<dt><b cla
b210: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69  ss="option">veri
b220: 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  fy</b> <i class=
b230: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
b240: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75  depth cert statu
b250: 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e  s error</i></dt>
b260: 0d 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 63 61  ..<dd><p>This ca
b270: 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64  llback was moved
b280: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70   to <b class="op
b290: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63  tion">-validatec
b2a0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63  ommand</b> in Tc
b2b0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
b2c0: 64 3e 0d 0a 3c 2f 64 6c 3e 0d 0a 3c 2f 64 69 76  d>..</dl>..</div
b2d0: 3e 0d 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73  >..<div id="subs
b2e0: 65 63 74 69 6f 6e 35 22 20 63 6c 61 73 73 3d 22  ection5" class="
b2f0: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74  doctools_subsect
b300: 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65  ion"><h3><a name
b310: 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22 3e 56  ="subsection5">V
b320: 61 6c 75 65 73 20 66 6f 72 20 50 61 73 73 77 6f  alues for Passwo
b330: 72 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c  rd Callback</a><
b340: 2f 68 33 3e 0d 0a 3c 70 3e 54 68 65 20 63 61 6c  /h3>..<p>The cal
b350: 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c 62  lback for the <b
b360: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
b370: 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70  -password</b> op
b380: 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20  tion is invoked 
b390: 62 79 20 54 63 6c 54 4c 53 20 77 68 65 6e 65 76  by TclTLS whenev
b3a0: 65 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73  er OpenSSL needs
b3b0: 0d 0a 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61  ..to obtain a pa
b3c0: 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c 6f  ssword. See belo
b3d0: 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62  w for the possib
b3e0: 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73  le arguments pas
b3f0: 73 65 64 20 74 6f 20 74 68 65 0d 0a 63 61 6c 6c  sed to the..call
b400: 62 61 63 6b 20 73 63 72 69 70 74 2e 20 54 68 65  back script. The
b410: 20 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70   user provided p
b420: 61 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63  assword is expec
b430: 74 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e  ted to be return
b440: 65 64 20 62 79 20 74 68 65 0d 0a 63 61 6c 6c 62  ed by the..callb
b450: 61 63 6b 2e 3c 2f 70 3e 0d 0a 3c 64 6c 20 63 6c  ack.</p>..<dl cl
b460: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70  ass="doctools_op
b470: 74 69 6f 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 62 20  tions">..<dt><b 
b480: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70  class="option">p
b490: 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63  assword</b> <i c
b4a0: 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61  lass="arg">rwfla
b4b0: 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0d  g size</i></dt>.
b4c0: 0a 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20  .<dd><p>Invoked 
b4d0: 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20  when loading or 
b4e0: 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 79  storing an encry
b4f0: 70 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 69  pted PEM certifi
b500: 63 61 74 65 2e 20 54 68 65 20 61 72 67 75 6d 65  cate. The argume
b510: 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0d 0a 3c 64  nts are:</p>..<d
b520: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
b530: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0d  s_definitions">.
b540: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61  .<dt><i class="a
b550: 72 67 22 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c 2f  rg">rwflag</i></
b560: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  dt>..<dd><p>The 
b570: 72 65 61 64 2f 77 72 69 74 65 20 66 6c 61 67 20  read/write flag 
b580: 69 73 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67  is 0 for reading
b590: 2f 64 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31  /decryption or 1
b5a0: 20 66 6f 72 20 77 72 69 74 69 6e 67 2f 65 6e 63   for writing/enc
b5b0: 72 79 70 74 69 6f 6e 2e 0d 0a 54 68 65 20 6c 61  ryption...The la
b5c0: 74 74 65 72 20 63 61 6e 20 62 65 20 75 73 65 64  tter can be used
b5d0: 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68   to determine wh
b5e0: 65 6e 20 74 6f 20 70 72 6f 6d 70 74 20 74 68 65  en to prompt the
b5f0: 20 75 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 6d   user to confirm
b600: 2e 0d 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74  ...This argument
b610: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
b620: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
b630: 0d 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  ..<dt><i class="
b640: 61 72 67 22 3e 73 69 7a 65 3c 2f 69 3e 3c 2f 64  arg">size</i></d
b650: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73  t>..<dd><p>The s
b660: 69 7a 65 20 69 73 20 74 68 65 20 6d 61 78 69 6d  ize is the maxim
b670: 75 6d 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65  um length of the
b680: 20 70 61 73 73 77 6f 72 64 20 69 6e 20 62 79 74   password in byt
b690: 65 73 2e 0d 0a 54 68 69 73 20 61 72 67 75 6d 65  es...This argume
b6a0: 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  nt is new for Tc
b6b0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
b6c0: 64 3e 0d 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0d 0a  d>..</dl></dd>..
b6d0: 3c 2f 64 6c 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c  </dl>..</div>..<
b6e0: 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69  div id="subsecti
b6f0: 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on6" class="doct
b700: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
b710: 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75  ><h3><a name="su
b720: 62 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65  bsection6">Value
b730: 73 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43  s for Validate C
b740: 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c  ommand Callback<
b750: 2f 61 3e 3c 2f 68 33 3e 0d 0a 3c 70 3e 54 68 65  /a></h3>..<p>The
b760: 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68   callback for th
b770: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e <b class="opti
b780: 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d  on">-validatecom
b790: 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20  mand</b> option 
b7a0: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e  is invoked durin
b7b0: 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0d  g the handshake.
b7c0: 0a 70 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 65  .process in orde
b7d0: 72 20 66 6f 72 20 74 68 65 20 61 70 70 6c 69 63  r for the applic
b7e0: 61 74 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74  ation to validat
b7f0: 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 76  e the provided v
b800: 61 6c 75 65 28 73 29 2e 20 53 65 65 0d 0a 62 65  alue(s). See..be
b810: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73  low for the poss
b820: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70  ible arguments p
b830: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c  assed to the cal
b840: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 49 66  lback script. If
b850: 20 6e 6f 74 0d 0a 73 70 65 63 69 66 69 65 64 2c   not..specified,
b860: 20 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63   OpenSSL will ac
b870: 63 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63  cept all valid c
b880: 65 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20  ertificates and 
b890: 65 78 74 65 6e 73 69 6f 6e 73 2e 20 54 6f 20 72  extensions. To r
b8a0: 65 6a 65 63 74 0d 0a 74 68 65 20 76 61 6c 75 65  eject..the value
b8b0: 20 61 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63   and abort the c
b8c0: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63  onnection, the c
b8d0: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72  allback should r
b8e0: 65 74 75 72 6e 20 30 2e 20 54 6f 20 61 63 63 65  eturn 0. To acce
b8f0: 70 74 20 74 68 65 0d 0a 76 61 6c 75 65 20 61 6e  pt the..value an
b900: 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63  d continue the c
b910: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68  onnection, it sh
b920: 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e 20 54  ould return 1. T
b930: 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c  o reject the val
b940: 75 65 2c 20 62 75 74 0d 0a 63 6f 6e 74 69 6e 75  ue, but..continu
b950: 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  e the connection
b960: 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75  , it should retu
b970: 72 6e 20 32 2e 20 54 68 69 73 20 63 61 6c 6c 62  rn 2. This callb
b980: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54  ack is new for T
b990: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 0d 0a  clTLS 1.8.</p>..
b9a0: 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <dl class="docto
b9b0: 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0d 0a 3c  ols_options">..<
b9c0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
b9d0: 69 6f 6e 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69  ion">alpn</b> <i
b9e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b9f0: 6e 6e 65 6c 49 64 20 70 72 6f 74 6f 63 6f 6c 20  nnelId protocol 
ba00: 6d 61 74 63 68 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  match</i></dt>..
ba10: 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65  <dd><p>For serve
ba20: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66  rs, this form of
ba30: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
ba40: 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63 6c  oked when the cl
ba50: 69 65 6e 74 20 41 4c 50 4e 20 65 78 74 65 6e 73  ient ALPN extens
ba60: 69 6f 6e 20 69 73 0d 0a 72 65 63 65 69 76 65 64  ion is..received
ba70: 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61  . If <i class="a
ba80: 72 67 22 3e 6d 61 74 63 68 3c 2f 69 3e 20 69 73  rg">match</i> is
ba90: 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 69 20 63   true, then <i c
baa0: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f  lass="arg">proto
bab0: 63 6f 6c 3c 2f 69 3e 20 69 73 20 74 68 65 20 66  col</i> is the f
bac0: 69 72 73 74 0d 0a 3c 62 20 63 6c 61 73 73 3d 22  irst..<b class="
bad0: 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62  option">-alpn</b
bae0: 3e 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f  > protocol optio
baf0: 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62  n in common to b
bb00: 6f 74 68 20 74 68 65 20 63 6c 69 65 6e 74 20 61  oth the client a
bb10: 6e 64 20 73 65 72 76 65 72 2e 0d 0a 49 66 20 6e  nd server...If n
bb20: 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c  ot, the first cl
bb30: 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 20 70  ient specified p
bb40: 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 2e  rotocol is used.
bb50: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69   This callback i
bb60: 73 20 63 61 6c 6c 65 64 0d 0a 61 66 74 65 72 20  s called..after 
bb70: 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 53 4e  the Hello and SN
bb80: 49 20 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e  I callbacks.</p>
bb90: 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20 63 6c  </dd>..<dt><b cl
bba0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 68 65 6c  ass="option">hel
bbb0: 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  lo</b> <i class=
bbc0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
bbd0: 73 65 72 76 65 72 6e 61 6d 65 20 73 65 73 73 69  servername sessi
bbe0: 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a  on_id</i></dt>..
bbf0: 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65  <dd><p>For serve
bc00: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66  rs, this form of
bc10: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
bc20: 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65  oked during clie
bc30: 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 65  nt hello message
bc40: 0d 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68  ..processing. Th
bc50: 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20  e purpose is so 
bc60: 74 68 65 20 73 65 72 76 65 72 20 63 61 6e 20 73  the server can s
bc70: 65 6c 65 63 74 20 74 68 65 20 61 70 70 72 6f 70  elect the approp
bc80: 72 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74  riate certificat
bc90: 65 0d 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 6f  e..to present to
bca0: 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64   the client, and
bcb0: 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 63   to make other c
bcc0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 6a  onfiguration adj
bcd0: 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e  ustments relevan
bce0: 74 0d 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65  t..to that serve
bcf0: 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63  r name and its c
bd00: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74  onfiguration. It
bd10: 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72   is called befor
bd20: 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c  e the SNI and AL
bd30: 50 4e 0d 0a 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f  PN..callbacks.</
bd40: 70 3e 3c 2f 64 64 3e 0d 0a 3c 64 74 3e 3c 62 20  p></dd>..<dt><b 
bd50: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73  class="option">s
bd60: 6e 69 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ni</b> <i class=
bd70: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
bd80: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f  servername</i></
bd90: 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20  dt>..<dd><p>For 
bda0: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
bdb0: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
bdc0: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74  s invoked when t
bdd0: 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49  he Server Name I
bde0: 6e 64 69 63 61 74 69 6f 6e 0d 0a 28 53 4e 49 29  ndication..(SNI)
bdf0: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65   extension is re
be00: 63 65 69 76 65 64 2e 20 54 68 65 20 3c 69 20 63  ceived. The <i c
be10: 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 72 76 65  lass="arg">serve
be20: 72 6e 61 6d 65 3c 2f 69 3e 20 61 72 67 75 6d 65  rname</i> argume
be30: 6e 74 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74  nt is the client
be40: 0d 0a 70 72 6f 76 69 64 65 64 20 73 65 72 76 65  ..provided serve
be50: 72 20 6e 61 6d 65 20 73 70 65 63 69 66 69 65 64  r name specified
be60: 20 69 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73   in the <b class
be70: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65  ="option">-serve
be80: 72 6e 61 6d 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  rname</b> option
be90: 2e 20 54 68 65 0d 0a 70 75 72 70 6f 73 65 20 69  . The..purpose i
bea0: 73 20 73 6f 20 77 68 65 6e 20 61 20 73 65 72 76  s so when a serv
beb0: 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74  er supports mult
bec0: 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 65 20  iple names, the 
bed0: 72 69 67 68 74 20 63 65 72 74 69 66 69 63 61 74  right certificat
bee0: 65 0d 0a 63 61 6e 20 62 65 20 75 73 65 64 2e 20  e..can be used. 
bef0: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 66 74  It is called aft
bf00: 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 63 61 6c  er the Hello cal
bf10: 6c 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72 65  lback but before
bf20: 20 74 68 65 20 41 4c 50 4e 0d 0a 63 61 6c 6c 62   the ALPN..callb
bf30: 61 63 6b 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c  ack.</p></dd>..<
bf40: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
bf50: 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20  ion">verify</b> 
bf60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
bf70: 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63  hannelId depth c
bf80: 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f 72  ert status error
bf90: 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c  </i></dt>..<dd><
bfa0: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  p>This form of c
bfb0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
bfc0: 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 68  ed by OpenSSL wh
bfd0: 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 66 69  en a new certifi
bfe0: 63 61 74 65 20 69 73 20 72 65 63 65 69 76 65 64  cate is received
bff0: 0d 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72 2e  ..from the peer.
c000: 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 20 63   It allows the c
c010: 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b 20 74  lient to check t
c020: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76  he certificate v
c030: 65 72 69 66 69 63 61 74 69 6f 6e 0d 0a 72 65 73  erification..res
c040: 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20  ults and choose 
c050: 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69  whether to conti
c060: 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69  nue or not. It i
c070: 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63  s called for eac
c080: 68 0d 0a 63 65 72 74 69 66 69 63 61 74 65 20 69  h..certificate i
c090: 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  n the certificat
c0a0: 65 20 63 68 61 69 6e 2e 20 54 68 69 73 20 63 61  e chain. This ca
c0b0: 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64  llback was moved
c0c0: 20 66 72 6f 6d 0d 0a 3c 62 20 63 6c 61 73 73 3d   from..<b class=
c0d0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e  "option">-comman
c0e0: 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20  d</b> in TclTLS 
c0f0: 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  1.8. The argumen
c100: 74 73 20 61 72 65 3a 3c 2f 70 3e 0d 0a 3c 64 6c  ts are:</p>..<dl
c110: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
c120: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0d 0a  _definitions">..
c130: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
c140: 67 22 3e 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74  g">depth</i></dt
c150: 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 65  >..<dd><p>The de
c160: 70 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 67  pth is the integ
c170: 65 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 20  er depth of the 
c180: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74  certificate in t
c190: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63  he certificate c
c1a0: 68 61 69 6e 2c 0d 0a 77 68 65 72 65 20 30 20 69  hain,..where 0 i
c1b0: 73 20 74 68 65 20 70 65 65 72 20 63 65 72 74 69  s the peer certi
c1c0: 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 65  ficate and highe
c1d0: 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75  r values going u
c1e0: 70 20 74 6f 20 74 68 65 20 43 65 72 74 69 66 69  p to the Certifi
c1f0: 63 61 74 65 0d 0a 41 75 74 68 6f 72 69 74 79 20  cate..Authority 
c200: 28 43 41 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  (CA).</p></dd>..
c210: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
c220: 67 22 3e 63 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e  g">cert</i></dt>
c230: 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72  ..<dd><p>The cer
c240: 74 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20  t argument is a 
c250: 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75  list of key-valu
c260: 65 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72 20  e pairs similar 
c270: 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65  to those returne
c280: 64 20 62 79 0d 0a 3c 62 20 63 6c 61 73 73 3d 22  d by..<b class="
c290: 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73  cmd">tls::status
c2a0: 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  </b>.</p></dd>..
c2b0: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
c2c0: 67 22 3e 73 74 61 74 75 73 3c 2f 69 3e 3c 2f 64  g">status</i></d
c2d0: 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73  t>..<dd><p>The s
c2e0: 74 61 74 75 73 20 61 72 67 75 6d 65 6e 74 20 69  tatus argument i
c2f0: 73 20 74 68 65 20 62 6f 6f 6c 65 61 6e 20 76 61  s the boolean va
c300: 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 75  lidity of the cu
c310: 72 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74  rrent certificat
c320: 65 20 77 68 65 72 65 20 30 0d 0a 69 73 20 69 6e  e where 0..is in
c330: 76 61 6c 69 64 20 61 6e 64 20 31 20 69 73 20 76  valid and 1 is v
c340: 61 6c 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a  alid.</p></dd>..
c350: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
c360: 67 22 3e 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74  g">error</i></dt
c370: 3e 0d 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65 72  >..<dd><p>The er
c380: 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69 73 20  ror argument is 
c390: 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67  the error messag
c3a0: 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72  e, if any, gener
c3b0: 61 74 65 64 20 62 79 0d 0a 3c 62 20 63 6c 61 73  ated by..<b clas
c3c0: 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 58 35 30  s="function">X50
c3d0: 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f  9_STORE_CTX_get_
c3e0: 65 72 72 6f 72 28 29 3c 2f 62 3e 2e 3c 2f 70 3e  error()</b>.</p>
c3f0: 3c 2f 64 64 3e 0d 0a 3c 2f 64 6c 3e 3c 2f 64 64  </dd>..</dl></dd
c400: 3e 0d 0a 3c 2f 64 6c 3e 0d 0a 3c 70 3e 52 65 66  >..</dl>..<p>Ref
c410: 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74  erence implement
c420: 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20  ations of these 
c430: 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72  callbacks are pr
c440: 6f 76 69 64 65 64 20 69 6e 20 26 71 75 6f 74 3b  ovided in &quot;
c450: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e  <b class="file">
c460: 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74  tls.tcl</b>&quot
c470: 3b 0d 0a 61 73 20 3c 62 20 63 6c 61 73 73 3d 22  ;..as <b class="
c480: 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61  cmd">tls::callba
c490: 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ck</b>, <b class
c4a0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73  ="cmd">tls::pass
c4b0: 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62  word</b>, and <b
c4c0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
c4d0: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61  ::validate_comma
c4e0: 6e 64 3c 2f 62 3e 0d 0a 72 65 73 70 65 63 74 69  nd</b>..respecti
c4f0: 76 65 6c 79 2e 20 4e 6f 74 65 20 74 68 61 74 20  vely. Note that 
c500: 74 68 65 73 65 20 61 72 65 20 6f 6e 6c 79 20 3c  these are only <
c510: 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69  em>sample</em> i
c520: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 20  mplementations. 
c530: 49 6e 20 61 20 6d 6f 72 65 0d 0a 72 65 61 6c 69  In a more..reali
c540: 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 20  stic deployment 
c550: 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66  you would specif
c560: 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62  y your own callb
c570: 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65  ack scripts on e
c580: 61 63 68 20 54 4c 53 0d 0a 63 68 61 6e 6e 65 6c  ach TLS..channel
c590: 20 75 73 69 6e 67 20 74 68 65 20 3c 62 20 63 6c   using the <b cl
c5a0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f  ass="option">-co
c5b0: 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c  mmand</b>, <b cl
c5c0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61  ass="option">-pa
c5d0: 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0d  ssword</b>, and.
c5e0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
c5f0: 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d  n">-validate_com
c600: 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73  mand</b> options
c610: 2e 3c 2f 70 3e 0d 0a 3c 70 3e 54 68 65 20 64 65  .</p>..<p>The de
c620: 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77  fault behavior w
c630: 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73  hen the <b class
c640: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61  ="option">-comma
c650: 6e 64 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c  nd</b> and <b cl
c660: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
c670: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
c680: 62 3e 0d 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20  b>..options are 
c690: 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2c 20 69  not specified, i
c6a0: 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20  s for TclTLS to 
c6b0: 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f  process the asso
c6c0: 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 0d 0a  ciated library..
c6d0: 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e  callbacks intern
c6e0: 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 75 6c  ally. The defaul
c6f0: 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20  t behavior when 
c700: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
c710: 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c  tion">-password<
c720: 2f 62 3e 20 6f 70 74 69 6f 6e 0d 0a 69 73 20 6e  /b> option..is n
c730: 6f 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20  ot specified is 
c740: 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72  for TclTLS to pr
c750: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69  ocess the associ
c760: 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c  ated library cal
c770: 6c 62 61 63 6b 73 20 62 79 0d 0a 61 74 74 65 6d  lbacks by..attem
c780: 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 20 3c 62  pting to call <b
c790: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
c7a0: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2e 20  ::password</b>. 
c7b0: 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62  The difference b
c7c0: 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f  etween these two
c7d0: 0d 0a 62 65 68 61 76 69 6f 72 73 20 69 73 20 61  ..behaviors is a
c7e0: 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20   consequence of 
c7f0: 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f 6d 70  maintaining comp
c800: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 65  atibility with e
c810: 61 72 6c 69 65 72 0d 0a 69 6d 70 6c 65 6d 65 6e  arlier..implemen
c820: 74 61 74 69 6f 6e 73 2e 3c 2f 70 3e 0d 0a 3c 70  tations.</p>..<p
c830: 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20  ><em>The use of 
c840: 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63 61  the reference ca
c850: 6c 6c 62 61 63 6b 73 20 3c 62 20 63 6c 61 73 73  llbacks <b class
c860: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c  ="cmd">tls::call
c870: 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  back</b>, <b cla
c880: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61  ss="cmd">tls::pa
c890: 73 73 77 6f 72 64 3c 2f 62 3e 2c 0d 0a 61 6e 64  ssword</b>,..and
c8a0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
c8b0: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f  tls::validate_co
c8c0: 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 6e 6f 74  mmand</b> is not
c8d0: 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 54 68   recommended. Th
c8e0: 65 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65  ey may be remove
c8f0: 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65  d from future re
c900: 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e  leases.</em></p>
c910: 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 2f 64 69 76 3e  ..</div>..</div>
c920: 0d 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69  ..<div id="secti
c930: 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on6" class="doct
c940: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68  ools_section"><h
c950: 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69  2><a name="secti
c960: 6f 6e 36 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f  on6">Debug</a></
c970: 68 32 3e 0d 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74  h2>..<p>For most
c980: 20 64 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73   debugging needs
c990: 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  , the <b class="
c9a0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63  option">-callbac
c9b0: 6b 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 63 61 6e  k</b> option can
c9c0: 20 62 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76   be used to prov
c9d0: 69 64 65 0d 0a 73 75 66 66 69 63 69 65 6e 74 20  ide..sufficient 
c9e0: 69 6e 73 69 67 68 74 20 61 6e 64 20 69 6e 66 6f  insight and info
c9f0: 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54  rmation on the T
ca00: 4c 53 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64  LS handshake and
ca10: 20 70 72 6f 67 72 65 73 73 2e 20 49 66 0d 0a 66   progress. If..f
ca20: 75 72 74 68 65 72 20 74 72 6f 75 62 6c 65 73 68  urther troublesh
ca30: 6f 6f 74 69 6e 67 20 69 6e 73 69 67 68 74 20 69  ooting insight i
ca40: 73 20 6e 65 65 64 65 64 2c 20 74 68 65 20 63 6f  s needed, the co
ca50: 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f  mpile time optio
ca60: 6e 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  n..<b class="opt
ca70: 69 6f 6e 22 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65  ion">--enable-de
ca80: 62 75 67 3c 2f 62 3e 20 63 61 6e 20 62 65 20 75  bug</b> can be u
ca90: 73 65 64 20 74 6f 20 67 65 74 20 64 65 74 61 69  sed to get detai
caa0: 6c 65 64 20 65 78 65 63 75 74 69 6f 6e 20 66 6c  led execution fl
cab0: 6f 77 20 73 74 61 74 75 73 2e 3c 2f 70 3e 0d 0a  ow status.</p>..
cac0: 3c 70 3e 54 4c 53 20 6b 65 79 20 6c 6f 67 67 69  <p>TLS key loggi
cad0: 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62 6c 65  ng can be enable
cae0: 64 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 65  d by setting the
caf0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72   environment var
cb00: 69 61 62 6c 65 0d 0a 3c 62 20 63 6c 61 73 73 3d  iable..<b class=
cb10: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 4b 45  "variable">SSLKE
cb20: 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f 20  YLOGFILE</b> to 
cb30: 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20  the name of the 
cb40: 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e 20  file to log to. 
cb50: 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 4c  Then whenever TL
cb60: 53 20 6b 65 79 0d 0a 6d 61 74 65 72 69 61 6c 20  S key..material 
cb70: 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20  is generated or 
cb80: 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c  received it will
cb90: 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68   be logged to th
cba0: 65 20 66 69 6c 65 2e 20 54 68 69 73 20 69 73 20  e file. This is 
cbb0: 75 73 65 66 75 6c 0d 0a 66 6f 72 20 6c 6f 67 67  useful..for logg
cbc0: 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72  ing key data for
cbd0: 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67   network logging
cbe0: 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f   tools to use to
cbf0: 20 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74   decrypt the dat
cc00: 61 2e 3c 2f 70 3e 0d 0a 3c 70 3e 54 68 65 20 3c  a.</p>..<p>The <
cc10: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
cc20: 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 62  e">tls::debug</b
cc30: 3e 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69  > variable provi
cc40: 64 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f  des some additio
cc50: 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72  nal control over
cc60: 20 74 68 65 0d 0a 64 65 62 75 67 20 6c 6f 67 67   the..debug logg
cc70: 69 6e 67 20 69 6e 20 74 68 65 20 3c 62 20 63 6c  ing in the <b cl
cc80: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63  ass="cmd">tls::c
cc90: 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20  allback</b>, <b 
cca0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
ccb0: 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61  :password</b>, a
ccc0: 6e 64 0d 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6d  nd..<b class="cm
ccd0: 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65  d">tls::validate
cce0: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 64 65 66  _command</b> def
ccf0: 61 75 6c 74 20 68 61 6e 64 6c 65 72 73 20 69 6e  ault handlers in
cd00: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
cd10: 22 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c 2f  "file">tls.tcl</
cd20: 62 3e 26 71 75 6f 74 3b 2e 0d 0a 54 68 65 20 64  b>&quot;...The d
cd30: 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 73 20  efault value is 
cd40: 30 20 77 69 74 68 20 68 69 67 68 65 72 20 76 61  0 with higher va
cd50: 6c 75 65 73 20 70 72 6f 64 75 63 69 6e 67 20 6d  lues producing m
cd60: 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f  ore diagnostic o
cd70: 75 74 70 75 74 2c 0d 0a 61 6e 64 20 77 69 6c 6c  utput,..and will
cd80: 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 20   also force the 
cd90: 76 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e  verify method in
cda0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
cdb0: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62  tls::callback</b
cdc0: 3e 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0d  > to accept the.
cdd0: 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76  .certificate, ev
cde0: 65 6e 20 69 66 20 69 74 20 69 73 20 69 6e 76 61  en if it is inva
cdf0: 6c 69 64 20 77 68 65 6e 20 74 68 65 20 3c 62 20  lid when the <b 
ce00: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
ce10: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c  validatecommand<
ce20: 2f 62 3e 0d 0a 6f 70 74 69 6f 6e 20 69 73 20 73  /b>..option is s
ce30: 65 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22  et to <b class="
ce40: 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61  cmd">tls::valida
ce50: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e 3c  te_command</b>.<
ce60: 2f 70 3e 0d 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20  /p>..<p><em>The 
ce70: 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61  use of the varia
ce80: 62 6c 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  ble <b class="va
ce90: 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62  riable">tls::deb
cea0: 75 67 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65  ug</b> is not re
ceb0: 63 6f 6d 6d 65 6e 64 65 64 2e 0d 0a 49 74 20 6d  commended...It m
cec0: 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72  ay be removed fr
ced0: 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73  om future releas
cee0: 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0d 0a 3c 2f  es.</em></p>..</
cef0: 64 69 76 3e 0d 0a 3c 64 69 76 20 69 64 3d 22 73  div>..<div id="s
cf00: 65 63 74 69 6f 6e 37 22 20 63 6c 61 73 73 3d 22  ection7" class="
cf10: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
cf20: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h2><a name="s
cf30: 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d 70 6c 65  ection7">Example
cf40: 73 3c 2f 61 3e 3c 2f 68 32 3e 0d 0a 3c 70 3e 54  s</a></h2>..<p>T
cf50: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65  he following are
cf60: 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73   example scripts
cf70: 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 61 20 77   to download a w
cf80: 65 62 70 61 67 65 20 61 6e 64 20 66 69 6c 65 20  ebpage and file 
cf90: 75 73 69 6e 67 20 74 68 65 0d 0a 68 74 74 70 20  using the..http 
cfa0: 70 61 63 6b 61 67 65 2e 20 53 65 65 20 3c 73 70  package. See <sp
cfb0: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65  an class="sectre
cfc0: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  f"><a href="#sec
cfd0: 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61  tion4">Certifica
cfe0: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
cff0: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 77 68 65  ></span> for whe
d000: 6e 20 74 68 65 0d 0a 3c 62 20 63 6c 61 73 73 3d  n the..<b class=
d010: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
d020: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
d030: 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f  ption">-cafile</
d040: 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73  b>, and <b class
d050: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f  ="option">-casto
d060: 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 61  re</b> options a
d070: 72 65 20 61 6c 73 6f 0d 0a 6e 65 65 64 65 64 2e  re also..needed.
d080: 20 53 65 65 20 74 68 65 20 26 71 75 6f 74 3b 3c   See the &quot;<
d090: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 64  b class="file">d
d0a0: 65 6d 6f 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 64  emos</b>&quot; d
d0b0: 69 72 65 63 74 6f 72 79 20 66 6f 72 20 6d 6f 72  irectory for mor
d0c0: 65 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74  e example script
d0d0: 73 2e 3c 2f 70 3e 0d 0a 3c 70 3e 45 78 61 6d 70  s.</p>..<p>Examp
d0e0: 6c 65 20 23 31 3a 20 44 6f 77 6e 6c 6f 61 64 20  le #1: Download 
d0f0: 61 20 77 65 62 20 70 61 67 65 3c 2f 70 3e 0d 0a  a web page</p>..
d100: 3c 70 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74  <pre class="doct
d110: 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0d 0a  ools_example">..
d120: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20  package require 
d130: 68 74 74 70 0d 0a 70 61 63 6b 61 67 65 20 72 65  http..package re
d140: 71 75 69 72 65 20 74 6c 73 0d 0a 73 65 74 20 75  quire tls..set u
d150: 72 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f  rl &quot;https:/
d160: 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 26 71 75 6f  /www.tcl.tk/&quo
d170: 74 3b 0d 0a 68 74 74 70 3a 3a 72 65 67 69 73 74  t;..http::regist
d180: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69  er https 443 [li
d190: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74  st ::tls::socket
d1a0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65   -autoservername
d1b0: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0d 0a   1 -require 1]..
d1c0: 23 20 47 65 74 20 55 52 4c 0d 0a 73 65 74 20 74  # Get URL..set t
d1d0: 6f 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75  oken [http::getu
d1e0: 72 6c 20 24 75 72 6c 5d 0d 0a 23 20 43 68 65 63  rl $url]..# Chec
d1f0: 6b 20 66 6f 72 20 65 72 72 6f 72 0d 0a 69 66 20  k for error..if 
d200: 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24  {[http::status $
d210: 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b  token] ne &quot;
d220: 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0d 0a 20 20 20  ok&quot;} {..   
d230: 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71   puts [format &q
d240: 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f  uot;Error %s&quo
d250: 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73  t; [http::status
d260: 20 24 74 6f 6b 65 6e 5d 5d 0d 0a 7d 0d 0a 23 20   $token]]..}..# 
d270: 53 61 76 65 20 77 65 62 20 70 61 67 65 20 74 6f  Save web page to
d280: 20 66 69 6c 65 0d 0a 73 65 74 20 63 68 20 5b 6f   file..set ch [o
d290: 70 65 6e 20 65 78 61 6d 70 6c 65 2e 68 74 6d 6c  pen example.html
d2a0: 20 77 62 5d 0d 0a 70 75 74 73 20 24 63 68 20 5b   wb]..puts $ch [
d2b0: 68 74 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65  http::data $toke
d2c0: 6e 5d 0d 0a 63 6c 6f 73 65 20 24 63 68 0d 0a 23  n]..close $ch..#
d2d0: 20 43 6c 65 61 6e 75 70 0d 0a 3a 3a 68 74 74 70   Cleanup..::http
d2e0: 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e  ::cleanup $token
d2f0: 0d 0a 3c 2f 70 72 65 3e 0d 0a 3c 70 3e 45 78 61  ..</pre>..<p>Exa
d300: 6d 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61  mple #2: Downloa
d310: 64 20 61 20 66 69 6c 65 3c 2f 70 3e 0d 0a 3c 70  d a file</p>..<p
d320: 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  re class="doctoo
d330: 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0d 0a 70 61  ls_example">..pa
d340: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74  ckage require ht
d350: 74 70 0d 0a 70 61 63 6b 61 67 65 20 72 65 71 75  tp..package requ
d360: 69 72 65 20 74 6c 73 0d 0a 73 65 74 20 75 72 6c  ire tls..set url
d370: 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77   &quot;https://w
d380: 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67  iki.tcl-lang.org
d390: 2f 73 69 74 65 6d 61 70 2e 78 6d 6c 26 71 75 6f  /sitemap.xml&quo
d3a0: 74 3b 0d 0a 68 74 74 70 3a 3a 72 65 67 69 73 74  t;..http::regist
d3b0: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69  er https 443 [li
d3c0: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74  st ::tls::socket
d3d0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65   -autoservername
d3e0: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0d 0a   1 -require 1]..
d3f0: 23 20 4f 70 65 6e 20 6f 75 74 70 75 74 20 66 69  # Open output fi
d400: 6c 65 0d 0a 73 65 74 20 66 69 6c 65 6e 61 6d 65  le..set filename
d410: 20 5b 66 69 6c 65 20 74 61 69 6c 20 24 75 72 6c   [file tail $url
d420: 5d 0d 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20  ]..set ch [open 
d430: 24 66 69 6c 65 6e 61 6d 65 20 77 62 5d 0d 0a 23  $filename wb]..#
d440: 20 47 65 74 20 66 69 6c 65 0d 0a 73 65 74 20 74   Get file..set t
d450: 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 65  oken [::http::ge
d460: 74 75 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 6b  turl $url -block
d470: 73 69 7a 65 20 36 35 35 33 36 20 2d 63 68 61 6e  size 65536 -chan
d480: 6e 65 6c 20 24 63 68 5d 0d 0a 23 20 43 68 65 63  nel $ch]..# Chec
d490: 6b 20 66 6f 72 20 65 72 72 6f 72 0d 0a 69 66 20  k for error..if 
d4a0: 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24  {[http::status $
d4b0: 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b  token] ne &quot;
d4c0: 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0d 0a 20 20 20  ok&quot;} {..   
d4d0: 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71   puts [format &q
d4e0: 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f  uot;Error %s&quo
d4f0: 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73  t; [http::status
d500: 20 24 74 6f 6b 65 6e 5d 5d 0d 0a 7d 0d 0a 23 20   $token]]..}..# 
d510: 43 6c 65 61 6e 75 70 0d 0a 63 6c 6f 73 65 20 24  Cleanup..close $
d520: 63 68 0d 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61  ch..::http::clea
d530: 6e 75 70 20 24 74 6f 6b 65 6e 0d 0a 3c 2f 70 72  nup $token..</pr
d540: 65 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76  e>..</div>..<div
d550: 20 69 64 3d 22 73 65 63 74 69 6f 6e 38 22 20 63   id="section8" c
d560: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
d570: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e  ection"><h2><a n
d580: 61 6d 65 3d 22 73 65 63 74 69 6f 6e 38 22 3e 53  ame="section8">S
d590: 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 61  pecial Considera
d5a0: 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0d 0a  tions</a></h2>..
d5b0: 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74  <p>The capabilit
d5c0: 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b  ies of this pack
d5d0: 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f  age can vary eno
d5e0: 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70  rmously based up
d5f0: 6f 6e 20 68 6f 77 20 74 68 65 0d 0a 6c 69 6e 6b  on how the..link
d600: 65 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69  ed to OpenSSL li
d610: 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67  brary was config
d620: 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20  ured and built. 
d630: 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79  New versions may
d640: 20 6f 62 73 6f 6c 65 74 65 0d 0a 6f 6c 64 65 72   obsolete..older
d650: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
d660: 6e 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76  ns, add or remov
d670: 65 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67  e ciphers, chang
d680: 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73  e default values
d690: 2c 20 65 74 63 2e 0d 0a 55 73 65 20 74 68 65 20  , etc...Use the 
d6a0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
d6b0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
d6c0: 3e 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62 74  > command to obt
d6d0: 61 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65  ain the supporte
d6e0: 64 0d 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  d..protocol vers
d6f0: 69 6f 6e 73 2e 3c 2f 70 3e 0d 0a 3c 2f 64 69 76  ions.</p>..</div
d700: 3e 0d 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  >..<div id="sect
d710: 69 6f 6e 39 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion9" class="doc
d720: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
d730: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
d740: 69 6f 6e 39 22 3e 45 72 72 6f 72 20 4d 65 73 73  ion9">Error Mess
d750: 61 67 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0d 0a 3c  ages</a></h2>..<
d760: 70 3e 53 6f 6d 65 20 4f 70 73 6e 53 53 6c 20 65  p>Some OpsnSSl e
d770: 72 72 6f 72 20 6d 65 73 73 61 67 65 73 20 68 61  rror messages ha
d780: 76 65 20 63 72 79 70 74 69 63 20 6d 65 61 6e 69  ve cryptic meani
d790: 6e 67 73 2e 20 54 68 69 73 20 69 73 20 61 20 6c  ngs. This is a l
d7a0: 69 73 74 20 6f 66 20 6d 65 73 73 61 67 65 73 0d  ist of messages.
d7b0: 0a 61 6c 6f 6e 67 20 77 69 74 68 20 74 68 65 69  .along with thei
d7c0: 72 20 74 72 75 65 20 6d 65 61 6e 69 6e 67 2e 3c  r true meaning.<
d7d0: 2f 70 3e 0d 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  /p>..<dl class="
d7e0: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
d7f0: 69 6f 6e 73 22 3e 0d 0a 3c 64 74 3e 3c 69 20 63  ions">..<dt><i c
d800: 6c 61 73 73 3d 22 61 72 67 22 3e 70 61 63 6b 65  lass="arg">packe
d810: 74 20 6c 65 6e 67 74 68 20 74 6f 6f 20 6c 6f 6e  t length too lon
d820: 67 3c 2f 69 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e  g</i></dt>..<dd>
d830: 3c 70 3e 43 6c 69 65 6e 74 20 68 61 73 20 74 72  <p>Client has tr
d840: 69 65 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74  ied to connect t
d850: 6f 20 61 20 48 54 54 50 20 73 65 72 76 65 72 20  o a HTTP server 
d860: 6f 6e 20 74 68 65 20 70 6c 61 69 6e 2d 74 65 78  on the plain-tex
d870: 74 20 70 6f 72 74 20 69 6e 73 74 65 61 64 20 6f  t port instead o
d880: 66 20 74 68 65 20 53 53 4c 2f 54 4c 53 20 70 6f  f the SSL/TLS po
d890: 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 64  rt.</p></dd>..<d
d8a0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
d8b0: 3e 75 6e 65 78 70 65 63 74 65 64 20 65 6f 66 20  >unexpected eof 
d8c0: 77 68 69 6c 65 20 72 65 61 64 69 6e 67 3c 2f 69  while reading</i
d8d0: 3e 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 50  ></dt>..<dd><p>P
d8e0: 65 65 72 20 68 61 73 20 63 6c 6f 73 65 64 20 74  eer has closed t
d8f0: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 77 69  he connection wi
d900: 74 68 6f 75 74 20 73 65 6e 64 69 6e 67 20 74 68  thout sending th
d910: 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65 20 6e 6f  e &quot;close no
d920: 74 69 66 79 26 71 75 6f 74 3b 20 73 68 75 74 64  tify&quot; shutd
d930: 6f 77 6e 20 61 6c 65 72 74 2e 3c 2f 70 3e 3c 2f  own alert.</p></
d940: 64 64 3e 0d 0a 3c 64 74 3e 3c 69 20 63 6c 61 73  dd>..<dt><i clas
d950: 73 3d 22 61 72 67 22 3e 77 72 6f 6e 67 20 76 65  s="arg">wrong ve
d960: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 3c 2f 69 3e  rsion number</i>
d970: 3c 2f 64 74 3e 0d 0a 3c 64 64 3e 3c 70 3e 43 6c  </dt>..<dd><p>Cl
d980: 69 65 6e 74 20 68 61 73 20 74 72 69 65 64 20 74  ient has tried t
d990: 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 20 61 20 6e  o connect to a n
d9a0: 6f 6e 2d 48 54 54 50 20 73 65 72 76 65 72 20 6f  on-HTTP server o
d9b0: 6e 20 61 20 6e 6f 6e 2d 54 4c 53 20 28 69 2e 65  n a non-TLS (i.e
d9c0: 2e 20 70 6c 61 69 6e 20 74 65 78 74 29 20 70 6f  . plain text) po
d9d0: 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0d 0a 3c 2f  rt.</p></dd>..</
d9e0: 64 6c 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69  dl>..</div>..<di
d9f0: 76 20 69 64 3d 22 73 65 65 2d 61 6c 73 6f 22 20  v id="see-also" 
da00: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
da10: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
da20: 6e 61 6d 65 3d 22 73 65 65 2d 61 6c 73 6f 22 3e  name="see-also">
da30: 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32  See Also</a></h2
da40: 3e 0d 0a 3c 70 3e 3c 61 20 68 72 65 66 3d 22 68  >..<p><a href="h
da50: 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73  ttps://www.opens
da60: 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c  sl.org/">OpenSSL
da70: 3c 2f 61 3e 2c 20 68 74 74 70 2c 20 73 6f 63 6b  </a>, http, sock
da80: 65 74 3c 2f 70 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a  et</p>..</div>..
da90: 3c 64 69 76 20 69 64 3d 22 6b 65 79 77 6f 72 64  <div id="keyword
daa0: 73 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  s" class="doctoo
dab0: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
dac0: 3c 61 20 6e 61 6d 65 3d 22 6b 65 79 77 6f 72 64  <a name="keyword
dad0: 73 22 3e 4b 65 79 77 6f 72 64 73 3c 2f 61 3e 3c  s">Keywords</a><
dae0: 2f 68 32 3e 0d 0a 3c 70 3e 49 2f 4f 2c 20 49 50  /h2>..<p>I/O, IP
daf0: 20 41 64 64 72 65 73 73 2c 20 4f 70 65 6e 53 53   Address, OpenSS
db00: 4c 2c 20 53 53 4c 2c 20 54 43 50 2c 20 54 4c 53  L, SSL, TCP, TLS
db10: 2c 20 54 63 6c 54 4c 53 2c 20 61 73 79 6e 63 68  , TclTLS, asynch
db20: 72 6f 6e 6f 75 73 20 49 2f 4f 2c 20 62 69 6e 64  ronous I/O, bind
db30: 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c 20 63  , certificate, c
db40: 68 61 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 63 74 69  hannel, connecti
db50: 6f 6e 2c 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 2c  on, domain name,
db60: 20 68 6f 73 74 2c 20 68 74 74 70 73 2c 20 6e 65   host, https, ne
db70: 74 77 6f 72 6b 2c 20 6e 65 74 77 6f 72 6b 20 61  twork, network a
db80: 64 64 72 65 73 73 2c 20 73 6f 63 6b 65 74 2c 20  ddress, socket, 
db90: 74 6c 73 3c 2f 70 3e 0d 0a 3c 2f 64 69 76 3e 0d  tls</p>..</div>.
dba0: 0a 3c 64 69 76 20 69 64 3d 22 63 61 74 65 67 6f  .<div id="catego
dbb0: 72 79 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  ry" class="docto
dbc0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
dbd0: 3e 3c 61 20 6e 61 6d 65 3d 22 63 61 74 65 67 6f  ><a name="catego
dbe0: 72 79 22 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e  ry">Category</a>
dbf0: 3c 2f 68 32 3e 0d 0a 3c 70 3e 74 6c 73 3c 2f 70  </h2>..<p>tls</p
dc00: 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 64 69 76 20  >..</div>..<div 
dc10: 69 64 3d 22 63 6f 70 79 72 69 67 68 74 22 20 63  id="copyright" c
dc20: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
dc30: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e  ection"><h2><a n
dc40: 61 6d 65 3d 22 63 6f 70 79 72 69 67 68 74 22 3e  ame="copyright">
dc50: 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c 2f 68  Copyright</a></h
dc60: 32 3e 0d 0a 3c 70 3e 43 6f 70 79 72 69 67 68 74  2>..<p>Copyright
dc70: 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74   &copy; 1999 Mat
dc80: 74 20 4e 65 77 6d 61 6e 3c 62 72 3e 0d 0a 43 6f  t Newman<br>..Co
dc90: 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32  pyright &copy; 2
dca0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73  004 Starfish Sys
dcb0: 74 65 6d 73 3c 62 72 3e 0d 0a 43 6f 70 79 72 69  tems<br>..Copyri
dcc0: 67 68 74 20 26 63 6f 70 79 3b 20 32 30 32 34 20  ght &copy; 2024 
dcd0: 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 3c 2f 70  Brian O'Hagan</p
dce0: 3e 0d 0a 3c 2f 64 69 76 3e 0d 0a 3c 2f 64 69 76  >..</div>..</div
dcf0: 3e 0d 0a 0a 5a 20 66 36 65 35 31 33 39 66 63 34  >...Z f6e5139fc4
dd00: 33 32 63 62 39 62 61 63 30 31 31 64 36 65 34 34  32cb9bac011d6e44
dd10: 32 39 65 33 63 61 0a                             29e3ca.