Hex Artifact Content

Artifact bb39a7e74bb41ca219c8434d20caa1ea002f0badba9928afcc51b710b9ed9807:


0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 3c  <!DOCTYPE html><
0010: 68 74 6d 6c 3e 3c 68 65 61 64 3e 0a 3c 6d 65 74  html><head>.<met
0020: 61 20 63 68 61 72 73 65 74 3d 22 55 54 46 2d 38  a charset="UTF-8
0030: 22 3e 0a 3c 6d 65 74 61 20 6e 61 6d 65 3d 22 76  ">.<meta name="v
0040: 69 65 77 70 6f 72 74 22 20 63 6f 6e 74 65 6e 74  iewport" content
0050: 3d 22 77 69 64 74 68 3d 64 65 76 69 63 65 2d 77  ="width=device-w
0060: 69 64 74 68 2c 20 69 6e 69 74 69 61 6c 2d 73 63  idth, initial-sc
0070: 61 6c 65 3d 31 22 3e 0a 3c 74 69 74 6c 65 3e 74  ale=1">.<title>t
0080: 6c 73 20 2d 20 54 63 6c 20 54 4c 53 20 65 78 74  ls - Tcl TLS ext
0090: 65 6e 73 69 6f 6e 3c 2f 74 69 74 6c 65 3e 0a 3c  ension</title>.<
00a0: 73 74 79 6c 65 20 74 79 70 65 3d 22 74 65 78 74  style type="text
00b0: 2f 63 73 73 22 3e 3c 21 2d 2d 0a 20 20 20 20 48  /css"><!--.    H
00c0: 54 4d 4c 20 7b 0a 09 62 61 63 6b 67 72 6f 75 6e  TML {..backgroun
00d0: 64 3a 20 09 23 46 46 46 46 46 46 3b 0a 09 63 6f  d: .#FFFFFF;..co
00e0: 6c 6f 72 3a 20 09 09 62 6c 61 63 6b 3b 0a 20 20  lor: ..black;.  
00f0: 20 20 7d 0a 20 20 20 20 42 4f 44 59 20 7b 0a 09    }.    BODY {..
0100: 62 61 63 6b 67 72 6f 75 6e 64 3a 20 09 23 46 46  background: .#FF
0110: 46 46 46 46 3b 0a 09 63 6f 6c 6f 72 3a 09 20 09  FFFF;..color:. .
0120: 62 6c 61 63 6b 3b 0a 20 20 20 20 7d 0a 20 20 20  black;.    }.   
0130: 20 44 49 56 2e 64 6f 63 74 6f 6f 6c 73 20 7b 0a   DIV.doctools {.
0140: 09 6d 61 72 67 69 6e 2d 6c 65 66 74 3a 09 31 30  .margin-left:.10
0150: 25 3b 0a 09 6d 61 72 67 69 6e 2d 72 69 67 68 74  %;..margin-right
0160: 3a 09 31 30 25 3b 0a 20 20 20 20 7d 0a 20 20 20  :.10%;.    }.   
0170: 20 44 49 56 2e 64 6f 63 74 6f 6f 6c 73 20 48 31   DIV.doctools H1
0180: 2c 44 49 56 2e 64 6f 63 74 6f 6f 6c 73 20 48 32  ,DIV.doctools H2
0190: 20 7b 0a 09 6d 61 72 67 69 6e 2d 6c 65 66 74 3a   {..margin-left:
01a0: 09 2d 35 25 3b 0a 20 20 20 20 7d 0a 20 20 20 20  .-5%;.    }.    
01b0: 48 31 2c 20 48 32 2c 20 48 33 2c 20 48 34 20 7b  H1, H2, H3, H4 {
01c0: 0a 09 6d 61 72 67 69 6e 2d 74 6f 70 3a 20 09 31  ..margin-top: .1
01d0: 65 6d 3b 0a 09 66 6f 6e 74 2d 66 61 6d 69 6c 79  em;..font-family
01e0: 3a 09 73 61 6e 73 2d 73 65 72 69 66 3b 0a 09 66  :.sans-serif;..f
01f0: 6f 6e 74 2d 73 69 7a 65 3a 09 6c 61 72 67 65 3b  ont-size:.large;
0200: 0a 09 63 6f 6c 6f 72 3a 09 09 23 30 30 35 41 39  ..color:..#005A9
0210: 43 3b 0a 09 62 61 63 6b 67 72 6f 75 6e 64 3a 20  C;..background: 
0220: 09 74 72 61 6e 73 70 61 72 65 6e 74 3b 0a 09 74  .transparent;..t
0230: 65 78 74 2d 61 6c 69 67 6e 3a 09 09 6c 65 66 74  ext-align:..left
0240: 3b 0a 20 20 20 20 7d 0a 20 20 20 20 48 31 2e 64  ;.    }.    H1.d
0250: 6f 63 74 6f 6f 6c 73 5f 74 69 74 6c 65 20 7b 0a  octools_title {.
0260: 09 74 65 78 74 2d 61 6c 69 67 6e 3a 20 63 65 6e  .text-align: cen
0270: 74 65 72 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55  ter;.    }.    U
0280: 4c 2c 4f 4c 20 7b 0a 09 6d 61 72 67 69 6e 2d 72  L,OL {..margin-r
0290: 69 67 68 74 3a 20 30 65 6d 3b 0a 09 6d 61 72 67  ight: 0em;..marg
02a0: 69 6e 2d 74 6f 70 3a 20 33 70 74 3b 0a 09 6d 61  in-top: 3pt;..ma
02b0: 72 67 69 6e 2d 62 6f 74 74 6f 6d 3a 20 33 70 74  rgin-bottom: 3pt
02c0: 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c 20 4c  ;.    }.    UL L
02d0: 49 20 7b 0a 09 6c 69 73 74 2d 73 74 79 6c 65 3a  I {..list-style:
02e0: 20 64 69 73 63 3b 0a 20 20 20 20 7d 0a 20 20 20   disc;.    }.   
02f0: 20 4f 4c 20 4c 49 20 7b 0a 09 6c 69 73 74 2d 73   OL LI {..list-s
0300: 74 79 6c 65 3a 20 64 65 63 69 6d 61 6c 3b 0a 20  tyle: decimal;. 
0310: 20 20 20 7d 0a 20 20 20 20 44 54 20 7b 0a 09 70     }.    DT {..p
0320: 61 64 64 69 6e 67 2d 74 6f 70 3a 20 09 31 65 78  adding-top: .1ex
0330: 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c 2e 64  ;.    }.    UL.d
0340: 6f 63 74 6f 6f 6c 73 5f 74 6f 63 2c 55 4c 2e 64  octools_toc,UL.d
0350: 6f 63 74 6f 6f 6c 73 5f 74 6f 63 20 55 4c 2c 20  octools_toc UL, 
0360: 55 4c 2e 64 6f 63 74 6f 6f 6c 73 5f 74 6f 63 20  UL.doctools_toc 
0370: 55 4c 20 55 4c 20 7b 0a 09 66 6f 6e 74 3a 09 09  UL UL {..font:..
0380: 6e 6f 72 6d 61 6c 20 31 32 70 74 2f 31 34 70 74  normal 12pt/14pt
0390: 20 73 61 6e 73 2d 73 65 72 69 66 3b 0a 09 6c 69   sans-serif;..li
03a0: 73 74 2d 73 74 79 6c 65 3a 09 6e 6f 6e 65 3b 0a  st-style:.none;.
03b0: 20 20 20 20 7d 0a 20 20 20 20 4c 49 2e 64 6f 63      }.    LI.doc
03c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 2c 20 4c  tools_section, L
03d0: 49 2e 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  I.doctools_subse
03e0: 63 74 69 6f 6e 20 7b 0a 09 6c 69 73 74 2d 73 74  ction {..list-st
03f0: 79 6c 65 3a 20 09 6e 6f 6e 65 3b 0a 09 6d 61 72  yle: .none;..mar
0400: 67 69 6e 2d 6c 65 66 74 3a 20 09 30 65 6d 3b 0a  gin-left: .0em;.
0410: 09 74 65 78 74 2d 69 6e 64 65 6e 74 3a 09 30 65  .text-indent:.0e
0420: 6d 3b 0a 09 70 61 64 64 69 6e 67 3a 20 09 30 65  m;..padding: .0e
0430: 6d 3b 0a 20 20 20 20 7d 0a 20 20 20 20 50 52 45  m;.    }.    PRE
0440: 20 7b 0a 09 64 69 73 70 6c 61 79 3a 20 09 62 6c   {..display: .bl
0450: 6f 63 6b 3b 0a 09 66 6f 6e 74 2d 66 61 6d 69 6c  ock;..font-famil
0460: 79 3a 09 6d 6f 6e 6f 73 70 61 63 65 3b 0a 09 77  y:.monospace;..w
0470: 68 69 74 65 2d 73 70 61 63 65 3a 09 70 72 65 3b  hite-space:.pre;
0480: 0a 09 6d 61 72 67 69 6e 3a 09 09 30 25 3b 0a 09  ..margin:..0%;..
0490: 70 61 64 64 69 6e 67 2d 74 6f 70 3a 09 30 2e 35  padding-top:.0.5
04a0: 65 78 3b 0a 09 70 61 64 64 69 6e 67 2d 62 6f 74  ex;..padding-bot
04b0: 74 6f 6d 3a 09 30 2e 35 65 78 3b 0a 09 70 61 64  tom:.0.5ex;..pad
04c0: 64 69 6e 67 2d 6c 65 66 74 3a 09 31 65 78 3b 0a  ding-left:.1ex;.
04d0: 09 70 61 64 64 69 6e 67 2d 72 69 67 68 74 3a 09  .padding-right:.
04e0: 31 65 78 3b 0a 09 77 69 64 74 68 3a 09 09 31 30  1ex;..width:..10
04f0: 30 25 3b 0a 20 20 20 20 7d 0a 20 20 20 20 50 52  0%;.    }.    PR
0500: 45 2e 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70  E.doctools_examp
0510: 6c 65 20 7b 0a 09 63 6f 6c 6f 72 3a 20 09 09 62  le {..color: ..b
0520: 6c 61 63 6b 3b 0a 09 62 61 63 6b 67 72 6f 75 6e  lack;..backgroun
0530: 64 3a 20 09 23 66 35 64 63 62 33 3b 0a 09 62 6f  d: .#f5dcb3;..bo
0540: 72 64 65 72 3a 09 09 31 70 78 20 73 6f 6c 69 64  rder:..1px solid
0550: 20 62 6c 61 63 6b 3b 0a 20 20 20 20 7d 0a 20 20   black;.    }.  
0560: 20 20 55 4c 2e 64 6f 63 74 6f 6f 6c 73 5f 72 65    UL.doctools_re
0570: 71 75 69 72 65 6d 65 6e 74 73 20 4c 49 2c 20 55  quirements LI, U
0580: 4c 2e 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61  L.doctools_synta
0590: 78 20 4c 49 20 7b 0a 09 6c 69 73 74 2d 73 74 79  x LI {..list-sty
05a0: 6c 65 3a 20 09 6e 6f 6e 65 3b 0a 09 6d 61 72 67  le: .none;..marg
05b0: 69 6e 2d 6c 65 66 74 3a 20 09 30 65 6d 3b 0a 09  in-left: .0em;..
05c0: 74 65 78 74 2d 69 6e 64 65 6e 74 3a 09 30 65 6d  text-indent:.0em
05d0: 3b 0a 09 70 61 64 64 69 6e 67 3a 09 30 65 6d 3b  ;..padding:.0em;
05e0: 0a 20 20 20 20 7d 0a 20 20 20 20 44 49 56 2e 64  .    }.    DIV.d
05f0: 6f 63 74 6f 6f 6c 73 5f 73 79 6e 6f 70 73 69 73  octools_synopsis
0600: 20 7b 0a 09 63 6f 6c 6f 72 3a 20 09 09 62 6c 61   {..color: ..bla
0610: 63 6b 3b 0a 09 62 61 63 6b 67 72 6f 75 6e 64 3a  ck;..background:
0620: 20 09 23 38 30 66 66 66 66 3b 0a 09 62 6f 72 64   .#80ffff;..bord
0630: 65 72 3a 09 09 31 70 78 20 73 6f 6c 69 64 20 62  er:..1px solid b
0640: 6c 61 63 6b 3b 0a 09 66 6f 6e 74 2d 66 61 6d 69  lack;..font-fami
0650: 6c 79 3a 09 73 65 72 69 66 3b 0a 09 6d 61 72 67  ly:.serif;..marg
0660: 69 6e 2d 74 6f 70 3a 20 09 31 65 6d 3b 0a 09 6d  in-top: .1em;..m
0670: 61 72 67 69 6e 2d 62 6f 74 74 6f 6d 3a 20 09 31  argin-bottom: .1
0680: 65 6d 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c  em;.    }.    UL
0690: 2e 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78  .doctools_syntax
06a0: 20 7b 0a 09 6d 61 72 67 69 6e 2d 74 6f 70 3a 20   {..margin-top: 
06b0: 09 31 65 6d 3b 0a 09 62 6f 72 64 65 72 2d 74 6f  .1em;..border-to
06c0: 70 3a 09 31 70 78 20 73 6f 6c 69 64 20 62 6c 61  p:.1px solid bla
06d0: 63 6b 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c  ck;.    }.    UL
06e0: 2e 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75 69 72  .doctools_requir
06f0: 65 6d 65 6e 74 73 20 7b 0a 09 6d 61 72 67 69 6e  ements {..margin
0700: 2d 62 6f 74 74 6f 6d 3a 20 09 31 65 6d 3b 0a 09  -bottom: .1em;..
0710: 62 6f 72 64 65 72 2d 62 6f 74 74 6f 6d 3a 09 31  border-bottom:.1
0720: 70 78 20 73 6f 6c 69 64 20 62 6c 61 63 6b 3b 0a  px solid black;.
0730: 20 20 20 20 7d 0a 2d 2d 3e 3c 2f 73 74 79 6c 65      }.--></style
0740: 3e 0a 3c 2f 68 65 61 64 3e 0a 3c 21 2d 2d 20 47  >.</head>.<!-- G
0750: 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 66 69  enerated from fi
0760: 6c 65 20 27 74 6c 73 2e 6d 61 6e 27 20 62 79 20  le 'tls.man' by 
0770: 74 63 6c 6c 69 62 2f 64 6f 63 74 6f 6f 6c 73 20  tcllib/doctools 
0780: 77 69 74 68 20 66 6f 72 6d 61 74 20 27 68 74 6d  with format 'htm
0790: 6c 27 0a 20 20 20 2d 2d 3e 0a 3c 21 2d 2d 20 43  l'.   -->.<!-- C
07a0: 6f 70 79 72 69 67 68 74 20 26 61 6d 70 3b 63 6f  opyright &amp;co
07b0: 70 79 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65  py; 1999 Matt Ne
07c0: 77 6d 61 6e 20 20 20 2d 2d 20 43 6f 70 79 72 69  wman   -- Copyri
07d0: 67 68 74 20 26 61 6d 70 3b 63 6f 70 79 3b 20 32  ght &amp;copy; 2
07e0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73  004 Starfish Sys
07f0: 74 65 6d 73 20 20 20 2d 2d 20 43 6f 70 79 72 69  tems   -- Copyri
0800: 67 68 74 20 26 61 6d 70 3b 63 6f 70 79 3b 20 32  ght &amp;copy; 2
0810: 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61  024 Brian O'Haga
0820: 6e 0a 20 20 20 2d 2d 3e 0a 3c 21 2d 2d 20 74 6c  n.   -->.<!-- tl
0830: 73 2e 6e 0a 20 20 20 2d 2d 3e 0a 3c 62 6f 64 79  s.n.   -->.<body
0840: 3e 3c 64 69 76 20 63 6c 61 73 73 3d 22 64 6f 63  ><div class="doc
0850: 74 6f 6f 6c 73 22 3e 0a 3c 68 31 20 63 6c 61 73  tools">.<h1 clas
0860: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 69 74 6c  s="doctools_titl
0870: 65 22 3e 74 6c 73 28 6e 29 20 32 2e 30 2e 31 20  e">tls(n) 2.0.1 
0880: 74 6c 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c  tls &quot;Tcl TL
0890: 53 20 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74  S extension&quot
08a0: 3b 3c 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22  ;</h1>.<div id="
08b0: 6e 61 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63  name" class="doc
08c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
08d0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65  h2><a name="name
08e0: 22 3e 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a  ">Name</a></h2>.
08f0: 3c 70 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67  <p>tls - binding
0900: 20 74 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   to the OpenSSL 
0910: 6c 69 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72  library for encr
0920: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64  ypted socket and
0930: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d   I/O channel com
0940: 6d 75 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a  munications</p>.
0950: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
0960: 74 6f 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  toc" class="doct
0970: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68  ools_section"><h
0980: 32 3e 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e  2><a name="toc">
0990: 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74  Table Of Content
09a0: 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63  s</a></h2>.<ul c
09b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74  lass="doctools_t
09c0: 6f 63 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  oc">.<li class="
09d0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
09e0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22  "><a href="#toc"
09f0: 3e 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e  >Table Of Conten
0a00: 74 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ts</a></li>.<li 
0a10: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0a20: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0a30: 3d 22 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e  ="#synopsis">Syn
0a40: 6f 70 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  opsis</a></li>.<
0a50: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0a60: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  ls_section"><a h
0a70: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e  ref="#section1">
0a80: 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c  Description</a><
0a90: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0aa0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
0ab0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
0ac0: 69 6f 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69 6c  ion2">Compatibil
0ad0: 69 74 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ity</a></li>.<li
0ae0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0af0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0b00: 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 6f  f="#section3">Co
0b10: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  mmands</a></li>.
0b20: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0b30: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0b40: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22  href="#section4"
0b50: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  >Certificate Val
0b60: 69 64 61 74 69 6f 6e 3c 2f 61 3e 0a 3c 75 6c 3e  idation</a>.<ul>
0b70: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
0b80: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
0b90: 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73 65  ><a href="#subse
0ba0: 63 74 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20  ction1">PKI and 
0bb0: 43 65 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e  Certificates</a>
0bc0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0bd0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63  "doctools_subsec
0be0: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
0bf0: 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d  subsection2">Sum
0c00: 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20  mary of command 
0c10: 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e  line options</a>
0c20: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0c30: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63  "doctools_subsec
0c40: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
0c50: 73 75 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65  subsection3">Whe
0c60: 6e 20 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69  n are command li
0c70: 6e 65 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65  ne options neede
0c80: 64 3f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c  d?</a></li>.</ul
0c90: 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73  >.</li>.<li clas
0ca0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
0cb0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0cc0: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63  ection5">Callbac
0cd0: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 0a 3c 75  k Options</a>.<u
0ce0: 6c 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  l>.<li class="do
0cf0: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f  ctools_subsectio
0d00: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62  n"><a href="#sub
0d10: 73 65 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73  section4">Values
0d20: 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c   for Command Cal
0d30: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  lback</a></li>.<
0d40: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0d50: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
0d60: 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74  a href="#subsect
0d70: 69 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72  ion5">Values for
0d80: 20 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61   Password Callba
0d90: 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ck</a></li>.<li 
0da0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0db0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  subsection"><a h
0dc0: 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e  ref="#subsection
0dd0: 36 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61  6">Values for Va
0de0: 6c 69 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43  lidate Command C
0df0: 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e  allback</a></li>
0e00: 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69  .</ul>.</li>.<li
0e10: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0e20: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0e30: 66 3d 22 23 73 65 63 74 69 6f 6e 36 22 3e 44 65  f="#section6">De
0e40: 62 75 67 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  bug</a></li>.<li
0e50: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0e60: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0e70: 66 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e 45 78  f="#section7">Ex
0e80: 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  amples</a></li>.
0e90: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0ea0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0eb0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 38 22  href="#section8"
0ec0: 3e 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65  >Special Conside
0ed0: 72 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e  rations</a></li>
0ee0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
0ef0: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61  ools_section"><a
0f00: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 39   href="#section9
0f10: 22 3e 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73  ">Error Messages
0f20: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0f30: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
0f40: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0f50: 23 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41  #see-also">See A
0f60: 6c 73 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  lso</a></li>.<li
0f70: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0f80: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0f90: 66 3d 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65  f="#keywords">Ke
0fa0: 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  ywords</a></li>.
0fb0: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0fc0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0fd0: 68 72 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22  href="#category"
0fe0: 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c  >Category</a></l
0ff0: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
1000: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
1010: 3c 61 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69  <a href="#copyri
1020: 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f  ght">Copyright</
1030: 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f  a></li>.</ul>.</
1040: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79  div>.<div id="sy
1050: 6e 6f 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64  nopsis" class="d
1060: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
1070: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79  ><h2><a name="sy
1080: 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73  nopsis">Synopsis
1090: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63  </a></h2>.<div c
10a0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
10b0: 79 6e 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c  ynopsis">.<ul cl
10c0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65  ass="doctools_re
10d0: 71 75 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69  quirements">.<li
10e0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
10f0: 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61   <b class="pkgna
1100: 6d 65 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e  me">Tcl 8.5-</b>
1110: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67  </li>.<li>packag
1120: 65 20 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61  e require <b cla
1130: 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73  ss="pkgname">tls
1140: 20 32 2e 30 2e 31 3c 2f 62 3e 3c 2f 6c 69 3e 0a   2.0.1</b></li>.
1150: 3c 2f 75 6c 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d  </ul>.<ul class=
1160: 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78  "doctools_syntax
1170: 22 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  ">.<li><a href="
1180: 23 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #1"><b class="cm
1190: 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e  d">tls::init</b>
11a0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
11b0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
11c0: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
11d0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
11e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
11f0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
1200: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1210: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1220: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1230: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
1240: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f  i>?</span></a></
1250: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  li>.<li><a href=
1260: 22 23 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  "#2"><b class="c
1270: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
1280: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /b> <span class=
1290: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
12a0: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
12b0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
12c0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
12d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
12e0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
12f0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1300: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1310: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
1320: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  .</i>?</span> <i
1330: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73   class="arg">hos
1340: 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</i> <i class="
1350: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
1360: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1370: 65 66 3d 22 23 33 22 3e 3c 62 20 63 6c 61 73 73  ef="#3"><b class
1380: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
1390: 65 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d  et</b> <b class=
13a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72  "option">-server
13b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
13c0: 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20  rg">command</i> 
13d0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
13e0: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
13f0: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
1400: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1410: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1420: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
1430: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
1440: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1450: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1460: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
1470: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1480: 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69  ss="arg">port</i
1490: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
14a0: 61 20 68 72 65 66 3d 22 23 34 22 3e 3c 62 20 63  a href="#4"><b c
14b0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
14c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
14d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
14e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73  l</i> <span clas
14f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1500: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1510: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1520: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1530: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1540: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1550: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1560: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1570: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1580: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
1590: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
15a0: 68 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c 61  href="#5"><b cla
15b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74  ss="cmd">tls::st
15c0: 61 72 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c  arttls</b> <i cl
15d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
15e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73  l</i> <span clas
15f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1600: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1610: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1620: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1630: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1640: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1650: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1660: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1670: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1680: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
1690: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
16a0: 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63 6c 61  href="#6"><b cla
16b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61  ss="cmd">tls::ha
16c0: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63  ndshake</b> <i c
16d0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
16e0: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  el</i></a></li>.
16f0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 37 22  <li><a href="#7"
1700: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
1710: 74 6c 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f 62  tls::shutdown</b
1720: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1730: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
1740: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
1750: 66 3d 22 23 38 22 3e 3c 62 20 63 6c 61 73 73 3d  f="#8"><b class=
1760: 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70  "cmd">tls::unimp
1770: 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ort</b> <i class
1780: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
1790: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e  i></a></li>.<li>
17a0: 3c 61 20 68 72 65 66 3d 22 23 39 22 3e 3c 62 20  <a href="#9"><b 
17b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
17c0: 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e 20 3c 69 20  :unstack</b> <i 
17d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
17e0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e  nel</i></a></li>
17f0: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31  .<li><a href="#1
1800: 30 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  0"><b class="cmd
1810: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62  ">tls::status</b
1820: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1830: 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f  pt">?<b class="o
1840: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62  ption">-local</b
1850: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1860: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
1870: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  </i></a></li>.<l
1880: 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 31 22 3e  i><a href="#11">
1890: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
18a0: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f  ls::connection</
18b0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
18c0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
18d0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
18e0: 65 66 3d 22 23 31 32 22 3e 3c 62 20 63 6c 61 73  ef="#12"><b clas
18f0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70  s="cmd">tls::cip
1900: 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63  hers</b> <span c
1910: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
1920: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f  lass="arg">proto
1930: 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  col</i>?</span> 
1940: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1950: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1960: 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f  ">verbose</i>?</
1970: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1980: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1990: 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65  s="arg">supporte
19a0: 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61  d</i>?</span></a
19b0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
19c0: 65 66 3d 22 23 31 33 22 3e 3c 62 20 63 6c 61 73  ef="#13"><b clas
19d0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f  s="cmd">tls::pro
19e0: 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f  tocols</b></a></
19f0: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  li>.<li><a href=
1a00: 22 23 31 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22  "#14"><b class="
1a10: 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f  cmd">tls::versio
1a20: 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  n</b></a></li>.<
1a30: 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69  /ul>.</div>.</di
1a40: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  v>.<div id="sect
1a50: 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion1" class="doc
1a60: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
1a70: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
1a80: 69 6f 6e 31 22 3e 44 65 73 63 72 69 70 74 69 6f  ion1">Descriptio
1a90: 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68  n</a></h2>.<p>Th
1aa0: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f  is extension pro
1ab0: 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 74  vides TCL script
1ac0: 20 61 63 63 65 73 73 20 74 6f 20 53 65 63 75 72   access to Secur
1ad0: 65 20 53 6f 63 6b 65 74 20 4c 61 79 65 72 20 28  e Socket Layer (
1ae0: 53 53 4c 29 0a 63 6f 6d 6d 75 6e 69 63 61 74 69  SSL).communicati
1af0: 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20 54 72  ons using the Tr
1b00: 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65  ansport Layer Se
1b10: 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f  curity (TLS) pro
1b20: 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64  tocol. It provid
1b30: 65 73 20 61 0a 67 65 6e 65 72 69 63 20 62 69 6e  es a.generic bin
1b40: 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 3d  ding to <a href=
1b50: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65  "https://www.ope
1b60: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53  nssl.org/">OpenS
1b70: 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e  SL</a>, utilizin
1b80: 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22  g the.<b class="
1b90: 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74 61 63  syscmd">Tcl_Stac
1ba0: 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49  kChannel</b> API
1bb0: 20 69 6e 20 54 43 4c 20 38 2e 34 20 6f 72 20 6c   in TCL 8.4 or l
1bc0: 61 74 65 72 2e 20 54 68 65 73 65 20 73 6f 63 6b  ater. These sock
1bd0: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74  ets behave exact
1be0: 6c 79 0a 74 68 65 20 73 61 6d 65 20 61 73 20 63  ly.the same as c
1bf0: 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20  hannels created 
1c00: 75 73 69 6e 67 20 74 68 65 20 62 75 69 6c 74 2d  using the built-
1c10: 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73  in <b class="sys
1c20: 63 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20  cmd">socket</b> 
1c30: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 0a 70 72 6f  command, but.pro
1c40: 76 69 64 65 20 61 64 64 69 74 69 6f 6e 61 6c 20  vide additional 
1c50: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74  options for cont
1c60: 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53 4c 2f  rolling the SSL/
1c70: 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e  TLS session.</p>
1c80: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d  .</div>.<div id=
1c90: 22 73 65 63 74 69 6f 6e 32 22 20 63 6c 61 73 73  "section2" class
1ca0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
1cb0: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d  on"><h2><a name=
1cc0: 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f 6d 70 61  "section2">Compa
1cd0: 74 69 62 69 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32  tibility</a></h2
1ce0: 3e 0a 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73  >.<p>This extens
1cf0: 69 6f 6e 20 69 73 20 63 6f 6d 70 61 74 69 62 6c  ion is compatibl
1d00: 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 31  e with OpenSSL 1
1d10: 2e 31 2e 31 20 6f 72 20 6c 61 74 65 72 2e 20 49  .1.1 or later. I
1d20: 74 20 72 65 71 75 69 72 65 73 20 54 63 6c 0a 76  t requires Tcl.v
1d30: 65 72 73 69 6f 6e 20 38 2e 35 20 6f 72 20 6c 61  ersion 8.5 or la
1d40: 74 65 72 20 61 6e 64 20 77 69 6c 6c 20 77 6f 72  ter and will wor
1d50: 6b 20 77 69 74 68 20 54 63 6c 20 39 2e 30 2e 3c  k with Tcl 9.0.<
1d60: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  /p>.</div>.<div 
1d70: 69 64 3d 22 73 65 63 74 69 6f 6e 33 22 20 63 6c  id="section3" cl
1d80: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
1d90: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
1da0: 6d 65 3d 22 73 65 63 74 69 6f 6e 33 22 3e 43 6f  me="section3">Co
1db0: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a  mmands</a></h2>.
1dc0: 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  <p>The following
1dd0: 20 61 72 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64   are the command
1de0: 73 20 70 72 6f 76 69 64 65 64 20 62 79 20 74 68  s provided by th
1df0: 65 20 54 63 4c 54 4c 53 20 70 61 63 6b 61 67 65  e TcLTLS package
1e00: 2e 20 53 65 65 0a 3c 73 70 61 6e 20 63 6c 61 73  . See.<span clas
1e10: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
1e20: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e  ref="#section7">
1e30: 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 73 70  Examples</a></sp
1e40: 61 6e 3e 20 66 6f 72 20 65 78 61 6d 70 6c 65 20  an> for example 
1e50: 75 73 61 67 65 20 61 6e 64 20 74 68 65 20 26 71  usage and the &q
1e60: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
1e70: 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71 75  le">demos</b>&qu
1e80: 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66 6f  ot; directory fo
1e90: 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 75  r.more example u
1ea0: 73 61 67 65 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  sage.</p>.<dl cl
1eb0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
1ec0: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
1ed0: 3c 61 20 6e 61 6d 65 3d 22 31 22 3e 3c 62 20 63  <a name="1"><b c
1ee0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1ef0: 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63  init</b> <span c
1f00: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
1f10: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69  lass="arg">-opti
1f20: 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  on</i>?</span> <
1f30: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
1f40: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
1f50: 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61  >value</i>?</spa
1f60: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1f70: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1f80: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c  arg">-option val
1f90: 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61  ue ...</i>?</spa
1fa0: 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  n></a></dt>.<dd>
1fb0: 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63  <p>Optional func
1fc0: 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20  tion to set the 
1fd0: 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20  default options 
1fe0: 75 73 65 64 20 62 79 20 3c 62 20 63 6c 61 73 73  used by <b class
1ff0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
2000: 65 74 3c 2f 62 3e 2e 20 49 66 20 79 6f 75 0a 63  et</b>. If you.c
2010: 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  all <b class="cm
2020: 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  d">tls::import</
2030: 62 3e 20 64 69 72 65 63 74 6c 79 2c 20 74 68 65  b> directly, the
2040: 20 76 61 6c 75 65 73 20 73 65 74 20 62 79 20 74   values set by t
2050: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76 65  his command have
2060: 20 6e 6f 20 65 66 66 65 63 74 2e 0a 54 68 69 73   no effect..This
2070: 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74   command support
2080: 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61 6d  s all of the sam
2090: 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65  e options as the
20a0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
20b0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
20c0: 63 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67 68 20  command,.though 
20d0: 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74  you should limit
20e0: 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f   your options to
20f0: 20 6f 6e 6c 79 20 74 68 65 20 54 4c 53 20 72 65   only the TLS re
2100: 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c  lated ones.</p><
2110: 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65  /dd>.<dt><a name
2120: 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  ="2"><b class="c
2130: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
2140: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /b> <span class=
2150: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
2160: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
2170: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
2180: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
2190: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
21a0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
21b0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
21c0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
21d0: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
21e0: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  .</i>?</span> <i
21f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73   class="arg">hos
2200: 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</i> <i class="
2210: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
2220: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
2230: 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66  is is a helper f
2240: 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69  unction that uti
2250: 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c  lizes the underl
2260: 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 3c 62  ying commands <b
2270: 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e   class="syscmd">
2280: 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c  socket</b>.and <
2290: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
22a0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f  s::import</b> to
22b0: 20 63 72 65 61 74 65 20 74 68 65 20 63 6f 6e 6e   create the conn
22c0: 65 63 74 69 6f 6e 2e 20 49 74 20 62 65 68 61 76  ection. It behav
22d0: 65 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 74  es the same as t
22e0: 68 65 0a 6e 61 74 69 76 65 20 54 43 4c 20 3c 62  he.native TCL <b
22f0: 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e   class="syscmd">
2300: 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61  socket</b> comma
2310: 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 73 75 70  nd, but also sup
2320: 70 6f 72 74 73 20 74 68 65 20 3c 62 20 63 6c 61  ports the <b cla
2330: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d  ss="cmd">tls::im
2340: 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64  port</b>.command
2350: 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e   options with on
2360: 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74  e additional opt
2370: 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 6e 73 20  ion. It returns 
2380: 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64  the channel hand
2390: 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e 65  le id.for the ne
23a0: 77 20 73 6f 63 6b 65 74 2e 20 41 64 64 69 74 69  w socket. Additi
23b0: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 61 72 65  onal options are
23c0: 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  :</p>.<dl class=
23d0: 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e  "doctools_option
23e0: 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  s">.<dt><b class
23f0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 75 74 6f 73  ="option">-autos
2400: 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69  ervername</b> <i
2410: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
2420: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
2430: 70 3e 49 66 20 3c 62 20 63 6c 61 73 73 3d 22 63  p>If <b class="c
2440: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20  onst">true</b>, 
2450: 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65  automatically se
2460: 74 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  t the <b class="
2470: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e  option">-servern
2480: 61 6d 65 3c 2f 62 3e 20 61 72 67 75 6d 65 6e 74  ame</b> argument
2490: 20 74 6f 20 74 68 65 0a 3c 65 6d 3e 68 6f 73 74   to the.<em>host
24a0: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 2e 20  </em> argument. 
24b0: 50 72 69 6f 72 20 74 6f 20 54 63 6c 54 4c 53 20  Prior to TclTLS 
24c0: 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74  2.0, the default
24d0: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
24e0: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a  nst">false</b>..
24f0: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54  Starting in TclT
2500: 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61  LS 2.0, the defa
2510: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
2520: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e  "const">true</b>
2530: 20 75 6e 6c 65 73 73 20 3c 62 20 63 6c 61 73 73   unless <b class
2540: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65  ="option">-serve
2550: 72 6e 61 6d 65 3c 2f 62 3e 0a 69 73 20 61 6c 73  rname</b>.is als
2560: 6f 20 73 70 65 63 69 66 69 65 64 2e 3c 2f 70 3e  o specified.</p>
2570: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
2580: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 33 22  .<dt><a name="3"
2590: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
25a0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
25b0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
25c0: 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69  ">-server</b> <i
25d0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6d   class="arg">com
25e0: 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e 20 63  mand</i> <span c
25f0: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
2600: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69  lass="arg">-opti
2610: 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  on</i>?</span> <
2620: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
2630: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
2640: 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61  >value</i>?</spa
2650: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
2660: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2670: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c  arg">-option val
2680: 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61  ue ...</i>?</spa
2690: 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  n> <i class="arg
26a0: 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f  ">port</i></a></
26b0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 61 6d 65 20  dt>.<dd><p>Same 
26c0: 61 73 20 70 72 65 76 69 6f 75 73 20 63 6f 6d 6d  as previous comm
26d0: 61 6e 64 2c 20 62 75 74 20 69 6e 73 74 65 61 64  and, but instead
26e0: 20 63 72 65 61 74 65 73 20 61 20 73 65 72 76 65   creates a serve
26f0: 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c 69  r socket for cli
2700: 65 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 63 74 20  ents to.connect 
2710: 74 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74 68 65  to just like the
2720: 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 3d 22 73   Tcl <b class="s
2730: 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 20 2d 73  yscmd">socket -s
2740: 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e  erver</b> comman
2750: 64 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74 68  d. It returns th
2760: 65 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65  e.channel handle
2770: 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65 77 20   id for the new 
2780: 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  socket.</p></dd>
2790: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 34 22  .<dt><a name="4"
27a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
27b0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20  tls::import</b> 
27c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
27d0: 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e  hannel</i> <span
27e0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
27f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
2800: 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  tion</i>?</span>
2810: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
2820: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
2830: 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73  g">value</i>?</s
2840: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
2850: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
2860: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76  ="arg">-option v
2870: 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73  alue ...</i>?</s
2880: 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64  pan></a></dt>.<d
2890: 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  d></dd>.<dt><a n
28a0: 61 6d 65 3d 22 35 22 3e 3c 62 20 63 6c 61 73 73  ame="5"><b class
28b0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 72  ="cmd">tls::star
28c0: 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ttls</b> <i clas
28d0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
28e0: 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /i> <span class=
28f0: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
2900: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
2910: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
2920: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
2930: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
2940: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
2950: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
2960: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
2970: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
2980: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61  .</i>?</span></a
2990: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74  ></dt>.<dd><p>St
29a0: 61 72 74 20 54 4c 53 20 65 6e 63 72 79 70 74 69  art TLS encrypti
29b0: 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 6e 6e 65  on on TCL channe
29c0: 6c 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  l <i class="arg"
29d0: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 76 69 61  >channel</i> via
29e0: 20 61 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e   a stacked chann
29f0: 65 6c 2e 20 49 74 0a 6e 65 65 64 20 6e 6f 74 20  el. It.need not 
2a00: 62 65 20 61 20 73 6f 63 6b 65 74 2c 20 62 75 74  be a socket, but
2a10: 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 69   must provide bi
2a20: 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f  -directional flo
2a30: 77 2e 20 41 6c 73 6f 20 73 65 74 73 20 73 65 73  w. Also sets ses
2a40: 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65 72 73 20  sion.parameters 
2a50: 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b  for SSL handshak
2a60: 65 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73  e. Valid options
2a70: 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c   are:</p>.<dl cl
2a80: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70  ass="doctools_op
2a90: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
2aa0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61  lass="option">-a
2ab0: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  lpn</b> <i class
2ac0: 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c  ="arg">list</i><
2ad0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74  /dt>.<dd><p>List
2ae0: 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f   of protocols to
2af0: 20 6f 66 66 65 72 20 64 75 72 69 6e 67 20 41 70   offer during Ap
2b00: 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20  plication-Layer 
2b10: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61  Protocol Negotia
2b20: 74 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20 46 6f 72  tion.(ALPN). For
2b30: 20 65 78 61 6d 70 6c 65 3a 20 3c 62 20 63 6c 61   example: <b cla
2b40: 73 73 3d 22 63 6f 6e 73 74 22 3e 68 32 3c 2f 62  ss="const">h2</b
2b50: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  > and <b class="
2b60: 63 6f 6e 73 74 22 3e 68 74 74 70 2f 31 2e 31 3c  const">http/1.1<
2b70: 2f 62 3e 2c 20 62 75 74 20 6e 6f 74 20 3c 62 20  /b>, but not <b 
2b80: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 33  class="const">h3
2b90: 3c 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c 61 73 73  </b> or.<b class
2ba0: 3d 22 63 6f 6e 73 74 22 3e 71 75 69 63 3c 2f 62  ="const">quic</b
2bb0: 3e 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 69  >. This option i
2bc0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
2bd0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
2be0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
2bf0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20  ion">-cadir</b> 
2c00: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
2c10: 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74  irectory</i></dt
2c20: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
2c30: 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79  es the directory
2c40: 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69   where the Certi
2c50: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79  ficate Authority
2c60: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74   (CA) certificat
2c70: 65 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54  es are.stored. T
2c80: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c  he default is pl
2c90: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20  atform specific 
2ca0: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61  and can be set a
2cb0: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20  t compile time. 
2cc0: 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61  The.default loca
2cd0: 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72  tion can be over
2ce0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62  ridden by the <b
2cf0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
2d00: 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f  ">SSL_CERT_DIR</
2d10: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76  b> environment.v
2d20: 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70  ariable. See <sp
2d30: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65  an class="sectre
2d40: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  f"><a href="#sec
2d50: 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61  tion4">Certifica
2d60: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
2d70: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72  ></span> for mor
2d80: 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f  e details.</p></
2d90: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
2da0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c  ="option">-cafil
2db0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
2dc0: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69  arg">filename</i
2dd0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
2de0: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65  ecifies the file
2df0: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66   with the Certif
2e00: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
2e10: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
2e20: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63  s to use in.<b c
2e30: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d  lass="const">PEM
2e40: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74  </b> file format
2e50: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
2e60: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
2e70: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c  "file">cert.pem<
2e80: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68  /b>&quot;, in th
2e90: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74  e OpenSSL.direct
2ea0: 6f 72 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74  ory. The default
2eb0: 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65   file can be ove
2ec0: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c  rridden by the <
2ed0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
2ee0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45  e">SSL_CERT_FILE
2ef0: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
2f00: 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c  .variable. See <
2f10: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
2f20: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
2f30: 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69  ection4">Certifi
2f40: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
2f50: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
2f60: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e  ore details.</p>
2f70: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
2f80: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73  ss="option">-cas
2f90: 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tore</b> <i clas
2fa0: 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c  s="arg">URI</i><
2fb0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
2fc0: 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72  ifies the Unifor
2fd0: 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74  m Resource Ident
2fe0: 69 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20  ifier (URI) for 
2ff0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
3000: 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73  Authority.(CA) s
3010: 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20  tore, which may 
3020: 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74  be a single cont
3030: 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c  ainer or a catal
3040: 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73  og of containers
3050: 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20  ..Starting with 
3060: 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d  OpenSSL 3.2 on M
3070: 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74  S Windows, set t
3080: 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  o &quot;<b class
3090: 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65  ="const">org.ope
30a0: 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f  nssl.winstore://
30b0: 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73  </b>&quot;.to us
30c0: 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d  e the built-in M
30d0: 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66  S Windows Certif
30e0: 69 63 61 74 65 20 53 74 6f 72 65 2e 0a 53 65 65  icate Store..See
30f0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65   <span class="se
3100: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22  ctref"><a href="
3110: 23 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69  #section4">Certi
3120: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f  ficate Validatio
3130: 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  n</a></span> for
3140: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a 54   more details..T
3150: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65  his option is ne
3160: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
3170: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3180: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3190: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 3c  >-certfile</b> <
31a0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69  i class="arg">fi
31b0: 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  lename</i></dt>.
31c0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
31d0: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65   the name of the
31e0: 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 63   file with the c
31f0: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73  ertificate to us
3200: 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0a  e in PEM format.
3210: 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 63 6c  as the local (cl
3220: 69 65 6e 74 20 6f 72 20 73 65 72 76 65 72 29 20  ient or server) 
3230: 63 65 72 74 69 66 69 63 61 74 65 2e 20 49 74 20  certificate. It 
3240: 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68  also contains th
3250: 65 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 70  e public key.</p
3260: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
3270: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65  ass="option">-ce
3280: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
3290: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
32a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
32b0: 63 69 66 69 65 73 20 74 68 65 20 63 65 72 74 69  cifies the certi
32c0: 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 61 73  ficate to use as
32d0: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73   a DER encoded s
32e0: 74 72 69 6e 67 20 28 58 2e 35 30 39 20 44 45 52  tring (X.509 DER
32f0: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
3300: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3310: 22 3e 2d 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69  ">-cipher</b> <i
3320: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
3330: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
3340: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
3350: 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  e list of cipher
3360: 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53  s to use for TLS
3370: 20 31 2e 32 20 61 6e 64 20 65 61 72 6c 69 65 72   1.2 and earlier
3380: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 0a 53 74   connections..St
3390: 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20  ring is a colon 
33a0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
33b0: 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f  const">:</b>&quo
33c0: 74 3b 20 73 65 70 61 72 61 74 65 64 20 6c 69 73  t; separated lis
33d0: 74 20 6f 66 20 63 69 70 68 65 72 73 2e 0a 43 69  t of ciphers..Ci
33e0: 70 68 65 72 73 20 63 61 6e 20 62 65 20 63 6f 6d  phers can be com
33f0: 62 69 6e 65 64 20 75 73 69 6e 67 20 74 68 65 20  bined using the 
3400: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
3410: 63 6f 6e 73 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f  const">+</b>&quo
3420: 74 3b 20 63 68 61 72 61 63 74 65 72 2e 0a 50 72  t; character..Pr
3430: 65 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 73  efixes can be us
3440: 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c  ed to permanentl
3450: 79 20 72 65 6d 6f 76 65 20 26 71 75 6f 74 3b 3c  y remove &quot;<
3460: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
3470: 21 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 64 65 6c  !</b>&quot;, del
3480: 65 74 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61  ete &quot;<b cla
3490: 73 73 3d 22 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e  ss="const">-</b>
34a0: 26 71 75 6f 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20  &quot;, or.move 
34b0: 74 6f 20 74 68 65 20 65 6e 64 20 26 71 75 6f 74  to the end &quot
34c0: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
34d0: 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 61 20  ">+</b>&quot; a 
34e0: 73 70 65 63 69 66 69 65 64 20 63 69 70 68 65 72  specified cipher
34f0: 2e 0a 4b 65 79 77 6f 72 64 73 20 3c 62 20 63 6c  ..Keywords <b cl
3500: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 40 53 54 52  ass="const">@STR
3510: 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20  ENGTH</b> (sort 
3520: 62 79 20 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79  by algorithm key
3530: 20 6c 65 6e 67 74 68 29 2c 0a 3c 62 20 63 6c 61   length),.<b cla
3540: 73 73 3d 22 63 6f 6e 73 74 22 3e 40 53 45 43 4c  ss="const">@SECL
3550: 45 56 45 4c 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f  EVEL=</b><em>n</
3560: 65 6d 3e 20 28 73 65 74 20 73 65 63 75 72 69 74  em> (set securit
3570: 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61  y level to n), a
3580: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  nd.<b class="con
3590: 73 74 22 3e 44 45 46 41 55 4c 54 3c 2f 62 3e 20  st">DEFAULT</b> 
35a0: 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 69 70  (use default cip
35b0: 68 65 72 20 6c 69 73 74 2c 20 61 74 20 73 74 61  her list, at sta
35c0: 72 74 20 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73  rt only) can als
35d0: 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e 0a  o be specified..
35e0: 53 65 65 20 74 68 65 20 3c 61 20 68 72 65 66 3d  See the <a href=
35f0: 22 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70  "https://docs.op
3600: 65 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72  enssl.org/master
3610: 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69  /man1/openssl-ci
3620: 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e  phers/#options">
3630: 4f 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75  OpenSSL</a>.docu
3640: 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68  mentation for th
3650: 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76  e full list of v
3660: 61 6c 69 64 20 76 61 6c 75 65 73 2e 3c 2f 70 3e  alid values.</p>
3670: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3680: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70  ss="option">-cip
3690: 68 65 72 73 75 69 74 65 73 3c 2f 62 3e 20 3c 69  hersuites</b> <i
36a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
36b0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
36c0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
36d0: 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  e list of cipher
36e0: 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 20 66   suites to use f
36f0: 6f 72 20 54 4c 53 20 31 2e 33 20 61 73 20 61 20  or TLS 1.3 as a 
3700: 63 6f 6c 6f 6e 0a 26 71 75 6f 74 3b 3c 62 20 63  colon.&quot;<b c
3710: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f  lass="const">:</
3720: 62 3e 26 71 75 6f 74 3b 20 73 65 70 61 72 61 74  b>&quot; separat
3730: 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65  ed list of ciphe
3740: 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 53  r suite names. S
3750: 65 65 20 74 68 65 0a 3c 61 20 68 72 65 66 3d 22  ee the.<a href="
3760: 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65  https://docs.ope
3770: 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f  nssl.org/master/
3780: 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70  man1/openssl-cip
3790: 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f  hers/#options">O
37a0: 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d  penSSL</a>.docum
37b0: 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65  entation for the
37c0: 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61   full list of va
37d0: 6c 69 64 20 76 61 6c 75 65 73 2e 0a 54 68 69 73  lid values..This
37e0: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66   option is new f
37f0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
3800: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
3810: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
3820: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c  ommand</b> <i cl
3830: 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61  ass="arg">callba
3840: 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ck</i></dt>.<dd>
3850: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
3860: 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e   callback comman
3870: 64 20 74 6f 20 62 65 20 69 6e 76 6f 6b 65 64 20  d to be invoked 
3880: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
3890: 73 20 64 75 72 69 6e 67 20 74 68 65 0a 68 61 6e  s during the.han
38a0: 64 73 68 61 6b 65 20 74 6f 20 70 61 73 73 20 65  dshake to pass e
38b0: 72 72 6f 72 73 2c 20 74 72 61 63 69 6e 67 20 69  rrors, tracing i
38c0: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20  nformation, and 
38d0: 70 72 6f 74 6f 63 6f 6c 20 6d 65 73 73 61 67 65  protocol message
38e0: 73 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  s..See <span cla
38f0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
3900: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22  href="#section5"
3910: 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e  >Callback Option
3920: 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  s</a></span> for
3930: 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c   more info.</p><
3940: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
3950: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 64 68 70 61  s="option">-dhpa
3960: 72 61 6d 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  rams</b> <i clas
3970: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65  s="arg">filename
3980: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3990: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 44  >Specifies the D
39a0: 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 28 44  iffie-Hellman (D
39b0: 48 29 20 70 61 72 61 6d 65 74 65 72 73 20 66 69  H) parameters fi
39c0: 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  le.</p></dd>.<dt
39d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
39e0: 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20  n">-keyfile</b> 
39f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66  <i class="arg">f
3a00: 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e  ilename</i></dt>
3a10: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
3a20: 73 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  s the private ke
3a30: 79 20 66 69 6c 65 2e 20 54 68 65 20 64 65 66 61  y file. The defa
3a40: 75 6c 74 20 69 73 20 74 6f 20 75 73 65 20 74 68  ult is to use th
3a50: 65 20 66 69 6c 65 0a 73 70 65 63 69 66 69 65 64  e file.specified
3a60: 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73   by the <b class
3a70: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66  ="option">-certf
3a80: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c  ile</b> option.<
3a90: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
3aa0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
3ab0: 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  key</b> <i class
3ac0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
3ad0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
3ae0: 65 63 69 66 69 65 73 20 74 68 65 20 70 72 69 76  ecifies the priv
3af0: 61 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61  ate key to use a
3b00: 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20  s a DER encoded 
3b10: 73 74 72 69 6e 67 20 28 50 4b 43 53 23 31 20 44  string (PKCS#1 D
3b20: 45 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ER).</p></dd>.<d
3b30: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3b40: 6f 6e 22 3e 2d 6d 6f 64 65 6c 3c 2f 62 3e 20 3c  on">-model</b> <
3b50: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
3b60: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  annel</i></dt>.<
3b70: 64 64 3e 3c 70 3e 46 6f 72 63 65 20 74 68 69 73  dd><p>Force this
3b80: 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72   channel to shar
3b90: 65 20 74 68 65 20 73 61 6d 65 20 3c 69 20 63 6c  e the same <i cl
3ba0: 61 73 73 3d 22 74 65 72 6d 22 3e 53 53 4c 5f 43  ass="term">SSL_C
3bb0: 54 58 3c 2f 69 3e 20 73 74 72 75 63 74 75 72 65  TX</i> structure
3bc0: 20 61 73 20 74 68 65 0a 73 70 65 63 69 66 69 65   as the.specifie
3bd0: 64 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  d <i class="arg"
3be0: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2c 20 61 6e  >channel</i>, an
3bf0: 64 20 74 68 65 72 65 66 6f 72 65 20 73 68 61 72  d therefore shar
3c00: 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c 6c 62 61  e config, callba
3c10: 63 6b 73 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64  cks, etc.</p></d
3c20: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3c30: 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f  "option">-passwo
3c40: 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rd</b> <i class=
3c50: 22 61 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f  "arg">callback</
3c60: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
3c70: 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c  pecifies the cal
3c80: 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f  lback command to
3c90: 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65   invoke when Ope
3ca0: 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62  nSSL needs to ob
3cb0: 74 61 69 6e 20 61 0a 70 61 73 73 77 6f 72 64 2e  tain a.password.
3cc0: 20 54 68 69 73 20 69 73 20 74 79 70 69 63 61 6c   This is typical
3cd0: 6c 79 20 75 73 65 64 20 74 6f 20 75 6e 6c 6f 63  ly used to unloc
3ce0: 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  k the private ke
3cf0: 79 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61  y of a certifica
3d00: 74 65 2e 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b  te..The callback
3d10: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61   should return a
3d20: 20 70 61 73 73 77 6f 72 64 20 73 74 72 69 6e 67   password string
3d30: 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 68 61  . This option ha
3d40: 73 20 63 68 61 6e 67 65 64 20 66 6f 72 0a 54 63  s changed for.Tc
3d50: 6c 54 4c 53 20 31 2e 38 2e 20 53 65 65 20 3c 73  lTLS 1.8. See <s
3d60: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
3d70: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
3d80: 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b  ction5">Callback
3d90: 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70   Options</a></sp
3da0: 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66  an> for more inf
3db0: 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  o.</p></dd>.<dt>
3dc0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3dd0: 22 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b  ">-post_handshak
3de0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
3df0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
3e00: 74 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20  t>.<dd><p>Allow 
3e10: 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73  post-handshake s
3e20: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70  ession ticket up
3e30: 64 61 74 65 73 2e 20 54 68 69 73 20 6f 70 74 69  dates. This opti
3e40: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  on is new for Tc
3e50: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
3e60: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3e70: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73  "option">-reques
3e80: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
3e90: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
3ea0: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73  t>.<dd><p>Reques
3eb0: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
3ec0: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75  from the peer du
3ed0: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e  ring the SSL han
3ee0: 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20  dshake. This is 
3ef0: 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72  needed.to do Cer
3f00: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
3f10: 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  ion. Starting in
3f20: 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65   TclTLS 1.8, the
3f30: 20 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63   default is.<b c
3f40: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
3f50: 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74  e</b> for client
3f60: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 53 74   connections. St
3f70: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
3f80: 20 32 2e 30 2c 20 69 66 20 73 65 74 20 74 6f 0a   2.0, if set to.
3f90: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
3fa0: 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 20 3c  >false</b> and <
3fb0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3fc0: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73  >-require</b> is
3fd0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
3fe0: 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e  ">true</b>, then
3ff0: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76   this will be.ov
4000: 65 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63  erridden to <b c
4010: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
4020: 65 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e  e</b>..See <span
4030: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22   class="sectref"
4040: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69  ><a href="#secti
4050: 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65  on4">Certificate
4060: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c   Validation</a><
4070: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20  /span> for more 
4080: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  details.</p></dd
4090: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
40a0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65  option">-require
40b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
40c0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
40d0: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65  >.<dd><p>Require
40e0: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69   a valid certifi
40f0: 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65  cate from the pe
4100: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53  er during the SS
4110: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20  L handshake. If 
4120: 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74  this is.set to t
4130: 72 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61  rue, then <b cla
4140: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71  ss="option">-req
4150: 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c  uest</b> must al
4160: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75  so be set to tru
4170: 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 3c  e and a either.<
4180: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4190: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20  >-cadir</b>, <b 
41a0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
41b0: 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63  cafile</b>, <b c
41c0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
41d0: 61 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61  astore</b>, or a
41e0: 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c   platform defaul
41f0: 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64  t.must be provid
4200: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76  ed in order to v
4210: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e  alidate against.
4220: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e 20   The default in 
4230: 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65  TclTLS 1.8 and.e
4240: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20  arlier versions 
4250: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4260: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69  st">false</b> si
4270: 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74  nce not all plat
4280: 66 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69  forms have certi
4290: 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64  ficates to.valid
42a0: 61 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61  ate against in a
42b0: 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65   form compatible
42c0: 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53   with OpenSSL. S
42d0: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c  tarting in TclTL
42e0: 53 20 32 2e 30 2c 0a 74 68 65 20 64 65 66 61 75  S 2.0,.the defau
42f0: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  lt is <b class="
4300: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20  const">true</b> 
4310: 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65  for client conne
4320: 63 74 69 6f 6e 73 2e 0a 53 65 65 20 3c 73 70 61  ctions..See <spa
4330: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
4340: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
4350: 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74  ion4">Certificat
4360: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
4370: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
4380: 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64   details.</p></d
4390: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
43a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69  "option">-securi
43b0: 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20  ty_level</b> <i 
43c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 6e 74 65  class="arg">inte
43d0: 67 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ger</i></dt>.<dd
43e0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
43f0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
4400: 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74   (value from 0 t
4410: 6f 20 35 29 2e 20 54 68 65 20 73 65 63 75 72 69  o 5). The securi
4420: 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73  ty level affects
4430: 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70  .the allowed cip
4440: 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 79 70  her suite encryp
4450: 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c  tion algorithms,
4460: 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 20 63   supported ECC c
4470: 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64  urves,.supported
4480: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
4490: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65  ithms, DH parame
44a0: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69  ter sizes, certi
44b0: 66 69 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73  ficate key sizes
44c0: 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61  .and signature a
44d0: 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64  lgorithms. The d
44e0: 65 66 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f  efault is 1 prio
44f0: 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32  r to OpenSSL 3.2
4500: 20 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65   and 2.thereafte
4510: 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68  r. Level 3 and h
4520: 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75  igher disable su
4530: 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f  pport for sessio
4540: 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e  n tickets and.on
4550: 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 65 72  ly accept cipher
4560: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f   suites that pro
4570: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63  vide forward sec
4580: 72 65 63 79 2e 0a 54 68 69 73 20 6f 70 74 69 6f  recy..This optio
4590: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  n is new for Tcl
45a0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
45b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
45c0: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c  option">-server<
45d0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
45e0: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
45f0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
4600: 73 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74  s whether to act
4610: 20 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64   as a server and
4620: 20 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20   respond with a 
4630: 73 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65  server handshake
4640: 20 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63   when a.client c
4650: 6f 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76  onnects and prov
4660: 69 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61  ides a client ha
4670: 6e 64 73 68 61 6b 65 2e 20 54 68 65 20 64 65 66  ndshake. The def
4680: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4690: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
46a0: 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  b>.</p></dd>.<dt
46b0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
46c0: 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f  n">-servername</
46d0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
46e0: 22 3e 68 6f 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f  ">hostname</i></
46f0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
4700: 66 79 20 74 68 65 20 70 65 65 72 27 73 20 68 6f  fy the peer's ho
4710: 73 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20  stname. This is 
4720: 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20  used to set the 
4730: 54 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 20  TLS Server Name 
4740: 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29  Indication.(SNI)
4750: 20 65 78 74 65 6e 73 69 6f 6e 2e 20 53 65 74 20   extension. Set 
4760: 74 68 69 73 20 74 6f 20 74 68 65 20 65 78 70 65  this to the expe
4770: 63 74 65 64 20 73 65 72 76 65 72 6e 61 6d 65 20  cted servername 
4780: 69 6e 20 74 68 65 20 73 65 72 76 65 72 27 73 20  in the server's 
4790: 63 65 72 74 69 66 69 63 61 74 65 0a 6f 72 20 6f  certificate.or o
47a0: 6e 65 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63  ne of the Subjec
47b0: 74 20 41 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65  t Alternate Name
47c0: 73 20 28 53 41 4e 29 2e 20 53 74 61 72 74 69 6e  s (SAN). Startin
47d0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
47e0: 20 74 68 69 73 20 77 69 6c 6c 0a 64 65 66 61 75   this will.defau
47f0: 6c 74 20 74 6f 20 74 68 65 20 68 6f 73 74 20 66  lt to the host f
4800: 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73  rom the <b class
4810: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
4820: 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c  et</b> command.<
4830: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4840: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4850: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c  session_id</b> <
4860: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69  i class="arg">bi
4870: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c  nary_string</i><
4880: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
4890: 69 66 69 65 73 20 74 68 65 20 73 65 73 73 69 6f  ifies the sessio
48a0: 6e 20 69 64 20 74 6f 20 72 65 73 75 6d 65 20 61  n id to resume a
48b0: 20 73 65 73 73 69 6f 6e 2e 20 4e 6f 74 20 73 75   session. Not su
48c0: 70 70 6f 72 74 65 64 20 79 65 74 2e 0a 54 68 69  pported yet..Thi
48d0: 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20  s option is new 
48e0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
48f0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4900: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4910: 73 73 6c 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ssl2</b> <i clas
4920: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
4930: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61  </dt>.<dd><p>Ena
4940: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
4950: 32 2e 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  2.The default is
4960: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
4970: 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4f 70 65  ">false</b>..Ope
4980: 6e 53 53 4c 20 31 2e 31 2b 20 6e 6f 20 6c 6f 6e  nSSL 1.1+ no lon
4990: 67 65 72 20 73 75 70 70 6f 72 74 73 20 53 53 4c  ger supports SSL
49a0: 20 76 32 2c 20 73 6f 20 74 68 69 73 20 6d 61 79   v2, so this may
49b0: 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 65 66   not have any ef
49c0: 66 65 63 74 2e 0a 53 65 65 20 74 68 65 20 3c 62  fect..See the <b
49d0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
49e0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20  ::protocols</b> 
49f0: 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70  command for supp
4a00: 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e  orted protocols.
4a10: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
4a20: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
4a30: 2d 73 73 6c 33 3c 2f 62 3e 20 3c 69 20 63 6c 61  -ssl3</b> <i cla
4a40: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69  ss="arg">bool</i
4a50: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e  ></dt>.<dd><p>En
4a60: 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20  able use of SSL 
4a70: 76 33 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  v3. The default 
4a80: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4a90: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 20 53  st">false</b>. S
4aa0: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c  tarting in TclTL
4ab0: 53 20 31 2e 38 2c 0a 75 73 65 20 6f 66 20 53 53  S 1.8,.use of SS
4ac0: 4c 20 76 33 20 69 66 20 6f 6e 6c 79 20 61 76 61  L v3 if only ava
4ad0: 69 6c 61 62 6c 65 20 76 69 61 20 61 20 63 6f 6d  ilable via a com
4ae0: 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e  pile time option
4af0: 2e 0a 4f 70 65 6e 53 53 4c 20 34 2e 30 2b 20 6e  ..OpenSSL 4.0+ n
4b00: 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f 72 74  o longer support
4b10: 73 20 53 53 4c 20 76 33 2c 20 73 6f 20 74 68 69  s SSL v3, so thi
4b20: 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61  s may not have a
4b30: 6e 79 20 65 66 66 65 63 74 2e 0a 53 65 65 20 74  ny effect..See t
4b40: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  he <b class="cmd
4b50: 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73  ">tls::protocols
4b60: 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72  </b> command for
4b70: 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f   supported proto
4b80: 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  cols.</p></dd>.<
4b90: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
4ba0: 69 6f 6e 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c  ion">-tls1</b> <
4bb0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
4bc0: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
4bd0: 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  <p>Enable use of
4be0: 20 54 4c 53 20 76 31 2e 20 53 74 61 72 74 69 6e   TLS v1. Startin
4bf0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
4c00: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   the default is 
4c10: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4c20: 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65  >false</b>..Note
4c30: 3a 20 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20  : TLS 1.0 needs 
4c40: 53 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c  SHA1 to operate,
4c50: 20 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61   which is only a
4c60: 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75  vailable in secu
4c70: 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72  rity level.0 for
4c80: 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20   Open SSL 3.0+. 
4c90: 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73  See the <b class
4ca0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72  ="option">-secur
4cb0: 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 6f 70  ity_level</b> op
4cc0: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  tion.</p></dd>.<
4cd0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
4ce0: 69 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e  ion">-tls1.1</b>
4cf0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
4d00: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
4d10: 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20  d><p>Enable use 
4d20: 6f 66 20 54 4c 53 20 76 31 2e 31 2e 20 53 74 61  of TLS v1.1. Sta
4d30: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20  rting in TclTLS 
4d40: 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74  2.0, the default
4d50: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
4d60: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a  nst">false</b>..
4d70: 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 31 20 6e 65  Note: TLS 1.1 ne
4d80: 65 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72  eds SHA1 to oper
4d90: 61 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e  ate, which is on
4da0: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20  ly available in 
4db0: 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30  security level.0
4dc0: 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e   for Open SSL 3.
4dd0: 30 2b 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63  0+. See the <b c
4de0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
4df0: 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62  ecurity_level</b
4e00: 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64  > option.</p></d
4e10: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
4e20: 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32  "option">-tls1.2
4e30: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
4e40: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
4e50: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20  >.<dd><p>Enable 
4e60: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 2e  use of TLS v1.2.
4e70: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
4e80: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4e90: 3e 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f  >true</b>.</p></
4ea0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
4eb0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e  ="option">-tls1.
4ec0: 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  3</b> <i class="
4ed0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
4ee0: 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65  t>.<dd><p>Enable
4ef0: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33   use of TLS v1.3
4f00: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
4f10: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
4f20: 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 54 68 69 73  ">true</b>. This
4f30: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62   is only availab
4f40: 6c 65 0a 73 74 61 72 74 69 6e 67 20 77 69 74 68  le.starting with
4f50: 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e 31 20 61   OpenSSL 1.1.1 a
4f60: 6e 64 20 54 63 6c 54 4c 53 20 31 2e 37 2e 3c 2f  nd TclTLS 1.7.</
4f70: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
4f80: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76  lass="option">-v
4f90: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f  alidatecommand</
4fa0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4fb0: 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f  ">callback</i></
4fc0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
4fd0: 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63  fies the callbac
4fe0: 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76  k command to inv
4ff0: 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 74 65 20  oke to validate 
5000: 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69  the peer certifi
5010: 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 65 72 20  cates.and other 
5020: 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 75 72 69  config info duri
5030: 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20  ng the protocol 
5040: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73  negotiation phas
5050: 65 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 75  e. This can be u
5060: 73 65 64 0a 62 79 20 54 43 4c 20 73 63 72 69 70  sed.by TCL scrip
5070: 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68  ts to perform th
5080: 65 69 72 20 6f 77 6e 20 43 65 72 74 69 66 69 63  eir own Certific
5090: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 20 74  ate Validation t
50a0: 6f 20 73 75 70 70 6c 65 6d 65 6e 74 20 74 68 65  o supplement the
50b0: 0a 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74  .default validat
50c0: 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79 20  ion provided by 
50d0: 4f 70 65 6e 53 53 4c 2e 20 54 68 65 20 73 63 72  OpenSSL. The scr
50e0: 69 70 74 20 6d 75 73 74 20 72 65 74 75 72 6e 20  ipt must return 
50f0: 61 20 62 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74  a boolean true.t
5100: 6f 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e  o continue the n
5110: 65 67 6f 74 69 61 74 69 6f 6e 2e 20 53 65 65 20  egotiation. See 
5120: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
5130: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
5140: 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61  section5">Callba
5150: 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f  ck Options</a></
5160: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69  span> for more i
5170: 6e 66 6f 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e  nfo..This option
5180: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
5190: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
51a0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
51b0: 3c 61 20 6e 61 6d 65 3d 22 36 22 3e 3c 62 20 63  <a name="6"><b c
51c0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
51d0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69  handshake</b> <i
51e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
51f0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  nnel</i></a></dt
5200: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 73 20  >.<dd><p>Forces 
5210: 74 68 65 20 54 4c 53 20 6e 65 67 6f 74 69 61 74  the TLS negotiat
5220: 69 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20 74 6f  ion handshake to
5230: 20 74 61 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65   take place imme
5240: 64 69 61 74 65 6c 79 2c 20 61 6e 64 20 72 65 74  diately, and ret
5250: 75 72 6e 73 20 30 0a 69 66 20 68 61 6e 64 73 68  urns 0.if handsh
5260: 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20  ake is still in 
5270: 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c  progress (non-bl
5280: 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66  ocking), or 1 if
5290: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77   the handshake w
52a0: 61 73 0a 73 75 63 63 65 73 73 66 75 6c 2e 20 49  as.successful. I
52b0: 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20  f the handshake 
52c0: 66 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72  failed, an error
52d0: 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65   will be returne
52e0: 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  d.</p></dd>.<dt>
52f0: 3c 61 20 6e 61 6d 65 3d 22 37 22 3e 3c 62 20 63  <a name="7"><b c
5300: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
5310: 73 68 75 74 64 6f 77 6e 3c 2f 62 3e 20 3c 69 20  shutdown</b> <i 
5320: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
5330: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  nel</i></a></dt>
5340: 0a 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .<dd></dd>.<dt><
5350: 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 20 63 6c  a name="8"><b cl
5360: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75  ass="cmd">tls::u
5370: 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63  nimport</b> <i c
5380: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
5390: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  el</i></a></dt>.
53a0: 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  <dd></dd>.<dt><a
53b0: 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 63 6c 61   name="9"><b cla
53c0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e  ss="cmd">tls::un
53d0: 73 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 63 6c 61  stack</b> <i cla
53e0: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
53f0: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64  </i></a></dt>.<d
5400: 64 3e 3c 70 3e 54 68 69 73 20 74 65 72 6d 69 6e  d><p>This termin
5410: 61 74 65 73 20 74 68 65 20 53 53 4c 2f 54 4c 53  ates the SSL/TLS
5420: 20 73 65 73 73 69 6f 6e 20 62 79 20 73 65 6e 64   session by send
5430: 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63 6c  ing the &quot;cl
5440: 6f 73 65 5f 6e 6f 74 69 66 79 26 71 75 6f 74 3b  ose_notify&quot;
5450: 20 6d 65 73 73 61 67 65 20 61 6e 64 0a 72 65 6d   message and.rem
5460: 6f 76 65 73 20 74 68 65 20 74 6f 70 20 6c 65 76  oves the top lev
5470: 65 6c 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  el stacked chann
5480: 65 6c 20 66 72 6f 6d 20 3c 69 20 63 6c 61 73 73  el from <i class
5490: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
54a0: 69 3e 2c 20 62 75 74 20 69 74 20 64 6f 65 73 20  i>, but it does 
54b0: 6e 6f 74 20 63 6c 6f 73 65 0a 74 68 65 20 73 6f  not close.the so
54c0: 63 6b 65 74 2e 20 49 74 20 69 73 20 74 68 65 20  cket. It is the 
54d0: 63 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 3c 62  compliment to <b
54e0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
54f0: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 62 79 20  ::import</b> by 
5500: 65 6e 64 69 6e 67 20 65 6e 63 72 79 70 74 69 6f  ending encryptio
5510: 6e 20 6f 66 0a 61 20 54 43 4c 20 63 68 61 6e 6e  n of.a TCL chann
5520: 65 6c 2e 20 41 6e 20 65 72 72 6f 72 20 69 73 20  el. An error is 
5530: 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73  thrown if TLS is
5540: 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61   not the top sta
5550: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70  cked channel typ
5560: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  e.</p></dd>.<dt>
5570: 3c 61 20 6e 61 6d 65 3d 22 31 30 22 3e 3c 62 20  <a name="10"><b 
5580: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
5590: 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70 61  :status</b> <spa
55a0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
55b0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
55c0: 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70  >-local</b>?</sp
55d0: 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  an> <i class="ar
55e0: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  g">channel</i></
55f0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52  a></dt>.<dd><p>R
5600: 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65  eturns the curre
5610: 6e 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20  nt status of an 
5620: 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65  SSL channel. The
5630: 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73   result is a lis
5640: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 0a 70  t of key-value.p
5650: 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20  airs describing 
5660: 74 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69  the SSL, certifi
5670: 63 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66  cate, and certif
5680: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69  icate verificati
5690: 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 0a 74 68  on status. If.th
56a0: 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20  e SSL handshake 
56b0: 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70  has not yet comp
56c0: 6c 65 74 65 64 2c 20 61 6e 20 65 6d 70 74 79 20  leted, an empty 
56d0: 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64  list is returned
56e0: 2e 20 49 66 20 74 68 65 0a 3c 62 20 63 6c 61 73  . If the.<b clas
56f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61  s="option">-loca
5700: 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20  l</b> option is 
5710: 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20  specified, then 
5720: 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66  the local certif
5730: 69 63 61 74 65 20 69 73 20 75 73 65 64 2e 0a 52  icate is used..R
5740: 65 74 75 72 6e 65 64 20 76 61 6c 75 65 73 20 69  eturned values i
5750: 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53  nclude:</p>.<p>S
5760: 53 4c 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64  SL Status</p>.<d
5770: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
5780: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
5790: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
57a0: 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e  riable">alpn</b>
57b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
57c0: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74  protocol</i></dt
57d0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f  >.<dd><p>The pro
57e0: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61  tocol selected a
57f0: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e  fter Application
5800: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20  -Layer Protocol 
5810: 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50  Negotiation (ALP
5820: 4e 29 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  N)..This value i
5830: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
5840: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
5850: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5860: 69 61 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62  iable">cipher</b
5870: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5880: 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e  >cipher</i></dt>
5890: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72  .<dd><p>The curr
58a0: 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73  ent cipher in us
58b0: 65 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f  e for the sessio
58c0: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  n.</p></dd>.<dt>
58d0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
58e0: 6c 65 22 3e 70 65 65 72 6e 61 6d 65 3c 2f 62 3e  le">peername</b>
58f0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5900: 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  name</i></dt>.<d
5910: 64 3e 3c 70 3e 54 68 65 20 70 65 65 72 6e 61 6d  d><p>The peernam
5920: 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 69  e from the certi
5930: 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c  ficate..This val
5940: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5950: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5960: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5970: 22 76 61 72 69 61 62 6c 65 22 3e 70 72 6f 74 6f  "variable">proto
5980: 63 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  col</b> <i class
5990: 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f  ="arg">version</
59a0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
59b0: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  he protocol vers
59c0: 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65  ion used for the
59d0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c   connection: SSL
59e0: 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54  2, SSL3, TLS1, T
59f0: 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 0a 54  LS1.1, TLS1.2,.T
5a00: 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77  LS1.3, or unknow
5a10: 6e 2e 20 54 68 69 73 20 76 61 6c 75 65 20 69 73  n. This value is
5a20: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
5a30: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
5a40: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5a50: 61 62 6c 65 22 3e 73 62 69 74 73 3c 2f 62 3e 20  able">sbits</b> 
5a60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
5a70: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5a80: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 62  >The number of b
5a90: 69 74 73 20 75 73 65 64 20 66 6f 72 20 74 68 65  its used for the
5aa0: 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c 2f 70   session key.</p
5ab0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5ac0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
5ad0: 69 67 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f  ignatureHashAlgo
5ae0: 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61  rithm</b> <i cla
5af0: 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74  ss="arg">algorit
5b00: 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  hm</i></dt>.<dd>
5b10: 3c 70 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65  <p>The signature
5b20: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e   hash algorithm.
5b30: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
5b40: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
5b50: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
5b60: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5b70: 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 54 79 70  le">signatureTyp
5b80: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
5b90: 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64  arg">type</i></d
5ba0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69  t>.<dd><p>The si
5bb0: 67 6e 61 74 75 72 65 20 74 79 70 65 20 76 61 6c  gnature type val
5bc0: 75 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  ue..This value i
5bd0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
5be0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
5bf0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5c00: 69 61 62 6c 65 22 3e 76 65 72 69 66 79 44 65 70  iable">verifyDep
5c10: 74 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  th</b> <i class=
5c20: 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e  "arg">n</i></dt>
5c30: 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d 75 6d 20  .<dd><p>Maximum 
5c40: 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 63 65  depth for the ce
5c50: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 20  rtificate chain 
5c60: 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 20 44 65  verification. De
5c70: 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20  fault is -1, to 
5c80: 63 68 65 63 6b 20 61 6c 6c 2e 0a 54 68 69 73 20  check all..This 
5c90: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
5ca0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
5cb0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5cc0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65  ss="variable">ve
5cd0: 72 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 3c 69 20  rifyMode</b> <i 
5ce0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74  class="arg">list
5cf0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5d00: 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69  >List of certifi
5d10: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f  cate verificatio
5d20: 6e 20 6d 6f 64 65 73 2e 0a 54 68 69 73 20 76 61  n modes..This va
5d30: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
5d40: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
5d50: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5d60: 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69  ="variable">veri
5d70: 66 79 52 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20  fyResult</b> <i 
5d80: 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 65 73 75  class="arg">resu
5d90: 6c 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  lt</i></dt>.<dd>
5da0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 76  <p>Certificate v
5db0: 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75  erification resu
5dc0: 6c 74 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  lt..This value i
5dd0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
5de0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
5df0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5e00: 69 61 62 6c 65 22 3e 63 61 5f 6e 61 6d 65 73 3c  iable">ca_names<
5e10: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5e20: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e  g">list</i></dt>
5e30: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20  .<dd><p>List of 
5e40: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
5e50: 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64  Authorities used
5e60: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63   to create the c
5e70: 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73  ertificate..This
5e80: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
5e90: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
5ea0: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e  ></dd>.</dl>.<p>
5eb0: 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74  Certificate Stat
5ec0: 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  us</p>.<dl class
5ed0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e  ="doctools_defin
5ee0: 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  itions">.<dt><b 
5ef0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5f00: 3e 61 6c 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  >all</b> <i clas
5f10: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
5f20: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44  i></dt>.<dd><p>D
5f30: 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69  ump of all certi
5f40: 66 69 63 61 74 65 20 69 6e 66 6f 2e 0a 54 68 69  ficate info..Thi
5f50: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
5f60: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
5f70: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5f80: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5f90: 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63  version</b> <i c
5fa0: 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65  lass="arg">value
5fb0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5fc0: 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 74 65  >The certificate
5fd0: 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64   version.</p></d
5fe0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5ff0: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 72 69 61  "variable">seria
6000: 6c 4e 75 6d 62 65 72 3c 2f 62 3e 20 3c 69 20 63  lNumber</b> <i c
6010: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e  lass="arg">strin
6020: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
6030: 70 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d  p>The serial num
6040: 62 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69  ber of the certi
6050: 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20  ficate as a hex 
6060: 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c  string..This val
6070: 75 65 20 77 61 73 20 63 68 61 6e 67 65 64 20 66  ue was changed f
6080: 72 6f 6d 20 73 65 72 69 61 6c 20 69 6e 20 54 63  rom serial in Tc
6090: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
60a0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
60b0: 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61  "variable">signa
60c0: 74 75 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ture</b> <i clas
60d0: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68  s="arg">algorith
60e0: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  m</i></dt>.<dd><
60f0: 70 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74  p>Cipher algorit
6100: 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74  hm used for cert
6110: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
6120: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  e..This value is
6130: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
6140: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
6150: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6160: 61 62 6c 65 22 3e 69 73 73 75 65 72 3c 2f 62 3e  able">issuer</b>
6170: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6180: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
6190: 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69 73 74 69  <dd><p>The disti
61a0: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44  nguished name (D
61b0: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  N) of the certif
61c0: 69 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 70  icate issuer.</p
61d0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
61e0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e  ass="variable">n
61f0: 6f 74 42 65 66 6f 72 65 3c 2f 62 3e 20 3c 69 20  otBefore</b> <i 
6200: 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 61 74 65  class="arg">date
6210: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6220: 3e 54 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 64  >The beginning d
6230: 61 74 65 20 6f 66 20 74 68 65 20 63 65 72 74 69  ate of the certi
6240: 66 69 63 61 74 65 20 76 61 6c 69 64 69 74 79 2e  ficate validity.
6250: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6260: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6270: 22 3e 6e 6f 74 41 66 74 65 72 3c 2f 62 3e 20 3c  ">notAfter</b> <
6280: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 61  i class="arg">da
6290: 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  te</i></dt>.<dd>
62a0: 3c 70 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f  <p>The expiratio
62b0: 6e 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65  n date of the ce
62c0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69  rtificate validi
62d0: 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ty.</p></dd>.<dt
62e0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
62f0: 62 6c 65 22 3e 73 75 62 6a 65 63 74 3c 2f 62 3e  ble">subject</b>
6300: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6310: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
6320: 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69 73 74 69  <dd><p>The disti
6330: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44  nguished name (D
6340: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  N) of the certif
6350: 69 63 61 74 65 20 73 75 62 6a 65 63 74 2e 20 46  icate subject. F
6360: 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43  ields include: C
6370: 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 4e 29 2c  ommon.Name (CN),
6380: 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f   Organization (O
6390: 29 2c 20 4c 6f 63 61 6c 69 74 79 20 6f 72 20 43  ), Locality or C
63a0: 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f  ity (L), State o
63b0: 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20  r Province (S), 
63c0: 61 6e 64 0a 43 6f 75 6e 74 72 79 20 4e 61 6d 65  and.Country Name
63d0: 20 28 43 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   (C).</p></dd>.<
63e0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
63f0: 69 61 62 6c 65 22 3e 69 73 73 75 65 72 55 6e 69  iable">issuerUni
6400: 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20 63 6c 61  queID</b> <i cla
6410: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
6420: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6430: 54 68 65 20 69 73 73 75 65 72 20 75 6e 69 71 75  The issuer uniqu
6440: 65 20 69 64 2e 0a 54 68 69 73 20 76 61 6c 75 65  e id..This value
6450: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
6460: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
6470: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6480: 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74  ariable">subject
6490: 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20  UniqueID</b> <i 
64a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
64b0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
64c0: 3c 70 3e 54 68 65 20 73 75 62 6a 65 63 74 20 75  <p>The subject u
64d0: 6e 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20 76  nique id..This v
64e0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
64f0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6500: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6510: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 75 6d  s="variable">num
6520: 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20  _extensions</b> 
6530: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
6540: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6550: 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69  >Number of certi
6560: 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e  ficate extension
6570: 73 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  s..This value is
6580: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
6590: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
65a0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
65b0: 61 62 6c 65 22 3e 65 78 74 65 6e 73 69 6f 6e 73  able">extensions
65c0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
65d0: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74  rg">list</i></dt
65e0: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66  >.<dd><p>List of
65f0: 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74   certificate ext
6600: 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e 0a 54 68  ension names..Th
6610: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20  is value is new 
6620: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
6630: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6640: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6650: 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65  >authorityKeyIde
6660: 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63  ntifier</b> <i c
6670: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e  lass="arg">strin
6680: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
6690: 70 3e 41 75 74 68 6f 72 69 74 79 20 4b 65 79 20  p>Authority Key 
66a0: 49 64 65 6e 74 69 66 69 65 72 20 28 41 4b 49 29  Identifier (AKI)
66b0: 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67 20   of the Issuing 
66c0: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20 74  CA certificate t
66d0: 68 61 74 20 73 69 67 6e 65 64 20 74 68 65 0a 53  hat signed the.S
66e0: 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 61  SL certificate a
66f0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20  s a hex string. 
6700: 54 68 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68  This value match
6710: 65 73 20 74 68 65 20 53 4b 49 20 76 61 6c 75 65  es the SKI value
6720: 20 6f 66 20 74 68 65 0a 49 6e 74 65 72 6d 65 64   of the.Intermed
6730: 69 61 74 65 20 43 41 20 63 65 72 74 69 66 69 63  iate CA certific
6740: 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  ate..This value 
6750: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6760: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6770: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6780: 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 4b  riable">subjectK
6790: 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e  eyIdentifier</b>
67a0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
67b0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
67c0: 3c 64 64 3e 3c 70 3e 53 75 62 6a 65 63 74 20 4b  <dd><p>Subject K
67d0: 65 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 53  ey Identifier (S
67e0: 4b 49 29 20 68 61 73 68 20 6f 66 20 74 68 65 20  KI) hash of the 
67f0: 70 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64  public key insid
6800: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  e the certificat
6810: 65 20 61 73 20 61 0a 68 65 78 20 73 74 72 69 6e  e as a.hex strin
6820: 67 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74  g. Used to ident
6830: 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73  ify certificates
6840: 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20   that contain a 
6850: 70 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69  particular publi
6860: 63 20 6b 65 79 2e 0a 54 68 69 73 20 76 61 6c 75  c key..This valu
6870: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
6880: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
6890: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
68a0: 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63  variable">subjec
68b0: 74 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 3c 69 20  tAltName</b> <i 
68c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74  class="arg">list
68d0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
68e0: 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20  >List of all of 
68f0: 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65  the Subject Alte
6900: 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 28 53  rnative Names (S
6910: 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 64 6f  AN) including do
6920: 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 0a  main names, sub.
6930: 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 50 20  domains, and IP 
6940: 61 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61  addresses that a
6950: 72 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68  re secured by th
6960: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54  e certificate..T
6970: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
6980: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
6990: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
69a0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
69b0: 22 3e 6f 63 73 70 3c 2f 62 3e 20 3c 69 20 63 6c  ">ocsp</b> <i cl
69c0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f  ass="arg">list</
69d0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c  i></dt>.<dd><p>L
69e0: 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e  ist of all Onlin
69f0: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74  e Certificate St
6a00: 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f  atus Protocol (O
6a10: 43 53 50 29 20 55 52 4c 73 20 74 68 61 74 20 63  CSP) URLs that c
6a20: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 63 68  an be used to.ch
6a30: 65 63 6b 20 74 68 65 20 76 61 6c 69 64 69 74 79  eck the validity
6a40: 20 6f 66 20 74 68 69 73 20 63 65 72 74 69 66 69   of this certifi
6a50: 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65  cate..This value
6a60: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
6a70: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
6a80: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6a90: 61 72 69 61 62 6c 65 22 3e 63 65 72 74 69 66 69  ariable">certifi
6aa0: 63 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  cate</b> <i clas
6ab0: 73 3d 22 61 72 67 22 3e 63 65 72 74 3c 2f 69 3e  s="arg">cert</i>
6ac0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
6ad0: 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72   PEM encoded cer
6ae0: 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64  tificate.</p></d
6af0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6b00: 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61  "variable">signa
6b10: 74 75 72 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 62  tureAlgorithm</b
6b20: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6b30: 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f  >algorithm</i></
6b40: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65  dt>.<dd><p>Ciphe
6b50: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64  r algorithm used
6b60: 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69   for the certifi
6b70: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 0a  cate signature..
6b80: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
6b90: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
6ba0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
6bb0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
6bc0: 65 22 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75  e">signatureValu
6bd0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
6be0: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
6bf0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74  /dt>.<dd><p>Cert
6c00: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
6c10: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e  e as a hex strin
6c20: 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  g..This value is
6c30: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
6c40: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
6c50: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6c60: 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 44  able">signatureD
6c70: 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  igest</b> <i cla
6c80: 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e  ss="arg">version
6c90: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6ca0: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67  >Certificate sig
6cb0: 6e 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61  ning digest as a
6cc0: 20 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69   hex string..Thi
6cd0: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
6ce0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
6cf0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6d00: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6d10: 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74  publicKeyAlgorit
6d20: 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  hm</b> <i class=
6d30: 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c  "arg">algorithm<
6d40: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6d50: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
6d60: 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79  ature public key
6d70: 20 61 6c 67 6f 72 69 74 68 6d 2e 0a 54 68 69 73   algorithm..This
6d80: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6d90: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6da0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6db0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70  ass="variable">p
6dc0: 75 62 6c 69 63 4b 65 79 3c 2f 62 3e 20 3c 69 20  ublicKey</b> <i 
6dd0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
6de0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
6df0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  <p>Certificate s
6e00: 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20  ignature public 
6e10: 6b 65 79 20 61 73 20 61 20 68 65 78 20 73 74 72  key as a hex str
6e20: 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  ing..This value 
6e30: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6e40: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6e50: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6e60: 72 69 61 62 6c 65 22 3e 62 69 74 73 3c 2f 62 3e  riable">bits</b>
6e70: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6e80: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
6e90: 70 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73  p>Number of bits
6ea0: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66   used for certif
6eb0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
6ec0: 6b 65 79 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  key..This value 
6ed0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6ee0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6ef0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6f00: 72 69 61 62 6c 65 22 3e 73 65 6c 66 5f 73 69 67  riable">self_sig
6f10: 6e 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ned</b> <i class
6f20: 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f  ="arg">boolean</
6f30: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57  i></dt>.<dd><p>W
6f40: 68 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69  hether the certi
6f50: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
6f60: 20 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 2e   is self signed.
6f70: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
6f80: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
6f90: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
6fa0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6fb0: 6c 65 22 3e 73 68 61 31 5f 68 61 73 68 3c 2f 62  le">sha1_hash</b
6fc0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6fd0: 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >hash</i></dt>.<
6fe0: 64 64 3e 3c 70 3e 54 68 65 20 53 48 41 31 20 68  dd><p>The SHA1 h
6ff0: 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69  ash of the certi
7000: 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20  ficate as a hex 
7010: 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c  string..This val
7020: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
7030: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
7040: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7050: 22 76 61 72 69 61 62 6c 65 22 3e 73 68 61 32 35  "variable">sha25
7060: 36 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c  6_hash</b> <i cl
7070: 61 73 73 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f  ass="arg">hash</
7080: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
7090: 68 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f  he SHA256 hash o
70a0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
70b0: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e  e as a hex strin
70c0: 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  g..This value is
70d0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
70e0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  1.8.</p></dd>.</
70f0: 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20  dl></dd>.<dt><a 
7100: 6e 61 6d 65 3d 22 31 31 22 3e 3c 62 20 63 6c 61  name="11"><b cla
7110: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 6f  ss="cmd">tls::co
7120: 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20  nnection</b> <i 
7130: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
7140: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  nel</i></a></dt>
7150: 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20  .<dd><p>Returns 
7160: 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e  the current conn
7170: 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66  ection status of
7180: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e   an SSL channel.
7190: 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61   The result is a
71a0: 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d 76 61 6c   list.of key-val
71b0: 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62  ue pairs describ
71c0: 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  ing the connecti
71d0: 6f 6e 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64  on..This command
71e0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
71f0: 4c 53 20 31 2e 38 2e 20 52 65 74 75 72 6e 65 64  LS 1.8. Returned
7200: 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a   values include:
7210: 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 74  </p>.<p>SSL Stat
7220: 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  us</p>.<dl class
7230: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e  ="doctools_defin
7240: 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  itions">.<dt><b 
7250: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7260: 3e 73 74 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c  >state</b> <i cl
7270: 61 73 73 3d 22 61 72 67 22 3e 73 74 61 74 65 3c  ass="arg">state<
7280: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
7290: 53 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e  State of the con
72a0: 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64  nection.</p></dd
72b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
72c0: 76 61 72 69 61 62 6c 65 22 3e 73 65 72 76 65 72  variable">server
72d0: 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  name</b> <i clas
72e0: 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e  s="arg">name</i>
72f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
7300: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e   name of the con
7310: 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 72  nected to server
7320: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
7330: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
7340: 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20  e">protocol</b> 
7350: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
7360: 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  ersion</i></dt>.
7370: 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f  <dd><p>The proto
7380: 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64  col version used
7390: 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74   for the connect
73a0: 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c  ion: SSL2, SSL3,
73b0: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54   TLS1, TLS1.1, T
73c0: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f  LS1.2, TLS1.3, o
73d0: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f  r unknown.</p></
73e0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
73f0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 72 65 6e 65  ="variable">rene
7400: 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65  gotiation_allowe
7410: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
7420: 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e  arg">boolean</i>
7430: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65  </dt>.<dd><p>Whe
7440: 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65  ther protocol re
7450: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73  negotiation is s
7460: 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e  upported or not.
7470: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7480: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7490: 22 3e 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c  ">security_level
74a0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
74b0: 72 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e 3c 2f 64  rg">level</i></d
74c0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65  t>.<dd><p>The se
74d0: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65  curity level use
74e0: 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20  d for selection 
74f0: 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20  of ciphers, key 
7500: 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f  size, etc.</p></
7510: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7520: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73  ="variable">sess
7530: 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 62 3e 20 3c  ion_reused</b> <
7540: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
7550: 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  olean</i></dt>.<
7560: 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68  dd><p>Whether th
7570: 65 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65  e session has be
7580: 65 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74  en reused or not
7590: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
75a0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
75b0: 65 22 3e 69 73 5f 73 65 72 76 65 72 3c 2f 62 3e  e">is_server</b>
75c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
75d0: 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e  boolean</i></dt>
75e0: 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20  .<dd><p>Whether 
75f0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69  the connection i
7600: 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20  s configured as 
7610: 61 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20  a server (1) or 
7620: 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 70 3e 3c  client (0).</p><
7630: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7640: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 6f 6d  s="variable">com
7650: 70 72 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20  pression</b> <i 
7660: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65  class="arg">mode
7670: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7680: 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74  >Compression met
7690: 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  hod.</p></dd>.<d
76a0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
76b0: 61 62 6c 65 22 3e 65 78 70 61 6e 73 69 6f 6e 3c  able">expansion<
76c0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
76d0: 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e  g">mode</i></dt>
76e0: 0a 3c 64 64 3e 3c 70 3e 45 78 70 61 6e 73 69 6f  .<dd><p>Expansio
76f0: 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64  n method.</p></d
7700: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7710: 22 76 61 72 69 61 62 6c 65 22 3e 63 61 4c 69 73  "variable">caLis
7720: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
7730: 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64  arg">list</i></d
7740: 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f  t>.<dd><p>List o
7750: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  f Certificate Au
7760: 74 68 6f 72 69 74 69 65 73 20 28 43 41 29 20 66  thorities (CA) f
7770: 6f 72 20 58 2e 35 30 39 20 63 65 72 74 69 66 69  or X.509 certifi
7780: 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  cate.</p></dd>.<
7790: 2f 64 6c 3e 0a 3c 70 3e 43 69 70 68 65 72 20 49  /dl>.<p>Cipher I
77a0: 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  nfo</p>.<dl clas
77b0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69  s="doctools_defi
77c0: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62  nitions">.<dt><b
77d0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
77e0: 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20  ">cipher</b> <i 
77f0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68  class="arg">ciph
7800: 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  er</i></dt>.<dd>
7810: 3c 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63  <p>The current c
7820: 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72  ipher in use for
7830: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e   the connection.
7840: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7850: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7860: 22 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c  ">standard_name<
7870: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7880: 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e  g">name</i></dt>
7890: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 6e  .<dd><p>The stan
78a0: 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66  dard RFC name of
78b0: 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64   cipher.</p></dd
78c0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
78d0: 76 61 72 69 61 62 6c 65 22 3e 61 6c 67 6f 72 69  variable">algori
78e0: 74 68 6d 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20  thm_bits</b> <i 
78f0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69  class="arg">n</i
7900: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
7910: 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63  e number of proc
7920: 65 73 73 65 64 20 62 69 74 73 20 75 73 65 64 20  essed bits used 
7930: 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c  for cipher.</p><
7940: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7950: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 63  s="variable">sec
7960: 72 65 74 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20  ret_bits</b> <i 
7970: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69  class="arg">n</i
7980: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
7990: 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72  e number of secr
79a0: 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f 72  et bits used for
79b0: 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64   cipher.</p></dd
79c0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
79d0: 76 61 72 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 65  variable">min_ve
79e0: 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  rsion</b> <i cla
79f0: 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e  ss="arg">version
7a00: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7a10: 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f  >The minimum pro
7a20: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f  tocol version fo
7a30: 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64  r cipher.</p></d
7a40: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7a50: 22 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65  "variable">ciphe
7a60: 72 5f 69 73 5f 61 65 61 64 3c 2f 62 3e 20 3c 69  r_is_aead</b> <i
7a70: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
7a80: 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  lean</i></dt>.<d
7a90: 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65  d><p>Whether the
7aa0: 20 63 69 70 68 65 72 20 69 73 20 41 75 74 68 65   cipher is Authe
7ab0: 6e 74 69 63 61 74 65 64 20 45 6e 63 72 79 70 74  nticated Encrypt
7ac0: 69 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 69 61  ion with Associa
7ad0: 74 65 64 20 44 61 74 61 20 28 41 45 41 44 29 2e  ted Data (AEAD).
7ae0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7af0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7b00: 22 3e 63 69 70 68 65 72 5f 69 64 3c 2f 62 3e 20  ">cipher_id</b> 
7b10: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69  <i class="arg">i
7b20: 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  d</i></dt>.<dd><
7b30: 70 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 69  p>The OpenSSL ci
7b40: 70 68 65 72 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64  pher id.</p></dd
7b50: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7b60: 76 61 72 69 61 62 6c 65 22 3e 64 65 73 63 72 69  variable">descri
7b70: 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  ption</b> <i cla
7b80: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
7b90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
7ba0: 41 20 74 65 78 74 20 64 65 73 63 72 69 70 74 69  A text descripti
7bb0: 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 72  on of the cipher
7bc0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
7bd0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
7be0: 65 22 3e 68 61 6e 64 73 68 61 6b 65 5f 64 69 67  e">handshake_dig
7bf0: 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  est</b> <i class
7c00: 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f  ="arg">boolean</
7c10: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44  i></dt>.<dd><p>D
7c20: 69 67 65 73 74 20 75 73 65 64 20 64 75 72 69 6e  igest used durin
7c30: 67 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 70 3e  g handshake.</p>
7c40: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 53  </dd>.</dl>.<p>S
7c50: 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 70 3e 0a  ession Info</p>.
7c60: 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <dl class="docto
7c70: 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22  ols_definitions"
7c80: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7c90: 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f  variable">alpn</
7ca0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
7cb0: 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f  ">protocol</i></
7cc0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70  dt>.<dd><p>The p
7cd0: 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64  rotocol selected
7ce0: 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69   after Applicati
7cf0: 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f  on-Layer Protoco
7d00: 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41  l Negotiation (A
7d10: 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  LPN).</p></dd>.<
7d20: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7d30: 69 61 62 6c 65 22 3e 72 65 73 75 6d 61 62 6c 65  iable">resumable
7d40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7d50: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
7d60: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74  /dt>.<dd><p>Whet
7d70: 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20  her the session 
7d80: 63 61 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f  can be resumed o
7d90: 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  r not.</p></dd>.
7da0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7db0: 72 69 61 62 6c 65 22 3e 73 74 61 72 74 5f 74 69  riable">start_ti
7dc0: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
7dd0: 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69  "arg">seconds</i
7de0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69  ></dt>.<dd><p>Ti
7df0: 6d 65 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e  me since session
7e00: 20 73 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f   started in seco
7e10: 6e 64 73 20 73 69 6e 63 65 20 65 70 6f 63 68 2e  nds since epoch.
7e20: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7e30: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7e40: 22 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69  ">timeout</b> <i
7e50: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63   class="arg">sec
7e60: 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  onds</i></dt>.<d
7e70: 64 3e 3c 70 3e 4d 61 78 20 64 75 72 61 74 69 6f  d><p>Max duratio
7e80: 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20  n of session in 
7e90: 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74  seconds before t
7ea0: 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 64  ime-out.</p></dd
7eb0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7ec0: 76 61 72 69 61 62 6c 65 22 3e 6c 69 66 65 74 69  variable">lifeti
7ed0: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
7ee0: 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69  "arg">seconds</i
7ef0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65  ></dt>.<dd><p>Se
7f00: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66  ssion ticket lif
7f10: 65 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65  etime hint in se
7f20: 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  conds.</p></dd>.
7f30: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7f40: 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f  riable">session_
7f50: 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  id</b> <i class=
7f60: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72  "arg">binary_str
7f70: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
7f80: 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69  ><p>Unique sessi
7f90: 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e  on id for use in
7fa0: 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65   resuming the se
7fb0: 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ssion.</p></dd>.
7fc0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7fd0: 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f  riable">session_
7fe0: 74 69 63 6b 65 74 3c 2f 62 3e 20 3c 69 20 63 6c  ticket</b> <i cl
7ff0: 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79  ass="arg">binary
8000: 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  _string</i></dt>
8010: 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73  .<dd><p>Unique s
8020: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f  ession ticket fo
8030: 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e  r use in resumin
8040: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f  g the session.</
8050: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
8060: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
8070: 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c  ticket_app_data<
8080: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
8090: 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67  g">binary_string
80a0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
80b0: 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20  >Unique session 
80c0: 74 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69  ticket applicati
80d0: 6f 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c 2f 64 64  on data.</p></dd
80e0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
80f0: 76 61 72 69 61 62 6c 65 22 3e 6d 61 73 74 65 72  variable">master
8100: 5f 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  _key</b> <i clas
8110: 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73  s="arg">binary_s
8120: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
8130: 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73  dd><p>Unique ses
8140: 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e  sion master key.
8150: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
8160: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
8170: 22 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f  ">session_cache_
8180: 6d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  mode</b> <i clas
8190: 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e  s="arg">mode</i>
81a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 72  </dt>.<dd><p>Ser
81b0: 76 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28  ver cache mode (
81c0: 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20  client, server, 
81d0: 6f 72 20 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64  or both).</p></d
81e0: 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64  d>.</dl></dd>.<d
81f0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 32 22 3e 3c  t><a name="12"><
8200: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
8210: 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c  s::ciphers</b> <
8220: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
8230: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
8240: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f  >protocol</i>?</
8250: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
8260: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
8270: 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c  s="arg">verbose<
8280: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
8290: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
82a0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75  i class="arg">su
82b0: 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70  pported</i>?</sp
82c0: 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  an></a></dt>.<dd
82d0: 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61 6e 79 20  ><p>Without any 
82e0: 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72 65 74 75  options, it retu
82f0: 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c  rns a list of al
8300: 6c 20 73 79 6d 6d 65 74 72 69 63 20 63 69 70 68  l symmetric ciph
8310: 65 72 73 20 66 6f 72 20 75 73 65 20 77 69 74 68  ers for use with
8320: 20 74 68 65 0a 3c 69 20 63 6c 61 73 73 3d 22 61   the.<i class="a
8330: 72 67 22 3e 2d 63 69 70 68 65 72 3c 2f 69 3e 20  rg">-cipher</i> 
8340: 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20 3c 69 20  option. With <i 
8350: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74  class="arg">prot
8360: 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c 79 20 74  ocol</i>, only t
8370: 68 65 20 63 69 70 68 65 72 73 20 73 75 70 70 6f  he ciphers suppo
8380: 72 74 65 64 20 66 6f 72 20 74 68 61 74 0a 70 72  rted for that.pr
8390: 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 75 72  otocol are retur
83a0: 6e 65 64 2e 20 53 65 65 20 74 68 65 20 3c 62 20  ned. See the <b 
83b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
83c0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63  :protocols</b> c
83d0: 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 65 20 73  ommand for the s
83e0: 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f  upported.protoco
83f0: 6c 73 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d  ls. If <i class=
8400: 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69  "arg">verbose</i
8410: 3e 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61  > is specified a
8420: 73 20 74 72 75 65 20 74 68 65 6e 20 61 20 76 65  s true then a ve
8430: 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61  rbose, human rea
8440: 64 61 62 6c 65 0a 6c 69 73 74 20 69 73 20 72 65  dable.list is re
8450: 74 75 72 6e 65 64 20 77 69 74 68 20 61 64 64 69  turned with addi
8460: 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69  tional informati
8470: 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72  on on the cipher
8480: 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61  . If <i class="a
8490: 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69  rg">supported</i
84a0: 3e 0a 69 73 20 73 70 65 63 69 66 69 65 64 20 61  >.is specified a
84b0: 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c  s true, then onl
84c0: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75  y the ciphers su
84d0: 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f 74  pported for prot
84e0: 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c 69 73  ocol will be lis
84f0: 74 65 64 2e 0a 54 68 65 20 3c 69 20 63 6c 61 73  ted..The <i clas
8500: 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65  s="arg">supporte
8510: 64 3c 2f 69 3e 20 61 72 67 20 69 73 20 6e 65 77  d</i> arg is new
8520: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
8530: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  </p></dd>.<dt><a
8540: 20 6e 61 6d 65 3d 22 31 33 22 3e 3c 62 20 63 6c   name="13"><b cl
8550: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70  ass="cmd">tls::p
8560: 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e  rotocols</b></a>
8570: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74  </dt>.<dd><p>Ret
8580: 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 74  urns a list of t
8590: 68 65 20 73 75 70 70 6f 72 74 65 64 20 53 53 4c  he supported SSL
85a0: 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c 73 2e 20  /TLS protocols. 
85b0: 56 61 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65  Valid values are
85c0: 3a 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  :.<b class="cons
85d0: 74 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 20  t">ssl2</b>, <b 
85e0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73  class="const">ss
85f0: 6c 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  l3</b>, <b class
8600: 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 3c 2f 62  ="const">tls1</b
8610: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >, <b class="con
8620: 73 74 22 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20  st">tls1.1</b>, 
8630: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
8640: 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20 61 6e 64  >tls1.2</b>, and
8650: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
8660: 22 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78  ">tls1.3</b>. Ex
8670: 61 63 74 20 6c 69 73 74 20 64 65 70 65 6e 64 73  act list depends
8680: 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 65 72 73   on OpenSSL vers
8690: 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 6c 65 20  ion and compile 
86a0: 74 69 6d 65 20 66 6c 61 67 73 2e 0a 54 68 69 73  time flags..This
86b0: 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20   command is new 
86c0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
86d0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20  /p></dd>.<dt><a 
86e0: 6e 61 6d 65 3d 22 31 34 22 3e 3c 62 20 63 6c 61  name="14"><b cla
86f0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65  ss="cmd">tls::ve
8700: 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64  rsion</b></a></d
8710: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e  t>.<dd><p>Return
8720: 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65  s the OpenSSL ve
8730: 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 70  rsion string.</p
8740: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64  ></dd>.</dl>.</d
8750: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63  iv>.<div id="sec
8760: 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 6f  tion4" class="do
8770: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
8780: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63  <h2><a name="sec
8790: 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61  tion4">Certifica
87a0: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
87b0: 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 69 64 3d 22  ></h2>.<div id="
87c0: 73 75 62 73 65 63 74 69 6f 6e 31 22 20 63 6c 61  subsection1" cla
87d0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62  ss="doctools_sub
87e0: 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20  section"><h3><a 
87f0: 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e  name="subsection
8800: 31 22 3e 50 4b 49 20 61 6e 64 20 43 65 72 74 69  1">PKI and Certi
8810: 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f 68 33 3e  ficates</a></h3>
8820: 0a 3c 70 3e 55 73 69 6e 67 20 74 68 65 20 50 75  .<p>Using the Pu
8830: 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 61 73 74  blic Key Infrast
8840: 72 75 63 74 75 72 65 20 28 50 4b 49 29 2c 20 65  ructure (PKI), e
8850: 61 63 68 20 75 73 65 72 20 63 72 65 61 74 65 73  ach user creates
8860: 20 61 20 70 72 69 76 61 74 65 20 6b 65 79 20 74   a private key t
8870: 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79 20 6b 6e  hat.only they kn
8880: 6f 77 20 61 62 6f 75 74 20 61 6e 64 20 61 20 70  ow about and a p
8890: 75 62 6c 69 63 20 6b 65 79 20 74 68 65 79 20 63  ublic key they c
88a0: 61 6e 20 65 78 63 68 61 6e 67 65 20 77 69 74 68  an exchange with
88b0: 20 6f 74 68 65 72 73 20 66 6f 72 20 75 73 65 20   others for use 
88c0: 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67 20 61 6e  in.encrypting an
88d0: 64 20 64 65 63 72 79 70 74 69 6e 67 20 64 61 74  d decrypting dat
88e0: 61 2e 20 54 68 65 20 70 72 6f 63 65 73 73 20 69  a. The process i
88f0: 73 20 74 68 65 20 73 65 6e 64 65 72 20 65 6e 63  s the sender enc
8900: 72 79 70 74 73 20 74 68 65 69 72 20 64 61 74 61  rypts their data
8910: 0a 75 73 69 6e 67 20 74 68 65 69 72 20 70 72 69  .using their pri
8920: 76 61 74 65 20 6b 65 79 20 61 6e 64 20 74 68 65  vate key and the
8930: 20 72 65 63 65 69 76 65 72 27 73 20 70 75 62 6c   receiver's publ
8940: 69 63 20 6b 65 79 2e 20 54 68 65 20 64 61 74 61  ic key. The data
8950: 20 69 73 20 74 68 65 6e 20 73 65 6e 74 0a 74 6f   is then sent.to
8960: 20 74 68 65 20 72 65 63 65 69 76 65 72 2e 20 49   the receiver. I
8970: 6e 20 61 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e  n a similar mann
8980: 65 72 2c 20 74 68 65 20 72 65 63 65 69 76 65 72  er, the receiver
8990: 20 75 73 65 73 20 74 68 65 69 72 20 70 72 69 76   uses their priv
89a0: 61 74 65 20 6b 65 79 20 61 6e 64 0a 74 68 65 20  ate key and.the 
89b0: 73 65 6e 64 65 72 27 73 20 70 75 62 6c 69 63 20  sender's public 
89c0: 6b 65 79 20 74 6f 20 64 65 63 72 79 70 74 20 74  key to decrypt t
89d0: 68 65 20 64 61 74 61 2e 20 54 68 69 73 20 70 72  he data. This pr
89e0: 6f 76 69 64 65 73 20 64 61 74 61 20 69 6e 74 65  ovides data inte
89f0: 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73 75 72 65  grity, to.ensure
8a00: 20 74 68 65 20 64 61 74 61 20 63 61 6e 27 74 20   the data can't 
8a10: 62 65 20 76 69 65 77 65 64 20 6f 72 20 61 6c 74  be viewed or alt
8a20: 65 72 65 64 20 64 75 72 69 6e 67 20 74 72 61 6e  ered during tran
8a30: 73 70 6f 72 74 2e 20 53 65 65 20 74 68 65 0a 3c  sport. See the.<
8a40: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
8a50: 3e 2d 6b 65 79 3c 2f 62 3e 20 61 6e 64 20 3c 62  >-key</b> and <b
8a60: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8a70: 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 6f 70 74  -keyfile</b> opt
8a80: 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20  ions for how to 
8a90: 73 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76  specify the priv
8aa0: 61 74 65 20 6b 65 79 2e 0a 41 6c 73 6f 20 73 65  ate key..Also se
8ab0: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  e the <b class="
8ac0: 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72  option">-passwor
8ad0: 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 66 6f 72  d</b> option for
8ae0: 20 68 6f 77 20 74 6f 20 70 72 6f 76 69 64 65 20   how to provide 
8af0: 74 68 65 20 70 61 73 73 77 6f 72 64 2e 3c 2f 70  the password.</p
8b00: 3e 0a 3c 70 3e 49 6e 20 6f 72 64 65 72 20 74 6f  >.<p>In order to
8b10: 20 70 72 6f 76 69 64 65 20 61 75 74 68 65 6e 74   provide authent
8b20: 69 63 61 74 69 6f 6e 2c 20 69 2e 65 2e 20 65 6e  ication, i.e. en
8b30: 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e 65 20 69  suring someone i
8b40: 73 20 77 68 6f 20 74 68 65 79 20 73 61 79 20 74  s who they say t
8b50: 68 65 79 0a 61 72 65 2c 20 74 68 65 20 70 75 62  hey.are, the pub
8b60: 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 73 65 72  lic key and user
8b70: 20 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e 20   identification 
8b80: 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 64 20 69  info is stored i
8b90: 6e 20 61 20 58 2e 35 30 39 0a 63 65 72 74 69 66  n a X.509.certif
8ba0: 69 63 61 74 65 20 61 6e 64 20 74 68 61 74 20 63  icate and that c
8bb0: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 61 75  ertificate is au
8bc0: 74 68 65 6e 74 69 63 61 74 65 64 20 28 69 2e 65  thenticated (i.e
8bd0: 2e 20 73 69 67 6e 65 64 29 20 62 79 20 61 20 43  . signed) by a C
8be0: 65 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f  ertificate.Autho
8bf0: 72 69 74 79 20 28 43 41 29 2e 20 55 73 65 72 73  rity (CA). Users
8c00: 20 63 61 6e 20 74 68 65 6e 20 65 78 63 68 61 6e   can then exchan
8c10: 67 65 20 74 68 65 73 65 20 63 65 72 74 69 66 69  ge these certifi
8c20: 63 61 74 65 73 20 64 75 72 69 6e 67 20 74 68 65  cates during the
8c30: 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69 7a 61 74   TLS.initializat
8c40: 69 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e 64 20  ion process and 
8c50: 63 68 65 63 6b 20 74 68 65 6d 20 61 67 61 69 6e  check them again
8c60: 73 74 20 74 68 65 20 72 6f 6f 74 20 43 41 20 63  st the root CA c
8c70: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 65  ertificates to e
8c80: 6e 73 75 72 65 0a 74 68 65 79 20 61 72 65 20 76  nsure.they are v
8c90: 61 6c 69 64 2e 20 54 68 69 73 20 69 73 20 68 61  alid. This is ha
8ca0: 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e 53 53 4c  ndled by OpenSSL
8cb0: 20 76 69 61 20 74 68 65 20 3c 62 20 63 6c 61 73   via the <b clas
8cc0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75  s="option">-requ
8cd0: 65 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c 62 20 63  est</b> and.<b c
8ce0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72  lass="option">-r
8cf0: 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70 74 69 6f  equire</b> optio
8d00: 6e 73 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63  ns. See the <b c
8d10: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
8d20: 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  adir</b>, <b cla
8d30: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64  ss="option">-cad
8d40: 69 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63  ir</b>, and.<b c
8d50: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
8d60: 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f  astore</b> optio
8d70: 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70  ns for how to sp
8d80: 65 63 69 66 79 20 77 68 65 72 65 20 74 6f 20 66  ecify where to f
8d90: 69 6e 64 20 74 68 65 20 43 41 20 63 65 72 74 69  ind the CA certi
8da0: 66 69 63 61 74 65 73 2e 0a 4f 70 74 69 6f 6e 61  ficates..Optiona
8db0: 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74 75 72 65  lly, in a future
8dc0: 20 72 65 6c 65 61 73 65 2c 20 74 68 65 79 20 63   release, they c
8dd0: 61 6e 20 61 6c 73 6f 20 62 65 20 63 68 65 63 6b  an also be check
8de0: 65 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 43  ed against the C
8df0: 65 72 74 69 66 69 63 61 74 65 0a 52 65 76 6f 63  ertificate.Revoc
8e00: 61 74 69 6f 6e 20 4c 69 73 74 20 28 43 52 4c 29  ation List (CRL)
8e10: 20 6f 66 20 72 65 76 6f 6b 65 64 20 63 65 72 74   of revoked cert
8e20: 69 66 69 63 61 74 65 73 2e 20 43 65 72 74 69 66  ificates. Certif
8e30: 69 63 61 74 65 73 20 63 61 6e 20 61 6c 73 6f 20  icates can also 
8e40: 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 64 2c 20  be.self-signed, 
8e50: 62 75 74 20 74 68 65 79 20 61 72 65 20 62 79 20  but they are by 
8e60: 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 72 75 73  default not trus
8e70: 74 65 64 20 75 6e 6c 65 73 73 20 79 6f 75 20 61  ted unless you a
8e80: 64 64 20 74 68 65 6d 20 74 6f 20 79 6f 75 72 0a  dd them to your.
8e90: 63 65 72 74 69 66 69 63 61 74 65 20 73 74 6f 72  certificate stor
8ea0: 65 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70 69 63 61  e.</p>.<p>Typica
8eb0: 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 74 69 6e  lly when visitin
8ec0: 67 20 77 65 62 20 73 69 74 65 73 2c 20 6f 6e 6c  g web sites, onl
8ed0: 79 20 74 68 65 20 63 6c 69 65 6e 74 20 6e 65 65  y the client nee
8ee0: 64 73 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20  ds to check the 
8ef0: 73 65 72 76 65 72 27 73 0a 63 65 72 74 69 66 69  server's.certifi
8f00: 63 61 74 65 20 74 6f 20 65 6e 73 75 72 65 20 69  cate to ensure i
8f10: 74 20 69 73 20 76 61 6c 69 64 2e 20 54 68 65 20  t is valid. The 
8f20: 73 65 72 76 65 72 20 64 6f 65 73 6e 27 74 20 6e  server doesn't n
8f30: 65 65 64 20 74 6f 20 63 68 65 63 6b 20 74 68 65  eed to check the
8f40: 20 63 6c 69 65 6e 74 0a 63 65 72 74 69 66 69 63   client.certific
8f50: 61 74 65 20 75 6e 6c 65 73 73 20 79 6f 75 20 6e  ate unless you n
8f60: 65 65 64 20 74 6f 20 61 75 74 68 65 6e 74 69 63  eed to authentic
8f70: 61 74 65 20 77 69 74 68 20 74 68 65 6d 20 74 6f  ate with them to
8f80: 20 6c 6f 67 69 6e 2c 20 65 74 63 2e 20 53 65 65   login, etc. See
8f90: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f   the.<b class="o
8fa0: 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e  ption">-cert</b>
8fb0: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f   and <b class="o
8fc0: 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65  ption">-certfile
8fd0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 69 66 20  </b> options if 
8fe0: 79 6f 75 20 6e 65 65 64 20 74 6f 20 70 72 6f 76  you need to prov
8ff0: 69 64 65 20 61 20 63 65 72 74 69 66 69 63 61 74  ide a certificat
9000: 65 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  e.</p>.</div>.<d
9010: 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f  iv id="subsectio
9020: 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n2" class="docto
9030: 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e  ols_subsection">
9040: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62  <h3><a name="sub
9050: 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d 61 72  section2">Summar
9060: 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e  y of command lin
9070: 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68  e options</a></h
9080: 33 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77  3>.<p>The follow
9090: 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72 65 20  ing options are 
90a0: 75 73 65 64 20 66 6f 72 20 70 65 65 72 20 63 65  used for peer ce
90b0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61  rtificate valida
90c0: 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  tion:</p>.<dl cl
90d0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70  ass="doctools_op
90e0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
90f0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
9100: 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  adir</b> <i clas
9110: 73 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72  s="arg">director
9120: 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  y</i></dt>.<dd><
9130: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
9140: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20  directory where 
9150: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
9160: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63  Authority (CA) c
9170: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a  ertificates are.
9180: 73 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 61  stored. The defa
9190: 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20  ult is platform 
91a0: 73 70 65 63 69 66 69 63 2c 20 62 75 74 20 69 73  specific, but is
91b0: 20 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c   usually &quot;<
91c0: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f  b class="file">/
91d0: 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 3c 2f 62  etc/ssl/certs</b
91e0: 3e 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 6e 75 78  >&quot; on.Linux
91f0: 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2e 20 54  /Unix systems. T
9200: 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74  he default locat
9210: 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72  ion can be overr
9220: 69 64 64 65 6e 20 62 79 20 74 68 65 0a 3c 62 20  idden by the.<b 
9230: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
9240: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62  >SSL_CERT_DIR</b
9250: 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61  > environment va
9260: 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e  riable.</p></dd>
9270: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
9280: 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f  ption">-cafile</
9290: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
92a0: 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f  ">filename</i></
92b0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
92c0: 66 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 69  fies the file wi
92d0: 74 68 20 74 68 65 20 43 65 72 74 69 66 69 63 61  th the Certifica
92e0: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41  te Authority (CA
92f0: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74  ) certificates t
9300: 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73  o use in.<b clas
9310: 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62  s="const">PEM</b
9320: 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54  > file format. T
9330: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 26 71  he default is &q
9340: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
9350: 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e  le">cert.pem</b>
9360: 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f  &quot;, in the O
9370: 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 79  penSSL.directory
9380: 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e 69 78 20  . On Linux/Unix 
9390: 73 79 73 74 65 6d 73 2c 20 74 68 69 73 20 69 73  systems, this is
93a0: 20 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c   usually &quot;<
93b0: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f  b class="file">/
93c0: 65 74 63 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 6c  etc/ssl/ca-bundl
93d0: 65 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2e  e.pem</b>&quot;.
93e0: 0a 54 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c  .The default fil
93f0: 65 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64  e can be overrid
9400: 64 65 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c  den by the <b cl
9410: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53  ass="variable">S
9420: 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e  SL_CERT_FILE</b>
9430: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72   environment.var
9440: 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  iable.</p></dd>.
9450: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
9460: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f  tion">-castore</
9470: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
9480: 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ">URI</i></dt>.<
9490: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
94a0: 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f  the Uniform Reso
94b0: 75 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20  urce Identifier 
94c0: 28 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65  (URI) for the Ce
94d0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
94e0: 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20  ity.(CA) store, 
94f0: 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73  which may be a s
9500: 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20  ingle container 
9510: 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20  or a catalog of 
9520: 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72  containers..Star
9530: 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53  ting with OpenSS
9540: 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64  L 3.2 on MS Wind
9550: 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 71 75 6f  ows, set to &quo
9560: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  t;<b class="cons
9570: 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77  t">org.openssl.w
9580: 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71  instore://</b>&q
9590: 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68 65 20  uot;.to use the 
95a0: 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64  built-in MS Wind
95b0: 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20  ows Certificate 
95c0: 53 74 6f 72 65 2e 20 53 74 61 72 74 69 6e 67 20  Store. Starting 
95d0: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74  in TclTLS 2.0, t
95e0: 68 69 73 0a 69 73 20 74 68 65 20 64 65 66 61 75  his.is the defau
95f0: 6c 74 20 69 66 20 3c 62 20 63 6c 61 73 73 3d 22  lt if <b class="
9600: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
9610: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
9620: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
9630: 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  , and <b class="
9640: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
9650: 3c 2f 62 3e 20 61 72 65 0a 6e 6f 74 20 73 70 65  </b> are.not spe
9660: 63 69 66 69 65 64 2e 20 54 68 69 73 20 73 74 6f  cified. This sto
9670: 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73  re only supports
9680: 20 72 6f 6f 74 20 63 65 72 74 69 66 69 63 61 74   root certificat
9690: 65 20 73 74 6f 72 65 73 2e 3c 2f 70 3e 3c 2f 64  e stores.</p></d
96a0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
96b0: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73  "option">-reques
96c0: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
96d0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
96e0: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73  t>.<dd><p>Reques
96f0: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
9700: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75  from the peer du
9710: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e  ring the SSL han
9720: 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20  dshake. This is 
9730: 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72  needed.to do Cer
9740: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
9750: 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  ion. Starting in
9760: 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65   TclTLS 1.8, the
9770: 20 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63   default is.<b c
9780: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
9790: 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74  e</b> for client
97a0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 53 74   connections. St
97b0: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
97c0: 20 32 2e 30 2c 20 69 66 20 73 65 74 20 74 6f 0a   2.0, if set to.
97d0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
97e0: 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 20 3c  >false</b> and <
97f0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9800: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73  >-require</b> is
9810: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
9820: 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e  ">true</b>, then
9830: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76   this will be.ov
9840: 65 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63  erridden to <b c
9850: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
9860: 65 3c 2f 62 3e 2e 20 49 6e 20 61 64 64 69 74 69  e</b>. In additi
9870: 6f 6e 2c 20 74 68 65 20 63 6c 69 65 6e 74 20 63  on, the client c
9880: 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 6e 73 70  an manually insp
9890: 65 63 74 20 61 6e 64 0a 61 63 63 65 70 74 20 6f  ect and.accept o
98a0: 72 20 72 65 6a 65 63 74 20 65 61 63 68 20 63 65  r reject each ce
98b0: 72 74 69 66 69 63 61 74 65 20 75 73 69 6e 67 20  rtificate using 
98c0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
98d0: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63  tion">-validatec
98e0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f  ommand</b> optio
98f0: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  n.</p></dd>.<dt>
9900: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9910: 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 3c  ">-require</b> <
9920: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
9930: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
9940: 3c 70 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c  <p>Require a val
9950: 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66  id certificate f
9960: 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72  rom the peer dur
9970: 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64  ing the SSL hand
9980: 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20 69  shake. If this i
9990: 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74  s.set to true, t
99a0: 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  hen <b class="op
99b0: 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f  tion">-request</
99c0: 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20  b> must also be 
99d0: 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20  set to true and 
99e0: 61 20 65 69 74 68 65 72 0a 3c 62 20 63 6c 61 73  a either.<b clas
99f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69  s="option">-cadi
9a00: 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  r</b>, <b class=
9a10: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
9a20: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
9a30: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
9a40: 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61 74 66  </b>, or a platf
9a50: 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74  orm default.must
9a60: 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20   be provided in 
9a70: 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74  order to validat
9a80: 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65 20 64  e against. The d
9a90: 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53  efault in TclTLS
9aa0: 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72   1.8 and.earlier
9ab0: 20 76 65 72 73 69 6f 6e 73 20 69 73 20 3c 62 20   versions is <b 
9ac0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61  class="const">fa
9ad0: 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f  lse</b> since no
9ae0: 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20  t all platforms 
9af0: 68 61 76 65 20 63 65 72 74 69 66 69 63 61 74 65  have certificate
9b00: 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67  s to.validate ag
9b10: 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20  ainst in a form 
9b20: 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20  compatible with 
9b30: 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72 74 69 6e  OpenSSL. Startin
9b40: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
9b50: 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20  .the default is 
9b60: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
9b70: 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c  >true</b> for cl
9b80: 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73  ient connections
9b90: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  .</p></dd>.</dl>
9ba0: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d  .</div>.<div id=
9bb0: 22 73 75 62 73 65 63 74 69 6f 6e 33 22 20 63 6c  "subsection3" cl
9bc0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75  ass="doctools_su
9bd0: 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61  bsection"><h3><a
9be0: 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f   name="subsectio
9bf0: 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 63 6f 6d  n3">When are com
9c00: 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e  mand line option
9c10: 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f 68  s needed?</a></h
9c20: 33 3e 0a 3c 70 3e 49 6e 20 54 63 6c 54 4c 53 20  3>.<p>In TclTLS 
9c30: 31 2e 38 20 61 6e 64 20 65 61 72 6c 69 65 72 20  1.8 and earlier 
9c40: 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 74 69 66  versions, certif
9c50: 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e  icate validation
9c60: 20 69 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f 65 6d 3e   is.<em>NOT</em>
9c70: 20 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61   enabled by defa
9c80: 75 6c 74 2e 20 54 68 69 73 20 6c 69 6d 69 74 61  ult. This limita
9c90: 74 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 74  tion is due to t
9ca0: 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f 6d  he lack of a com
9cb0: 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74 66 6f  mon.cross platfo
9cc0: 72 6d 20 64 61 74 61 62 61 73 65 20 6f 66 20 43  rm database of C
9cd0: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f  ertificate Autho
9ce0: 72 69 74 79 20 28 43 41 29 20 70 72 6f 76 69 64  rity (CA) provid
9cf0: 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73 20  ed certificates 
9d00: 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69  to.validate agai
9d10: 6e 73 74 2e 20 4d 61 6e 79 20 4c 69 6e 75 78 20  nst. Many Linux 
9d20: 73 79 73 74 65 6d 73 20 6e 61 74 69 76 65 6c 79  systems natively
9d30: 20 73 75 70 70 6f 72 74 20 4f 70 65 6e 53 53 4c   support OpenSSL
9d40: 20 61 6e 64 20 74 68 75 73 20 68 61 76 65 0a 74   and thus have.t
9d50: 68 65 73 65 20 63 65 72 74 69 66 69 63 61 74 65  hese certificate
9d60: 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 73 20 70  s installed as p
9d70: 61 72 74 20 6f 66 20 74 68 65 20 4f 53 2c 20 62  art of the OS, b
9d80: 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 4d 53 20  ut MacOS and MS 
9d90: 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f 74 2e 0a  Windows do not..
9da0: 53 74 61 72 69 6e 67 20 69 6e 20 54 63 6c 54 4c  Staring in TclTL
9db0: 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75  S 2.0, the defau
9dc0: 6c 74 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f  lt for client co
9dd0: 6e 6e 65 63 74 69 6f 6e 73 20 68 61 73 20 62 65  nnections has be
9de0: 65 6e 20 63 68 61 6e 67 65 64 20 74 6f 0a 72 65  en changed to.re
9df0: 71 75 69 72 65 20 63 65 72 74 69 66 69 63 61 74  quire certificat
9e00: 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 62 79 20  e validation by 
9e10: 64 65 66 61 75 6c 74 2e 20 49 6e 20 6f 72 64 65  default. In orde
9e20: 72 20 74 6f 20 75 73 65 20 74 68 65 20 3c 62 20  r to use the <b 
9e30: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
9e40: 72 65 71 75 69 72 65 3c 2f 62 3e 0a 6f 70 74 69  require</b>.opti
9e50: 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 65 20 66  on, one of the f
9e60: 6f 6c 6c 6f 77 69 6e 67 20 6d 75 73 74 20 62 65  ollowing must be
9e70: 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75 6c 20 63   true:</p>.<ul c
9e80: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 69  lass="doctools_i
9e90: 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69 3e 3c 70  temized">.<li><p
9ea0: 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 20 55 6e  >On Linux and Un
9eb0: 69 78 20 73 79 73 74 65 6d 73 20 77 69 74 68 20  ix systems with 
9ec0: 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61 64 79 20  OpenSSL already 
9ed0: 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 69 66 20  installed or if 
9ee0: 74 68 65 20 43 41 0a 63 65 72 74 69 66 69 63 61  the CA.certifica
9ef0: 74 65 73 20 61 72 65 20 61 76 61 69 6c 61 62 6c  tes are availabl
9f00: 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 2c  e in PEM format,
9f10: 20 61 6e 64 20 69 66 20 74 68 65 79 20 61 72 65   and if they are
9f20: 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 0a 73   stored in the.s
9f30: 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e  tandard location
9f40: 73 2c 20 6f 72 20 69 66 20 74 68 65 20 3c 62 20  s, or if the <b 
9f50: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
9f60: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62  >SSL_CERT_DIR</b
9f70: 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76  > or <b class="v
9f80: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52  ariable">SSL_CER
9f90: 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e 76 69 72  T_FILE</b>.envir
9fa0: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73  onment variables
9fb0: 20 61 72 65 20 73 65 74 2c 20 74 68 65 6e 20 3c   are set, then <
9fc0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9fd0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20  >-cadir</b>, <b 
9fe0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
9ff0: 63 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e 64 20 3c  cadir</b>,.and <
a000: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
a010: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61 72  >-castore</b> ar
a020: 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c 2f 70 3e  en't needed.</p>
a030: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20  </li>.<li><p>If 
a040: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69  OpenSSL is not i
a050: 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 20  nstalled in the 
a060: 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e  default location
a070: 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 20  , or when using 
a080: 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 6e  Mac OS.or MS Win
a090: 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 4c  dows and OpenSSL
a0a0: 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74   is installed, t
a0b0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  he <b class="var
a0c0: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
a0d0: 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 0a 3c  DIR</b> and/or.<
a0e0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
a0f0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45  e">SSL_CERT_FILE
a100: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
a110: 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68   variables or th
a120: 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 3c 62 20  e one of the <b 
a130: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
a140: 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 20 63 6c  cadir</b>,.<b cl
a150: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
a160: 64 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c 62 20 63  dir</b>, or <b c
a170: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
a180: 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f  astore</b> optio
a190: 6e 73 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e  ns must be defin
a1a0: 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ed.</p></li>.<li
a1b0: 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e 64 6f 77  ><p>On MS Window
a1c0: 73 2c 20 73 74 61 72 74 69 6e 67 20 69 6e 20 4f  s, starting in O
a1d0: 70 65 6e 53 53 4c 20 33 2e 32 2c 20 69 74 20 69  penSSL 3.2, it i
a1e0: 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c 65 20 74  s now possible t
a1f0: 6f 20 61 63 63 65 73 73 20 74 68 65 0a 62 75 69  o access the.bui
a200: 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73 20 43 65  lt-in Windows Ce
a210: 72 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 20  rtificate Store 
a220: 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e 20 54 68  from OpenSSL. Th
a230: 69 73 20 63 61 6e 20 62 65 20 75 74 69 6c 69 7a  is can be utiliz
a240: 65 64 20 62 79 0a 73 65 74 74 69 6e 67 20 74 68  ed by.setting th
a250: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e <b class="opti
a260: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e  on">-castore</b>
a270: 20 6f 70 74 69 6f 6e 20 74 6f 20 26 71 75 6f 74   option to &quot
a280: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
a290: 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69  ">org.openssl.wi
a2a0: 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75  nstore://</b>&qu
a2b0: 6f 74 3b 2e 0a 49 6e 20 54 63 6c 54 4c 53 20 32  ot;..In TclTLS 2
a2c0: 2e 30 2c 20 74 68 69 73 20 69 73 20 74 68 65 20  .0, this is the 
a2d0: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 66  default value if
a2e0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
a2f0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c  n">-cadir</b>,.<
a300: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
a310: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64  >-cadir</b>, and
a320: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
a330: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20  n">-castore</b> 
a340: 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65  are not specifie
a350: 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e  d.</p></li>.<li>
a360: 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c 20 69 73  <p>If OpenSSL is
a370: 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20 6f   not installed o
a380: 72 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69  r the CA certifi
a390: 63 61 74 65 73 20 61 72 65 20 6e 6f 74 20 61 76  cates are not av
a3a0: 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d 0a 66  ailable in PEM.f
a3b0: 6f 72 6d 61 74 2c 20 74 68 65 20 43 41 20 63 65  ormat, the CA ce
a3c0: 72 74 69 66 69 63 61 74 65 73 20 6d 75 73 74 20  rtificates must 
a3d0: 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 61 6e  be downloaded an
a3e0: 64 20 69 6e 73 74 61 6c 6c 65 64 20 77 69 74 68  d installed with
a3f0: 20 74 68 65 20 75 73 65 72 0a 73 6f 66 74 77 61   the user.softwa
a400: 72 65 2e 20 54 68 65 20 43 55 52 4c 20 74 65 61  re. The CURL tea
a410: 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20 61 76 61  m makes them ava
a420: 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20 68 72 65  ilable at.<a hre
a430: 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75 72 6c 2e  f="https://curl.
a440: 73 65 2f 64 6f 63 73 2f 63 61 65 78 74 72 61 63  se/docs/caextrac
a450: 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65 72 74 69  t.html">CA certi
a460: 66 69 63 61 74 65 73 20 65 78 74 72 61 63 74 65  ficates extracte
a470: 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f  d.from Mozilla</
a480: 61 3e 20 69 6e 20 74 68 65 20 26 71 75 6f 74 3b  a> in the &quot;
a490: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e  <b class="file">
a4a0: 63 61 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71  cacert.pem</b>&q
a4b0: 75 6f 74 3b 20 66 69 6c 65 2e 20 59 6f 75 20 6d  uot; file. You m
a4c0: 75 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 20  ust then either 
a4d0: 73 65 74 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  set the.<b class
a4e0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f  ="variable">SSL_
a4f0: 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64  CERT_DIR</b> and
a500: 2f 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  /or <b class="va
a510: 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54  riable">SSL_CERT
a520: 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f  _FILE</b> enviro
a530: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20  nment variables 
a540: 6f 72 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  or the.<b class=
a550: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
a560: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  /b> or <b class=
a570: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
a580: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 74 6f 20  </b> options to 
a590: 74 68 65 20 43 41 20 63 65 72 74 20 66 69 6c 65  the CA cert file
a5a0: 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74  's install.locat
a5b0: 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f 75 72 20  ion. It is your 
a5c0: 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74  responsibility t
a5d0: 6f 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65  o keep this file
a5e0: 20 75 70 20 74 6f 20 64 61 74 65 2e 3c 2f 70 3e   up to date.</p>
a5f0: 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69  </li>.</ul>.</di
a600: 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  v>.</div>.<div i
a610: 64 3d 22 73 65 63 74 69 6f 6e 35 22 20 63 6c 61  d="section5" cla
a620: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
a630: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
a640: 65 3d 22 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c  e="section5">Cal
a650: 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61  lback Options</a
a660: 3e 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20 70 72 65  ></h2>.<p>As pre
a670: 76 69 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65  viously describe
a680: 64 2c 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20  d, each channel 
a690: 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65  can be given the
a6a0: 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73  ir own callbacks
a6b0: 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72  .to handle inter
a6c0: 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69  mediate processi
a6d0: 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ng by the OpenSS
a6e0: 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67  L library, using
a6f0: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f   the.<b class="o
a700: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
a710: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
a720: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64  ption">-password
a730: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
a740: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
a750: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62  idate_command</b
a760: 3e 20 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64  > options.passed
a770: 20 74 6f 20 65 69 74 68 65 72 20 6f 66 20 3c 62   to either of <b
a780: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
a790: 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 6f 72 20  ::socket</b> or 
a7a0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
a7b0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 0a  ls::import</b>..
a7c0: 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f 75 73 20  Unlike previous 
a7d0: 76 65 72 73 69 6f 6e 73 20 6f 66 20 54 63 6c 54  versions of TclT
a7e0: 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74 68 65 20  LS, only if the 
a7f0: 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74  callback generat
a800: 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c  es an error,.wil
a810: 6c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  l the <b class="
a820: 73 79 73 63 6d 64 22 3e 62 67 65 72 72 6f 72 3c  syscmd">bgerror<
a830: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 62 65 20 69  /b> command be i
a840: 6e 76 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20  nvoked with the 
a850: 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f  error informatio
a860: 6e 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69 64 3d 22  n.</p>.<div id="
a870: 73 75 62 73 65 63 74 69 6f 6e 34 22 20 63 6c 61  subsection4" cla
a880: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62  ss="doctools_sub
a890: 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20  section"><h3><a 
a8a0: 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e  name="subsection
a8b0: 34 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 43 6f  4">Values for Co
a8c0: 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  mmand Callback</
a8d0: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63  a></h3>.<p>The c
a8e0: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20  allback for the 
a8f0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
a900: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f  ">-command</b> o
a910: 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64  ption is invoked
a920: 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e   at several poin
a930: 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f 70  ts during the.Op
a940: 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20  enSSL handshake 
a950: 61 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69  and during routi
a960: 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 53  ne operations. S
a970: 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65  ee below for the
a980: 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 75 6d 65   possible.argume
a990: 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68  nts passed to th
a9a0: 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70  e callback scrip
a9b0: 74 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e  t. Values return
a9c0: 65 64 20 66 72 6f 6d 20 74 68 65 20 63 61 6c 6c  ed from the call
a9d0: 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f 72 65 64  back are.ignored
a9e0: 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  .</p>.<dl class=
a9f0: 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e  "doctools_option
aa00: 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  s">.<dt><b class
aa10: 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72 6f 72 3c  ="option">error<
aa20: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
aa30: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 65 73  g">channelId mes
aa40: 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  sage</i></dt>.<d
aa50: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f  d><p>This form o
aa60: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
aa70: 76 6f 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61  voked whenever a
aa80: 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64  n error occurs d
aa90: 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61  uring the initia
aaa0: 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61  l.connection, ha
aab0: 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20  ndshake, or I/O 
aac0: 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20  operations. The 
aad0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
aae0: 65 73 73 61 67 65 3c 2f 69 3e 20 61 72 67 75 6d  essage</i> argum
aaf0: 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20  ent can be.from 
ab00: 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67  the Tcl_ErrnoMsg
ab10: 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  , OpenSSL functi
ab20: 6f 6e 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  on <b class="fun
ab30: 63 74 69 6f 6e 22 3e 45 52 52 5f 72 65 61 73 6f  ction">ERR_reaso
ab40: 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29  n_error_string()
ab50: 3c 2f 62 3e 2c 0a 6f 72 20 61 20 63 75 73 74 6f  </b>,.or a custo
ab60: 6d 20 6d 65 73 73 61 67 65 2e 20 54 68 69 73 20  m message. This 
ab70: 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20  callback is new 
ab80: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
ab90: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
aba0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 69  class="option">i
abb0: 6e 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  nfo</b> <i class
abc0: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
abd0: 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73   major minor mes
abe0: 73 61 67 65 20 74 79 70 65 3c 2f 69 3e 3c 2f 64  sage type</i></d
abf0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66  t>.<dd><p>This f
ac00: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
ac10: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
ac20: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
ac30: 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  on.<b class="fun
ac40: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 69  ction">SSL_set_i
ac50: 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f  nfo_callback()</
ac60: 62 3e 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e  b> during the in
ac70: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e  itial connection
ac80: 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f   and handshake.o
ac90: 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 61  perations. The a
aca0: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70  rguments are:</p
acb0: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
acc0: 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e  tools_definition
acd0: 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  s">.<dt><i class
ace0: 3d 22 61 72 67 22 3e 6d 61 6a 6f 72 3c 2f 69 3e  ="arg">major</i>
acf0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 6a  </dt>.<dd><p>Maj
ad00: 6f 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20  or category for 
ad10: 65 72 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75  error. Valid enu
ad20: 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73  ms are: <b class
ad30: 3d 22 63 6f 6e 73 74 22 3e 68 61 6e 64 73 68 61  ="const">handsha
ad40: 6b 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ke</b>, <b class
ad50: 3d 22 63 6f 6e 73 74 22 3e 61 6c 65 72 74 3c 2f  ="const">alert</
ad60: 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>,.<b class="co
ad70: 6e 73 74 22 3e 63 6f 6e 6e 65 63 74 3c 2f 62 3e  nst">connect</b>
ad80: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
ad90: 74 22 3e 61 63 63 65 70 74 3c 2f 62 3e 2e 3c 2f  t">accept</b>.</
ada0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
adb0: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 69 6e 6f 72  lass="arg">minor
adc0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
add0: 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20  >Minor category 
ade0: 66 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64  for error. Valid
adf0: 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63   enums are: <b c
ae00: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 74 61  lass="const">sta
ae10: 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  rt</b>, <b class
ae20: 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 3c 2f 62  ="const">done</b
ae30: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >, <b class="con
ae40: 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c 0a 3c 62  st">read</b>,.<b
ae50: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77   class="const">w
ae60: 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  rite</b>, <b cla
ae70: 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f 6f 70 3c  ss="const">loop<
ae80: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
ae90: 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62 3e 2e 3c  onst">exit</b>.<
aea0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
aeb0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73  class="arg">mess
aec0: 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  age</i></dt>.<dd
aed0: 3e 3c 70 3e 44 65 73 63 72 69 70 74 69 76 65 20  ><p>Descriptive 
aee0: 6d 65 73 73 61 67 65 20 73 74 72 69 6e 67 20 77  message string w
aef0: 68 69 63 68 20 6d 61 79 20 62 65 20 67 65 6e 65  hich may be gene
af00: 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 0a  rated either by.
af10: 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69  <b class="functi
af20: 6f 6e 22 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74  on">SSL_state_st
af30: 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 20  ring_long()</b> 
af40: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  or <b class="fun
af50: 63 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c 65 72 74  ction">SSL_alert
af60: 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e  _desc_string_lon
af70: 67 28 29 3c 2f 62 3e 2c 0a 64 65 70 65 6e 64 69  g()</b>,.dependi
af80: 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78  ng on the contex
af90: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  t.</p></dd>.<dt>
afa0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 74  <i class="arg">t
afb0: 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ype</i></dt>.<dd
afc0: 3e 3c 70 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20  ><p>For alerts, 
afd0: 74 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c  the possible val
afe0: 75 65 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73  ues are: <b clas
aff0: 73 3d 22 63 6f 6e 73 74 22 3e 77 61 72 6e 69 6e  s="const">warnin
b000: 67 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d  g</b>,.<b class=
b010: 22 63 6f 6e 73 74 22 3e 66 61 74 61 6c 3c 2f 62  "const">fatal</b
b020: 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d  >, and <b class=
b030: 22 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f 77 6e 3c  "const">unknown<
b040: 2f 62 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c  /b>. For others,
b050: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
b060: 22 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73 20 75 73  ">info</b> is us
b070: 65 64 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e  ed..This argumen
b080: 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  t is new for Tcl
b090: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
b0a0: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
b0b0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
b0c0: 6e 22 3e 6d 65 73 73 61 67 65 3c 2f 62 3e 20 3c  n">message</b> <
b0d0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
b0e0: 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 69 6f  annelId directio
b0f0: 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e  n version conten
b100: 74 5f 74 79 70 65 20 6d 65 73 73 61 67 65 3c 2f  t_type message</
b110: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
b120: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c  his form of call
b130: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20  back is invoked 
b140: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66  by the OpenSSL f
b150: 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73  unction.<b class
b160: 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f  ="function">SSL_
b170: 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b  set_msg_callback
b180: 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20  ()</b> whenever 
b190: 61 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e  a message is sen
b1a0: 74 20 6f 72 20 72 65 63 65 69 76 65 64 20 64 75  t or received du
b1b0: 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 69 61 6c  ring the.initial
b1c0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e   connection, han
b1d0: 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f  dshake, or I/O o
b1e0: 70 65 72 61 74 69 6f 6e 73 2e 20 49 74 20 69 73  perations. It is
b1f0: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20   only available 
b200: 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 69 73 20  when.OpenSSL is 
b210: 63 6f 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68  complied with th
b220: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  e <b class="cons
b230: 74 22 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72  t">enable-ssl-tr
b240: 61 63 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20  ace</b> option. 
b250: 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73  This callback is
b260: 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20  .new for TclTLS 
b270: 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  1.8. The argumen
b280: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20  ts are:</p>.<dl 
b290: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
b2a0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
b2b0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
b2c0: 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69 3e 3c 2f  >direction</i></
b2d0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 72 65 63  dt>.<dd><p>Direc
b2e0: 74 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 3c  tion is either <
b2f0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
b300: 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63  Sent</b> or <b c
b310: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 52 65 63  lass="const">Rec
b320: 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f  eived</b>.</p></
b330: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  dd>.<dt><i class
b340: 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f  ="arg">version</
b350: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 56  i></dt>.<dd><p>V
b360: 65 72 73 69 6f 6e 20 69 73 20 74 68 65 20 70 72  ersion is the pr
b370: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2e 3c  otocol version.<
b380: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
b390: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6e 74  class="arg">cont
b3a0: 65 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c 2f 64 74  ent_type</i></dt
b3b0: 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74 65 6e 74  >.<dd><p>Content
b3c0: 20 74 79 70 65 20 69 73 20 74 68 65 20 6d 65 73   type is the mes
b3d0: 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70  sage content typ
b3e0: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  e.</p></dd>.<dt>
b3f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
b400: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  essage</i></dt>.
b410: 3c 64 64 3e 3c 70 3e 4d 65 73 73 61 67 65 20 69  <dd><p>Message i
b420: 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 6f 6d  s more info from
b430: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
b440: 6f 6e 73 74 22 3e 53 53 4c 5f 74 72 61 63 65 3c  onst">SSL_trace<
b450: 2f 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c 2f 64 64  /b> API.</p></dd
b460: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
b470: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
b480: 6e 22 3e 73 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c  n">session</b> <
b490: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
b4a0: 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f  annelId session_
b4b0: 69 64 20 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65  id session_ticke
b4c0: 74 20 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f  t lifetime</i></
b4d0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  dt>.<dd><p>This 
b4e0: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
b4f0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74   is invoked by t
b500: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
b510: 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75  ion.<b class="fu
b520: 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 43 54 58 5f  nction">SSL_CTX_
b530: 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28  sess_set_new_cb(
b540: 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61  )</b> whenever a
b550: 20 6e 65 77 20 73 65 73 73 69 6f 6e 20 69 64 20   new session id 
b560: 69 73 20 73 65 6e 74 20 62 79 20 74 68 65 0a 73  is sent by the.s
b570: 65 72 76 65 72 20 64 75 72 69 6e 67 20 74 68 65  erver during the
b580: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74   initial connect
b590: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b  ion and handshak
b5a0: 65 20 61 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e  e and also durin
b5b0: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 0a 69 66  g the session.if
b5c0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
b5d0: 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e  ption">-post_han
b5e0: 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f  dshake</b> optio
b5f0: 6e 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65  n is set to true
b600: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  . This callback 
b610: 69 73 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c  is new for.TclTL
b620: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d  S 1.8. The argum
b630: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64  ents are:</p>.<d
b640: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
b650: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
b660: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
b670: 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 69  g">session_id</i
b680: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65  ></dt>.<dd><p>Se
b690: 73 73 69 6f 6e 20 49 64 20 69 73 20 74 68 65 20  ssion Id is the 
b6a0: 63 75 72 72 65 6e 74 20 73 65 73 73 69 6f 6e 20  current session 
b6b0: 69 64 65 6e 74 69 66 69 65 72 3c 2f 70 3e 3c 2f  identifier</p></
b6c0: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  dd>.<dt><i class
b6d0: 3d 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 74  ="arg">session_t
b6e0: 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  icket</i></dt>.<
b6f0: 64 64 3e 3c 70 3e 54 69 63 6b 65 74 20 69 73 20  dd><p>Ticket is 
b700: 74 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b  the session tick
b710: 65 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f 64 64 3e  et info</p></dd>
b720: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61  .<dt><i class="a
b730: 72 67 22 3e 6c 69 66 65 74 69 6d 65 3c 2f 69 3e  rg">lifetime</i>
b740: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 66  </dt>.<dd><p>Lif
b750: 65 74 69 6d 65 20 69 73 20 74 68 65 20 74 69 63  etime is the tic
b760: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20  ket lifetime in 
b770: 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64  seconds.</p></dd
b780: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
b790: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
b7a0: 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69  n">verify</b> <i
b7b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b7c0: 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72  nnelId depth cer
b7d0: 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f  t status error</
b7e0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
b7f0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73  his callback was
b800: 20 6d 6f 76 65 64 20 74 6f 20 3c 62 20 63 6c 61   moved to <b cla
b810: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
b820: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  idatecommand</b>
b830: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c   in TclTLS 1.8.<
b840: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c  /p></dd>.</dl>.<
b850: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
b860: 75 62 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 73  ubsection5" clas
b870: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
b880: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
b890: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 35  ame="subsection5
b8a0: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 50 61 73  ">Values for Pas
b8b0: 73 77 6f 72 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  sword Callback</
b8c0: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63  a></h3>.<p>The c
b8d0: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20  allback for the 
b8e0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b8f0: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20  ">-password</b> 
b900: 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65  option is invoke
b910: 64 20 62 79 20 54 63 6c 54 4c 53 20 77 68 65 6e  d by TclTLS when
b920: 65 76 65 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65  ever OpenSSL nee
b930: 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20 61 20 70  ds.to obtain a p
b940: 61 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c  assword. See bel
b950: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69  ow for the possi
b960: 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61  ble arguments pa
b970: 73 73 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c  ssed to the.call
b980: 62 61 63 6b 20 73 63 72 69 70 74 2e 20 54 68 65  back script. The
b990: 20 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70   user provided p
b9a0: 61 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63  assword is expec
b9b0: 74 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e  ted to be return
b9c0: 65 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61  ed by the.callba
b9d0: 63 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  ck.</p>.<dl clas
b9e0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69  s="doctools_opti
b9f0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
ba00: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70 61 73 73  ss="option">pass
ba10: 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  word</b> <i clas
ba20: 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 67 20 73  s="arg">rwflag s
ba30: 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ize</i></dt>.<dd
ba40: 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20 77 68 65 6e  ><p>Invoked when
ba50: 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72   loading or stor
ba60: 69 6e 67 20 61 6e 20 65 6e 63 72 79 70 74 65 64  ing an encrypted
ba70: 20 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65   PEM certificate
ba80: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20  . The arguments 
ba90: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  are:</p>.<dl cla
baa0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
bab0: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  initions">.<dt><
bac0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 77  i class="arg">rw
bad0: 66 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  flag</i></dt>.<d
bae0: 64 3e 3c 70 3e 54 68 65 20 72 65 61 64 2f 77 72  d><p>The read/wr
baf0: 69 74 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f  ite flag is 0 fo
bb00: 72 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70  r reading/decryp
bb10: 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72  tion or 1 for wr
bb20: 69 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e  iting/encryption
bb30: 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e  ..The latter can
bb40: 20 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 65   be used to dete
bb50: 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72  rmine when to pr
bb60: 6f 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 6f  ompt the user to
bb70: 20 63 6f 6e 66 69 72 6d 2e 0a 54 68 69 73 20 61   confirm..This a
bb80: 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66  rgument is new f
bb90: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
bba0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
bbb0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 69 7a 65 3c  lass="arg">size<
bbc0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
bbd0: 54 68 65 20 73 69 7a 65 20 69 73 20 74 68 65 20  The size is the 
bbe0: 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 68 20 6f  maximum length o
bbf0: 66 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 69  f the password i
bc00: 6e 20 62 79 74 65 73 2e 0a 54 68 69 73 20 61 72  n bytes..This ar
bc10: 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f  gument is new fo
bc20: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
bc30: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64  ></dd>.</dl></dd
bc40: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c  >.</dl>.</div>.<
bc50: 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69  div id="subsecti
bc60: 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on6" class="doct
bc70: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
bc80: 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75  ><h3><a name="su
bc90: 62 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65  bsection6">Value
bca0: 73 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43  s for Validate C
bcb0: 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c  ommand Callback<
bcc0: 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20  /a></h3>.<p>The 
bcd0: 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65  callback for the
bce0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
bcf0: 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d  n">-validatecomm
bd00: 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69  and</b> option i
bd10: 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67  s invoked during
bd20: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70   the handshake.p
bd30: 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20  rocess in order 
bd40: 66 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 74  for the applicat
bd50: 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20  ion to validate 
bd60: 74 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c  the provided val
bd70: 75 65 28 73 29 2e 20 53 65 65 0a 62 65 6c 6f 77  ue(s). See.below
bd80: 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c   for the possibl
bd90: 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73  e arguments pass
bda0: 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61  ed to the callba
bdb0: 63 6b 20 73 63 72 69 70 74 2e 20 49 66 20 6e 6f  ck script. If no
bdc0: 74 0a 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65  t.specified, Ope
bdd0: 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 70 74  nSSL will accept
bde0: 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 74 69   all valid certi
bdf0: 66 69 63 61 74 65 73 20 61 6e 64 20 65 78 74 65  ficates and exte
be00: 6e 73 69 6f 6e 73 2e 20 54 6f 20 72 65 6a 65 63  nsions. To rejec
be10: 74 0a 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20  t.the value and 
be20: 61 62 6f 72 74 20 74 68 65 20 63 6f 6e 6e 65 63  abort the connec
be30: 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61  tion, the callba
be40: 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e  ck should return
be50: 20 30 2e 20 54 6f 20 61 63 63 65 70 74 20 74 68   0. To accept th
be60: 65 0a 76 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74  e.value and cont
be70: 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74  inue the connect
be80: 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72  ion, it should r
be90: 65 74 75 72 6e 20 31 2e 20 54 6f 20 72 65 6a 65  eturn 1. To reje
bea0: 63 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75  ct the value, bu
beb0: 74 0a 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63  t.continue the c
bec0: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68  onnection, it sh
bed0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 32 2e 20 54  ould return 2. T
bee0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20  his callback is 
bef0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
bf00: 2e 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  .8.</p>.<dl clas
bf10: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69  s="doctools_opti
bf20: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
bf30: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 6c 70 6e  ss="option">alpn
bf40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
bf50: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72  rg">channelId pr
bf60: 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c 2f 69 3e  otocol match</i>
bf70: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72  </dt>.<dd><p>For
bf80: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66   servers, this f
bf90: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
bfa0: 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20  is invoked when 
bfb0: 74 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 20  the client ALPN 
bfc0: 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a 72 65 63  extension is.rec
bfd0: 65 69 76 65 64 2e 20 49 66 20 3c 69 20 63 6c 61  eived. If <i cla
bfe0: 73 73 3d 22 61 72 67 22 3e 6d 61 74 63 68 3c 2f  ss="arg">match</
bff0: 69 3e 20 69 73 20 74 72 75 65 2c 20 74 68 65 6e  i> is true, then
c000: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
c010: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20 69 73 20  protocol</i> is 
c020: 74 68 65 20 66 69 72 73 74 0a 3c 62 20 63 6c 61  the first.<b cla
c030: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70  ss="option">-alp
c040: 6e 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f 6c 20 6f  n</b> protocol o
c050: 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20  ption in common 
c060: 74 6f 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65  to both the clie
c070: 6e 74 20 61 6e 64 20 73 65 72 76 65 72 2e 0a 49  nt and server..I
c080: 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74  f not, the first
c090: 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65   client specifie
c0a0: 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73  d protocol is us
c0b0: 65 64 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63  ed. This callbac
c0c0: 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65  k is called.afte
c0d0: 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20  r the Hello and 
c0e0: 53 4e 49 20 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f  SNI callbacks.</
c0f0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
c100: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 68 65  lass="option">he
c110: 6c 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  llo</b> <i class
c120: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
c130: 20 73 65 72 76 65 72 6e 61 6d 65 20 73 65 73 73   servername sess
c140: 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a  ion_id</i></dt>.
c150: 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65  <dd><p>For serve
c160: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66  rs, this form of
c170: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
c180: 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65  oked during clie
c190: 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 65  nt hello message
c1a0: 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 65  .processing. The
c1b0: 20 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 74   purpose is so t
c1c0: 68 65 20 73 65 72 76 65 72 20 63 61 6e 20 73 65  he server can se
c1d0: 6c 65 63 74 20 74 68 65 20 61 70 70 72 6f 70 72  lect the appropr
c1e0: 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74 65  iate certificate
c1f0: 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 74  .to present to t
c200: 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74  he client, and t
c210: 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f 6e  o make other con
c220: 66 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 73  figuration adjus
c230: 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 0a  tments relevant.
c240: 74 6f 20 74 68 61 74 20 73 65 72 76 65 72 20 6e  to that server n
c250: 61 6d 65 20 61 6e 64 20 69 74 73 20 63 6f 6e 66  ame and its conf
c260: 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 20 69 73  iguration. It is
c270: 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74   called before t
c280: 68 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 0a  he SNI and ALPN.
c290: 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f  callbacks.</p></
c2a0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
c2b0: 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 3c 2f 62  ="option">sni</b
c2c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
c2d0: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65  >channelId serve
c2e0: 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rname</i></dt>.<
c2f0: 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72  dd><p>For server
c300: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20  s, this form of 
c310: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
c320: 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 72  ked when the Ser
c330: 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74  ver Name Indicat
c340: 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73  ion.(SNI) extens
c350: 69 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 2e  ion is received.
c360: 20 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61   The <i class="a
c370: 72 67 22 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f  rg">servername</
c380: 69 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74  i> argument is t
c390: 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64  he client.provid
c3a0: 65 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 73  ed server name s
c3b0: 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20  pecified in the 
c3c0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
c3d0: 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62  ">-servername</b
c3e0: 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 65 0a 70 75  > option. The.pu
c3f0: 72 70 6f 73 65 20 69 73 20 73 6f 20 77 68 65 6e  rpose is so when
c400: 20 61 20 73 65 72 76 65 72 20 73 75 70 70 6f 72   a server suppor
c410: 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65  ts multiple name
c420: 73 2c 20 74 68 65 20 72 69 67 68 74 20 63 65 72  s, the right cer
c430: 74 69 66 69 63 61 74 65 0a 63 61 6e 20 62 65 20  tificate.can be 
c440: 75 73 65 64 2e 20 49 74 20 69 73 20 63 61 6c 6c  used. It is call
c450: 65 64 20 61 66 74 65 72 20 74 68 65 20 48 65 6c  ed after the Hel
c460: 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20  lo callback but 
c470: 62 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a  before the ALPN.
c480: 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e 3c 2f 64  callback.</p></d
c490: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
c4a0: 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c  "option">verify<
c4b0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
c4c0: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65 70  g">channelId dep
c4d0: 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65  th cert status e
c4e0: 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  rror</i></dt>.<d
c4f0: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f  d><p>This form o
c500: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
c510: 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c  voked by OpenSSL
c520: 20 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74   when a new cert
c530: 69 66 69 63 61 74 65 20 69 73 20 72 65 63 65 69  ificate is recei
c540: 76 65 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65  ved.from the pee
c550: 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65  r. It allows the
c560: 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b   client to check
c570: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
c580: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 65   verification.re
c590: 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65  sults and choose
c5a0: 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74   whether to cont
c5b0: 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 49 74 20  inue or not. It 
c5c0: 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61  is called for ea
c5d0: 63 68 0a 63 65 72 74 69 66 69 63 61 74 65 20 69  ch.certificate i
c5e0: 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  n the certificat
c5f0: 65 20 63 68 61 69 6e 2e 20 54 68 69 73 20 63 61  e chain. This ca
c600: 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64  llback was moved
c610: 20 66 72 6f 6d 0a 3c 62 20 63 6c 61 73 73 3d 22   from.<b class="
c620: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64  option">-command
c630: 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31  </b> in TclTLS 1
c640: 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74  .8. The argument
c650: 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63  s are:</p>.<dl c
c660: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
c670: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
c680: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
c690: 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  depth</i></dt>.<
c6a0: 64 64 3e 3c 70 3e 54 68 65 20 64 65 70 74 68 20  dd><p>The depth 
c6b0: 69 73 20 74 68 65 20 69 6e 74 65 67 65 72 20 64  is the integer d
c6c0: 65 70 74 68 20 6f 66 20 74 68 65 20 63 65 72 74  epth of the cert
c6d0: 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63  ificate in the c
c6e0: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e  ertificate chain
c6f0: 2c 0a 77 68 65 72 65 20 30 20 69 73 20 74 68 65  ,.where 0 is the
c700: 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74   peer certificat
c710: 65 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c  e and higher val
c720: 75 65 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20  ues going up to 
c730: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 0a  the Certificate.
c740: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c  Authority (CA).<
c750: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
c760: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74  class="arg">cert
c770: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
c780: 3e 54 68 65 20 63 65 72 74 20 61 72 67 75 6d 65  >The cert argume
c790: 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20  nt is a list of 
c7a0: 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20  key-value pairs 
c7b0: 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 6f 73 65  similar to those
c7c0: 20 72 65 74 75 72 6e 65 64 20 62 79 0a 3c 62 20   returned by.<b 
c7d0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
c7e0: 3a 73 74 61 74 75 73 3c 2f 62 3e 2e 3c 2f 70 3e  :status</b>.</p>
c7f0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
c800: 73 73 3d 22 61 72 67 22 3e 73 74 61 74 75 73 3c  ss="arg">status<
c810: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
c820: 54 68 65 20 73 74 61 74 75 73 20 61 72 67 75 6d  The status argum
c830: 65 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65  ent is the boole
c840: 61 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74  an validity of t
c850: 68 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 69  he current certi
c860: 66 69 63 61 74 65 20 77 68 65 72 65 20 30 0a 69  ficate where 0.i
c870: 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20  s invalid and 1 
c880: 69 73 20 76 61 6c 69 64 2e 3c 2f 70 3e 3c 2f 64  is valid.</p></d
c890: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
c8a0: 22 61 72 67 22 3e 65 72 72 6f 72 3c 2f 69 3e 3c  "arg">error</i><
c8b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
c8c0: 65 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69  error argument i
c8d0: 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73  s the error mess
c8e0: 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e  age, if any, gen
c8f0: 65 72 61 74 65 64 20 62 79 0a 3c 62 20 63 6c 61  erated by.<b cla
c900: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 58 35  ss="function">X5
c910: 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74  09_STORE_CTX_get
c920: 5f 65 72 72 6f 72 28 29 3c 2f 62 3e 2e 3c 2f 70  _error()</b>.</p
c930: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64  ></dd>.</dl></dd
c940: 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65 66 65 72  >.</dl>.<p>Refer
c950: 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74  ence implementat
c960: 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61  ions of these ca
c970: 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76  llbacks are prov
c980: 69 64 65 64 20 69 6e 20 26 71 75 6f 74 3b 3c 62  ided in &quot;<b
c990: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c   class="file">tl
c9a0: 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 0a  s.tcl</b>&quot;.
c9b0: 61 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  as <b class="cmd
c9c0: 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c  ">tls::callback<
c9d0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
c9e0: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  md">tls::passwor
c9f0: 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c  d</b>, and <b cl
ca00: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76  ass="cmd">tls::v
ca10: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c  alidate_command<
ca20: 2f 62 3e 0a 72 65 73 70 65 63 74 69 76 65 6c 79  /b>.respectively
ca30: 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73  . Note that thes
ca40: 65 20 61 72 65 20 6f 6e 6c 79 20 3c 65 6d 3e 73  e are only <em>s
ca50: 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65  ample</em> imple
ca60: 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 49 6e 20 61  mentations. In a
ca70: 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20   more.realistic 
ca80: 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77  deployment you w
ca90: 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75  ould specify you
caa0: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73  r own callback s
cab0: 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54  cripts on each T
cac0: 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67  LS.channel using
cad0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
cae0: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
caf0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
cb00: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64  ption">-password
cb10: 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61  </b>, and.<b cla
cb20: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
cb30: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62  idate_command</b
cb40: 3e 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c  > options.</p>.<
cb50: 70 3e 54 68 65 20 64 65 66 61 75 6c 74 20 62 65  p>The default be
cb60: 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20  havior when the 
cb70: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
cb80: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 61  ">-command</b> a
cb90: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  nd <b class="opt
cba0: 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63  ion">-validate_c
cbb0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f  ommand</b>.optio
cbc0: 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69  ns are not speci
cbd0: 66 69 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c  fied, is for Tcl
cbe0: 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74  TLS to process t
cbf0: 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69  he associated li
cc00: 62 72 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20  brary.callbacks 
cc10: 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20  internally. The 
cc20: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72  default behavior
cc30: 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61   when the <b cla
cc40: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73  ss="option">-pas
cc50: 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e  sword</b> option
cc60: 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65  .is not specifie
cc70: 64 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20  d is for TclTLS 
cc80: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61  to process the a
cc90: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72  ssociated librar
cca0: 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61  y callbacks by.a
ccb0: 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c  ttempting to cal
ccc0: 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  l <b class="cmd"
ccd0: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f  >tls::password</
cce0: 62 3e 2e 20 54 68 65 20 64 69 66 66 65 72 65 6e  b>. The differen
ccf0: 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 65  ce between these
cd00: 20 74 77 6f 0a 62 65 68 61 76 69 6f 72 73 20 69   two.behaviors i
cd10: 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20  s a consequence 
cd20: 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63  of maintaining c
cd30: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74  ompatibility wit
cd40: 68 20 65 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d  h earlier.implem
cd50: 65 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c  entations.</p>.<
cd60: 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66  p><em>The use of
cd70: 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63   the reference c
cd80: 61 6c 6c 62 61 63 6b 73 20 3c 62 20 63 6c 61 73  allbacks <b clas
cd90: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c  s="cmd">tls::cal
cda0: 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c  lback</b>, <b cl
cdb0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70  ass="cmd">tls::p
cdc0: 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a 61 6e 64  assword</b>,.and
cdd0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
cde0: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f  tls::validate_co
cdf0: 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 6e 6f 74  mmand</b> is not
ce00: 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 54 68   recommended. Th
ce10: 65 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65  ey may be remove
ce20: 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65  d from future re
ce30: 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e  leases.</em></p>
ce40: 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c  .</div>.</div>.<
ce50: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 36  div id="section6
ce60: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
ce70: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
ce80: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 36  a name="section6
ce90: 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f 68 32 3e  ">Debug</a></h2>
cea0: 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74 20 64 65 62  .<p>For most deb
ceb0: 75 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 74 68  ugging needs, th
cec0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e <b class="opti
ced0: 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b 3c 2f 62  on">-callback</b
cee0: 3e 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 65 20  > option can be 
cef0: 75 73 65 64 20 74 6f 20 70 72 6f 76 69 64 65 0a  used to provide.
cf00: 73 75 66 66 69 63 69 65 6e 74 20 69 6e 73 69 67  sufficient insig
cf10: 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 74 69  ht and informati
cf20: 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 68 61  on on the TLS ha
cf30: 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 72 6f 67  ndshake and prog
cf40: 72 65 73 73 2e 20 49 66 0a 66 75 72 74 68 65 72  ress. If.further
cf50: 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67   troubleshooting
cf60: 20 69 6e 73 69 67 68 74 20 69 73 20 6e 65 65 64   insight is need
cf70: 65 64 2c 20 74 68 65 20 63 6f 6d 70 69 6c 65 20  ed, the compile 
cf80: 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c 62 20 63  time option.<b c
cf90: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 2d  lass="option">--
cfa0: 65 6e 61 62 6c 65 2d 64 65 62 75 67 3c 2f 62 3e  enable-debug</b>
cfb0: 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20   can be used to 
cfc0: 67 65 74 20 64 65 74 61 69 6c 65 64 20 65 78 65  get detailed exe
cfd0: 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73 74 61 74  cution flow stat
cfe0: 75 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c 53 20 6b  us.</p>.<p>TLS k
cff0: 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62  ey logging can b
d000: 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74  e enabled by set
d010: 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e  ting the environ
d020: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62  ment variable.<b
d030: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
d040: 22 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c  ">SSLKEYLOGFILE<
d050: 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20  /b> to the name 
d060: 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c  of the file to l
d070: 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e  og to. Then when
d080: 65 76 65 72 20 54 4c 53 20 6b 65 79 0a 6d 61 74  ever TLS key.mat
d090: 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74  erial is generat
d0a0: 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69  ed or received i
d0b0: 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64  t will be logged
d0c0: 20 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68   to the file. Th
d0d0: 69 73 20 69 73 20 75 73 65 66 75 6c 0a 66 6f 72  is is useful.for
d0e0: 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74   logging key dat
d0f0: 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f  a for network lo
d100: 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75  gging tools to u
d110: 73 65 20 74 6f 20 64 65 63 72 79 70 74 20 74 68  se to decrypt th
d120: 65 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c 70 3e 54  e data.</p>.<p>T
d130: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  he <b class="var
d140: 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75  iable">tls::debu
d150: 67 3c 2f 62 3e 20 76 61 72 69 61 62 6c 65 20 70  g</b> variable p
d160: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64  rovides some add
d170: 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20  itional control 
d180: 6f 76 65 72 20 74 68 65 0a 64 65 62 75 67 20 6c  over the.debug l
d190: 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 20 3c 62  ogging in the <b
d1a0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
d1b0: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20  ::callback</b>, 
d1c0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
d1d0: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e  ls::password</b>
d1e0: 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22  , and.<b class="
d1f0: 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61  cmd">tls::valida
d200: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 64  te_command</b> d
d210: 65 66 61 75 6c 74 20 68 61 6e 64 6c 65 72 73 20  efault handlers 
d220: 69 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  in &quot;<b clas
d230: 73 3d 22 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c  s="file">tls.tcl
d240: 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 68 65 20  </b>&quot;..The 
d250: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 73  default value is
d260: 20 30 20 77 69 74 68 20 68 69 67 68 65 72 20 76   0 with higher v
d270: 61 6c 75 65 73 20 70 72 6f 64 75 63 69 6e 67 20  alues producing 
d280: 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20  more diagnostic 
d290: 6f 75 74 70 75 74 2c 0a 61 6e 64 20 77 69 6c 6c  output,.and will
d2a0: 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 20   also force the 
d2b0: 76 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e  verify method in
d2c0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
d2d0: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62  tls::callback</b
d2e0: 3e 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a  > to accept the.
d2f0: 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 65  certificate, eve
d300: 6e 20 69 66 20 69 74 20 69 73 20 69 6e 76 61 6c  n if it is inval
d310: 69 64 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63  id when the <b c
d320: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76  lass="option">-v
d330: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f  alidatecommand</
d340: 62 3e 0a 6f 70 74 69 6f 6e 20 69 73 20 73 65 74  b>.option is set
d350: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d   to <b class="cm
d360: 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65  d">tls::validate
d370: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e 3c 2f 70  _command</b>.</p
d380: 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65  >.<p><em>The use
d390: 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65   of the variable
d3a0: 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61   <b class="varia
d3b0: 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c  ble">tls::debug<
d3c0: 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d  /b> is not recom
d3d0: 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 62  mended..It may b
d3e0: 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66  e removed from f
d3f0: 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 3c  uture releases.<
d400: 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a  /em></p>.</div>.
d410: 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e  <div id="section
d420: 37 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  7" class="doctoo
d430: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
d440: 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e  <a name="section
d450: 37 22 3e 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c  7">Examples</a><
d460: 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c  /h2>.<p>The foll
d470: 6f 77 69 6e 67 20 61 72 65 20 65 78 61 6d 70 6c  owing are exampl
d480: 65 20 73 63 72 69 70 74 73 20 74 6f 20 64 6f 77  e scripts to dow
d490: 6e 6c 6f 61 64 20 61 20 77 65 62 70 61 67 65 20  nload a webpage 
d4a0: 61 6e 64 20 66 69 6c 65 20 75 73 69 6e 67 20 74  and file using t
d4b0: 68 65 0a 68 74 74 70 20 70 61 63 6b 61 67 65 2e  he.http package.
d4c0: 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73   See <span class
d4d0: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
d4e0: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43  ef="#section4">C
d4f0: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
d500: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e  ation</a></span>
d510: 20 66 6f 72 20 77 68 65 6e 20 74 68 65 0a 3c 62   for when the.<b
d520: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
d530: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63  -cadir</b>, <b c
d540: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
d550: 61 66 69 6c 65 3c 2f 62 3e 2c 20 61 6e 64 20 3c  afile</b>, and <
d560: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
d570: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70  >-castore</b> op
d580: 74 69 6f 6e 73 20 61 72 65 20 61 6c 73 6f 0a 6e  tions are also.n
d590: 65 65 64 65 64 2e 20 53 65 65 20 74 68 65 20 26  eeded. See the &
d5a0: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66  quot;<b class="f
d5b0: 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71  ile">demos</b>&q
d5c0: 75 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66  uot; directory f
d5d0: 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20  or more example 
d5e0: 73 63 72 69 70 74 73 2e 3c 2f 70 3e 0a 3c 70 3e  scripts.</p>.<p>
d5f0: 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 6e  Example #1: Down
d600: 6c 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 3c  load a web page<
d610: 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22  /p>.<pre class="
d620: 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65  doctools_example
d630: 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  ">.package requi
d640: 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20  re http.package 
d650: 72 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20  require tls.set 
d660: 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a  url &quot;https:
d670: 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 26 71 75  //www.tcl.tk/&qu
d680: 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73 74  ot;.http::regist
d690: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69  er https 443 [li
d6a0: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74  st ::tls::socket
d6b0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65   -autoservername
d6c0: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 23   1 -require 1].#
d6d0: 20 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f 6b   Get URL.set tok
d6e0: 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c  en [http::geturl
d6f0: 20 24 75 72 6c 5d 0a 23 20 43 68 65 63 6b 20 66   $url].# Check f
d700: 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74  or error.if {[ht
d710: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65  tp::status $toke
d720: 6e 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71  n] ne &quot;ok&q
d730: 75 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73  uot;} {.    puts
d740: 20 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45   [format &quot;E
d750: 72 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b 68  rror %s&quot; [h
d760: 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b  ttp::status $tok
d770: 65 6e 5d 5d 0a 7d 0a 23 20 53 61 76 65 20 77 65  en]].}.# Save we
d780: 62 20 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73  b page to file.s
d790: 65 74 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d  et ch [open exam
d7a0: 70 6c 65 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 74  ple.html wb].put
d7b0: 73 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 74  s $ch [http::dat
d7c0: 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 20  a $token].close 
d7d0: 24 63 68 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a  $ch.# Cleanup.::
d7e0: 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74  http::cleanup $t
d7f0: 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 70 3e 45  oken.</pre>.<p>E
d800: 78 61 6d 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c  xample #2: Downl
d810: 6f 61 64 20 61 20 66 69 6c 65 3c 2f 70 3e 0a 3c  oad a file</p>.<
d820: 70 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  pre class="docto
d830: 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61  ols_example">.pa
d840: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74  ckage require ht
d850: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  tp.package requi
d860: 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26  re tls.set url &
d870: 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 69 6b  quot;https://wik
d880: 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 73  i.tcl-lang.org/s
d890: 69 74 65 6d 61 70 2e 78 6d 6c 26 71 75 6f 74 3b  itemap.xml&quot;
d8a0: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20  .http::register 
d8b0: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20  https 443 [list 
d8c0: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61  ::tls::socket -a
d8d0: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20  utoservername 1 
d8e0: 2d 72 65 71 75 69 72 65 20 31 5d 0a 23 20 4f 70  -require 1].# Op
d8f0: 65 6e 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73  en output file.s
d900: 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c  et filename [fil
d910: 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74  e tail $url].set
d920: 20 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e   ch [open $filen
d930: 61 6d 65 20 77 62 5d 0a 23 20 47 65 74 20 66 69  ame wb].# Get fi
d940: 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a  le.set token [::
d950: 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72  http::geturl $ur
d960: 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35  l -blocksize 655
d970: 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d  36 -channel $ch]
d980: 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72  .# Check for err
d990: 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74  or.if {[http::st
d9a0: 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20  atus $token] ne 
d9b0: 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20  &quot;ok&quot;} 
d9c0: 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d  {.    puts [form
d9d0: 61 74 20 26 71 75 6f 74 3b 45 72 72 6f 72 20 25  at &quot;Error %
d9e0: 73 26 71 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73  s&quot; [http::s
d9f0: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d  tatus $token]].}
da00: 0a 23 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65  .# Cleanup.close
da10: 20 24 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65   $ch.::http::cle
da20: 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72  anup $token.</pr
da30: 65 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  e>.</div>.<div i
da40: 64 3d 22 73 65 63 74 69 6f 6e 38 22 20 63 6c 61  d="section8" cla
da50: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
da60: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
da70: 65 3d 22 73 65 63 74 69 6f 6e 38 22 3e 53 70 65  e="section8">Spe
da80: 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 61 74 69  cial Considerati
da90: 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e  ons</a></h2>.<p>
daa0: 54 68 65 20 63 61 70 61 62 69 6c 69 74 69 65 73  The capabilities
dab0: 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61 67 65   of this package
dac0: 20 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f   can vary enormo
dad0: 75 73 6c 79 20 62 61 73 65 64 20 75 70 6f 6e 20  usly based upon 
dae0: 68 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 64 20 74  how the.linked t
daf0: 6f 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72  o OpenSSL librar
db00: 79 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64  y was configured
db10: 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65 77 20   and built. New 
db20: 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73  versions may obs
db30: 6f 6c 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74  olete.older prot
db40: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61  ocol versions, a
db50: 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70  dd or remove cip
db60: 68 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66  hers, change def
db70: 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63  ault values, etc
db80: 2e 0a 55 73 65 20 74 68 65 20 3c 62 20 63 6c 61  ..Use the <b cla
db90: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72  ss="cmd">tls::pr
dba0: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d  otocols</b> comm
dbb0: 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e 20 74 68  and to obtain th
dbc0: 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74  e supported.prot
dbd0: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2e 3c 2f  ocol versions.</
dbe0: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  p>.</div>.<div i
dbf0: 64 3d 22 73 65 63 74 69 6f 6e 39 22 20 63 6c 61  d="section9" cla
dc00: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
dc10: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
dc20: 65 3d 22 73 65 63 74 69 6f 6e 39 22 3e 45 72 72  e="section9">Err
dc30: 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f 61 3e 3c  or Messages</a><
dc40: 2f 68 32 3e 0a 3c 70 3e 53 6f 6d 65 20 4f 70 73  /h2>.<p>Some Ops
dc50: 6e 53 53 6c 20 65 72 72 6f 72 20 6d 65 73 73 61  nSSl error messa
dc60: 67 65 73 20 68 61 76 65 20 63 72 79 70 74 69 63  ges have cryptic
dc70: 20 6d 65 61 6e 69 6e 67 73 2e 20 54 68 69 73 20   meanings. This 
dc80: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6d 65 73  is a list of mes
dc90: 73 61 67 65 73 0a 61 6c 6f 6e 67 20 77 69 74 68  sages.along with
dca0: 20 74 68 65 69 72 20 74 72 75 65 20 6d 65 61 6e   their true mean
dcb0: 69 6e 67 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  ing.</p>.<dl cla
dcc0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
dcd0: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  initions">.<dt><
dce0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61  i class="arg">ha
dcf0: 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 64 3a 20  ndshake failed: 
dd00: 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69  certificate veri
dd10: 66 79 20 66 61 69 6c 65 64 20 64 75 65 20 74 6f  fy failed due to
dd20: 20 26 71 75 6f 74 3b 75 6e 61 62 6c 65 20 74 6f   &quot;unable to
dd30: 20 67 65 74 20 6c 6f 63 61 6c 20 69 73 73 75 65   get local issue
dd40: 72 20 63 65 72 74 69 66 69 63 61 74 65 26 71 75  r certificate&qu
dd50: 6f 74 3b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ot;</i></dt>.<dd
dd60: 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 66 69 63  ><p>The certific
dd70: 61 74 65 73 20 69 6e 20 74 68 65 20 43 41 20 66  ates in the CA f
dd80: 69 6c 65 20 6f 72 20 63 65 72 74 69 66 69 63 61  ile or certifica
dd90: 74 65 20 73 74 6f 72 65 20 65 69 74 68 65 72 20  te store either 
dda0: 64 6f 20 6e 6f 74 20 68 61 76 65 20 6f 6e 65 20  do not have one 
ddb0: 6f 72 0a 6d 6f 72 65 20 69 73 73 75 65 72 73 20  or.more issuers 
ddc0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
ddd0: 74 65 73 20 79 6f 75 20 61 72 65 20 76 61 6c 69  tes you are vali
dde0: 64 61 74 69 6e 67 20 6f 72 20 74 68 65 79 20 68  dating or they h
ddf0: 61 76 65 20 65 78 70 69 72 65 64 2e 0a 55 73 75  ave expired..Usu
de00: 61 6c 6c 79 20 74 68 69 73 20 6d 65 61 6e 73 20  ally this means 
de10: 79 6f 75 20 6e 65 65 64 20 61 6e 20 75 70 64 61  you need an upda
de20: 74 65 64 20 43 41 63 65 72 74 20 66 69 6c 65 2e  ted CAcert file.
de30: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69  </p></dd>.<dt><i
de40: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 61 63   class="arg">pac
de50: 6b 65 74 20 6c 65 6e 67 74 68 20 74 6f 6f 20 6c  ket length too l
de60: 6f 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ong</i></dt>.<dd
de70: 3e 3c 70 3e 43 6c 69 65 6e 74 20 68 61 73 20 74  ><p>Client has t
de80: 72 69 65 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20  ried to connect 
de90: 74 6f 20 61 20 48 54 54 50 20 73 65 72 76 65 72  to a HTTP server
dea0: 20 6f 6e 20 74 68 65 20 70 6c 61 69 6e 2d 74 65   on the plain-te
deb0: 78 74 20 70 6f 72 74 20 69 6e 73 74 65 61 64 20  xt port instead 
dec0: 6f 66 0a 74 68 65 20 53 53 4c 2f 54 4c 53 20 70  of.the SSL/TLS p
ded0: 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ort.</p></dd>.<d
dee0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
def0: 3e 75 6e 65 78 70 65 63 74 65 64 20 65 6f 66 20  >unexpected eof 
df00: 77 68 69 6c 65 20 72 65 61 64 69 6e 67 3c 2f 69  while reading</i
df10: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
df20: 65 20 70 65 65 72 20 68 61 73 20 63 6c 6f 73 65  e peer has close
df30: 64 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  d the connection
df40: 20 77 69 74 68 6f 75 74 20 73 65 6e 64 69 6e 67   without sending
df50: 20 74 68 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65   the &quot;close
df60: 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b 20 73 68   notify&quot; sh
df70: 75 74 64 6f 77 6e 0a 61 6c 65 72 74 2e 20 53 6f  utdown.alert. So
df80: 6d 65 20 73 65 72 76 65 72 73 20 77 69 6c 6c 20  me servers will 
df90: 74 65 72 6d 69 6e 61 74 65 20 74 68 65 20 63 6f  terminate the co
dfa0: 6e 6e 65 63 74 69 6f 6e 20 61 66 74 65 72 20 74  nnection after t
dfb0: 68 65 20 66 69 6c 65 20 6f 72 20 77 65 62 70 61  he file or webpa
dfc0: 67 65 20 68 61 73 0a 62 65 65 6e 20 73 65 6e 74  ge has.been sent
dfd0: 20 77 69 74 68 6f 75 74 20 73 65 6e 64 69 6e 67   without sending
dfe0: 20 74 68 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65   the &quot;close
dff0: 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b 20 6d 65   notify&quot; me
e000: 73 73 61 67 65 2e 20 49 6e 20 74 68 69 73 20 63  ssage. In this c
e010: 61 73 65 2c 20 69 74 20 73 68 6f 75 6c 64 0a 6e  ase, it should.n
e020: 6f 74 20 72 65 73 75 6c 74 20 69 6e 20 61 20 6c  ot result in a l
e030: 6f 73 73 20 6f 66 20 64 61 74 61 2e 3c 2f 70 3e  oss of data.</p>
e040: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
e050: 73 73 3d 22 61 72 67 22 3e 77 72 6f 6e 67 20 76  ss="arg">wrong v
e060: 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 3c 2f 69  ersion number</i
e070: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6c  ></dt>.<dd><p>Cl
e080: 69 65 6e 74 20 68 61 73 20 74 72 69 65 64 20 74  ient has tried t
e090: 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 20 61 20 6e  o connect to a n
e0a0: 6f 6e 2d 48 54 54 50 20 73 65 72 76 65 72 20 6f  on-HTTP server o
e0b0: 6e 20 61 20 6e 6f 6e 2d 54 4c 53 20 28 69 2e 65  n a non-TLS (i.e
e0c0: 2e 20 70 6c 61 69 6e 20 74 65 78 74 29 20 70 6f  . plain text) po
e0d0: 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  rt.</p></dd>.</d
e0e0: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  l>.</div>.<div i
e0f0: 64 3d 22 73 65 65 2d 61 6c 73 6f 22 20 63 6c 61  d="see-also" cla
e100: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
e110: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
e120: 65 3d 22 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65  e="see-also">See
e130: 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c   Also</a></h2>.<
e140: 70 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  p><a href="https
e150: 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f  ://www.openssl.o
e160: 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e  rg/">OpenSSL</a>
e170: 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 3c 2f  , http, socket</
e180: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  p>.</div>.<div i
e190: 64 3d 22 6b 65 79 77 6f 72 64 73 22 20 63 6c 61  d="keywords" cla
e1a0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
e1b0: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
e1c0: 65 3d 22 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79  e="keywords">Key
e1d0: 77 6f 72 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c  words</a></h2>.<
e1e0: 70 3e 49 2f 4f 2c 20 49 50 20 41 64 64 72 65 73  p>I/O, IP Addres
e1f0: 73 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c  s, OpenSSL, SSL,
e200: 20 54 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c   TCP, TLS, TclTL
e210: 53 2c 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20  S, asynchronous 
e220: 49 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74 69  I/O, bind, certi
e230: 66 69 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c  ficate, channel,
e240: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d   connection, dom
e250: 61 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20  ain name, host, 
e260: 68 74 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20  https, network, 
e270: 6e 65 74 77 6f 72 6b 20 61 64 64 72 65 73 73 2c  network address,
e280: 20 73 6f 63 6b 65 74 2c 20 74 6c 73 3c 2f 70 3e   socket, tls</p>
e290: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d  .</div>.<div id=
e2a0: 22 63 61 74 65 67 6f 72 79 22 20 63 6c 61 73 73  "category" class
e2b0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
e2c0: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d  on"><h2><a name=
e2d0: 22 63 61 74 65 67 6f 72 79 22 3e 43 61 74 65 67  "category">Categ
e2e0: 6f 72 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e  ory</a></h2>.<p>
e2f0: 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  tls</p>.</div>.<
e300: 64 69 76 20 69 64 3d 22 63 6f 70 79 72 69 67 68  div id="copyrigh
e310: 74 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  t" class="doctoo
e320: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
e330: 3c 61 20 6e 61 6d 65 3d 22 63 6f 70 79 72 69 67  <a name="copyrig
e340: 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61  ht">Copyright</a
e350: 3e 3c 2f 68 32 3e 0a 3c 70 3e 43 6f 70 79 72 69  ></h2>.<p>Copyri
e360: 67 68 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20  ght &copy; 1999 
e370: 4d 61 74 74 20 4e 65 77 6d 61 6e 3c 62 72 3e 0a  Matt Newman<br>.
e380: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
e390: 20 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53   2004 Starfish S
e3a0: 79 73 74 65 6d 73 3c 62 72 3e 0a 43 6f 70 79 72  ystems<br>.Copyr
e3b0: 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 32 34  ight &copy; 2024
e3c0: 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 3c 2f   Brian O'Hagan</
e3d0: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e  p>.</div>.</div>
e3e0: 3c 2f 62 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a     </body></html>.