Hex Artifact Content

Artifact e3673db36e82d79c33957cf5cb7723237d8d4eef1c22e52d72f10d31d3e99f2e:


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 20 74 6c  e">tls(n) 2.0 tl
0880: 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c 53 20  s &quot;Tcl TLS 
0890: 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74 3b 3c  extension&quot;<
08a0: 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22 6e 61  /h1>.<div id="na
08b0: 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  me" class="docto
08c0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
08d0: 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65 22 3e  ><a name="name">
08e0: 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  Name</a></h2>.<p
08f0: 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67 20 74  >tls - binding t
0900: 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69  o the OpenSSL li
0910: 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72 79 70  brary for encryp
0920: 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64 20 49  ted socket and I
0930: 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75  /O channel commu
0940: 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a 3c 2f  nications</p>.</
0950: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 74 6f  div>.<div id="to
0960: 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  c" class="doctoo
0970: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
0980: 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e 54 61  <a name="toc">Ta
0990: 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 73 3c  ble Of Contents<
09a0: 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63 6c 61  /a></h2>.<ul cla
09b0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 6f 63  ss="doctools_toc
09c0: 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  ">.<li class="do
09d0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
09e0: 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22 3e 54  <a href="#toc">T
09f0: 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 73  able Of Contents
0a00: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0a10: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
0a20: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0a30: 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70  #synopsis">Synop
0a40: 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  sis</a></li>.<li
0a50: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0a60: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0a70: 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e 44 65  f="#section1">De
0a80: 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c  scription</a></l
0a90: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
0aa0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
0ab0: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
0ac0: 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69 6c 69 74  n2">Compatibilit
0ad0: 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63  y</a></li>.<li c
0ae0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0af0: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0b00: 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 6f 6d 6d  "#section3">Comm
0b10: 61 6e 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ands</a></li>.<l
0b20: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0b30: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0b40: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43  ef="#section4">C
0b50: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
0b60: 61 74 69 6f 6e 3c 2f 61 3e 0a 3c 75 6c 3e 0a 3c  ation</a>.<ul>.<
0b70: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0b80: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
0b90: 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74  a href="#subsect
0ba0: 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65  ion1">PKI and Ce
0bb0: 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f  rtificates</a></
0bc0: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  li>.<li class="d
0bd0: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69  octools_subsecti
0be0: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75  on"><a href="#su
0bf0: 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d 61  bsection2">Summa
0c00: 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c 69  ry of command li
0c10: 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f  ne options</a></
0c20: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  li>.<li class="d
0c30: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69  octools_subsecti
0c40: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75  on"><a href="#su
0c50: 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65 6e 20  bsection3">When 
0c60: 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65  are command line
0c70: 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65 64 3f   options needed?
0c80: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a  </a></li>.</ul>.
0c90: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0ca0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
0cb0: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  n"><a href="#sec
0cc0: 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b 20  tion5">Callback 
0cd0: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 0a 3c 75 6c 3e  Options</a>.<ul>
0ce0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
0cf0: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
0d00: 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73 65  ><a href="#subse
0d10: 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66  ction4">Values f
0d20: 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62  or Command Callb
0d30: 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ack</a></li>.<li
0d40: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0d50: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20  _subsection"><a 
0d60: 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f  href="#subsectio
0d70: 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 50  n5">Values for P
0d80: 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 63 6b  assword Callback
0d90: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0da0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75  ass="doctools_su
0db0: 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  bsection"><a hre
0dc0: 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 36 22  f="#subsection6"
0dd0: 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61 6c 69  >Values for Vali
0de0: 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c  date Command Cal
0df0: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  lback</a></li>.<
0e00: 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 20 63  /ul>.</li>.<li c
0e10: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0e20: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0e30: 22 23 73 65 63 74 69 6f 6e 36 22 3e 44 65 62 75  "#section6">Debu
0e40: 67 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63  g</a></li>.<li c
0e50: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0e60: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0e70: 22 23 73 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d  "#section7">Exam
0e80: 70 6c 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ples</a></li>.<l
0e90: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0ea0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0eb0: 65 66 3d 22 23 73 65 63 74 69 6f 6e 38 22 3e 53  ef="#section8">S
0ec0: 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 61  pecial Considera
0ed0: 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  tions</a></li>.<
0ee0: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0ef0: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  ls_section"><a h
0f00: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 39 22 3e  ref="#section9">
0f10: 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f  Error Messages</
0f20: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73  a></li>.<li clas
0f30: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
0f40: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0f50: 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73  ee-also">See Als
0f60: 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63  o</a></li>.<li c
0f70: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0f80: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0f90: 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77  "#keywords">Keyw
0fa0: 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ords</a></li>.<l
0fb0: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0fc0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0fd0: 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22 3e 43  ef="#category">C
0fe0: 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c 69 3e  ategory</a></li>
0ff0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
1000: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61  ools_section"><a
1010: 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69 67 68   href="#copyrigh
1020: 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e  t">Copyright</a>
1030: 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69  </li>.</ul>.</di
1040: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79 6e 6f  v>.<div id="syno
1050: 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64 6f 63  psis" class="doc
1060: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
1070: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 6e 6f  h2><a name="syno
1080: 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f  psis">Synopsis</
1090: 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 6c 61  a></h2>.<div cla
10a0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e  ss="doctools_syn
10b0: 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c 61 73  opsis">.<ul clas
10c0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75  s="doctools_requ
10d0: 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 3e 70  irements">.<li>p
10e0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 3c  ackage require <
10f0: 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d 65  b class="pkgname
1100: 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e 3c 2f  ">Tcl 8.5-</b></
1110: 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20  li>.<li>package 
1120: 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73  require <b class
1130: 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 20 32  ="pkgname">tls 2
1140: 2e 30 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c  .0</b></li>.</ul
1150: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<ul class="doc
1160: 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 22 3e 0a 3c  tools_syntax">.<
1170: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 22 3e  li><a href="#1">
1180: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1190: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70  ls::init</b> <sp
11a0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
11b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
11c0: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
11d0: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
11e0: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
11f0: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
1200: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1210: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1220: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
1230: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
1240: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  /span></a></li>.
1250: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 32 22  <li><a href="#2"
1260: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
1270: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
1280: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1290: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
12a0: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
12b0: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
12c0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
12d0: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
12e0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
12f0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1300: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1310: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
1320: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1330: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69  ss="arg">host</i
1340: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1350: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c  >port</i></a></l
1360: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  i>.<li><a href="
1370: 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #3"><b class="cm
1380: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
1390: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  b> <b class="opt
13a0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e  ion">-server</b>
13b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
13c0: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61  command</i> <spa
13d0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
13e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
13f0: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  ption</i>?</span
1400: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1410: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1420: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f  rg">value</i>?</
1430: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1440: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1450: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20  s="arg">-option 
1460: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f  value ...</i>?</
1470: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22  span> <i class="
1480: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
1490: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
14a0: 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c 61 73 73  ef="#4"><b class
14b0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f  ="cmd">tls::impo
14c0: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
14d0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
14e0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
14f0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1500: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
1510: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
1520: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
1530: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
1540: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1550: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1560: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
1570: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
1580: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1590: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
15a0: 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="#5"><b class="
15b0: 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 72 74 74  cmd">tls::startt
15c0: 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ls</b> <i class=
15d0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
15e0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
15f0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1600: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
1610: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
1620: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
1630: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
1640: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1650: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1660: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
1670: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
1680: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1690: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
16a0: 3d 22 23 36 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="#6"><b class="
16b0: 63 6d 64 22 3e 74 6c 73 3a 3a 68 61 6e 64 73 68  cmd">tls::handsh
16c0: 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ake</b> <i class
16d0: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
16e0: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e  i></a></li>.<li>
16f0: 3c 61 20 68 72 65 66 3d 22 23 37 22 3e 3c 62 20  <a href="#7"><b 
1700: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
1710: 3a 73 68 75 74 64 6f 77 6e 3c 2f 62 3e 20 3c 69  :shutdown</b> <i
1720: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
1730: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69  nnel</i></a></li
1740: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
1750: 38 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  8"><b class="cmd
1760: 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c  ">tls::unimport<
1770: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
1780: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  g">channel</i></
1790: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68  a></li>.<li><a h
17a0: 72 65 66 3d 22 23 39 22 3e 3c 62 20 63 6c 61 73  ref="#9"><b clas
17b0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 73  s="cmd">tls::uns
17c0: 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tack</b> <i clas
17d0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
17e0: 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  /i></a></li>.<li
17f0: 3e 3c 61 20 68 72 65 66 3d 22 23 31 30 22 3e 3c  ><a href="#10"><
1800: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1810: 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73  s::status</b> <s
1820: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1830: 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ?<b class="optio
1840: 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f  n">-local</b>?</
1850: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22  span> <i class="
1860: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  arg">channel</i>
1870: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61  </a></li>.<li><a
1880: 20 68 72 65 66 3d 22 23 31 31 22 3e 3c 62 20 63   href="#11"><b c
1890: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
18a0: 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c  connection</b> <
18b0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
18c0: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c  annel</i></a></l
18d0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  i>.<li><a href="
18e0: 23 31 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  #12"><b class="c
18f0: 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  md">tls::ciphers
1900: 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  </b> <span class
1910: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
1920: 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c  ="arg">protocol<
1930: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1940: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1950: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
1960: 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  rbose</i>?</span
1970: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1980: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1990: 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69  rg">supported</i
19a0: 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c  >?</span></a></l
19b0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  i>.<li><a href="
19c0: 23 31 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  #13"><b class="c
19d0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  md">tls::protoco
19e0: 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  ls</b></a></li>.
19f0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 34  <li><a href="#14
1a00: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
1a10: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62  >tls::version</b
1a20: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e  ></a></li>.</ul>
1a30: 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c  .</div>.</div>.<
1a40: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 31  div id="section1
1a50: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
1a60: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
1a70: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 31  a name="section1
1a80: 22 3e 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61  ">Description</a
1a90: 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 69 73 20 65  ></h2>.<p>This e
1aa0: 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65  xtension provide
1ab0: 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 63 63  s TCL script acc
1ac0: 65 73 73 20 74 6f 20 53 65 63 75 72 65 20 53 6f  ess to Secure So
1ad0: 63 6b 65 74 20 4c 61 79 65 72 20 28 53 53 4c 29  cket Layer (SSL)
1ae0: 0a 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 20  .communications 
1af0: 75 73 69 6e 67 20 74 68 65 20 54 72 61 6e 73 70  using the Transp
1b00: 6f 72 74 20 4c 61 79 65 72 20 53 65 63 75 72 69  ort Layer Securi
1b10: 74 79 20 28 54 4c 53 29 20 70 72 6f 74 6f 63 6f  ty (TLS) protoco
1b20: 6c 2e 20 49 74 20 70 72 6f 76 69 64 65 73 20 61  l. It provides a
1b30: 0a 67 65 6e 65 72 69 63 20 62 69 6e 64 69 6e 67  .generic binding
1b40: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74   to <a href="htt
1b50: 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c  ps://www.openssl
1b60: 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f  .org/">OpenSSL</
1b70: 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 20 74 68  a>, utilizing th
1b80: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63  e.<b class="sysc
1b90: 6d 64 22 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61  md">Tcl_StackCha
1ba0: 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49 20 69 6e 20  nnel</b> API in 
1bb0: 54 43 4c 20 38 2e 34 20 6f 72 20 6c 61 74 65 72  TCL 8.4 or later
1bc0: 2e 20 54 68 65 73 65 20 73 6f 63 6b 65 74 73 20  . These sockets 
1bd0: 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 0a 74  behave exactly.t
1be0: 68 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e 6e  he same as chann
1bf0: 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 6e  els created usin
1c00: 67 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 3c  g the built-in <
1c10: 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22  b class="syscmd"
1c20: 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d  >socket</b> comm
1c30: 61 6e 64 2c 20 62 75 74 0a 70 72 6f 76 69 64 65  and, but.provide
1c40: 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69   additional opti
1c50: 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c  ons for controll
1c60: 69 6e 67 20 74 68 65 20 53 53 4c 2f 54 4c 53 20  ing the SSL/TLS 
1c70: 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 0a 3c 2f 64  session.</p>.</d
1c80: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63  iv>.<div id="sec
1c90: 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f  tion2" class="do
1ca0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
1cb0: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63  <h2><a name="sec
1cc0: 74 69 6f 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69  tion2">Compatibi
1cd0: 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  lity</a></h2>.<p
1ce0: 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20  >This extension 
1cf0: 69 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69  is compatible wi
1d00: 74 68 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e 31  th OpenSSL 1.1.1
1d10: 20 6f 72 20 6c 61 74 65 72 20 69 6e 63 6c 75 64   or later includ
1d20: 69 6e 67 20 74 68 65 20 33 2e 78 20 61 6e 64 20  ing the 3.x and 
1d30: 34 2e 30 0a 72 65 6c 65 61 73 65 73 2e 20 49 74  4.0.releases. It
1d40: 20 72 65 71 75 69 72 65 73 20 54 63 6c 20 76 65   requires Tcl ve
1d50: 72 73 69 6f 6e 20 38 2e 35 20 6f 72 20 6c 61 74  rsion 8.5 or lat
1d60: 65 72 20 61 6e 64 20 77 69 6c 6c 20 77 6f 72 6b  er and will work
1d70: 20 77 69 74 68 20 54 63 6c 20 39 2e 30 2e 3c 2f   with Tcl 9.0.</
1d80: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  p>.</div>.<div i
1d90: 64 3d 22 73 65 63 74 69 6f 6e 33 22 20 63 6c 61  d="section3" cla
1da0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
1db0: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
1dc0: 65 3d 22 73 65 63 74 69 6f 6e 33 22 3e 43 6f 6d  e="section3">Com
1dd0: 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c  mands</a></h2>.<
1de0: 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20  p>The following 
1df0: 61 72 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64 73  are the commands
1e00: 20 70 72 6f 76 69 64 65 64 20 62 79 20 74 68 65   provided by the
1e10: 20 54 63 4c 54 4c 53 20 70 61 63 6b 61 67 65 2e   TcLTLS package.
1e20: 20 53 65 65 0a 3c 73 70 61 6e 20 63 6c 61 73 73   See.<span class
1e30: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
1e40: 65 66 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e 45  ef="#section7">E
1e50: 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 73 70 61  xamples</a></spa
1e60: 6e 3e 20 66 6f 72 20 65 78 61 6d 70 6c 65 20 75  n> for example u
1e70: 73 61 67 65 20 61 6e 64 20 74 68 65 20 26 71 75  sage and the &qu
1e80: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
1e90: 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71 75 6f  e">demos</b>&quo
1ea0: 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72  t; directory for
1eb0: 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 75 73  .more example us
1ec0: 61 67 65 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  age.</p>.<dl cla
1ed0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
1ee0: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  initions">.<dt><
1ef0: 61 20 6e 61 6d 65 3d 22 31 22 3e 3c 62 20 63 6c  a name="1"><b cl
1f00: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69  ass="cmd">tls::i
1f10: 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c  nit</b> <span cl
1f20: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
1f30: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f  ass="arg">-optio
1f40: 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  n</i>?</span> <s
1f50: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1f60: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1f70: 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  value</i>?</span
1f80: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1f90: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1fa0: 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75  rg">-option valu
1fb0: 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  e ...</i>?</span
1fc0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  ></a></dt>.<dd><
1fd0: 70 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74  p>Optional funct
1fe0: 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20 64  ion to set the d
1ff0: 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75  efault options u
2000: 73 65 64 20 62 79 20 3c 62 20 63 6c 61 73 73 3d  sed by <b class=
2010: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
2020: 74 3c 2f 62 3e 2e 20 49 66 20 79 6f 75 0a 63 61  t</b>. If you.ca
2030: 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  ll <b class="cmd
2040: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
2050: 3e 20 64 69 72 65 63 74 6c 79 2c 20 74 68 65 20  > directly, the 
2060: 76 61 6c 75 65 73 20 73 65 74 20 62 79 20 74 68  values set by th
2070: 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76 65 20  is command have 
2080: 6e 6f 20 65 66 66 65 63 74 2e 0a 54 68 69 73 20  no effect..This 
2090: 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74 73  command supports
20a0: 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61 6d 65   all of the same
20b0: 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65 20   options as the 
20c0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
20d0: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63  ls::socket</b> c
20e0: 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67 68 20 79  ommand,.though y
20f0: 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20  ou should limit 
2100: 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f 20  your options to 
2110: 6f 6e 6c 79 20 74 68 65 20 54 4c 53 20 72 65 6c  only the TLS rel
2120: 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c 2f  ated ones.</p></
2130: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  dd>.<dt><a name=
2140: 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  "2"><b class="cm
2150: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
2160: 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  b> <span class="
2170: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2180: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e  arg">-option</i>
2190: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63  ?</span> <span c
21a0: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
21b0: 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65  lass="arg">value
21c0: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
21d0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
21e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
21f0: 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e  option value ...
2200: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20  </i>?</span> <i 
2210: 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74  class="arg">host
2220: 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </i> <i class="a
2230: 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e  rg">port</i></a>
2240: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69  </dt>.<dd><p>Thi
2250: 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66 75  s is a helper fu
2260: 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c  nction that util
2270: 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79  izes the underly
2280: 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 3c 62 20  ing commands <b 
2290: 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73  class="syscmd">s
22a0: 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c 62  ocket</b>.and <b
22b0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
22c0: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f 20  ::import</b> to 
22d0: 63 72 65 61 74 65 20 74 68 65 20 63 6f 6e 6e 65  create the conne
22e0: 63 74 69 6f 6e 2e 20 49 74 20 62 65 68 61 76 65  ction. It behave
22f0: 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 68  s the same as th
2300: 65 0a 6e 61 74 69 76 65 20 54 43 4c 20 3c 62 20  e.native TCL <b 
2310: 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73  class="syscmd">s
2320: 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e  ocket</b> comman
2330: 64 2c 20 62 75 74 20 61 6c 73 6f 20 73 75 70 70  d, but also supp
2340: 6f 72 74 73 20 74 68 65 20 3c 62 20 63 6c 61 73  orts the <b clas
2350: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70  s="cmd">tls::imp
2360: 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64 20  ort</b>.command 
2370: 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65  options with one
2380: 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69   additional opti
2390: 6f 6e 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74  on. It returns t
23a0: 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c  he channel handl
23b0: 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e 65 77  e id.for the new
23c0: 20 73 6f 63 6b 65 74 2e 20 41 64 64 69 74 69 6f   socket. Additio
23d0: 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a  nal options are:
23e0: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
23f0: 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73  doctools_options
2400: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  ">.<dt><b class=
2410: 22 6f 70 74 69 6f 6e 22 3e 2d 61 75 74 6f 73 65  "option">-autose
2420: 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20  rvername</b> <i 
2430: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
2440: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
2450: 3e 49 66 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  >If <b class="co
2460: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 61  nst">true</b>, a
2470: 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 74  utomatically set
2480: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
2490: 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61  ption">-serverna
24a0: 6d 65 3c 2f 62 3e 20 61 72 67 75 6d 65 6e 74 20  me</b> argument 
24b0: 74 6f 20 74 68 65 0a 3c 65 6d 3e 68 6f 73 74 3c  to the.<em>host<
24c0: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 2e 20 50  /em> argument. P
24d0: 72 69 6f 72 20 74 6f 20 54 63 6c 54 4c 53 20 32  rior to TclTLS 2
24e0: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20  .0, the default 
24f0: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
2500: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 53  st">false</b>..S
2510: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c  tarting in TclTL
2520: 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75  S 2.0, the defau
2530: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  lt is <b class="
2540: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20  const">true</b> 
2550: 75 6e 6c 65 73 73 20 3c 62 20 63 6c 61 73 73 3d  unless <b class=
2560: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72  "option">-server
2570: 6e 61 6d 65 3c 2f 62 3e 0a 69 73 20 61 6c 73 6f  name</b>.is also
2580: 20 73 70 65 63 69 66 69 65 64 2e 3c 2f 70 3e 3c   specified.</p><
2590: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
25a0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 33 22 3e  <dt><a name="3">
25b0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
25c0: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c  ls::socket</b> <
25d0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
25e0: 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20  >-server</b> <i 
25f0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6d 6d  class="arg">comm
2600: 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c  and</i> <span cl
2610: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
2620: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f  ass="arg">-optio
2630: 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  n</i>?</span> <s
2640: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
2650: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
2660: 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  value</i>?</span
2670: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
2680: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
2690: 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75  rg">-option valu
26a0: 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  e ...</i>?</span
26b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
26c0: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64  >port</i></a></d
26d0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 61 6d 65 20 61  t>.<dd><p>Same a
26e0: 73 20 70 72 65 76 69 6f 75 73 20 63 6f 6d 6d 61  s previous comma
26f0: 6e 64 2c 20 62 75 74 20 69 6e 73 74 65 61 64 20  nd, but instead 
2700: 63 72 65 61 74 65 73 20 61 20 73 65 72 76 65 72  creates a server
2710: 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c 69 65   socket for clie
2720: 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 63 74 20 74  nts to.connect t
2730: 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74 68 65 20  o just like the 
2740: 54 63 6c 20 3c 62 20 63 6c 61 73 73 3d 22 73 79  Tcl <b class="sy
2750: 73 63 6d 64 22 3e 73 6f 63 6b 65 74 20 2d 73 65  scmd">socket -se
2760: 72 76 65 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64  rver</b> command
2770: 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65  . It returns the
2780: 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20  .channel handle 
2790: 69 64 20 66 6f 72 20 74 68 65 20 6e 65 77 20 73  id for the new s
27a0: 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ocket.</p></dd>.
27b0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 34 22 3e  <dt><a name="4">
27c0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
27d0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c  ls::import</b> <
27e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
27f0: 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20  annel</i> <span 
2800: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
2810: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
2820: 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  ion</i>?</span> 
2830: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
2840: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
2850: 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70  ">value</i>?</sp
2860: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  an> <span class=
2870: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
2880: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61  "arg">-option va
2890: 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70  lue ...</i>?</sp
28a0: 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  an></a></dt>.<dd
28b0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61  ></dd>.<dt><a na
28c0: 6d 65 3d 22 35 22 3e 3c 62 20 63 6c 61 73 73 3d  me="5"><b class=
28d0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 72 74  "cmd">tls::start
28e0: 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  tls</b> <i class
28f0: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
2900: 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  i> <span class="
2910: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2920: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e  arg">-option</i>
2930: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63  ?</span> <span c
2940: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
2950: 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65  lass="arg">value
2960: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
2970: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
2980: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
2990: 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e  option value ...
29a0: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e  </i>?</span></a>
29b0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74 61  </dt>.<dd><p>Sta
29c0: 72 74 20 54 4c 53 20 65 6e 63 72 79 70 74 69 6f  rt TLS encryptio
29d0: 6e 20 6f 6e 20 54 43 4c 20 63 68 61 6e 6e 65 6c  n on TCL channel
29e0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
29f0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 76 69 61 20  channel</i> via 
2a00: 61 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65  a stacked channe
2a10: 6c 2e 20 49 74 0a 6e 65 65 64 20 6e 6f 74 20 62  l. It.need not b
2a20: 65 20 61 20 73 6f 63 6b 65 74 2c 20 62 75 74 20  e a socket, but 
2a30: 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d  must provide bi-
2a40: 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77  directional flow
2a50: 2e 20 41 6c 73 6f 20 73 65 74 73 20 73 65 73 73  . Also sets sess
2a60: 69 6f 6e 0a 70 61 72 61 6d 65 74 65 72 73 20 66  ion.parameters f
2a70: 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65  or SSL handshake
2a80: 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73 20  . Valid options 
2a90: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  are:</p>.<dl cla
2aa0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74  ss="doctools_opt
2ab0: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
2ac0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c  ass="option">-al
2ad0: 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  pn</b> <i class=
2ae0: 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f  "arg">list</i></
2af0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20  dt>.<dd><p>List 
2b00: 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20  of protocols to 
2b10: 6f 66 66 65 72 20 64 75 72 69 6e 67 20 41 70 70  offer during App
2b20: 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50  lication-Layer P
2b30: 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74  rotocol Negotiat
2b40: 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20 46 6f 72 20  ion.(ALPN). For 
2b50: 65 78 61 6d 70 6c 65 3a 20 3c 62 20 63 6c 61 73  example: <b clas
2b60: 73 3d 22 63 6f 6e 73 74 22 3e 68 32 3c 2f 62 3e  s="const">h2</b>
2b70: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63   and <b class="c
2b80: 6f 6e 73 74 22 3e 68 74 74 70 2f 31 2e 31 3c 2f  onst">http/1.1</
2b90: 62 3e 2c 20 62 75 74 20 6e 6f 74 20 3c 62 20 63  b>, but not <b c
2ba0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 33 3c  lass="const">h3<
2bb0: 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c 61 73 73 3d  /b> or.<b class=
2bc0: 22 63 6f 6e 73 74 22 3e 71 75 69 63 3c 2f 62 3e  "const">quic</b>
2bd0: 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73  . This option is
2be0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
2bf0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
2c00: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
2c10: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c  on">-cadir</b> <
2c20: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 69  i class="arg">di
2c30: 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e  rectory</i></dt>
2c40: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
2c50: 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20  s the directory 
2c60: 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66  where the Certif
2c70: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
2c80: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
2c90: 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54 68  s are.stored. Th
2ca0: 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61  e default is pla
2cb0: 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61  tform specific a
2cc0: 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 74  nd can be set at
2cd0: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54   compile time. T
2ce0: 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61 74  he.default locat
2cf0: 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72  ion can be overr
2d00: 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62 20  idden by the <b 
2d10: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
2d20: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62  >SSL_CERT_DIR</b
2d30: 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61  > environment.va
2d40: 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70 61  riable. See <spa
2d50: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
2d60: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
2d70: 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74  ion4">Certificat
2d80: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
2d90: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
2da0: 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64   details.</p></d
2db0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
2dc0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
2dd0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
2de0: 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e  rg">filename</i>
2df0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
2e00: 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 20  cifies the file 
2e10: 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 69  with the Certifi
2e20: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28  cate Authority (
2e30: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73  CA) certificates
2e40: 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c   to use in.<b cl
2e50: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c  ass="const">PEM<
2e60: 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e  /b> file format.
2e70: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
2e80: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
2e90: 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f  file">cert.pem</
2ea0: 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65  b>&quot;, in the
2eb0: 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f   OpenSSL.directo
2ec0: 72 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ry. The default 
2ed0: 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72  file can be over
2ee0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62  ridden by the <b
2ef0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
2f00: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c  ">SSL_CERT_FILE<
2f10: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a  /b> environment.
2f20: 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73  variable. See <s
2f30: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
2f40: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
2f50: 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63  ction4">Certific
2f60: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f  ate Validation</
2f70: 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f  a></span> for mo
2f80: 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c  re details.</p><
2f90: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
2fa0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
2fb0: 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ore</b> <i class
2fc0: 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f  ="arg">URI</i></
2fd0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
2fe0: 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d  fies the Uniform
2ff0: 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69   Resource Identi
3000: 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20 74  fier (URI) for t
3010: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
3020: 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74  uthority.(CA) st
3030: 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62  ore, which may b
3040: 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61  e a single conta
3050: 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f  iner or a catalo
3060: 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e  g of containers.
3070: 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f  .Starting with O
3080: 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53  penSSL 3.2 on MS
3090: 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f   Windows, set to
30a0: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
30b0: 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e  "const">org.open
30c0: 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c  ssl.winstore://<
30d0: 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65  /b>&quot;.to use
30e0: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53   the built-in MS
30f0: 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69   Windows Certifi
3100: 63 61 74 65 20 53 74 6f 72 65 2e 0a 53 65 65 20  cate Store..See 
3110: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
3120: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
3130: 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66  section4">Certif
3140: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e  icate Validation
3150: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20  </a></span> for 
3160: 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a 54 68  more details..Th
3170: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77  is option is new
3180: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
3190: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
31a0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
31b0: 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 3c 69  -certfile</b> <i
31c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c   class="arg">fil
31d0: 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ename</i></dt>.<
31e0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
31f0: 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20  the name of the 
3200: 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 63 65  file with the ce
3210: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65  rtificate to use
3220: 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61   in PEM format.a
3230: 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69  s the local (cli
3240: 65 6e 74 20 6f 72 20 73 65 72 76 65 72 29 20 63  ent or server) c
3250: 65 72 74 69 66 69 63 61 74 65 2e 20 49 74 20 61  ertificate. It a
3260: 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68 65  lso contains the
3270: 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e   public key.</p>
3280: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3290: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72  ss="option">-cer
32a0: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
32b0: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
32c0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
32d0: 69 66 69 65 73 20 74 68 65 20 63 65 72 74 69 66  ifies the certif
32e0: 69 63 61 74 65 20 74 6f 20 75 73 65 20 61 73 20  icate to use as 
32f0: 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74  a DER encoded st
3300: 72 69 6e 67 20 28 58 2e 35 30 39 20 44 45 52 29  ring (X.509 DER)
3310: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3320: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3330: 3e 2d 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20  >-cipher</b> <i 
3340: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
3350: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
3360: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
3370: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 73   list of ciphers
3380: 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20   to use for TLS 
3390: 31 2e 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20  1.2 and earlier 
33a0: 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 0a 53 74 72  connections..Str
33b0: 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 26  ing is a colon &
33c0: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63  quot;<b class="c
33d0: 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74  onst">:</b>&quot
33e0: 3b 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74  ; separated list
33f0: 20 6f 66 20 63 69 70 68 65 72 73 2e 0a 43 69 70   of ciphers..Cip
3400: 68 65 72 73 20 63 61 6e 20 62 65 20 63 6f 6d 62  hers can be comb
3410: 69 6e 65 64 20 75 73 69 6e 67 20 74 68 65 20 26  ined using the &
3420: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63  quot;<b class="c
3430: 6f 6e 73 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74  onst">+</b>&quot
3440: 3b 20 63 68 61 72 61 63 74 65 72 2e 0a 50 72 65  ; character..Pre
3450: 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 73 65  fixes can be use
3460: 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79  d to permanently
3470: 20 72 65 6d 6f 76 65 20 26 71 75 6f 74 3b 3c 62   remove &quot;<b
3480: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 21   class="const">!
3490: 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 64 65 6c 65  </b>&quot;, dele
34a0: 74 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  te &quot;<b clas
34b0: 73 3d 22 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e 26  s="const">-</b>&
34c0: 71 75 6f 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20 74  quot;, or.move t
34d0: 6f 20 74 68 65 20 65 6e 64 20 26 71 75 6f 74 3b  o the end &quot;
34e0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
34f0: 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 61 20 73  >+</b>&quot; a s
3500: 70 65 63 69 66 69 65 64 20 63 69 70 68 65 72 2e  pecified cipher.
3510: 0a 4b 65 79 77 6f 72 64 73 20 3c 62 20 63 6c 61  .Keywords <b cla
3520: 73 73 3d 22 63 6f 6e 73 74 22 3e 40 53 54 52 45  ss="const">@STRE
3530: 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62  NGTH</b> (sort b
3540: 79 20 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79 20  y algorithm key 
3550: 6c 65 6e 67 74 68 29 2c 0a 3c 62 20 63 6c 61 73  length),.<b clas
3560: 73 3d 22 63 6f 6e 73 74 22 3e 40 53 45 43 4c 45  s="const">@SECLE
3570: 56 45 4c 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65  VEL=</b><em>n</e
3580: 6d 3e 20 28 73 65 74 20 73 65 63 75 72 69 74 79  m> (set security
3590: 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e   level to n), an
35a0: 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  d.<b class="cons
35b0: 74 22 3e 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28  t">DEFAULT</b> (
35c0: 75 73 65 20 64 65 66 61 75 6c 74 20 63 69 70 68  use default ciph
35d0: 65 72 20 6c 69 73 74 2c 20 61 74 20 73 74 61 72  er list, at star
35e0: 74 20 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f  t only) can also
35f0: 20 62 65 20 73 70 65 63 69 66 69 65 64 2e 0a 53   be specified..S
3600: 65 65 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22  ee the <a href="
3610: 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65  https://docs.ope
3620: 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f  nssl.org/master/
3630: 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70  man1/openssl-cip
3640: 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f  hers/#options">O
3650: 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d  penSSL</a>.docum
3660: 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65  entation for the
3670: 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61   full list of va
3680: 6c 69 64 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c  lid values.</p><
3690: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
36a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68  s="option">-ciph
36b0: 65 72 73 75 69 74 65 73 3c 2f 62 3e 20 3c 69 20  ersuites</b> <i 
36c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
36d0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
36e0: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
36f0: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20   list of cipher 
3700: 73 75 69 74 65 73 20 74 6f 20 75 73 65 20 66 6f  suites to use fo
3710: 72 20 54 4c 53 20 31 2e 33 20 61 73 20 61 20 63  r TLS 1.3 as a c
3720: 6f 6c 6f 6e 0a 26 71 75 6f 74 3b 3c 62 20 63 6c  olon.&quot;<b cl
3730: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62  ass="const">:</b
3740: 3e 26 71 75 6f 74 3b 20 73 65 70 61 72 61 74 65  >&quot; separate
3750: 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  d list of cipher
3760: 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 53 65   suite names. Se
3770: 65 20 74 68 65 0a 3c 61 20 68 72 65 66 3d 22 68  e the.<a href="h
3780: 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e  ttps://docs.open
3790: 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d  ssl.org/master/m
37a0: 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68  an1/openssl-ciph
37b0: 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70  ers/#options">Op
37c0: 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65  enSSL</a>.docume
37d0: 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20  ntation for the 
37e0: 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c  full list of val
37f0: 69 64 20 76 61 6c 75 65 73 2e 0a 54 68 69 73 20  id values..This 
3800: 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f  option is new fo
3810: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
3820: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
3830: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f  ass="option">-co
3840: 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  mmand</b> <i cla
3850: 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61 63  ss="arg">callbac
3860: 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  k</i></dt>.<dd><
3870: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
3880: 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64  callback command
3890: 20 74 6f 20 62 65 20 69 6e 76 6f 6b 65 64 20 61   to be invoked a
38a0: 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73  t several points
38b0: 20 64 75 72 69 6e 67 20 74 68 65 0a 68 61 6e 64   during the.hand
38c0: 73 68 61 6b 65 20 74 6f 20 70 61 73 73 20 65 72  shake to pass er
38d0: 72 6f 72 73 2c 20 74 72 61 63 69 6e 67 20 69 6e  rors, tracing in
38e0: 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20 70  formation, and p
38f0: 72 6f 74 6f 63 6f 6c 20 6d 65 73 73 61 67 65 73  rotocol messages
3900: 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73  ..See <span clas
3910: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
3920: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e  ref="#section5">
3930: 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73  Callback Options
3940: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20  </a></span> for 
3950: 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f  more info.</p></
3960: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
3970: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 64 68 70 61 72  ="option">-dhpar
3980: 61 6d 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ams</b> <i class
3990: 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c  ="arg">filename<
39a0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
39b0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 44 69  Specifies the Di
39c0: 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 28 44 48  ffie-Hellman (DH
39d0: 29 20 70 61 72 61 6d 65 74 65 72 73 20 66 69 6c  ) parameters fil
39e0: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  e.</p></dd>.<dt>
39f0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3a00: 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 3c  ">-keyfile</b> <
3a10: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69  i class="arg">fi
3a20: 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  lename</i></dt>.
3a30: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
3a40: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
3a50: 20 66 69 6c 65 2e 20 54 68 65 20 64 65 66 61 75   file. The defau
3a60: 6c 74 20 69 73 20 74 6f 20 75 73 65 20 74 68 65  lt is to use the
3a70: 20 66 69 6c 65 0a 73 70 65 63 69 66 69 65 64 20   file.specified 
3a80: 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  by the <b class=
3a90: 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69  "option">-certfi
3aa0: 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f  le</b> option.</
3ab0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
3ac0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b  lass="option">-k
3ad0: 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ey</b> <i class=
3ae0: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
3af0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
3b00: 63 69 66 69 65 73 20 74 68 65 20 70 72 69 76 61  cifies the priva
3b10: 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73  te key to use as
3b20: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73   a DER encoded s
3b30: 74 72 69 6e 67 20 28 50 4b 43 53 23 31 20 44 45  tring (PKCS#1 DE
3b40: 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  R).</p></dd>.<dt
3b50: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3b60: 6e 22 3e 2d 6d 6f 64 65 6c 3c 2f 62 3e 20 3c 69  n">-model</b> <i
3b70: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
3b80: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  nnel</i></dt>.<d
3b90: 64 3e 3c 70 3e 46 6f 72 63 65 20 74 68 69 73 20  d><p>Force this 
3ba0: 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65  channel to share
3bb0: 20 74 68 65 20 73 61 6d 65 20 3c 69 20 63 6c 61   the same <i cla
3bc0: 73 73 3d 22 74 65 72 6d 22 3e 53 53 4c 5f 43 54  ss="term">SSL_CT
3bd0: 58 3c 2f 69 3e 20 73 74 72 75 63 74 75 72 65 20  X</i> structure 
3be0: 61 73 20 74 68 65 0a 73 70 65 63 69 66 69 65 64  as the.specified
3bf0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3c00: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2c 20 61 6e 64  channel</i>, and
3c10: 20 74 68 65 72 65 66 6f 72 65 20 73 68 61 72 65   therefore share
3c20: 20 63 6f 6e 66 69 67 2c 20 63 61 6c 6c 62 61 63   config, callbac
3c30: 6b 73 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64 64  ks, etc.</p></dd
3c40: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
3c50: 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72  option">-passwor
3c60: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
3c70: 61 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69  arg">callback</i
3c80: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
3c90: 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c  ecifies the call
3ca0: 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20  back command to 
3cb0: 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e  invoke when Open
3cc0: 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62 74  SSL needs to obt
3cd0: 61 69 6e 20 61 0a 70 61 73 73 77 6f 72 64 2e 20  ain a.password. 
3ce0: 54 68 69 73 20 69 73 20 74 79 70 69 63 61 6c 6c  This is typicall
3cf0: 79 20 75 73 65 64 20 74 6f 20 75 6e 6c 6f 63 6b  y used to unlock
3d00: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
3d10: 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74   of a certificat
3d20: 65 2e 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b 20  e..The callback 
3d30: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20  should return a 
3d40: 70 61 73 73 77 6f 72 64 20 73 74 72 69 6e 67 2e  password string.
3d50: 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 68 61 73   This option has
3d60: 20 63 68 61 6e 67 65 64 20 66 6f 72 0a 54 63 6c   changed for.Tcl
3d70: 54 4c 53 20 31 2e 38 2e 20 53 65 65 20 3c 73 70  TLS 1.8. See <sp
3d80: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65  an class="sectre
3d90: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  f"><a href="#sec
3da0: 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b 20  tion5">Callback 
3db0: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61  Options</a></spa
3dc0: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f  n> for more info
3dd0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3de0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3df0: 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65  >-post_handshake
3e00: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
3e10: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
3e20: 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20 70  >.<dd><p>Allow p
3e30: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73 65  ost-handshake se
3e40: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70 64  ssion ticket upd
3e50: 61 74 65 73 2e 20 54 68 69 73 20 6f 70 74 69 6f  ates. This optio
3e60: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  n is new for Tcl
3e70: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
3e80: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
3e90: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74  option">-request
3ea0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
3eb0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
3ec0: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73 74  >.<dd><p>Request
3ed0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66   a certificate f
3ee0: 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72  rom the peer dur
3ef0: 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64  ing the SSL hand
3f00: 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20 6e  shake. This is n
3f10: 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74  eeded.to do Cert
3f20: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69  ificate Validati
3f30: 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20  on. Starting in 
3f40: 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65 20  TclTLS 1.8, the 
3f50: 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63 6c  default is.<b cl
3f60: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
3f70: 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74 20  </b> for client 
3f80: 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 53 74 61  connections. Sta
3f90: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20  rting in TclTLS 
3fa0: 32 2e 30 2c 20 69 66 20 73 65 74 20 74 6f 0a 3c  2.0, if set to.<
3fb0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
3fc0: 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 20 3c 62  false</b> and <b
3fd0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
3fe0: 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73 20  -require</b> is 
3ff0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4000: 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e 20  >true</b>, then 
4010: 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76 65  this will be.ove
4020: 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63 6c  rridden to <b cl
4030: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
4040: 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e 20  </b>..See <span 
4050: 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e  class="sectref">
4060: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
4070: 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65 20  n4">Certificate 
4080: 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f  Validation</a></
4090: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64  span> for more d
40a0: 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  etails.</p></dd>
40b0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
40c0: 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c  ption">-require<
40d0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
40e0: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
40f0: 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 20  .<dd><p>Require 
4100: 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63  a valid certific
4110: 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65  ate from the pee
4120: 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c  r during the SSL
4130: 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74   handshake. If t
4140: 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74 72  his is.set to tr
4150: 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 73  ue, then <b clas
4160: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75  s="option">-requ
4170: 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73  est</b> must als
4180: 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 65  o be set to true
4190: 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 3c 62   and a either.<b
41a0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
41b0: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63  -cadir</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 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c  afile</b>, <b cl
41e0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
41f0: 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20  store</b>, or a 
4200: 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c 74  platform default
4210: 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 65  .must be provide
4220: 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61  d in order to va
4230: 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20  lidate against. 
4240: 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e 20 54  The default in T
4250: 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61  clTLS 1.8 and.ea
4260: 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69  rlier versions i
4270: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  s <b class="cons
4280: 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e  t">false</b> sin
4290: 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66  ce not all platf
42a0: 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69 66  orms have certif
42b0: 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61  icates to.valida
42c0: 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20  te against in a 
42d0: 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20  form compatible 
42e0: 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74  with OpenSSL. St
42f0: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
4300: 20 32 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c   2.0,.the defaul
4310: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
4320: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66  onst">true</b> f
4330: 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63  or client connec
4340: 74 69 6f 6e 73 2e 0a 53 65 65 20 3c 73 70 61 6e  tions..See <span
4350: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22   class="sectref"
4360: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69  ><a href="#secti
4370: 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65  on4">Certificate
4380: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c   Validation</a><
4390: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20  /span> for more 
43a0: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  details.</p></dd
43b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
43c0: 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69 74  option">-securit
43d0: 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63  y_level</b> <i c
43e0: 6c 61 73 73 3d 22 61 72 67 22 3e 69 6e 74 65 67  lass="arg">integ
43f0: 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  er</i></dt>.<dd>
4400: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
4410: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20   security level 
4420: 28 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74 6f  (value from 0 to
4430: 20 35 29 2e 20 54 68 65 20 73 65 63 75 72 69 74   5). The securit
4440: 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a  y level affects.
4450: 74 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70 68  the allowed ciph
4460: 65 72 20 73 75 69 74 65 20 65 6e 63 72 79 70 74  er suite encrypt
4470: 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20  ion algorithms, 
4480: 73 75 70 70 6f 72 74 65 64 20 45 43 43 20 63 75  supported ECC cu
4490: 72 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64 20  rves,.supported 
44a0: 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69  signature algori
44b0: 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74  thms, DH paramet
44c0: 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66  er sizes, certif
44d0: 69 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73 0a  icate key sizes.
44e0: 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c  and signature al
44f0: 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 65  gorithms. The de
4500: 66 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72  fault is 1 prior
4510: 20 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20   to OpenSSL 3.2 
4520: 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65 72  and 2.thereafter
4530: 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69  . Level 3 and hi
4540: 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70  gher disable sup
4550: 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e  port for session
4560: 20 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e 6c   tickets and.onl
4570: 79 20 61 63 63 65 70 74 20 63 69 70 68 65 72 20  y accept cipher 
4580: 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f 76  suites that prov
4590: 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63 72  ide forward secr
45a0: 65 63 79 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e  ecy..This option
45b0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
45c0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
45d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
45e0: 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f  ption">-server</
45f0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4600: 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">bool</i></dt>.
4610: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
4620: 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74 20   whether to act 
4630: 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64 20  as a server and 
4640: 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73  respond with a s
4650: 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65 20  erver handshake 
4660: 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f  when a.client co
4670: 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69  nnects and provi
4680: 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e  des a client han
4690: 64 73 68 61 6b 65 2e 20 54 68 65 20 64 65 66 61  dshake. The defa
46a0: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
46b0: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62  "const">false</b
46c0: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  >.</p></dd>.<dt>
46d0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
46e0: 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62  ">-servername</b
46f0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4700: 3e 68 6f 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >hostname</i></d
4710: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
4720: 79 20 74 68 65 20 70 65 65 72 27 73 20 68 6f 73  y the peer's hos
4730: 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20 75  tname. This is u
4740: 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20 54  sed to set the T
4750: 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49  LS Server Name I
4760: 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20  ndication.(SNI) 
4770: 65 78 74 65 6e 73 69 6f 6e 2e 20 53 65 74 20 74  extension. Set t
4780: 68 69 73 20 74 6f 20 74 68 65 20 65 78 70 65 63  his to the expec
4790: 74 65 64 20 73 65 72 76 65 72 6e 61 6d 65 20 69  ted servername i
47a0: 6e 20 74 68 65 20 73 65 72 76 65 72 27 73 20 63  n the server's c
47b0: 65 72 74 69 66 69 63 61 74 65 0a 6f 72 20 6f 6e  ertificate.or on
47c0: 65 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74  e of the Subject
47d0: 20 41 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65 73   Alternate Names
47e0: 20 28 53 41 4e 29 2e 20 53 74 61 72 74 69 6e 67   (SAN). Starting
47f0: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20   in TclTLS 2.0, 
4800: 74 68 69 73 20 77 69 6c 6c 0a 64 65 66 61 75 6c  this will.defaul
4810: 74 20 74 6f 20 74 68 65 20 68 6f 73 74 20 66 72  t to the host fr
4820: 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  om the <b class=
4830: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
4840: 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c 2f  t</b> command.</
4850: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
4860: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
4870: 65 73 73 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69  ession_id</b> <i
4880: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e   class="arg">bin
4890: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  ary_string</i></
48a0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
48b0: 66 69 65 73 20 74 68 65 20 73 65 73 73 69 6f 6e  fies the session
48c0: 20 69 64 20 74 6f 20 72 65 73 75 6d 65 20 61 20   id to resume a 
48d0: 73 65 73 73 69 6f 6e 2e 20 4e 6f 74 20 73 75 70  session. Not sup
48e0: 70 6f 72 74 65 64 20 79 65 74 2e 0a 54 68 69 73  ported yet..This
48f0: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66   option is new f
4900: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
4910: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
4920: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
4930: 73 6c 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  sl2</b> <i class
4940: 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c  ="arg">bool</i><
4950: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62  /dt>.<dd><p>Enab
4960: 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32  le use of SSL v2
4970: 2e 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20  .The default is 
4980: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4990: 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4f 70 65 6e  >false</b>..Open
49a0: 53 53 4c 20 31 2e 31 2b 20 6e 6f 20 6c 6f 6e 67  SSL 1.1+ no long
49b0: 65 72 20 73 75 70 70 6f 72 74 73 20 53 53 4c 20  er supports SSL 
49c0: 76 32 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 20  v2, so this may 
49d0: 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 65 66 66  not have any eff
49e0: 65 63 74 2e 0a 53 65 65 20 74 68 65 20 3c 62 20  ect..See the <b 
49f0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
4a00: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63  :protocols</b> c
4a10: 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70 6f  ommand for suppo
4a20: 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c  rted protocols.<
4a30: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4a40: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4a50: 73 73 6c 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ssl3</b> <i clas
4a60: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
4a70: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61  </dt>.<dd><p>Ena
4a80: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
4a90: 33 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69  3. The default i
4aa0: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  s <b class="cons
4ab0: 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 20 53 74  t">false</b>. St
4ac0: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
4ad0: 20 31 2e 38 2c 0a 75 73 65 20 6f 66 20 53 53 4c   1.8,.use of SSL
4ae0: 20 76 33 20 69 66 20 6f 6e 6c 79 20 61 76 61 69   v3 if only avai
4af0: 6c 61 62 6c 65 20 76 69 61 20 61 20 63 6f 6d 70  lable via a comp
4b00: 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 2e  ile time option.
4b10: 0a 4f 70 65 6e 53 53 4c 20 34 2e 30 2b 20 6e 6f  .OpenSSL 4.0+ no
4b20: 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f 72 74 73   longer supports
4b30: 20 53 53 4c 20 76 33 2c 20 73 6f 20 74 68 69 73   SSL v3, so this
4b40: 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61 6e   may not have an
4b50: 79 20 65 66 66 65 63 74 2e 0a 53 65 65 20 74 68  y effect..See th
4b60: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
4b70: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
4b80: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20  /b> command for 
4b90: 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63  supported protoc
4ba0: 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ols.</p></dd>.<d
4bb0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
4bc0: 6f 6e 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69  on">-tls1</b> <i
4bd0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
4be0: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
4bf0: 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20  p>Enable use of 
4c00: 54 4c 53 20 76 31 2e 20 53 74 61 72 74 69 6e 67  TLS v1. Starting
4c10: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20   in TclTLS 2.0, 
4c20: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
4c30: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4c40: 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a  false</b>..Note:
4c50: 20 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20 53   TLS 1.0 needs S
4c60: 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20  HA1 to operate, 
4c70: 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76  which is only av
4c80: 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72  ailable in secur
4c90: 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20  ity level.0 for 
4ca0: 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53  Open SSL 3.0+. S
4cb0: 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ee the <b class=
4cc0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69  "option">-securi
4cd0: 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 6f 70 74  ty_level</b> opt
4ce0: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ion.</p></dd>.<d
4cf0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
4d00: 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e 20  on">-tls1.1</b> 
4d10: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
4d20: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
4d30: 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  ><p>Enable use o
4d40: 66 20 54 4c 53 20 76 31 2e 31 2e 20 53 74 61 72  f TLS v1.1. Star
4d50: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32  ting in TclTLS 2
4d60: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20  .0, the default 
4d70: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4d80: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e  st">false</b>..N
4d90: 6f 74 65 3a 20 54 4c 53 20 31 2e 31 20 6e 65 65  ote: TLS 1.1 nee
4da0: 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61  ds SHA1 to opera
4db0: 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c  te, which is onl
4dc0: 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73  y available in s
4dd0: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20  ecurity level.0 
4de0: 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30  for Open SSL 3.0
4df0: 2b 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c  +. See the <b cl
4e00: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65  ass="option">-se
4e10: 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e  curity_level</b>
4e20: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64   option.</p></dd
4e30: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
4e40: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32 3c  option">-tls1.2<
4e50: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
4e60: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
4e70: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75  .<dd><p>Enable u
4e80: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 2e 20  se of TLS v1.2. 
4e90: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  The default is <
4ea0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4eb0: 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64  true</b>.</p></d
4ec0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
4ed0: 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 33  "option">-tls1.3
4ee0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
4ef0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
4f00: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20  >.<dd><p>Enable 
4f10: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 2e  use of TLS v1.3.
4f20: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
4f30: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4f40: 3e 74 72 75 65 3c 2f 62 3e 2e 20 54 68 69 73 20  >true</b>. This 
4f50: 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c  is only availabl
4f60: 65 0a 73 74 61 72 74 69 6e 67 20 77 69 74 68 20  e.starting with 
4f70: 4f 70 65 6e 53 53 4c 20 31 2e 31 2e 31 20 61 6e  OpenSSL 1.1.1 an
4f80: 64 20 54 63 6c 54 4c 53 20 31 2e 37 2e 3c 2f 70  d TclTLS 1.7.</p
4f90: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
4fa0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
4fb0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
4fc0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4fd0: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64  >callback</i></d
4fe0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
4ff0: 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b  ies the callback
5000: 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f   command to invo
5010: 6b 65 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74  ke to validate t
5020: 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69 63  he peer certific
5030: 61 74 65 73 0a 61 6e 64 20 6f 74 68 65 72 20 63  ates.and other c
5040: 6f 6e 66 69 67 20 69 6e 66 6f 20 64 75 72 69 6e  onfig info durin
5050: 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e  g the protocol n
5060: 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 65  egotiation phase
5070: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 73  . This can be us
5080: 65 64 0a 62 79 20 54 43 4c 20 73 63 72 69 70 74  ed.by TCL script
5090: 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65  s to perform the
50a0: 69 72 20 6f 77 6e 20 43 65 72 74 69 66 69 63 61  ir own Certifica
50b0: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 20 74 6f  te Validation to
50c0: 20 73 75 70 70 6c 65 6d 65 6e 74 20 74 68 65 0a   supplement the.
50d0: 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69  default validati
50e0: 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79 20 4f  on provided by O
50f0: 70 65 6e 53 53 4c 2e 20 54 68 65 20 73 63 72 69  penSSL. The scri
5100: 70 74 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61  pt must return a
5110: 20 62 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74 6f   boolean true.to
5120: 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e 65   continue the ne
5130: 67 6f 74 69 61 74 69 6f 6e 2e 20 53 65 65 20 3c  gotiation. See <
5140: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
5150: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
5160: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63  ection5">Callbac
5170: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73  k Options</a></s
5180: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e  pan> for more in
5190: 66 6f 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20  fo..This option 
51a0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
51b0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
51c0: 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  </dl></dd>.<dt><
51d0: 61 20 6e 61 6d 65 3d 22 36 22 3e 3c 62 20 63 6c  a name="6"><b cl
51e0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68  ass="cmd">tls::h
51f0: 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20  andshake</b> <i 
5200: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
5210: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  nel</i></a></dt>
5220: 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 73 20 74  .<dd><p>Forces t
5230: 68 65 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 69  he TLS negotiati
5240: 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20  on handshake to 
5250: 74 61 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 64  take place immed
5260: 69 61 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 75  iately, and retu
5270: 72 6e 73 20 30 0a 69 66 20 68 61 6e 64 73 68 61  rns 0.if handsha
5280: 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70  ke is still in p
5290: 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f  rogress (non-blo
52a0: 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 20  cking), or 1 if 
52b0: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61  the handshake wa
52c0: 73 0a 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66  s.successful. If
52d0: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66   the handshake f
52e0: 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 20  ailed, an error 
52f0: 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64  will be returned
5300: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5310: 61 20 6e 61 6d 65 3d 22 37 22 3e 3c 62 20 63 6c  a name="7"><b cl
5320: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73  ass="cmd">tls::s
5330: 68 75 74 64 6f 77 6e 3c 2f 62 3e 20 3c 69 20 63  hutdown</b> <i c
5340: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
5350: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  el</i></a></dt>.
5360: 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  <dd></dd>.<dt><a
5370: 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 20 63 6c 61   name="8"><b cla
5380: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e  ss="cmd">tls::un
5390: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
53a0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
53b0: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  l</i></a></dt>.<
53c0: 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20  dd></dd>.<dt><a 
53d0: 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 63 6c 61 73  name="9"><b clas
53e0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 73  s="cmd">tls::uns
53f0: 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tack</b> <i clas
5400: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
5410: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  /i></a></dt>.<dd
5420: 3e 3c 70 3e 54 68 69 73 20 74 65 72 6d 69 6e 61  ><p>This termina
5430: 74 65 73 20 74 68 65 20 53 53 4c 2f 54 4c 53 20  tes the SSL/TLS 
5440: 73 65 73 73 69 6f 6e 20 62 79 20 73 65 6e 64 69  session by sendi
5450: 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63 6c 6f  ng the &quot;clo
5460: 73 65 5f 6e 6f 74 69 66 79 26 71 75 6f 74 3b 20  se_notify&quot; 
5470: 6d 65 73 73 61 67 65 20 61 6e 64 0a 72 65 6d 6f  message and.remo
5480: 76 65 73 20 74 68 65 20 74 6f 70 20 6c 65 76 65  ves the top leve
5490: 6c 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65  l stacked channe
54a0: 6c 20 66 72 6f 6d 20 3c 69 20 63 6c 61 73 73 3d  l from <i class=
54b0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
54c0: 3e 2c 20 62 75 74 20 69 74 20 64 6f 65 73 20 6e  >, but it does n
54d0: 6f 74 20 63 6c 6f 73 65 0a 74 68 65 20 73 6f 63  ot close.the soc
54e0: 6b 65 74 2e 20 49 74 20 69 73 20 74 68 65 20 63  ket. It is the c
54f0: 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 3c 62 20  ompliment to <b 
5500: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
5510: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 62 79 20 65  :import</b> by e
5520: 6e 64 69 6e 67 20 65 6e 63 72 79 70 74 69 6f 6e  nding encryption
5530: 20 6f 66 0a 61 20 54 43 4c 20 63 68 61 6e 6e 65   of.a TCL channe
5540: 6c 2e 20 41 6e 20 65 72 72 6f 72 20 69 73 20 74  l. An error is t
5550: 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20  hrown if TLS is 
5560: 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 63  not the top stac
5570: 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65  ked channel type
5580: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5590: 61 20 6e 61 6d 65 3d 22 31 30 22 3e 3c 62 20 63  a name="10"><b c
55a0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
55b0: 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70 61 6e  status</b> <span
55c0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 62   class="opt">?<b
55d0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
55e0: 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61  -local</b>?</spa
55f0: 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  n> <i class="arg
5600: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
5610: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65  ></dt>.<dd><p>Re
5620: 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e  turns the curren
5630: 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53  t status of an S
5640: 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20  SL channel. The 
5650: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74  result is a list
5660: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 0a 70 61   of key-value.pa
5670: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74  irs describing t
5680: 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69 63  he SSL, certific
5690: 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66 69  ate, and certifi
56a0: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f  cate verificatio
56b0: 6e 20 73 74 61 74 75 73 2e 20 49 66 0a 74 68 65  n status. If.the
56c0: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 68   SSL handshake h
56d0: 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c  as not yet compl
56e0: 65 74 65 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c  eted, an empty l
56f0: 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 2e  ist is returned.
5700: 20 49 66 20 74 68 65 0a 3c 62 20 63 6c 61 73 73   If the.<b class
5710: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c  ="option">-local
5720: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73  </b> option is s
5730: 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74  pecified, then t
5740: 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69  he local certifi
5750: 63 61 74 65 20 69 73 20 75 73 65 64 2e 0a 52 65  cate is used..Re
5760: 74 75 72 6e 65 64 20 76 61 6c 75 65 73 20 69 6e  turned values in
5770: 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53  clude:</p>.<p>SS
5780: 4c 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c  L Status</p>.<dl
5790: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
57a0: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c  _definitions">.<
57b0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
57c0: 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20  iable">alpn</b> 
57d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70  <i class="arg">p
57e0: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  rotocol</i></dt>
57f0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74  .<dd><p>The prot
5800: 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66  ocol selected af
5810: 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d  ter Application-
5820: 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e  Layer Protocol N
5830: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e  egotiation (ALPN
5840: 29 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  )..This value is
5850: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
5860: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
5870: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5880: 61 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e  able">cipher</b>
5890: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
58a0: 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a  cipher</i></dt>.
58b0: 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65  <dd><p>The curre
58c0: 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65  nt cipher in use
58d0: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e   for the session
58e0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
58f0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5900: 65 22 3e 70 65 65 72 6e 61 6d 65 3c 2f 62 3e 20  e">peername</b> 
5910: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
5920: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ame</i></dt>.<dd
5930: 3e 3c 70 3e 54 68 65 20 70 65 65 72 6e 61 6d 65  ><p>The peername
5940: 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 69 66   from the certif
5950: 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75  icate..This valu
5960: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
5970: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
5980: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5990: 76 61 72 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63  variable">protoc
59a0: 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ol</b> <i class=
59b0: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69  "arg">version</i
59c0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
59d0: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69  e protocol versi
59e0: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  on used for the 
59f0: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32  connection: SSL2
5a00: 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c  , SSL3, TLS1, TL
5a10: 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 0a 54 4c  S1.1, TLS1.2,.TL
5a20: 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e  S1.3, or unknown
5a30: 2e 20 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  . This value is 
5a40: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
5a50: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
5a60: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5a70: 62 6c 65 22 3e 73 62 69 74 73 3c 2f 62 3e 20 3c  ble">sbits</b> <
5a80: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c  i class="arg">n<
5a90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5aa0: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 62 69  The number of bi
5ab0: 74 73 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  ts used for the 
5ac0: 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c 2f 70 3e  session key.</p>
5ad0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5ae0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69  ss="variable">si
5af0: 67 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f 72  gnatureHashAlgor
5b00: 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ithm</b> <i clas
5b10: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68  s="arg">algorith
5b20: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  m</i></dt>.<dd><
5b30: 70 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20  p>The signature 
5b40: 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e 0a  hash algorithm..
5b50: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
5b60: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
5b70: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5b80: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5b90: 65 22 3e 73 69 67 6e 61 74 75 72 65 54 79 70 65  e">signatureType
5ba0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5bb0: 72 67 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74  rg">type</i></dt
5bc0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67  >.<dd><p>The sig
5bd0: 6e 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75  nature type valu
5be0: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  e..This value is
5bf0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
5c00: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
5c10: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5c20: 61 62 6c 65 22 3e 76 65 72 69 66 79 44 65 70 74  able">verifyDept
5c30: 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  h</b> <i class="
5c40: 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  arg">n</i></dt>.
5c50: 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d 75 6d 20 64  <dd><p>Maximum d
5c60: 65 70 74 68 20 66 6f 72 20 74 68 65 20 63 65 72  epth for the cer
5c70: 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 20 76  tificate chain v
5c80: 65 72 69 66 69 63 61 74 69 6f 6e 2e 20 44 65 66  erification. Def
5c90: 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20 63  ault is -1, to c
5ca0: 68 65 63 6b 20 61 6c 6c 2e 0a 54 68 69 73 20 76  heck all..This v
5cb0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
5cc0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
5cd0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5ce0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72  s="variable">ver
5cf0: 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63  ifyMode</b> <i c
5d00: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c  lass="arg">list<
5d10: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5d20: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63  List of certific
5d30: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
5d40: 20 6d 6f 64 65 73 2e 0a 54 68 69 73 20 76 61 6c   modes..This val
5d50: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5d60: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5d70: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5d80: 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66  "variable">verif
5d90: 79 52 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20 63  yResult</b> <i c
5da0: 6c 61 73 73 3d 22 61 72 67 22 3e 72 65 73 75 6c  lass="arg">resul
5db0: 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  t</i></dt>.<dd><
5dc0: 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 76 65  p>Certificate ve
5dd0: 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c  rification resul
5de0: 74 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  t..This value is
5df0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
5e00: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
5e10: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5e20: 61 62 6c 65 22 3e 63 61 5f 6e 61 6d 65 73 3c 2f  able">ca_names</
5e30: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5e40: 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">list</i></dt>.
5e50: 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 74  <dd><p>List of t
5e60: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
5e70: 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20  uthorities used 
5e80: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65  to create the ce
5e90: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20  rtificate..This 
5ea0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
5eb0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
5ec0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43  </dd>.</dl>.<p>C
5ed0: 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75  ertificate Statu
5ee0: 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  s</p>.<dl class=
5ef0: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69  "doctools_defini
5f00: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
5f10: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5f20: 61 6c 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  all</b> <i class
5f30: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
5f40: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 75  ></dt>.<dd><p>Du
5f50: 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66  mp of all certif
5f60: 69 63 61 74 65 20 69 6e 66 6f 2e 0a 54 68 69 73  icate info..This
5f70: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
5f80: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
5f90: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5fa0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76  ass="variable">v
5fb0: 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c  ersion</b> <i cl
5fc0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
5fd0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5fe0: 54 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  The certificate 
5ff0: 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64  version.</p></dd
6000: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6010: 76 61 72 69 61 62 6c 65 22 3e 73 65 72 69 61 6c  variable">serial
6020: 4e 75 6d 62 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  Number</b> <i cl
6030: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
6040: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6050: 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d 62  >The serial numb
6060: 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  er of the certif
6070: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
6080: 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75  tring..This valu
6090: 65 20 77 61 73 20 63 68 61 6e 67 65 64 20 66 72  e was changed fr
60a0: 6f 6d 20 73 65 72 69 61 6c 20 69 6e 20 54 63 6c  om serial in Tcl
60b0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
60c0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
60d0: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
60e0: 75 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ure</b> <i class
60f0: 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d  ="arg">algorithm
6100: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6110: 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68  >Cipher algorith
6120: 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69  m used for certi
6130: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
6140: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
6150: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
6160: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
6170: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6180: 62 6c 65 22 3e 69 73 73 75 65 72 3c 2f 62 3e 20  ble">issuer</b> 
6190: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
61a0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
61b0: 64 64 3e 3c 70 3e 54 68 65 20 64 69 73 74 69 6e  dd><p>The distin
61c0: 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e  guished name (DN
61d0: 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  ) of the certifi
61e0: 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 70 3e  cate issuer.</p>
61f0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6200: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 6f  ss="variable">no
6210: 74 42 65 66 6f 72 65 3c 2f 62 3e 20 3c 69 20 63  tBefore</b> <i c
6220: 6c 61 73 73 3d 22 61 72 67 22 3e 64 61 74 65 3c  lass="arg">date<
6230: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6240: 54 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 64 61  The beginning da
6250: 74 65 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  te of the certif
6260: 69 63 61 74 65 20 76 61 6c 69 64 69 74 79 2e 3c  icate validity.<
6270: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6280: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6290: 3e 6e 6f 74 41 66 74 65 72 3c 2f 62 3e 20 3c 69  >notAfter</b> <i
62a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 61 74   class="arg">dat
62b0: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
62c0: 70 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e  p>The expiration
62d0: 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65 72   date of the cer
62e0: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69 74  tificate validit
62f0: 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  y.</p></dd>.<dt>
6300: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6310: 6c 65 22 3e 73 75 62 6a 65 63 74 3c 2f 62 3e 20  le">subject</b> 
6320: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
6330: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
6340: 64 64 3e 3c 70 3e 54 68 65 20 64 69 73 74 69 6e  dd><p>The distin
6350: 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e  guished name (DN
6360: 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  ) of the certifi
6370: 63 61 74 65 20 73 75 62 6a 65 63 74 2e 20 46 69  cate subject. Fi
6380: 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f  elds include: Co
6390: 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 4e 29 2c 20  mmon.Name (CN), 
63a0: 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29  Organization (O)
63b0: 2c 20 4c 6f 63 61 6c 69 74 79 20 6f 72 20 43 69  , Locality or Ci
63c0: 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f 72  ty (L), State or
63d0: 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20 61   Province (S), a
63e0: 6e 64 0a 43 6f 75 6e 74 72 79 20 4e 61 6d 65 20  nd.Country Name 
63f0: 28 43 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  (C).</p></dd>.<d
6400: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6410: 61 62 6c 65 22 3e 69 73 73 75 65 72 55 6e 69 71  able">issuerUniq
6420: 75 65 49 44 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ueID</b> <i clas
6430: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
6440: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
6450: 68 65 20 69 73 73 75 65 72 20 75 6e 69 71 75 65  he issuer unique
6460: 20 69 64 2e 0a 54 68 69 73 20 76 61 6c 75 65 20   id..This value 
6470: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6480: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6490: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
64a0: 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 55  riable">subjectU
64b0: 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20 63  niqueID</b> <i c
64c0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e  lass="arg">strin
64d0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
64e0: 70 3e 54 68 65 20 73 75 62 6a 65 63 74 20 75 6e  p>The subject un
64f0: 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20 76 61  ique id..This va
6500: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
6510: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
6520: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6530: 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 75 6d 5f  ="variable">num_
6540: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20 3c  extensions</b> <
6550: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c  i class="arg">n<
6560: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6570: 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66  Number of certif
6580: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73  icate extensions
6590: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
65a0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
65b0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
65c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
65d0: 62 6c 65 22 3e 65 78 74 65 6e 73 69 6f 6e 73 3c  ble">extensions<
65e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
65f0: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e  g">list</i></dt>
6600: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20  .<dd><p>List of 
6610: 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65  certificate exte
6620: 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e 0a 54 68 69  nsion names..Thi
6630: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
6640: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
6650: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6660: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6670: 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65 6e  authorityKeyIden
6680: 74 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  tifier</b> <i cl
6690: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
66a0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
66b0: 3e 41 75 74 68 6f 72 69 74 79 20 4b 65 79 20 49  >Authority Key I
66c0: 64 65 6e 74 69 66 69 65 72 20 28 41 4b 49 29 20  dentifier (AKI) 
66d0: 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67 20 43  of the Issuing C
66e0: 41 20 63 65 72 74 69 66 69 63 61 74 65 20 74 68  A certificate th
66f0: 61 74 20 73 69 67 6e 65 64 20 74 68 65 0a 53 53  at signed the.SS
6700: 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  L certificate as
6710: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54   a hex string. T
6720: 68 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65  his value matche
6730: 73 20 74 68 65 20 53 4b 49 20 76 61 6c 75 65 20  s the SKI value 
6740: 6f 66 20 74 68 65 0a 49 6e 74 65 72 6d 65 64 69  of the.Intermedi
6750: 61 74 65 20 43 41 20 63 65 72 74 69 66 69 63 61  ate CA certifica
6760: 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  te..This value i
6770: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
6780: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
6790: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
67a0: 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 4b 65  iable">subjectKe
67b0: 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20  yIdentifier</b> 
67c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
67d0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
67e0: 64 64 3e 3c 70 3e 53 75 62 6a 65 63 74 20 4b 65  dd><p>Subject Ke
67f0: 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b  y Identifier (SK
6800: 49 29 20 68 61 73 68 20 6f 66 20 74 68 65 20 70  I) hash of the p
6810: 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65  ublic key inside
6820: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
6830: 20 61 73 20 61 0a 68 65 78 20 73 74 72 69 6e 67   as a.hex string
6840: 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 69  . Used to identi
6850: 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73 20  fy certificates 
6860: 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 70  that contain a p
6870: 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69 63  articular public
6880: 20 6b 65 79 2e 0a 54 68 69 73 20 76 61 6c 75 65   key..This value
6890: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
68a0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
68b0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
68c0: 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74  ariable">subject
68d0: 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63  AltName</b> <i c
68e0: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c  lass="arg">list<
68f0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6900: 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74  List of all of t
6910: 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72  he Subject Alter
6920: 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 28 53 41  native Names (SA
6930: 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 64 6f 6d  N) including dom
6940: 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 0a 64  ain names, sub.d
6950: 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 50 20 61  omains, and IP a
6960: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72  ddresses that ar
6970: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65  e secured by the
6980: 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68   certificate..Th
6990: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20  is value is new 
69a0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
69b0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
69c0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
69d0: 3e 6f 63 73 70 3c 2f 62 3e 20 3c 69 20 63 6c 61  >ocsp</b> <i cla
69e0: 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69  ss="arg">list</i
69f0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69  ></dt>.<dd><p>Li
6a00: 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65  st of all Online
6a10: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61   Certificate Sta
6a20: 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43  tus Protocol (OC
6a30: 53 50 29 20 55 52 4c 73 20 74 68 61 74 20 63 61  SP) URLs that ca
6a40: 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 63 68 65  n be used to.che
6a50: 63 6b 20 74 68 65 20 76 61 6c 69 64 69 74 79 20  ck the validity 
6a60: 6f 66 20 74 68 69 73 20 63 65 72 74 69 66 69 63  of this certific
6a70: 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  ate..This value 
6a80: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6a90: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6aa0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6ab0: 72 69 61 62 6c 65 22 3e 63 65 72 74 69 66 69 63  riable">certific
6ac0: 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ate</b> <i class
6ad0: 3d 22 61 72 67 22 3e 63 65 72 74 3c 2f 69 3e 3c  ="arg">cert</i><
6ae0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
6af0: 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 74  PEM encoded cert
6b00: 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64  ificate.</p></dd
6b10: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6b20: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
6b30: 75 72 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e  ureAlgorithm</b>
6b40: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6b50: 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64  algorithm</i></d
6b60: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72  t>.<dd><p>Cipher
6b70: 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20   algorithm used 
6b80: 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63  for the certific
6b90: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 0a 54  ate signature..T
6ba0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
6bb0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
6bc0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6bd0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6be0: 22 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65  ">signatureValue
6bf0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6c00: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
6c10: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69  dt>.<dd><p>Certi
6c20: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
6c30: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67   as a hex string
6c40: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
6c50: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
6c60: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
6c70: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6c80: 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 44 69  ble">signatureDi
6c90: 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  gest</b> <i clas
6ca0: 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c  s="arg">version<
6cb0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6cc0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
6cd0: 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61 20  ing digest as a 
6ce0: 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73  hex string..This
6cf0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6d00: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6d10: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6d20: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70  ass="variable">p
6d30: 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68  ublicKeyAlgorith
6d40: 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  m</b> <i class="
6d50: 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f  arg">algorithm</
6d60: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43  i></dt>.<dd><p>C
6d70: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
6d80: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20  ture public key 
6d90: 61 6c 67 6f 72 69 74 68 6d 2e 0a 54 68 69 73 20  algorithm..This 
6da0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
6db0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
6dc0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6dd0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 75  ss="variable">pu
6de0: 62 6c 69 63 4b 65 79 3c 2f 62 3e 20 3c 69 20 63  blicKey</b> <i c
6df0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e  lass="arg">strin
6e00: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
6e10: 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69  p>Certificate si
6e20: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b  gnature public k
6e30: 65 79 20 61 73 20 61 20 68 65 78 20 73 74 72 69  ey as a hex stri
6e40: 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  ng..This value i
6e50: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
6e60: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
6e70: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6e80: 69 61 62 6c 65 22 3e 62 69 74 73 3c 2f 62 3e 20  iable">bits</b> 
6e90: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
6ea0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6eb0: 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20  >Number of bits 
6ec0: 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69  used for certifi
6ed0: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b  cate signature k
6ee0: 65 79 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  ey..This value i
6ef0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
6f00: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
6f10: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6f20: 69 61 62 6c 65 22 3e 73 65 6c 66 5f 73 69 67 6e  iable">self_sign
6f30: 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ed</b> <i class=
6f40: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69  "arg">boolean</i
6f50: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68  ></dt>.<dd><p>Wh
6f60: 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 66  ether the certif
6f70: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
6f80: 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 0a  is self signed..
6f90: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
6fa0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
6fb0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
6fc0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
6fd0: 65 22 3e 73 68 61 31 5f 68 61 73 68 3c 2f 62 3e  e">sha1_hash</b>
6fe0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6ff0: 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  hash</i></dt>.<d
7000: 64 3e 3c 70 3e 54 68 65 20 53 48 41 31 20 68 61  d><p>The SHA1 ha
7010: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
7020: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
7030: 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75  tring..This valu
7040: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
7050: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
7060: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7070: 76 61 72 69 61 62 6c 65 22 3e 73 68 61 32 35 36  variable">sha256
7080: 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61  _hash</b> <i cla
7090: 73 73 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f 69  ss="arg">hash</i
70a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
70b0: 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f 66  e SHA256 hash of
70c0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
70d0: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67   as a hex string
70e0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
70f0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
7100: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  .8.</p></dd>.</d
7110: 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  l></dd>.<dt><a n
7120: 61 6d 65 3d 22 31 31 22 3e 3c 62 20 63 6c 61 73  ame="11"><b clas
7130: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 6f 6e  s="cmd">tls::con
7140: 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63  nection</b> <i c
7150: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
7160: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  el</i></a></dt>.
7170: 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74  <dd><p>Returns t
7180: 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65  he current conne
7190: 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20  ction status of 
71a0: 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20  an SSL channel. 
71b0: 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20  The result is a 
71c0: 6c 69 73 74 0a 6f 66 20 6b 65 79 2d 76 61 6c 75  list.of key-valu
71d0: 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62 69  e pairs describi
71e0: 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  ng the connectio
71f0: 6e 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20  n..This command 
7200: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
7210: 53 20 31 2e 38 2e 20 52 65 74 75 72 6e 65 64 20  S 1.8. Returned 
7220: 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c  values include:<
7230: 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75  /p>.<p>SSL Statu
7240: 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  s</p>.<dl class=
7250: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69  "doctools_defini
7260: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
7270: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
7280: 73 74 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  state</b> <i cla
7290: 73 73 3d 22 61 72 67 22 3e 73 74 61 74 65 3c 2f  ss="arg">state</
72a0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
72b0: 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e  tate of the conn
72c0: 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ection.</p></dd>
72d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
72e0: 61 72 69 61 62 6c 65 22 3e 73 65 72 76 65 72 6e  ariable">servern
72f0: 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ame</b> <i class
7300: 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c  ="arg">name</i><
7310: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
7320: 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e  name of the conn
7330: 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 72 2e  ected to server.
7340: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7350: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7360: 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c  ">protocol</b> <
7370: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
7380: 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rsion</i></dt>.<
7390: 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63  dd><p>The protoc
73a0: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20  ol version used 
73b0: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  for the connecti
73c0: 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20  on: SSL2, SSL3, 
73d0: 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c  TLS1, TLS1.1, TL
73e0: 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72  S1.2, TLS1.3, or
73f0: 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f 64   unknown.</p></d
7400: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7410: 22 76 61 72 69 61 62 6c 65 22 3e 72 65 6e 65 67  "variable">reneg
7420: 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64  otiation_allowed
7430: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7440: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
7450: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74  /dt>.<dd><p>Whet
7460: 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e  her protocol ren
7470: 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75  egotiation is su
7480: 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c  pported or not.<
7490: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
74a0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
74b0: 3e 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c  >security_level<
74c0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
74d0: 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e 3c 2f 64 74  g">level</i></dt
74e0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 63  >.<dd><p>The sec
74f0: 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64  urity level used
7500: 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f   for selection o
7510: 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73  f ciphers, key s
7520: 69 7a 65 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64  ize, etc.</p></d
7530: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7540: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69  "variable">sessi
7550: 6f 6e 5f 72 65 75 73 65 64 3c 2f 62 3e 20 3c 69  on_reused</b> <i
7560: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
7570: 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  lean</i></dt>.<d
7580: 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65  d><p>Whether the
7590: 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65   session has bee
75a0: 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e  n reused or not.
75b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
75c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
75d0: 22 3e 69 73 5f 73 65 72 76 65 72 3c 2f 62 3e 20  ">is_server</b> 
75e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
75f0: 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  oolean</i></dt>.
7600: 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74  <dd><p>Whether t
7610: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73  he connection is
7620: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61   configured as a
7630: 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63   server (1) or c
7640: 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 70 3e 3c 2f  lient (0).</p></
7650: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7660: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 6f 6d 70  ="variable">comp
7670: 72 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63  ression</b> <i c
7680: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c  lass="arg">mode<
7690: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
76a0: 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68  Compression meth
76b0: 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  od.</p></dd>.<dt
76c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
76d0: 62 6c 65 22 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f  ble">expansion</
76e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
76f0: 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">mode</i></dt>.
7700: 3c 64 64 3e 3c 70 3e 45 78 70 61 6e 73 69 6f 6e  <dd><p>Expansion
7710: 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64   method.</p></dd
7720: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7730: 76 61 72 69 61 62 6c 65 22 3e 63 61 4c 69 73 74  variable">caList
7740: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7750: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74  rg">list</i></dt
7760: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66  >.<dd><p>List of
7770: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
7780: 68 6f 72 69 74 69 65 73 20 28 43 41 29 20 66 6f  horities (CA) fo
7790: 72 20 58 2e 35 30 39 20 63 65 72 74 69 66 69 63  r X.509 certific
77a0: 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  ate.</p></dd>.</
77b0: 64 6c 3e 0a 3c 70 3e 43 69 70 68 65 72 20 49 6e  dl>.<p>Cipher In
77c0: 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  fo</p>.<dl class
77d0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e  ="doctools_defin
77e0: 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  itions">.<dt><b 
77f0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7800: 3e 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63  >cipher</b> <i c
7810: 6c 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65  lass="arg">ciphe
7820: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
7830: 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69  p>The current ci
7840: 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20  pher in use for 
7850: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c  the connection.<
7860: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7870: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7880: 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f  >standard_name</
7890: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
78a0: 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">name</i></dt>.
78b0: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 6e 64  <dd><p>The stand
78c0: 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20  ard RFC name of 
78d0: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
78e0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
78f0: 61 72 69 61 62 6c 65 22 3e 61 6c 67 6f 72 69 74  ariable">algorit
7900: 68 6d 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63  hm_bits</b> <i c
7910: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e  lass="arg">n</i>
7920: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
7930: 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65   number of proce
7940: 73 73 65 64 20 62 69 74 73 20 75 73 65 64 20 66  ssed bits used f
7950: 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f  or cipher.</p></
7960: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7970: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 63 72  ="variable">secr
7980: 65 74 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63  et_bits</b> <i c
7990: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e  lass="arg">n</i>
79a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
79b0: 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65   number of secre
79c0: 74 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  t bits used for 
79d0: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
79e0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
79f0: 61 72 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 65 72  ariable">min_ver
7a00: 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  sion</b> <i clas
7a10: 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c  s="arg">version<
7a20: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
7a30: 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74  The minimum prot
7a40: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72  ocol version for
7a50: 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64   cipher.</p></dd
7a60: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7a70: 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72  variable">cipher
7a80: 5f 69 73 5f 61 65 61 64 3c 2f 62 3e 20 3c 69 20  _is_aead</b> <i 
7a90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
7aa0: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ean</i></dt>.<dd
7ab0: 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20  ><p>Whether the 
7ac0: 63 69 70 68 65 72 20 69 73 20 41 75 74 68 65 6e  cipher is Authen
7ad0: 74 69 63 61 74 65 64 20 45 6e 63 72 79 70 74 69  ticated Encrypti
7ae0: 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 69 61 74  on with Associat
7af0: 65 64 20 44 61 74 61 20 28 41 45 41 44 29 2e 3c  ed Data (AEAD).<
7b00: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7b10: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7b20: 3e 63 69 70 68 65 72 5f 69 64 3c 2f 62 3e 20 3c  >cipher_id</b> <
7b30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 64  i class="arg">id
7b40: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7b50: 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 69 70  >The OpenSSL cip
7b60: 68 65 72 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e  her id.</p></dd>
7b70: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7b80: 61 72 69 61 62 6c 65 22 3e 64 65 73 63 72 69 70  ariable">descrip
7b90: 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tion</b> <i clas
7ba0: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
7bb0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41  i></dt>.<dd><p>A
7bc0: 20 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f   text descriptio
7bd0: 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e  n of the cipher.
7be0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7bf0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7c00: 22 3e 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65  ">handshake_dige
7c10: 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  st</b> <i class=
7c20: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69  "arg">boolean</i
7c30: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69  ></dt>.<dd><p>Di
7c40: 67 65 73 74 20 75 73 65 64 20 64 75 72 69 6e 67  gest used during
7c50: 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 70 3e 3c   handshake.</p><
7c60: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 53 65  /dd>.</dl>.<p>Se
7c70: 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 70 3e 0a 3c  ssion Info</p>.<
7c80: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
7c90: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
7ca0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7cb0: 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62  ariable">alpn</b
7cc0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7cd0: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64  >protocol</i></d
7ce0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72  t>.<dd><p>The pr
7cf0: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20  otocol selected 
7d00: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f  after Applicatio
7d10: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
7d20: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c   Negotiation (AL
7d30: 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  PN).</p></dd>.<d
7d40: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7d50: 61 62 6c 65 22 3e 72 65 73 75 6d 61 62 6c 65 3c  able">resumable<
7d60: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7d70: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f  g">boolean</i></
7d80: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68  dt>.<dd><p>Wheth
7d90: 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63  er the session c
7da0: 61 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72  an be resumed or
7db0: 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   not.</p></dd>.<
7dc0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7dd0: 69 61 62 6c 65 22 3e 73 74 61 72 74 5f 74 69 6d  iable">start_tim
7de0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
7df0: 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e  arg">seconds</i>
7e00: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 6d  </dt>.<dd><p>Tim
7e10: 65 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20  e since session 
7e20: 73 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e  started in secon
7e30: 64 73 20 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c  ds since epoch.<
7e40: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7e50: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7e60: 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69 20  >timeout</b> <i 
7e70: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f  class="arg">seco
7e80: 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  nds</i></dt>.<dd
7e90: 3e 3c 70 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e  ><p>Max duration
7ea0: 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73   of session in s
7eb0: 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69  econds before ti
7ec0: 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  me-out.</p></dd>
7ed0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7ee0: 61 72 69 61 62 6c 65 22 3e 6c 69 66 65 74 69 6d  ariable">lifetim
7ef0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
7f00: 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e  arg">seconds</i>
7f10: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73  </dt>.<dd><p>Ses
7f20: 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65  sion ticket life
7f30: 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63  time hint in sec
7f40: 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  onds.</p></dd>.<
7f50: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7f60: 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 69  iable">session_i
7f70: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
7f80: 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69  arg">binary_stri
7f90: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
7fa0: 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f  <p>Unique sessio
7fb0: 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20  n id for use in 
7fc0: 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73  resuming the ses
7fd0: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  sion.</p></dd>.<
7fe0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7ff0: 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 74  iable">session_t
8000: 69 63 6b 65 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  icket</b> <i cla
8010: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f  ss="arg">binary_
8020: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
8030: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65  <dd><p>Unique se
8040: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72  ssion ticket for
8050: 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67   use in resuming
8060: 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70   the session.</p
8070: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
8080: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74  ass="variable">t
8090: 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f  icket_app_data</
80a0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
80b0: 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  ">binary_string<
80c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
80d0: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74  Unique session t
80e0: 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f  icket applicatio
80f0: 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c 2f 64 64 3e  n data.</p></dd>
8100: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
8110: 61 72 69 61 62 6c 65 22 3e 6d 61 73 74 65 72 5f  ariable">master_
8120: 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  key</b> <i class
8130: 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74  ="arg">binary_st
8140: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
8150: 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73  d><p>Unique sess
8160: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c  ion master key.<
8170: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
8180: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
8190: 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d  >session_cache_m
81a0: 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ode</b> <i class
81b0: 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c  ="arg">mode</i><
81c0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 72 76  /dt>.<dd><p>Serv
81d0: 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63  er cache mode (c
81e0: 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f  lient, server, o
81f0: 72 20 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64 64  r both).</p></dd
8200: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
8210: 3e 3c 61 20 6e 61 6d 65 3d 22 31 32 22 3e 3c 62  ><a name="12"><b
8220: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
8230: 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73  ::ciphers</b> <s
8240: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
8250: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
8260: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73  protocol</i>?</s
8270: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
8280: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
8290: 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f  ="arg">verbose</
82a0: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
82b0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
82c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70   class="arg">sup
82d0: 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61  ported</i>?</spa
82e0: 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  n></a></dt>.<dd>
82f0: 3c 70 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 6f  <p>Without any o
8300: 70 74 69 6f 6e 73 2c 20 69 74 20 72 65 74 75 72  ptions, it retur
8310: 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c  ns a list of all
8320: 20 73 79 6d 6d 65 74 72 69 63 20 63 69 70 68 65   symmetric ciphe
8330: 72 73 20 66 6f 72 20 75 73 65 20 77 69 74 68 20  rs for use with 
8340: 74 68 65 0a 3c 69 20 63 6c 61 73 73 3d 22 61 72  the.<i class="ar
8350: 67 22 3e 2d 63 69 70 68 65 72 3c 2f 69 3e 20 6f  g">-cipher</i> o
8360: 70 74 69 6f 6e 2e 20 57 69 74 68 20 3c 69 20 63  ption. With <i c
8370: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f  lass="arg">proto
8380: 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c 79 20 74 68  col</i>, only th
8390: 65 20 63 69 70 68 65 72 73 20 73 75 70 70 6f 72  e ciphers suppor
83a0: 74 65 64 20 66 6f 72 20 74 68 61 74 0a 70 72 6f  ted for that.pro
83b0: 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 75 72 6e  tocol are return
83c0: 65 64 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63  ed. See the <b c
83d0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
83e0: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f  protocols</b> co
83f0: 6d 6d 61 6e 64 20 66 6f 72 20 74 68 65 20 73 75  mmand for the su
8400: 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c  pported.protocol
8410: 73 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22  s. If <i class="
8420: 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e  arg">verbose</i>
8430: 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73   is specified as
8440: 20 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72   true then a ver
8450: 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64  bose, human read
8460: 61 62 6c 65 0a 6c 69 73 74 20 69 73 20 72 65 74  able.list is ret
8470: 75 72 6e 65 64 20 77 69 74 68 20 61 64 64 69 74  urned with addit
8480: 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f  ional informatio
8490: 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e  n on the cipher.
84a0: 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61 72   If <i class="ar
84b0: 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e  g">supported</i>
84c0: 0a 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73  .is specified as
84d0: 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c 79   true, then only
84e0: 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70   the ciphers sup
84f0: 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f 74 6f  ported for proto
8500: 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c 69 73 74  col will be list
8510: 65 64 2e 0a 54 68 65 20 3c 69 20 63 6c 61 73 73  ed..The <i class
8520: 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64  ="arg">supported
8530: 3c 2f 69 3e 20 61 72 67 20 69 73 20 6e 65 77 20  </i> arg is new 
8540: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
8550: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20  /p></dd>.<dt><a 
8560: 6e 61 6d 65 3d 22 31 33 22 3e 3c 62 20 63 6c 61  name="13"><b cla
8570: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72  ss="cmd">tls::pr
8580: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c  otocols</b></a><
8590: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75  /dt>.<dd><p>Retu
85a0: 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 74 68  rns a list of th
85b0: 65 20 73 75 70 70 6f 72 74 65 64 20 53 53 4c 2f  e supported SSL/
85c0: 54 4c 53 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56  TLS protocols. V
85d0: 61 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a  alid values are:
85e0: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
85f0: 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 20 63  ">ssl2</b>, <b c
8600: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c  lass="const">ssl
8610: 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  3</b>, <b class=
8620: 22 63 6f 6e 73 74 22 3e 74 6c 73 31 3c 2f 62 3e  "const">tls1</b>
8630: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
8640: 74 22 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c  t">tls1.1</b>, <
8650: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
8660: 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20 61 6e 64 0a  tls1.2</b>, and.
8670: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
8680: 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61  >tls1.3</b>. Exa
8690: 63 74 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20  ct list depends 
86a0: 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69  on OpenSSL versi
86b0: 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 6c 65 20 74  on and compile t
86c0: 69 6d 65 20 66 6c 61 67 73 2e 0a 54 68 69 73 20  ime flags..This 
86d0: 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20 66  command is new f
86e0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
86f0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  p></dd>.<dt><a n
8700: 61 6d 65 3d 22 31 34 22 3e 3c 62 20 63 6c 61 73  ame="14"><b clas
8710: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72  s="cmd">tls::ver
8720: 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74  sion</b></a></dt
8730: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73  >.<dd><p>Returns
8740: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72   the OpenSSL ver
8750: 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 70 3e  sion string.</p>
8760: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69  </dd>.</dl>.</di
8770: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  v>.<div id="sect
8780: 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion4" class="doc
8790: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
87a0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
87b0: 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74  ion4">Certificat
87c0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
87d0: 3c 2f 68 32 3e 0a 3c 64 69 76 20 69 64 3d 22 73  </h2>.<div id="s
87e0: 75 62 73 65 63 74 69 6f 6e 31 22 20 63 6c 61 73  ubsection1" clas
87f0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
8800: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
8810: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 31  ame="subsection1
8820: 22 3e 50 4b 49 20 61 6e 64 20 43 65 72 74 69 66  ">PKI and Certif
8830: 69 63 61 74 65 73 3c 2f 61 3e 3c 2f 68 33 3e 0a  icates</a></h3>.
8840: 3c 70 3e 55 73 69 6e 67 20 74 68 65 20 50 75 62  <p>Using the Pub
8850: 6c 69 63 20 4b 65 79 20 49 6e 66 72 61 73 74 72  lic Key Infrastr
8860: 75 63 74 75 72 65 20 28 50 4b 49 29 2c 20 65 61  ucture (PKI), ea
8870: 63 68 20 75 73 65 72 20 63 72 65 61 74 65 73 20  ch user creates 
8880: 61 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 68  a private key th
8890: 61 74 0a 6f 6e 6c 79 20 74 68 65 79 20 6b 6e 6f  at.only they kno
88a0: 77 20 61 62 6f 75 74 20 61 6e 64 20 61 20 70 75  w about and a pu
88b0: 62 6c 69 63 20 6b 65 79 20 74 68 65 79 20 63 61  blic key they ca
88c0: 6e 20 65 78 63 68 61 6e 67 65 20 77 69 74 68 20  n exchange with 
88d0: 6f 74 68 65 72 73 20 66 6f 72 20 75 73 65 20 69  others for use i
88e0: 6e 0a 65 6e 63 72 79 70 74 69 6e 67 20 61 6e 64  n.encrypting and
88f0: 20 64 65 63 72 79 70 74 69 6e 67 20 64 61 74 61   decrypting data
8900: 2e 20 54 68 65 20 70 72 6f 63 65 73 73 20 69 73  . The process is
8910: 20 74 68 65 20 73 65 6e 64 65 72 20 65 6e 63 72   the sender encr
8920: 79 70 74 73 20 74 68 65 69 72 20 64 61 74 61 0a  ypts their data.
8930: 75 73 69 6e 67 20 74 68 65 69 72 20 70 72 69 76  using their priv
8940: 61 74 65 20 6b 65 79 20 61 6e 64 20 74 68 65 20  ate key and the 
8950: 72 65 63 65 69 76 65 72 27 73 20 70 75 62 6c 69  receiver's publi
8960: 63 20 6b 65 79 2e 20 54 68 65 20 64 61 74 61 20  c key. The data 
8970: 69 73 20 74 68 65 6e 20 73 65 6e 74 0a 74 6f 20  is then sent.to 
8980: 74 68 65 20 72 65 63 65 69 76 65 72 2e 20 49 6e  the receiver. In
8990: 20 61 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e 65   a similar manne
89a0: 72 2c 20 74 68 65 20 72 65 63 65 69 76 65 72 20  r, the receiver 
89b0: 75 73 65 73 20 74 68 65 69 72 20 70 72 69 76 61  uses their priva
89c0: 74 65 20 6b 65 79 20 61 6e 64 0a 74 68 65 20 73  te key and.the s
89d0: 65 6e 64 65 72 27 73 20 70 75 62 6c 69 63 20 6b  ender's public k
89e0: 65 79 20 74 6f 20 64 65 63 72 79 70 74 20 74 68  ey to decrypt th
89f0: 65 20 64 61 74 61 2e 20 54 68 69 73 20 70 72 6f  e data. This pro
8a00: 76 69 64 65 73 20 64 61 74 61 20 69 6e 74 65 67  vides data integ
8a10: 72 69 74 79 2c 20 74 6f 0a 65 6e 73 75 72 65 20  rity, to.ensure 
8a20: 74 68 65 20 64 61 74 61 20 63 61 6e 27 74 20 62  the data can't b
8a30: 65 20 76 69 65 77 65 64 20 6f 72 20 61 6c 74 65  e viewed or alte
8a40: 72 65 64 20 64 75 72 69 6e 67 20 74 72 61 6e 73  red during trans
8a50: 70 6f 72 74 2e 20 53 65 65 20 74 68 65 0a 3c 62  port. See the.<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 3c 2f 62 3e 20 61 6e 64 20 3c 62 20  -key</b> and <b 
8a80: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8a90: 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69  keyfile</b> opti
8aa0: 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73  ons for how to s
8ab0: 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61  pecify the priva
8ac0: 74 65 20 6b 65 79 2e 0a 41 6c 73 6f 20 73 65 65  te key..Also see
8ad0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
8ae0: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64  ption">-password
8af0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 66 6f 72 20  </b> option for 
8b00: 68 6f 77 20 74 6f 20 70 72 6f 76 69 64 65 20 74  how to provide t
8b10: 68 65 20 70 61 73 73 77 6f 72 64 2e 3c 2f 70 3e  he password.</p>
8b20: 0a 3c 70 3e 49 6e 20 6f 72 64 65 72 20 74 6f 20  .<p>In order to 
8b30: 70 72 6f 76 69 64 65 20 61 75 74 68 65 6e 74 69  provide authenti
8b40: 63 61 74 69 6f 6e 2c 20 69 2e 65 2e 20 65 6e 73  cation, i.e. ens
8b50: 75 72 69 6e 67 20 73 6f 6d 65 6f 6e 65 20 69 73  uring someone is
8b60: 20 77 68 6f 20 74 68 65 79 20 73 61 79 20 74 68   who they say th
8b70: 65 79 0a 61 72 65 2c 20 74 68 65 20 70 75 62 6c  ey.are, the publ
8b80: 69 63 20 6b 65 79 20 61 6e 64 20 75 73 65 72 20  ic key and user 
8b90: 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e 20 69  identification i
8ba0: 6e 66 6f 20 69 73 20 73 74 6f 72 65 64 20 69 6e  nfo is stored in
8bb0: 20 61 20 58 2e 35 30 39 0a 63 65 72 74 69 66 69   a X.509.certifi
8bc0: 63 61 74 65 20 61 6e 64 20 74 68 61 74 20 63 65  cate and that ce
8bd0: 72 74 69 66 69 63 61 74 65 20 69 73 20 61 75 74  rtificate is aut
8be0: 68 65 6e 74 69 63 61 74 65 64 20 28 69 2e 65 2e  henticated (i.e.
8bf0: 20 73 69 67 6e 65 64 29 20 62 79 20 61 20 43 65   signed) by a Ce
8c00: 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f 72  rtificate.Author
8c10: 69 74 79 20 28 43 41 29 2e 20 55 73 65 72 73 20  ity (CA). Users 
8c20: 63 61 6e 20 74 68 65 6e 20 65 78 63 68 61 6e 67  can then exchang
8c30: 65 20 74 68 65 73 65 20 63 65 72 74 69 66 69 63  e these certific
8c40: 61 74 65 73 20 64 75 72 69 6e 67 20 74 68 65 20  ates during the 
8c50: 54 4c 53 0a 69 6e 69 74 69 61 6c 69 7a 61 74 69  TLS.initializati
8c60: 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e 64 20 63  on process and c
8c70: 68 65 63 6b 20 74 68 65 6d 20 61 67 61 69 6e 73  heck them agains
8c80: 74 20 74 68 65 20 72 6f 6f 74 20 43 41 20 63 65  t the root CA ce
8c90: 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 65 6e  rtificates to en
8ca0: 73 75 72 65 0a 74 68 65 79 20 61 72 65 20 76 61  sure.they are va
8cb0: 6c 69 64 2e 20 54 68 69 73 20 69 73 20 68 61 6e  lid. This is han
8cc0: 64 6c 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20  dled by OpenSSL 
8cd0: 76 69 61 20 74 68 65 20 3c 62 20 63 6c 61 73 73  via the <b class
8ce0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65  ="option">-reque
8cf0: 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c 62 20 63 6c  st</b> and.<b cl
8d00: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65  ass="option">-re
8d10: 71 75 69 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  quire</b> option
8d20: 73 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c  s. See the <b cl
8d30: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
8d40: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  dir</b>, <b clas
8d50: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69  s="option">-cadi
8d60: 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c  r</b>, and.<b cl
8d70: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
8d80: 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  store</b> option
8d90: 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 65  s for how to spe
8da0: 63 69 66 79 20 77 68 65 72 65 20 74 6f 20 66 69  cify where to fi
8db0: 6e 64 20 74 68 65 20 43 41 20 63 65 72 74 69 66  nd the CA certif
8dc0: 69 63 61 74 65 73 2e 0a 4f 70 74 69 6f 6e 61 6c  icates..Optional
8dd0: 6c 79 2c 20 69 6e 20 61 20 66 75 74 75 72 65 20  ly, in a future 
8de0: 72 65 6c 65 61 73 65 2c 20 74 68 65 79 20 63 61  release, they ca
8df0: 6e 20 61 6c 73 6f 20 62 65 20 63 68 65 63 6b 65  n also be checke
8e00: 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 43 65  d against the Ce
8e10: 72 74 69 66 69 63 61 74 65 0a 52 65 76 6f 63 61  rtificate.Revoca
8e20: 74 69 6f 6e 20 4c 69 73 74 20 28 43 52 4c 29 20  tion List (CRL) 
8e30: 6f 66 20 72 65 76 6f 6b 65 64 20 63 65 72 74 69  of revoked certi
8e40: 66 69 63 61 74 65 73 2e 20 43 65 72 74 69 66 69  ficates. Certifi
8e50: 63 61 74 65 73 20 63 61 6e 20 61 6c 73 6f 20 62  cates can also b
8e60: 65 0a 73 65 6c 66 2d 73 69 67 6e 65 64 2c 20 62  e.self-signed, b
8e70: 75 74 20 74 68 65 79 20 61 72 65 20 62 79 20 64  ut they are by d
8e80: 65 66 61 75 6c 74 20 6e 6f 74 20 74 72 75 73 74  efault not trust
8e90: 65 64 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 64  ed unless you ad
8ea0: 64 20 74 68 65 6d 20 74 6f 20 79 6f 75 72 0a 63  d them to your.c
8eb0: 65 72 74 69 66 69 63 61 74 65 20 73 74 6f 72 65  ertificate store
8ec0: 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70 69 63 61 6c  .</p>.<p>Typical
8ed0: 6c 79 20 77 68 65 6e 20 76 69 73 69 74 69 6e 67  ly when visiting
8ee0: 20 77 65 62 20 73 69 74 65 73 2c 20 6f 6e 6c 79   web sites, only
8ef0: 20 74 68 65 20 63 6c 69 65 6e 74 20 6e 65 65 64   the client need
8f00: 73 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 73  s to check the s
8f10: 65 72 76 65 72 27 73 0a 63 65 72 74 69 66 69 63  erver's.certific
8f20: 61 74 65 20 74 6f 20 65 6e 73 75 72 65 20 69 74  ate to ensure it
8f30: 20 69 73 20 76 61 6c 69 64 2e 20 54 68 65 20 73   is valid. The s
8f40: 65 72 76 65 72 20 64 6f 65 73 6e 27 74 20 6e 65  erver doesn't ne
8f50: 65 64 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20  ed to check the 
8f60: 63 6c 69 65 6e 74 0a 63 65 72 74 69 66 69 63 61  client.certifica
8f70: 74 65 20 75 6e 6c 65 73 73 20 79 6f 75 20 6e 65  te unless you ne
8f80: 65 64 20 74 6f 20 61 75 74 68 65 6e 74 69 63 61  ed to authentica
8f90: 74 65 20 77 69 74 68 20 74 68 65 6d 20 74 6f 20  te with them to 
8fa0: 6c 6f 67 69 6e 2c 20 65 74 63 2e 20 53 65 65 20  login, etc. See 
8fb0: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
8fc0: 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e 20  tion">-cert</b> 
8fd0: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and <b class="op
8fe0: 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65 3c  tion">-certfile<
8ff0: 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 69 66 20 79  /b> options if y
9000: 6f 75 20 6e 65 65 64 20 74 6f 20 70 72 6f 76 69  ou need to provi
9010: 64 65 20 61 20 63 65 72 74 69 66 69 63 61 74 65  de a certificate
9020: 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  .</p>.</div>.<di
9030: 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e  v id="subsection
9040: 32 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  2" class="doctoo
9050: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
9060: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73  h3><a name="subs
9070: 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d 61 72 79  ection2">Summary
9080: 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65   of command line
9090: 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 33   options</a></h3
90a0: 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69  >.<p>The followi
90b0: 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 75  ng options are u
90c0: 73 65 64 20 66 6f 72 20 70 65 65 72 20 63 65 72  sed for peer cer
90d0: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74  tificate validat
90e0: 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  ion:</p>.<dl cla
90f0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74  ss="doctools_opt
9100: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
9110: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
9120: 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  dir</b> <i class
9130: 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72 79  ="arg">directory
9140: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
9150: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64  >Specifies the d
9160: 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74  irectory where t
9170: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
9180: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65  uthority (CA) ce
9190: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a 73  rtificates are.s
91a0: 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 61 75  tored. The defau
91b0: 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 73  lt is platform s
91c0: 70 65 63 69 66 69 63 2c 20 62 75 74 20 69 73 20  pecific, but is 
91d0: 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62  usually &quot;<b
91e0: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65   class="file">/e
91f0: 74 63 2f 73 73 6c 2f 63 65 72 74 73 3c 2f 62 3e  tc/ssl/certs</b>
9200: 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 6e 75 78 2f  &quot; on.Linux/
9210: 55 6e 69 78 20 73 79 73 74 65 6d 73 2e 20 54 68  Unix systems. Th
9220: 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69  e default locati
9230: 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69  on can be overri
9240: 64 64 65 6e 20 62 79 20 74 68 65 0a 3c 62 20 63  dden by the.<b c
9250: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
9260: 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e  SSL_CERT_DIR</b>
9270: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72   environment var
9280: 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  iable.</p></dd>.
9290: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
92a0: 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62  tion">-cafile</b
92b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
92c0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >filename</i></d
92d0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
92e0: 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 69 74  ies the file wit
92f0: 68 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  h the Certificat
9300: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e Authority (CA)
9310: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f   certificates to
9320: 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73   use in.<b class
9330: 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e  ="const">PEM</b>
9340: 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68   file format. Th
9350: 65 20 64 65 66 61 75 6c 74 20 69 73 20 26 71 75  e default is &qu
9360: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
9370: 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26  e">cert.pem</b>&
9380: 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70  quot;, in the Op
9390: 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 2e  enSSL.directory.
93a0: 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e 69 78 20 73   On Linux/Unix s
93b0: 79 73 74 65 6d 73 2c 20 74 68 69 73 20 69 73 20  ystems, this is 
93c0: 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62  usually &quot;<b
93d0: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65   class="file">/e
93e0: 74 63 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 6c 65  tc/ssl/ca-bundle
93f0: 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a  .pem</b>&quot;..
9400: 54 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65  The default file
9410: 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64   can be overridd
9420: 65 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61  en by the <b cla
9430: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
9440: 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20  L_CERT_FILE</b> 
9450: 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69  environment.vari
9460: 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  able.</p></dd>.<
9470: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
9480: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
9490: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
94a0: 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  >URI</i></dt>.<d
94b0: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
94c0: 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75  he Uniform Resou
94d0: 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28  rce Identifier (
94e0: 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72  URI) for the Cer
94f0: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
9500: 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77  ty.(CA) store, w
9510: 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69  hich may be a si
9520: 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f  ngle container o
9530: 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63  r a catalog of c
9540: 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 74  ontainers..Start
9550: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ing with OpenSSL
9560: 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f   3.2 on MS Windo
9570: 77 73 2c 20 73 65 74 20 74 6f 20 26 71 75 6f 74  ws, set to &quot
9580: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
9590: 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69  ">org.openssl.wi
95a0: 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75  nstore://</b>&qu
95b0: 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68 65 20 62  ot;.to use the b
95c0: 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f  uilt-in MS Windo
95d0: 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53  ws Certificate S
95e0: 74 6f 72 65 2e 20 53 74 61 72 74 69 6e 67 20 69  tore. Starting i
95f0: 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68  n TclTLS 2.0, th
9600: 69 73 0a 69 73 20 74 68 65 20 64 65 66 61 75 6c  is.is the defaul
9610: 74 20 69 66 20 3c 62 20 63 6c 61 73 73 3d 22 6f  t if <b class="o
9620: 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62  ption">-cadir</b
9630: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  >, <b class="opt
9640: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c  ion">-cadir</b>,
9650: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f   and <b class="o
9660: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c  ption">-castore<
9670: 2f 62 3e 20 61 72 65 0a 6e 6f 74 20 73 70 65 63  /b> are.not spec
9680: 69 66 69 65 64 2e 20 54 68 69 73 20 73 74 6f 72  ified. This stor
9690: 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73 20  e only supports 
96a0: 72 6f 6f 74 20 63 65 72 74 69 66 69 63 61 74 65  root certificate
96b0: 20 73 74 6f 72 65 73 2e 3c 2f 70 3e 3c 2f 64 64   stores.</p></dd
96c0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
96d0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74  option">-request
96e0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
96f0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
9700: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73 74  >.<dd><p>Request
9710: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66   a certificate f
9720: 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72  rom the peer dur
9730: 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64  ing the SSL hand
9740: 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20 6e  shake. This is n
9750: 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74  eeded.to do Cert
9760: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69  ificate Validati
9770: 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20  on. Starting in 
9780: 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65 20  TclTLS 1.8, the 
9790: 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63 6c  default is.<b cl
97a0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
97b0: 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74 20  </b> for client 
97c0: 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 53 74 61  connections. Sta
97d0: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20  rting in TclTLS 
97e0: 32 2e 30 2c 20 69 66 20 73 65 74 20 74 6f 0a 3c  2.0, if set to.<
97f0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9800: 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 20 3c 62  false</b> and <b
9810: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9820: 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73 20  -require</b> is 
9830: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
9840: 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e 20  >true</b>, then 
9850: 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76 65  this will be.ove
9860: 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63 6c  rridden to <b cl
9870: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
9880: 3c 2f 62 3e 2e 20 49 6e 20 61 64 64 69 74 69 6f  </b>. In additio
9890: 6e 2c 20 74 68 65 20 63 6c 69 65 6e 74 20 63 61  n, the client ca
98a0: 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 6e 73 70 65  n manually inspe
98b0: 63 74 20 61 6e 64 0a 61 63 63 65 70 74 20 6f 72  ct and.accept or
98c0: 20 72 65 6a 65 63 74 20 65 61 63 68 20 63 65 72   reject each cer
98d0: 74 69 66 69 63 61 74 65 20 75 73 69 6e 67 20 74  tificate using t
98e0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
98f0: 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f  ion">-validateco
9900: 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e  mmand</b> option
9910: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
9920: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9930: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 3c 69  >-require</b> <i
9940: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
9950: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
9960: 70 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c 69  p>Require a vali
9970: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72  d certificate fr
9980: 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69  om the peer duri
9990: 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73  ng the SSL hands
99a0: 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73  hake. If this is
99b0: 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68  .set to true, th
99c0: 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  en <b class="opt
99d0: 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62  ion">-request</b
99e0: 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73  > must also be s
99f0: 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61  et to true and a
9a00: 20 65 69 74 68 65 72 0a 3c 62 20 63 6c 61 73 73   either.<b class
9a10: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
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 66 69 6c 65 3c  option">-cafile<
9a40: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
9a50: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c  ption">-castore<
9a60: 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f  /b>, or a platfo
9a70: 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20  rm default.must 
9a80: 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f  be provided in o
9a90: 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65  rder to validate
9aa0: 20 61 67 61 69 6e 73 74 2e 20 54 68 65 20 64 65   against. The de
9ab0: 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20  fault in TclTLS 
9ac0: 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20  1.8 and.earlier 
9ad0: 76 65 72 73 69 6f 6e 73 20 69 73 20 3c 62 20 63  versions is <b c
9ae0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c  lass="const">fal
9af0: 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74  se</b> since not
9b00: 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68   all platforms h
9b10: 61 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73  ave certificates
9b20: 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61   to.validate aga
9b30: 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63  inst in a form c
9b40: 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f  ompatible with O
9b50: 70 65 6e 53 53 4c 2e 20 53 74 61 72 74 69 6e 67  penSSL. Starting
9b60: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 0a   in TclTLS 2.0,.
9b70: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
9b80: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9b90: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69  true</b> for cli
9ba0: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e  ent connections.
9bb0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a  </p></dd>.</dl>.
9bc0: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
9bd0: 73 75 62 73 65 63 74 69 6f 6e 33 22 20 63 6c 61  subsection3" cla
9be0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62  ss="doctools_sub
9bf0: 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20  section"><h3><a 
9c00: 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e  name="subsection
9c10: 33 22 3e 57 68 65 6e 20 61 72 65 20 63 6f 6d 6d  3">When are comm
9c20: 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73  and line options
9c30: 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f 68 33   needed?</a></h3
9c40: 3e 0a 3c 70 3e 49 6e 20 54 63 6c 54 4c 53 20 31  >.<p>In TclTLS 1
9c50: 2e 38 20 61 6e 64 20 65 61 72 6c 69 65 72 20 76  .8 and earlier v
9c60: 65 72 73 69 6f 6e 73 2c 20 63 65 72 74 69 66 69  ersions, certifi
9c70: 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20  cate validation 
9c80: 69 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f 65 6d 3e 20  is.<em>NOT</em> 
9c90: 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 75  enabled by defau
9ca0: 6c 74 2e 20 54 68 69 73 20 6c 69 6d 69 74 61 74  lt. This limitat
9cb0: 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 74 68  ion is due to th
9cc0: 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f 6d 6d  e lack of a comm
9cd0: 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74 66 6f 72  on.cross platfor
9ce0: 6d 20 64 61 74 61 62 61 73 65 20 6f 66 20 43 65  m database of Ce
9cf0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
9d00: 69 74 79 20 28 43 41 29 20 70 72 6f 76 69 64 65  ity (CA) provide
9d10: 64 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74  d certificates t
9d20: 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e  o.validate again
9d30: 73 74 2e 20 4d 61 6e 79 20 4c 69 6e 75 78 20 73  st. Many Linux s
9d40: 79 73 74 65 6d 73 20 6e 61 74 69 76 65 6c 79 20  ystems natively 
9d50: 73 75 70 70 6f 72 74 20 4f 70 65 6e 53 53 4c 20  support OpenSSL 
9d60: 61 6e 64 20 74 68 75 73 20 68 61 76 65 0a 74 68  and thus have.th
9d70: 65 73 65 20 63 65 72 74 69 66 69 63 61 74 65 73  ese certificates
9d80: 20 69 6e 73 74 61 6c 6c 65 64 20 61 73 20 70 61   installed as pa
9d90: 72 74 20 6f 66 20 74 68 65 20 4f 53 2c 20 62 75  rt of the OS, bu
9da0: 74 20 4d 61 63 4f 53 20 61 6e 64 20 4d 53 20 57  t MacOS and MS W
9db0: 69 6e 64 6f 77 73 20 64 6f 20 6e 6f 74 2e 0a 53  indows do not..S
9dc0: 74 61 72 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  taring in TclTLS
9dd0: 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c   2.0, the defaul
9de0: 74 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e  t for client con
9df0: 6e 65 63 74 69 6f 6e 73 20 68 61 73 20 62 65 65  nections has bee
9e00: 6e 20 63 68 61 6e 67 65 64 20 74 6f 0a 72 65 71  n changed to.req
9e10: 75 69 72 65 20 63 65 72 74 69 66 69 63 61 74 65  uire certificate
9e20: 20 76 61 6c 69 64 61 74 69 6f 6e 20 62 79 20 64   validation by d
9e30: 65 66 61 75 6c 74 2e 20 49 6e 20 6f 72 64 65 72  efault. In order
9e40: 20 74 6f 20 75 73 65 20 74 68 65 20 3c 62 20 63   to use the <b c
9e50: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72  lass="option">-r
9e60: 65 71 75 69 72 65 3c 2f 62 3e 0a 6f 70 74 69 6f  equire</b>.optio
9e70: 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 6f  n, one of the fo
9e80: 6c 6c 6f 77 69 6e 67 20 6d 75 73 74 20 62 65 20  llowing must be 
9e90: 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75 6c 20 63 6c  true:</p>.<ul cl
9ea0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 69 74  ass="doctools_it
9eb0: 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69 3e 3c 70 3e  emized">.<li><p>
9ec0: 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 20 55 6e 69  On Linux and Uni
9ed0: 78 20 73 79 73 74 65 6d 73 20 77 69 74 68 20 4f  x systems with O
9ee0: 70 65 6e 53 53 4c 20 61 6c 72 65 61 64 79 20 69  penSSL already i
9ef0: 6e 73 74 61 6c 6c 65 64 20 6f 72 20 69 66 20 74  nstalled or if t
9f00: 68 65 20 43 41 0a 63 65 72 74 69 66 69 63 61 74  he CA.certificat
9f10: 65 73 20 61 72 65 20 61 76 61 69 6c 61 62 6c 65  es are available
9f20: 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 2c 20   in PEM format, 
9f30: 61 6e 64 20 69 66 20 74 68 65 79 20 61 72 65 20  and if they are 
9f40: 73 74 6f 72 65 64 20 69 6e 20 74 68 65 0a 73 74  stored in the.st
9f50: 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73  andard locations
9f60: 2c 20 6f 72 20 69 66 20 74 68 65 20 3c 62 20 63  , or if the <b c
9f70: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
9f80: 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e  SSL_CERT_DIR</b>
9f90: 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61   or <b class="va
9fa0: 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54  riable">SSL_CERT
9fb0: 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e 76 69 72 6f  _FILE</b>.enviro
9fc0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20  nment variables 
9fd0: 61 72 65 20 73 65 74 2c 20 74 68 65 6e 20 3c 62  are set, then <b
9fe0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9ff0: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63  -cadir</b>, <b c
a000: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
a010: 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e 64 20 3c 62  adir</b>,.and <b
a020: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
a030: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61 72 65  -castore</b> are
a040: 6e 27 74 20 6e 65 65 64 65 64 2e 3c 2f 70 3e 3c  n't needed.</p><
a050: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20 4f  /li>.<li><p>If O
a060: 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e  penSSL is not in
a070: 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 20 64  stalled in the d
a080: 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 2c  efault location,
a090: 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 20 4d   or when using M
a0a0: 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 6e 64  ac OS.or MS Wind
a0b0: 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 4c 20  ows and OpenSSL 
a0c0: 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74 68  is installed, th
a0d0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  e <b class="vari
a0e0: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44  able">SSL_CERT_D
a0f0: 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 0a 3c 62  IR</b> and/or.<b
a100: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
a110: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c  ">SSL_CERT_FILE<
a120: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  /b> environment 
a130: 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65  variables or the
a140: 20 6f 6e 65 20 6f 66 20 74 68 65 20 3c 62 20 63   one of the <b c
a150: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
a160: 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61  adir</b>,.<b cla
a170: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64  ss="option">-cad
a180: 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c 62 20 63 6c  ir</b>, or <b cl
a190: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
a1a0: 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  store</b> option
a1b0: 73 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65  s must be define
a1c0: 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e  d.</p></li>.<li>
a1d0: 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e 64 6f 77 73  <p>On MS Windows
a1e0: 2c 20 73 74 61 72 74 69 6e 67 20 69 6e 20 4f 70  , starting in Op
a1f0: 65 6e 53 53 4c 20 33 2e 32 2c 20 69 74 20 69 73  enSSL 3.2, it is
a200: 20 6e 6f 77 20 70 6f 73 73 69 62 6c 65 20 74 6f   now possible to
a210: 20 61 63 63 65 73 73 20 74 68 65 0a 62 75 69 6c   access the.buil
a220: 74 2d 69 6e 20 57 69 6e 64 6f 77 73 20 43 65 72  t-in Windows Cer
a230: 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 20 66  tificate Store f
a240: 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e 20 54 68 69  rom OpenSSL. Thi
a250: 73 20 63 61 6e 20 62 65 20 75 74 69 6c 69 7a 65  s can be utilize
a260: 64 20 62 79 0a 73 65 74 74 69 6e 67 20 74 68 65  d by.setting the
a270: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
a280: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20  n">-castore</b> 
a290: 6f 70 74 69 6f 6e 20 74 6f 20 26 71 75 6f 74 3b  option to &quot;
a2a0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
a2b0: 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e  >org.openssl.win
a2c0: 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f  store://</b>&quo
a2d0: 74 3b 2e 0a 49 6e 20 54 63 6c 54 4c 53 20 32 2e  t;..In TclTLS 2.
a2e0: 30 2c 20 74 68 69 73 20 69 73 20 74 68 65 20 64  0, this is the d
a2f0: 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 66 20  efault value if 
a300: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
a310: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62  ">-cadir</b>,.<b
a320: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
a330: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 20  -cadir</b>, and 
a340: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
a350: 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61  ">-castore</b> a
a360: 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64  re not specified
a370: 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  .</p></li>.<li><
a380: 70 3e 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20  p>If OpenSSL is 
a390: 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72  not installed or
a3a0: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63   the CA certific
a3b0: 61 74 65 73 20 61 72 65 20 6e 6f 74 20 61 76 61  ates are not ava
a3c0: 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d 0a 66 6f  ilable in PEM.fo
a3d0: 72 6d 61 74 2c 20 74 68 65 20 43 41 20 63 65 72  rmat, the CA cer
a3e0: 74 69 66 69 63 61 74 65 73 20 6d 75 73 74 20 62  tificates must b
a3f0: 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 61 6e 64  e downloaded and
a400: 20 69 6e 73 74 61 6c 6c 65 64 20 77 69 74 68 20   installed with 
a410: 74 68 65 20 75 73 65 72 0a 73 6f 66 74 77 61 72  the user.softwar
a420: 65 2e 20 54 68 65 20 43 55 52 4c 20 74 65 61 6d  e. The CURL team
a430: 20 6d 61 6b 65 73 20 74 68 65 6d 20 61 76 61 69   makes them avai
a440: 6c 61 62 6c 65 20 61 74 0a 3c 61 20 68 72 65 66  lable at.<a href
a450: 3d 22 68 74 74 70 73 3a 2f 2f 63 75 72 6c 2e 73  ="https://curl.s
a460: 65 2f 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74  e/docs/caextract
a470: 2e 68 74 6d 6c 22 3e 43 41 20 63 65 72 74 69 66  .html">CA certif
a480: 69 63 61 74 65 73 20 65 78 74 72 61 63 74 65 64  icates extracted
a490: 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f 61  .from Mozilla</a
a4a0: 3e 20 69 6e 20 74 68 65 20 26 71 75 6f 74 3b 3c  > in the &quot;<
a4b0: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63  b class="file">c
a4c0: 61 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75  acert.pem</b>&qu
a4d0: 6f 74 3b 20 66 69 6c 65 2e 20 59 6f 75 20 6d 75  ot; file. You mu
a4e0: 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 20 73  st then either s
a4f0: 65 74 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  et the.<b class=
a500: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
a510: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f  ERT_DIR</b> and/
a520: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  or <b class="var
a530: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
a540: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  FILE</b> environ
a550: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f  ment variables o
a560: 72 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22  r the.<b class="
a570: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
a580: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22  b> or <b class="
a590: 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c  option">-cafile<
a5a0: 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74  /b> options to t
a5b0: 68 65 20 43 41 20 63 65 72 74 20 66 69 6c 65 27  he CA cert file'
a5c0: 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74 69  s install.locati
a5d0: 6f 6e 2e 20 49 74 20 69 73 20 79 6f 75 72 20 72  on. It is your r
a5e0: 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f  esponsibility to
a5f0: 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65 20   keep this file 
a600: 75 70 20 74 6f 20 64 61 74 65 2e 3c 2f 70 3e 3c  up to date.</p><
a610: 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76  /li>.</ul>.</div
a620: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
a630: 3d 22 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 73  ="section5" clas
a640: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
a650: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
a660: 3d 22 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c  ="section5">Call
a670: 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e  back Options</a>
a680: 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20 70 72 65 76  </h2>.<p>As prev
a690: 69 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65 64  iously described
a6a0: 2c 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 63  , each channel c
a6b0: 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 69  an be given thei
a6c0: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a  r own callbacks.
a6d0: 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d  to handle interm
a6e0: 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e  ediate processin
a6f0: 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  g by the OpenSSL
a700: 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20   library, using 
a710: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
a720: 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  tion">-command</
a730: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
a740: 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c  tion">-password<
a750: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73  /b>, and <b clas
a760: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
a770: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
a780: 20 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 20   options.passed 
a790: 74 6f 20 65 69 74 68 65 72 20 6f 66 20 3c 62 20  to either of <b 
a7a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
a7b0: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 6f 72 20 3c  :socket</b> or <
a7c0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
a7d0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 0a 55  s::import</b>..U
a7e0: 6e 6c 69 6b 65 20 70 72 65 76 69 6f 75 73 20 76  nlike previous v
a7f0: 65 72 73 69 6f 6e 73 20 6f 66 20 54 63 6c 54 4c  ersions of TclTL
a800: 53 2c 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 63  S, only if the c
a810: 61 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65  allback generate
a820: 73 20 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c 6c  s an error,.will
a830: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 73   the <b class="s
a840: 79 73 63 6d 64 22 3e 62 67 65 72 72 6f 72 3c 2f  yscmd">bgerror</
a850: 62 3e 20 63 6f 6d 6d 61 6e 64 20 62 65 20 69 6e  b> command be in
a860: 76 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20 65  voked with the e
a870: 72 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e  rror information
a880: 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69 64 3d 22 73  .</p>.<div id="s
a890: 75 62 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73  ubsection4" clas
a8a0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
a8b0: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
a8c0: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 34  ame="subsection4
a8d0: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d  ">Values for Com
a8e0: 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61  mand Callback</a
a8f0: 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61  ></h3>.<p>The ca
a900: 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c  llback for the <
a910: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
a920: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70  >-command</b> op
a930: 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20  tion is invoked 
a940: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
a950: 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f 70 65  s during the.Ope
a960: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61  nSSL handshake a
a970: 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69 6e  nd during routin
a980: 65 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 53 65  e operations. Se
a990: 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20  e below for the 
a9a0: 70 6f 73 73 69 62 6c 65 0a 61 72 67 75 6d 65 6e  possible.argumen
a9b0: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65  ts passed to the
a9c0: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
a9d0: 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e 65  . Values returne
a9e0: 64 20 66 72 6f 6d 20 74 68 65 20 63 61 6c 6c 62  d from the callb
a9f0: 61 63 6b 20 61 72 65 0a 69 67 6e 6f 72 65 64 2e  ack are.ignored.
aa00: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
aa10: 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73  doctools_options
aa20: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  ">.<dt><b class=
aa30: 22 6f 70 74 69 6f 6e 22 3e 65 72 72 6f 72 3c 2f  "option">error</
aa40: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
aa50: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 65 73 73  ">channelId mess
aa60: 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  age</i></dt>.<dd
aa70: 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66  ><p>This form of
aa80: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
aa90: 6f 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e  oked whenever an
aaa0: 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75   error occurs du
aab0: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c  ring the initial
aac0: 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e  .connection, han
aad0: 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f  dshake, or I/O o
aae0: 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 3c  perations. The <
aaf0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65  i class="arg">me
ab00: 73 73 61 67 65 3c 2f 69 3e 20 61 72 67 75 6d 65  ssage</i> argume
ab10: 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20 74  nt can be.from t
ab20: 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c  he Tcl_ErrnoMsg,
ab30: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
ab40: 6e 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  n <b class="func
ab50: 74 69 6f 6e 22 3e 45 52 52 5f 72 65 61 73 6f 6e  tion">ERR_reason
ab60: 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 3c  _error_string()<
ab70: 2f 62 3e 2c 0a 6f 72 20 61 20 63 75 73 74 6f 6d  /b>,.or a custom
ab80: 20 6d 65 73 73 61 67 65 2e 20 54 68 69 73 20 63   message. This c
ab90: 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66  allback is new f
aba0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
abb0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
abc0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 69 6e  lass="option">in
abd0: 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  fo</b> <i class=
abe0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
abf0: 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73  major minor mess
ac00: 61 67 65 20 74 79 70 65 3c 2f 69 3e 3c 2f 64 74  age type</i></dt
ac10: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f  >.<dd><p>This fo
ac20: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
ac30: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65  s invoked by the
ac40: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
ac50: 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  n.<b class="func
ac60: 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 69 6e  tion">SSL_set_in
ac70: 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 62  fo_callback()</b
ac80: 3e 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69  > during the ini
ac90: 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20  tial connection 
aca0: 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f 70  and handshake.op
acb0: 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 61 72  erations. The ar
acc0: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e  guments are:</p>
acd0: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
ace0: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73  ools_definitions
acf0: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  ">.<dt><i class=
ad00: 22 61 72 67 22 3e 6d 61 6a 6f 72 3c 2f 69 3e 3c  "arg">major</i><
ad10: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 6a 6f  /dt>.<dd><p>Majo
ad20: 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65  r category for e
ad30: 72 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75 6d  rror. Valid enum
ad40: 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d  s are: <b class=
ad50: 22 63 6f 6e 73 74 22 3e 68 61 6e 64 73 68 61 6b  "const">handshak
ad60: 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  e</b>, <b class=
ad70: 22 63 6f 6e 73 74 22 3e 61 6c 65 72 74 3c 2f 62  "const">alert</b
ad80: 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >,.<b class="con
ad90: 73 74 22 3e 63 6f 6e 6e 65 63 74 3c 2f 62 3e 2c  st">connect</b>,
ada0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
adb0: 22 3e 61 63 63 65 70 74 3c 2f 62 3e 2e 3c 2f 70  ">accept</b>.</p
adc0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
add0: 61 73 73 3d 22 61 72 67 22 3e 6d 69 6e 6f 72 3c  ass="arg">minor<
ade0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
adf0: 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 66  Minor category f
ae00: 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20  or error. Valid 
ae10: 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c  enums are: <b cl
ae20: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 74 61 72  ass="const">star
ae30: 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  t</b>, <b class=
ae40: 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 3c 2f 62 3e  "const">done</b>
ae50: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
ae60: 74 22 3e 72 65 61 64 3c 2f 62 3e 2c 0a 3c 62 20  t">read</b>,.<b 
ae70: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 72  class="const">wr
ae80: 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  ite</b>, <b clas
ae90: 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f 6f 70 3c 2f  s="const">loop</
aea0: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>, <b class="co
aeb0: 6e 73 74 22 3e 65 78 69 74 3c 2f 62 3e 2e 3c 2f  nst">exit</b>.</
aec0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
aed0: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61  lass="arg">messa
aee0: 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ge</i></dt>.<dd>
aef0: 3c 70 3e 44 65 73 63 72 69 70 74 69 76 65 20 6d  <p>Descriptive m
af00: 65 73 73 61 67 65 20 73 74 72 69 6e 67 20 77 68  essage string wh
af10: 69 63 68 20 6d 61 79 20 62 65 20 67 65 6e 65 72  ich may be gener
af20: 61 74 65 64 20 65 69 74 68 65 72 20 62 79 0a 3c  ated either by.<
af30: 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f  b class="functio
af40: 6e 22 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72  n">SSL_state_str
af50: 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 20 6f  ing_long()</b> o
af60: 72 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  r <b class="func
af70: 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c 65 72 74 5f  tion">SSL_alert_
af80: 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67  desc_string_long
af90: 28 29 3c 2f 62 3e 2c 0a 64 65 70 65 6e 64 69 6e  ()</b>,.dependin
afa0: 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74  g on the context
afb0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
afc0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 74 79  i class="arg">ty
afd0: 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  pe</i></dt>.<dd>
afe0: 3c 70 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20 74  <p>For alerts, t
aff0: 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c 75  he possible valu
b000: 65 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73  es are: <b class
b010: 3d 22 63 6f 6e 73 74 22 3e 77 61 72 6e 69 6e 67  ="const">warning
b020: 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22  </b>,.<b class="
b030: 63 6f 6e 73 74 22 3e 66 61 74 61 6c 3c 2f 62 3e  const">fatal</b>
b040: 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  , and <b class="
b050: 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f 77 6e 3c 2f  const">unknown</
b060: 62 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 20  b>. For others, 
b070: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
b080: 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73 20 75 73 65  >info</b> is use
b090: 64 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74  d..This argument
b0a0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
b0b0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
b0c0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
b0d0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b0e0: 22 3e 6d 65 73 73 61 67 65 3c 2f 62 3e 20 3c 69  ">message</b> <i
b0f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b100: 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 69 6f 6e  nnelId direction
b110: 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e 74   version content
b120: 5f 74 79 70 65 20 6d 65 73 73 61 67 65 3c 2f 69  _type message</i
b130: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
b140: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
b150: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62  ack is invoked b
b160: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75  y the OpenSSL fu
b170: 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d  nction.<b class=
b180: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73  "function">SSL_s
b190: 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28  et_msg_callback(
b1a0: 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61  )</b> whenever a
b1b0: 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e 74   message is sent
b1c0: 20 6f 72 20 72 65 63 65 69 76 65 64 20 64 75 72   or received dur
b1d0: 69 6e 67 20 74 68 65 0a 69 6e 69 74 69 61 6c 20  ing the.initial 
b1e0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64  connection, hand
b1f0: 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70  shake, or I/O op
b200: 65 72 61 74 69 6f 6e 73 2e 20 49 74 20 69 73 20  erations. It is 
b210: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 77  only available w
b220: 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 69 73 20 63  hen.OpenSSL is c
b230: 6f 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68 65  omplied with the
b240: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
b250: 22 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61  ">enable-ssl-tra
b260: 63 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54  ce</b> option. T
b270: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 0a  his callback is.
b280: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
b290: 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74  .8. The argument
b2a0: 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63  s are:</p>.<dl c
b2b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
b2c0: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
b2d0: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
b2e0: 64 69 72 65 63 74 69 6f 6e 3c 2f 69 3e 3c 2f 64  direction</i></d
b2f0: 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 72 65 63 74  t>.<dd><p>Direct
b300: 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 3c 62  ion is either <b
b310: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 53   class="const">S
b320: 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c  ent</b> or <b cl
b330: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 52 65 63 65  ass="const">Rece
b340: 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64  ived</b>.</p></d
b350: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
b360: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69  "arg">version</i
b370: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 56 65  ></dt>.<dd><p>Ve
b380: 72 73 69 6f 6e 20 69 73 20 74 68 65 20 70 72 6f  rsion is the pro
b390: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2e 3c 2f  tocol version.</
b3a0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
b3b0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6e 74 65  lass="arg">conte
b3c0: 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e  nt_type</i></dt>
b3d0: 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74 65 6e 74 20  .<dd><p>Content 
b3e0: 74 79 70 65 20 69 73 20 74 68 65 20 6d 65 73 73  type is the mess
b3f0: 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65  age content type
b400: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
b410: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65  i class="arg">me
b420: 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ssage</i></dt>.<
b430: 64 64 3e 3c 70 3e 4d 65 73 73 61 67 65 20 69 73  dd><p>Message is
b440: 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 6f 6d 20   more info from 
b450: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  the <b class="co
b460: 6e 73 74 22 3e 53 53 4c 5f 74 72 61 63 65 3c 2f  nst">SSL_trace</
b470: 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c 2f 64 64 3e  b> API.</p></dd>
b480: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
b490: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b4a0: 22 3e 73 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69  ">session</b> <i
b4b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b4c0: 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f 69  nnelId session_i
b4d0: 64 20 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74  d session_ticket
b4e0: 20 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64   lifetime</i></d
b4f0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66  t>.<dd><p>This f
b500: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
b510: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
b520: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
b530: 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  on.<b class="fun
b540: 63 74 69 6f 6e 22 3e 53 53 4c 5f 43 54 58 5f 73  ction">SSL_CTX_s
b550: 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29  ess_set_new_cb()
b560: 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61 20  </b> whenever a 
b570: 6e 65 77 20 73 65 73 73 69 6f 6e 20 69 64 20 69  new session id i
b580: 73 20 73 65 6e 74 20 62 79 20 74 68 65 0a 73 65  s sent by the.se
b590: 72 76 65 72 20 64 75 72 69 6e 67 20 74 68 65 20  rver during the 
b5a0: 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69  initial connecti
b5b0: 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65  on and handshake
b5c0: 20 61 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e 67   and also during
b5d0: 20 74 68 65 20 73 65 73 73 69 6f 6e 0a 69 66 20   the session.if 
b5e0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
b5f0: 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e 64  tion">-post_hand
b600: 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  shake</b> option
b610: 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e   is set to true.
b620: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69   This callback i
b630: 73 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53  s new for.TclTLS
b640: 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65   1.8. The argume
b650: 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c  nts are:</p>.<dl
b660: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
b670: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c  _definitions">.<
b680: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
b690: 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e  ">session_id</i>
b6a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73  </dt>.<dd><p>Ses
b6b0: 73 69 6f 6e 20 49 64 20 69 73 20 74 68 65 20 63  sion Id is the c
b6c0: 75 72 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69  urrent session i
b6d0: 64 65 6e 74 69 66 69 65 72 3c 2f 70 3e 3c 2f 64  dentifier</p></d
b6e0: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
b6f0: 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 74 69  "arg">session_ti
b700: 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  cket</i></dt>.<d
b710: 64 3e 3c 70 3e 54 69 63 6b 65 74 20 69 73 20 74  d><p>Ticket is t
b720: 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65  he session ticke
b730: 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f 64 64 3e 0a  t info</p></dd>.
b740: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
b750: 67 22 3e 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c  g">lifetime</i><
b760: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 66 65  /dt>.<dd><p>Life
b770: 74 69 6d 65 20 69 73 20 74 68 65 20 74 69 63 6b  time is the tick
b780: 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73  et lifetime in s
b790: 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  econds.</p></dd>
b7a0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
b7b0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b7c0: 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69 20  ">verify</b> <i 
b7d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
b7e0: 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72 74  nelId depth cert
b7f0: 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 69   status error</i
b800: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
b810: 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20  is callback was 
b820: 6d 6f 76 65 64 20 74 6f 20 3c 62 20 63 6c 61 73  moved to <b clas
b830: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
b840: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20  datecommand</b> 
b850: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  in TclTLS 1.8.</
b860: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f  p></dd>.</dl>.</
b870: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75  div>.<div id="su
b880: 62 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 73 73  bsection5" class
b890: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
b8a0: 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61  ction"><h3><a na
b8b0: 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22  me="subsection5"
b8c0: 3e 56 61 6c 75 65 73 20 66 6f 72 20 50 61 73 73  >Values for Pass
b8d0: 77 6f 72 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61  word Callback</a
b8e0: 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61  ></h3>.<p>The ca
b8f0: 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c  llback for the <
b900: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
b910: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f  >-password</b> o
b920: 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64  ption is invoked
b930: 20 62 79 20 54 63 6c 54 4c 53 20 77 68 65 6e 65   by TclTLS whene
b940: 76 65 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64  ver OpenSSL need
b950: 73 0a 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61  s.to obtain a pa
b960: 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c 6f  ssword. See belo
b970: 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62  w for the possib
b980: 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73  le arguments pas
b990: 73 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62  sed to the.callb
b9a0: 61 63 6b 20 73 63 72 69 70 74 2e 20 54 68 65 20  ack script. The 
b9b0: 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70 61  user provided pa
b9c0: 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63 74  ssword is expect
b9d0: 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65  ed to be returne
b9e0: 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 63  d by the.callbac
b9f0: 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  k.</p>.<dl class
ba00: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f  ="doctools_optio
ba10: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
ba20: 73 3d 22 6f 70 74 69 6f 6e 22 3e 70 61 73 73 77  s="option">passw
ba30: 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ord</b> <i class
ba40: 3d 22 61 72 67 22 3e 72 77 66 6c 61 67 20 73 69  ="arg">rwflag si
ba50: 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ze</i></dt>.<dd>
ba60: 3c 70 3e 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20  <p>Invoked when 
ba70: 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69  loading or stori
ba80: 6e 67 20 61 6e 20 65 6e 63 72 79 70 74 65 64 20  ng an encrypted 
ba90: 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65 2e  PEM certificate.
baa0: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61   The arguments a
bab0: 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  re:</p>.<dl clas
bac0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69  s="doctools_defi
bad0: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69  nitions">.<dt><i
bae0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66   class="arg">rwf
baf0: 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  lag</i></dt>.<dd
bb00: 3e 3c 70 3e 54 68 65 20 72 65 61 64 2f 77 72 69  ><p>The read/wri
bb10: 74 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f 72  te flag is 0 for
bb20: 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74   reading/decrypt
bb30: 69 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 69  ion or 1 for wri
bb40: 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 2e  ting/encryption.
bb50: 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e 20  .The latter can 
bb60: 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 65 72  be used to deter
bb70: 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 6f  mine when to pro
bb80: 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 6f 20  mpt the user to 
bb90: 63 6f 6e 66 69 72 6d 2e 0a 54 68 69 73 20 61 72  confirm..This ar
bba0: 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f  gument is new fo
bbb0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
bbc0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
bbd0: 61 73 73 3d 22 61 72 67 22 3e 73 69 7a 65 3c 2f  ass="arg">size</
bbe0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
bbf0: 68 65 20 73 69 7a 65 20 69 73 20 74 68 65 20 6d  he size is the m
bc00: 61 78 69 6d 75 6d 20 6c 65 6e 67 74 68 20 6f 66  aximum length of
bc10: 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 69 6e   the password in
bc20: 20 62 79 74 65 73 2e 0a 54 68 69 73 20 61 72 67   bytes..This arg
bc30: 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72  ument is new for
bc40: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
bc50: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
bc60: 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  .</dl>.</div>.<d
bc70: 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f  iv id="subsectio
bc80: 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n6" class="docto
bc90: 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e  ols_subsection">
bca0: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62  <h3><a name="sub
bcb0: 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65 73  section6">Values
bcc0: 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43 6f   for Validate Co
bcd0: 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  mmand Callback</
bce0: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63  a></h3>.<p>The c
bcf0: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20  allback for the 
bd00: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
bd10: 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61  ">-validatecomma
bd20: 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73  nd</b> option is
bd30: 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20   invoked during 
bd40: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 72  the handshake.pr
bd50: 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20 66  ocess in order f
bd60: 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 74 69  or the applicati
bd70: 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74  on to validate t
bd80: 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75  he provided valu
bd90: 65 28 73 29 2e 20 53 65 65 0a 62 65 6c 6f 77 20  e(s). See.below 
bda0: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65  for the possible
bdb0: 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65   arguments passe
bdc0: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63  d to the callbac
bdd0: 6b 20 73 63 72 69 70 74 2e 20 49 66 20 6e 6f 74  k script. If not
bde0: 0a 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65 6e  .specified, Open
bdf0: 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 70 74 20  SSL will accept 
be00: 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 74 69 66  all valid certif
be10: 69 63 61 74 65 73 20 61 6e 64 20 65 78 74 65 6e  icates and exten
be20: 73 69 6f 6e 73 2e 20 54 6f 20 72 65 6a 65 63 74  sions. To reject
be30: 0a 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20 61  .the value and a
be40: 62 6f 72 74 20 74 68 65 20 63 6f 6e 6e 65 63 74  bort the connect
be50: 69 6f 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61 63  ion, the callbac
be60: 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20  k should return 
be70: 30 2e 20 54 6f 20 61 63 63 65 70 74 20 74 68 65  0. To accept the
be80: 0a 76 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69  .value and conti
be90: 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  nue the connecti
bea0: 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65  on, it should re
beb0: 74 75 72 6e 20 31 2e 20 54 6f 20 72 65 6a 65 63  turn 1. To rejec
bec0: 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74  t the value, but
bed0: 0a 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f  .continue the co
bee0: 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f  nnection, it sho
bef0: 75 6c 64 20 72 65 74 75 72 6e 20 32 2e 20 54 68  uld return 2. Th
bf00: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e  is callback is n
bf10: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
bf20: 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  8.</p>.<dl class
bf30: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f  ="doctools_optio
bf40: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
bf50: 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 6c 70 6e 3c  s="option">alpn<
bf60: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
bf70: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f  g">channelId pro
bf80: 74 6f 63 6f 6c 20 6d 61 74 63 68 3c 2f 69 3e 3c  tocol match</i><
bf90: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20  /dt>.<dd><p>For 
bfa0: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
bfb0: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
bfc0: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74  s invoked when t
bfd0: 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 20 65  he client ALPN e
bfe0: 78 74 65 6e 73 69 6f 6e 20 69 73 0a 72 65 63 65  xtension is.rece
bff0: 69 76 65 64 2e 20 49 66 20 3c 69 20 63 6c 61 73  ived. If <i clas
c000: 73 3d 22 61 72 67 22 3e 6d 61 74 63 68 3c 2f 69  s="arg">match</i
c010: 3e 20 69 73 20 74 72 75 65 2c 20 74 68 65 6e 20  > is true, then 
c020: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70  <i class="arg">p
c030: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20 69 73 20 74  rotocol</i> is t
c040: 68 65 20 66 69 72 73 74 0a 3c 62 20 63 6c 61 73  he first.<b clas
c050: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e  s="option">-alpn
c060: 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f 6c 20 6f 70  </b> protocol op
c070: 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74  tion in common t
c080: 6f 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e  o both the clien
c090: 74 20 61 6e 64 20 73 65 72 76 65 72 2e 0a 49 66  t and server..If
c0a0: 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20   not, the first 
c0b0: 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64  client specified
c0c0: 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65   protocol is use
c0d0: 64 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b  d. This callback
c0e0: 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 72   is called.after
c0f0: 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 53   the Hello and S
c100: 4e 49 20 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70  NI callbacks.</p
c110: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
c120: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 68 65 6c  ass="option">hel
c130: 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  lo</b> <i class=
c140: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
c150: 73 65 72 76 65 72 6e 61 6d 65 20 73 65 73 73 69  servername sessi
c160: 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  on_id</i></dt>.<
c170: 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72  dd><p>For server
c180: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20  s, this form of 
c190: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
c1a0: 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65 6e  ked during clien
c1b0: 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 65 0a  t hello message.
c1c0: 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 65 20  processing. The 
c1d0: 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 74 68  purpose is so th
c1e0: 65 20 73 65 72 76 65 72 20 63 61 6e 20 73 65 6c  e server can sel
c1f0: 65 63 74 20 74 68 65 20 61 70 70 72 6f 70 72 69  ect the appropri
c200: 61 74 65 20 63 65 72 74 69 66 69 63 61 74 65 0a  ate certificate.
c210: 74 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 74 68  to present to th
c220: 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74 6f  e client, and to
c230: 20 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f 6e 66   make other conf
c240: 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 73 74  iguration adjust
c250: 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 0a 74  ments relevant.t
c260: 6f 20 74 68 61 74 20 73 65 72 76 65 72 20 6e 61  o that server na
c270: 6d 65 20 61 6e 64 20 69 74 73 20 63 6f 6e 66 69  me and its confi
c280: 67 75 72 61 74 69 6f 6e 2e 20 49 74 20 69 73 20  guration. It is 
c290: 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74 68  called before th
c2a0: 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 0a 63  e SNI and ALPN.c
c2b0: 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f 64  allbacks.</p></d
c2c0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
c2d0: 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 3c 2f 62 3e  "option">sni</b>
c2e0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
c2f0: 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72  channelId server
c300: 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  name</i></dt>.<d
c310: 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72 73  d><p>For servers
c320: 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  , this form of c
c330: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
c340: 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 72 76  ed when the Serv
c350: 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69  er Name Indicati
c360: 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 69  on.(SNI) extensi
c370: 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 2e 20  on is received. 
c380: 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  The <i class="ar
c390: 67 22 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69  g">servername</i
c3a0: 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68  > argument is th
c3b0: 65 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64 65  e client.provide
c3c0: 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 73 70  d server name sp
c3d0: 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 3c  ecified in the <
c3e0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
c3f0: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e  >-servername</b>
c400: 20 6f 70 74 69 6f 6e 2e 20 54 68 65 0a 70 75 72   option. The.pur
c410: 70 6f 73 65 20 69 73 20 73 6f 20 77 68 65 6e 20  pose is so when 
c420: 61 20 73 65 72 76 65 72 20 73 75 70 70 6f 72 74  a server support
c430: 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73  s multiple names
c440: 2c 20 74 68 65 20 72 69 67 68 74 20 63 65 72 74  , the right cert
c450: 69 66 69 63 61 74 65 0a 63 61 6e 20 62 65 20 75  ificate.can be u
c460: 73 65 64 2e 20 49 74 20 69 73 20 63 61 6c 6c 65  sed. It is calle
c470: 64 20 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c  d after the Hell
c480: 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62  o callback but b
c490: 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63  efore the ALPN.c
c4a0: 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e 3c 2f 64 64  allback.</p></dd
c4b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
c4c0: 6f 70 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f  option">verify</
c4d0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
c4e0: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74  ">channelId dept
c4f0: 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72  h cert status er
c500: 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ror</i></dt>.<dd
c510: 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66  ><p>This form of
c520: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
c530: 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20  oked by OpenSSL 
c540: 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69  when a new certi
c550: 66 69 63 61 74 65 20 69 73 20 72 65 63 65 69 76  ficate is receiv
c560: 65 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72  ed.from the peer
c570: 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 20  . It allows the 
c580: 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b 20  client to check 
c590: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
c5a0: 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 65 73  verification.res
c5b0: 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20  ults and choose 
c5c0: 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69  whether to conti
c5d0: 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69  nue or not. It i
c5e0: 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63  s called for eac
c5f0: 68 0a 63 65 72 74 69 66 69 63 61 74 65 20 69 6e  h.certificate in
c600: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
c610: 20 63 68 61 69 6e 2e 20 54 68 69 73 20 63 61 6c   chain. This cal
c620: 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 20  lback was moved 
c630: 66 72 6f 6d 0a 3c 62 20 63 6c 61 73 73 3d 22 6f  from.<b class="o
c640: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
c650: 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e  /b> in TclTLS 1.
c660: 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73  8. The arguments
c670: 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c   are:</p>.<dl cl
c680: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
c690: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
c6a0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
c6b0: 65 70 74 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  epth</i></dt>.<d
c6c0: 64 3e 3c 70 3e 54 68 65 20 64 65 70 74 68 20 69  d><p>The depth i
c6d0: 73 20 74 68 65 20 69 6e 74 65 67 65 72 20 64 65  s the integer de
c6e0: 70 74 68 20 6f 66 20 74 68 65 20 63 65 72 74 69  pth of the certi
c6f0: 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 65  ficate in the ce
c700: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c  rtificate chain,
c710: 0a 77 68 65 72 65 20 30 20 69 73 20 74 68 65 20  .where 0 is the 
c720: 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65  peer certificate
c730: 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75   and higher valu
c740: 65 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74  es going up to t
c750: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 41  he Certificate.A
c760: 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f  uthority (CA).</
c770: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
c780: 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74 3c  lass="arg">cert<
c790: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
c7a0: 54 68 65 20 63 65 72 74 20 61 72 67 75 6d 65 6e  The cert argumen
c7b0: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b  t is a list of k
c7c0: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73  ey-value pairs s
c7d0: 69 6d 69 6c 61 72 20 74 6f 20 74 68 6f 73 65 20  imilar to those 
c7e0: 72 65 74 75 72 6e 65 64 20 62 79 0a 3c 62 20 63  returned by.<b c
c7f0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
c800: 73 74 61 74 75 73 3c 2f 62 3e 2e 3c 2f 70 3e 3c  status</b>.</p><
c810: 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73  /dd>.<dt><i clas
c820: 73 3d 22 61 72 67 22 3e 73 74 61 74 75 73 3c 2f  s="arg">status</
c830: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
c840: 68 65 20 73 74 61 74 75 73 20 61 72 67 75 6d 65  he status argume
c850: 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 61  nt is the boolea
c860: 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68  n validity of th
c870: 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 69 66  e current certif
c880: 69 63 61 74 65 20 77 68 65 72 65 20 30 0a 69 73  icate where 0.is
c890: 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 69   invalid and 1 i
c8a0: 73 20 76 61 6c 69 64 2e 3c 2f 70 3e 3c 2f 64 64  s valid.</p></dd
c8b0: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
c8c0: 61 72 67 22 3e 65 72 72 6f 72 3c 2f 69 3e 3c 2f  arg">error</i></
c8d0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65  dt>.<dd><p>The e
c8e0: 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69 73  rror argument is
c8f0: 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61   the error messa
c900: 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65  ge, if any, gene
c910: 72 61 74 65 64 20 62 79 0a 3c 62 20 63 6c 61 73  rated by.<b clas
c920: 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 58 35 30  s="function">X50
c930: 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f  9_STORE_CTX_get_
c940: 65 72 72 6f 72 28 29 3c 2f 62 3e 2e 3c 2f 70 3e  error()</b>.</p>
c950: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
c960: 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65 66 65 72 65  .</dl>.<p>Refere
c970: 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69  nce implementati
c980: 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c  ons of these cal
c990: 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69  lbacks are provi
c9a0: 64 65 64 20 69 6e 20 26 71 75 6f 74 3b 3c 62 20  ded in &quot;<b 
c9b0: 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c 73  class="file">tls
c9c0: 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 0a 61  .tcl</b>&quot;.a
c9d0: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  s <b class="cmd"
c9e0: 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f  >tls::callback</
c9f0: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  b>, <b class="cm
ca00: 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64  d">tls::password
ca10: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
ca20: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61  ss="cmd">tls::va
ca30: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
ca40: 62 3e 0a 72 65 73 70 65 63 74 69 76 65 6c 79 2e  b>.respectively.
ca50: 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73 65   Note that these
ca60: 20 61 72 65 20 6f 6e 6c 79 20 3c 65 6d 3e 73 61   are only <em>sa
ca70: 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d  mple</em> implem
ca80: 65 6e 74 61 74 69 6f 6e 73 2e 20 49 6e 20 61 20  entations. In a 
ca90: 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20 64  more.realistic d
caa0: 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 6f  eployment you wo
cab0: 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 72  uld specify your
cac0: 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63   own callback sc
cad0: 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c  ripts on each TL
cae0: 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20  S.channel using 
caf0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
cb00: 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  tion">-command</
cb10: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
cb20: 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c  tion">-password<
cb30: 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73  /b>, and.<b clas
cb40: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
cb50: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
cb60: 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70   options.</p>.<p
cb70: 3e 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68  >The default beh
cb80: 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c  avior when the <
cb90: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
cba0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 61 6e  >-command</b> an
cbb0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  d <b class="opti
cbc0: 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f  on">-validate_co
cbd0: 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e  mmand</b>.option
cbe0: 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66  s are not specif
cbf0: 69 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54  ied, is for TclT
cc00: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
cc10: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
cc20: 72 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69  rary.callbacks i
cc30: 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64  nternally. The d
cc40: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20  efault behavior 
cc50: 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73  when the <b clas
cc60: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73  s="option">-pass
cc70: 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 0a  word</b> option.
cc80: 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64  is not specified
cc90: 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74   is for TclTLS t
cca0: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73  o process the as
ccb0: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79  sociated library
ccc0: 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61 74   callbacks by.at
ccd0: 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c  tempting to call
cce0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
ccf0: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62  tls::password</b
cd00: 3e 2e 20 54 68 65 20 64 69 66 66 65 72 65 6e 63  >. The differenc
cd10: 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20  e between these 
cd20: 74 77 6f 0a 62 65 68 61 76 69 6f 72 73 20 69 73  two.behaviors is
cd30: 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f   a consequence o
cd40: 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f  f maintaining co
cd50: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68  mpatibility with
cd60: 20 65 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d 65   earlier.impleme
cd70: 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70  ntations.</p>.<p
cd80: 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20  ><em>The use of 
cd90: 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63 61  the reference ca
cda0: 6c 6c 62 61 63 6b 73 20 3c 62 20 63 6c 61 73 73  llbacks <b class
cdb0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c  ="cmd">tls::call
cdc0: 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  back</b>, <b cla
cdd0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61  ss="cmd">tls::pa
cde0: 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a 61 6e 64 20  ssword</b>,.and 
cdf0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
ce00: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d  ls::validate_com
ce10: 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 6e 6f 74 20  mand</b> is not 
ce20: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 54 68 65  recommended. The
ce30: 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64  y may be removed
ce40: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c   from future rel
ce50: 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a  eases.</em></p>.
ce60: 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  </div>.</div>.<d
ce70: 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 36 22  iv id="section6"
ce80: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
ce90: 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61  _section"><h2><a
cea0: 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 36 22   name="section6"
ceb0: 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f 68 32 3e 0a  >Debug</a></h2>.
cec0: 3c 70 3e 46 6f 72 20 6d 6f 73 74 20 64 65 62 75  <p>For most debu
ced0: 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 74 68 65  gging needs, the
cee0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
cef0: 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e  n">-callback</b>
cf00: 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 65 20 75   option can be u
cf10: 73 65 64 20 74 6f 20 70 72 6f 76 69 64 65 0a 73  sed to provide.s
cf20: 75 66 66 69 63 69 65 6e 74 20 69 6e 73 69 67 68  ufficient insigh
cf30: 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 74 69 6f  t and informatio
cf40: 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 68 61 6e  n on the TLS han
cf50: 64 73 68 61 6b 65 20 61 6e 64 20 70 72 6f 67 72  dshake and progr
cf60: 65 73 73 2e 20 49 66 0a 66 75 72 74 68 65 72 20  ess. If.further 
cf70: 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67 20  troubleshooting 
cf80: 69 6e 73 69 67 68 74 20 69 73 20 6e 65 65 64 65  insight is neede
cf90: 64 2c 20 74 68 65 20 63 6f 6d 70 69 6c 65 20 74  d, the compile t
cfa0: 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c 62 20 63 6c  ime option.<b cl
cfb0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 2d 65  ass="option">--e
cfc0: 6e 61 62 6c 65 2d 64 65 62 75 67 3c 2f 62 3e 20  nable-debug</b> 
cfd0: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 67  can be used to g
cfe0: 65 74 20 64 65 74 61 69 6c 65 64 20 65 78 65 63  et detailed exec
cff0: 75 74 69 6f 6e 20 66 6c 6f 77 20 73 74 61 74 75  ution flow statu
d000: 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c 53 20 6b 65  s.</p>.<p>TLS ke
d010: 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 65  y logging can be
d020: 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74 74   enabled by sett
d030: 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d  ing the environm
d040: 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 20  ent variable.<b 
d050: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
d060: 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f  >SSLKEYLOGFILE</
d070: 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f  b> to the name o
d080: 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f  f the file to lo
d090: 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65  g to. Then whene
d0a0: 76 65 72 20 54 4c 53 20 6b 65 79 0a 6d 61 74 65  ver TLS key.mate
d0b0: 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65  rial is generate
d0c0: 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74  d or received it
d0d0: 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20   will be logged 
d0e0: 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69  to the file. Thi
d0f0: 73 20 69 73 20 75 73 65 66 75 6c 0a 66 6f 72 20  s is useful.for 
d100: 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61  logging key data
d110: 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67   for network log
d120: 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73  ging tools to us
d130: 65 20 74 6f 20 64 65 63 72 79 70 74 20 74 68 65  e to decrypt the
d140: 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c 70 3e 54 68   data.</p>.<p>Th
d150: 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  e <b class="vari
d160: 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67  able">tls::debug
d170: 3c 2f 62 3e 20 76 61 72 69 61 62 6c 65 20 70 72  </b> variable pr
d180: 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69  ovides some addi
d190: 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20 6f  tional control o
d1a0: 76 65 72 20 74 68 65 0a 64 65 62 75 67 20 6c 6f  ver the.debug lo
d1b0: 67 67 69 6e 67 20 69 6e 20 74 68 65 20 3c 62 20  gging in the <b 
d1c0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
d1d0: 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c  :callback</b>, <
d1e0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
d1f0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c  s::password</b>,
d200: 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63   and.<b class="c
d210: 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74  md">tls::validat
d220: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 64 65  e_command</b> de
d230: 66 61 75 6c 74 20 68 61 6e 64 6c 65 72 73 20 69  fault handlers i
d240: 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  n &quot;<b class
d250: 3d 22 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c  ="file">tls.tcl<
d260: 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 68 65 20 64  /b>&quot;..The d
d270: 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 73 20  efault value is 
d280: 30 20 77 69 74 68 20 68 69 67 68 65 72 20 76 61  0 with higher va
d290: 6c 75 65 73 20 70 72 6f 64 75 63 69 6e 67 20 6d  lues producing m
d2a0: 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f  ore diagnostic o
d2b0: 75 74 70 75 74 2c 0a 61 6e 64 20 77 69 6c 6c 20  utput,.and will 
d2c0: 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 20 76  also force the v
d2d0: 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20  erify method in 
d2e0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
d2f0: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e  ls::callback</b>
d300: 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a 63   to accept the.c
d310: 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 65 6e  ertificate, even
d320: 20 69 66 20 69 74 20 69 73 20 69 6e 76 61 6c 69   if it is invali
d330: 64 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c  d when the <b cl
d340: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
d350: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
d360: 3e 0a 6f 70 74 69 6f 6e 20 69 73 20 73 65 74 20  >.option is set 
d370: 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  to <b class="cmd
d380: 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f  ">tls::validate_
d390: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e 3c 2f 70 3e  command</b>.</p>
d3a0: 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20  .<p><em>The use 
d3b0: 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 20  of the variable 
d3c0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
d3d0: 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f  le">tls::debug</
d3e0: 62 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d  b> is not recomm
d3f0: 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 62 65  ended..It may be
d400: 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75   removed from fu
d410: 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 3c 2f  ture releases.</
d420: 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  em></p>.</div>.<
d430: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 37  div id="section7
d440: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
d450: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
d460: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 37  a name="section7
d470: 22 3e 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f  ">Examples</a></
d480: 68 32 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f  h2>.<p>The follo
d490: 77 69 6e 67 20 61 72 65 20 65 78 61 6d 70 6c 65  wing are example
d4a0: 20 73 63 72 69 70 74 73 20 74 6f 20 64 6f 77 6e   scripts to down
d4b0: 6c 6f 61 64 20 61 20 77 65 62 70 61 67 65 20 61  load a webpage a
d4c0: 6e 64 20 66 69 6c 65 20 75 73 69 6e 67 20 74 68  nd file using th
d4d0: 65 0a 68 74 74 70 20 70 61 63 6b 61 67 65 2e 20  e.http package. 
d4e0: 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  See <span class=
d4f0: 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65  "sectref"><a hre
d500: 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65  f="#section4">Ce
d510: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61  rtificate Valida
d520: 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20  tion</a></span> 
d530: 66 6f 72 20 77 68 65 6e 20 74 68 65 0a 3c 62 20  for when the.<b 
d540: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
d550: 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c  cadir</b>, <b cl
d560: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
d570: 66 69 6c 65 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62  file</b>, and <b
d580: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
d590: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74  -castore</b> opt
d5a0: 69 6f 6e 73 20 61 72 65 20 61 6c 73 6f 0a 6e 65  ions are also.ne
d5b0: 65 64 65 64 2e 20 53 65 65 20 74 68 65 20 26 71  eded. See the &q
d5c0: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
d5d0: 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71 75  le">demos</b>&qu
d5e0: 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66 6f  ot; directory fo
d5f0: 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 73  r more example s
d600: 63 72 69 70 74 73 2e 3c 2f 70 3e 0a 3c 70 3e 45  cripts.</p>.<p>E
d610: 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 6e 6c  xample #1: Downl
d620: 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 3c 2f  oad a web page</
d630: 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22 64  p>.<pre class="d
d640: 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22  octools_example"
d650: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  >.package requir
d660: 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72  e http.package r
d670: 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75  equire tls.set u
d680: 72 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f  rl &quot;https:/
d690: 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 26 71 75 6f  /www.tcl.tk/&quo
d6a0: 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65  t;.http::registe
d6b0: 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73  r https 443 [lis
d6c0: 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20  t ::tls::socket 
d6d0: 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20  -autoservername 
d6e0: 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 23 20  1 -require 1].# 
d6f0: 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f 6b 65  Get URL.set toke
d700: 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20  n [http::geturl 
d710: 24 75 72 6c 5d 0a 23 20 43 68 65 63 6b 20 66 6f  $url].# Check fo
d720: 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 74  r error.if {[htt
d730: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e  p::status $token
d740: 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75  ] ne &quot;ok&qu
d750: 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20  ot;} {.    puts 
d760: 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72  [format &quot;Er
d770: 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74  ror %s&quot; [ht
d780: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65  tp::status $toke
d790: 6e 5d 5d 0a 7d 0a 23 20 53 61 76 65 20 77 65 62  n]].}.# Save web
d7a0: 20 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65   page to file.se
d7b0: 74 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70  t ch [open examp
d7c0: 6c 65 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 74 73  le.html wb].puts
d7d0: 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 74 61   $ch [http::data
d7e0: 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 20 24   $token].close $
d7f0: 63 68 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a 68  ch.# Cleanup.::h
d800: 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f  ttp::cleanup $to
d810: 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 70 3e 45 78  ken.</pre>.<p>Ex
d820: 61 6d 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f  ample #2: Downlo
d830: 61 64 20 61 20 66 69 6c 65 3c 2f 70 3e 0a 3c 70  ad a file</p>.<p
d840: 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  re class="doctoo
d850: 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63  ls_example">.pac
d860: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74  kage require htt
d870: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  p.package requir
d880: 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 71  e tls.set url &q
d890: 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 69 6b 69  uot;https://wiki
d8a0: 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 73 69  .tcl-lang.org/si
d8b0: 74 65 6d 61 70 2e 78 6d 6c 26 71 75 6f 74 3b 0a  temap.xml&quot;.
d8c0: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68  http::register h
d8d0: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a  ttps 443 [list :
d8e0: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75  :tls::socket -au
d8f0: 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d  toservername 1 -
d900: 72 65 71 75 69 72 65 20 31 5d 0a 23 20 4f 70 65  require 1].# Ope
d910: 6e 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65  n output file.se
d920: 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65  t filename [file
d930: 20 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20   tail $url].set 
d940: 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61  ch [open $filena
d950: 6d 65 20 77 62 5d 0a 23 20 47 65 74 20 66 69 6c  me wb].# Get fil
d960: 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68  e.set token [::h
d970: 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c  ttp::geturl $url
d980: 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33   -blocksize 6553
d990: 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a  6 -channel $ch].
d9a0: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f  # Check for erro
d9b0: 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61  r.if {[http::sta
d9c0: 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26  tus $token] ne &
d9d0: 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b  quot;ok&quot;} {
d9e0: 0a 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61  .    puts [forma
d9f0: 74 20 26 71 75 6f 74 3b 45 72 72 6f 72 20 25 73  t &quot;Error %s
da00: 26 71 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74  &quot; [http::st
da10: 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a  atus $token]].}.
da20: 23 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20  # Cleanup.close 
da30: 24 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61  $ch.::http::clea
da40: 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65  nup $token.</pre
da50: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
da60: 3d 22 73 65 63 74 69 6f 6e 38 22 20 63 6c 61 73  ="section8" clas
da70: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
da80: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
da90: 3d 22 73 65 63 74 69 6f 6e 38 22 3e 53 70 65 63  ="section8">Spec
daa0: 69 61 6c 20 43 6f 6e 73 69 64 65 72 61 74 69 6f  ial Consideratio
dab0: 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54  ns</a></h2>.<p>T
dac0: 68 65 20 63 61 70 61 62 69 6c 69 74 69 65 73 20  he capabilities 
dad0: 6f 66 20 74 68 69 73 20 70 61 63 6b 61 67 65 20  of this package 
dae0: 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75  can vary enormou
daf0: 73 6c 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68  sly based upon h
db00: 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f  ow the.linked to
db10: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79   OpenSSL library
db20: 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20   was configured 
db30: 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65 77 20 76  and built. New v
db40: 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f  ersions may obso
db50: 6c 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f  lete.older proto
db60: 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64  col versions, ad
db70: 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68  d or remove ciph
db80: 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61  ers, change defa
db90: 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 2e  ult values, etc.
dba0: 0a 55 73 65 20 74 68 65 20 3c 62 20 63 6c 61 73  .Use the <b clas
dbb0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f  s="cmd">tls::pro
dbc0: 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61  tocols</b> comma
dbd0: 6e 64 20 74 6f 20 6f 62 74 61 69 6e 20 74 68 65  nd to obtain the
dbe0: 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f   supported.proto
dbf0: 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70  col versions.</p
dc00: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
dc10: 3d 22 73 65 63 74 69 6f 6e 39 22 20 63 6c 61 73  ="section9" clas
dc20: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
dc30: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
dc40: 3d 22 73 65 63 74 69 6f 6e 39 22 3e 45 72 72 6f  ="section9">Erro
dc50: 72 20 4d 65 73 73 61 67 65 73 3c 2f 61 3e 3c 2f  r Messages</a></
dc60: 68 32 3e 0a 3c 70 3e 53 6f 6d 65 20 4f 70 73 6e  h2>.<p>Some Opsn
dc70: 53 53 6c 20 65 72 72 6f 72 20 6d 65 73 73 61 67  SSl error messag
dc80: 65 73 20 68 61 76 65 20 63 72 79 70 74 69 63 20  es have cryptic 
dc90: 6d 65 61 6e 69 6e 67 73 2e 20 54 68 69 73 20 69  meanings. This i
dca0: 73 20 61 20 6c 69 73 74 20 6f 66 20 6d 65 73 73  s a list of mess
dcb0: 61 67 65 73 0a 61 6c 6f 6e 67 20 77 69 74 68 20  ages.along with 
dcc0: 74 68 65 69 72 20 74 72 75 65 20 6d 65 61 6e 69  their true meani
dcd0: 6e 67 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  ng.</p>.<dl clas
dce0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69  s="doctools_defi
dcf0: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69  nitions">.<dt><i
dd00: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61 6e   class="arg">han
dd10: 64 73 68 61 6b 65 20 66 61 69 6c 65 64 3a 20 63  dshake failed: c
dd20: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66  ertificate verif
dd30: 79 20 66 61 69 6c 65 64 20 64 75 65 20 74 6f 20  y failed due to 
dd40: 26 71 75 6f 74 3b 75 6e 61 62 6c 65 20 74 6f 20  &quot;unable to 
dd50: 67 65 74 20 6c 6f 63 61 6c 20 69 73 73 75 65 72  get local issuer
dd60: 20 63 65 72 74 69 66 69 63 61 74 65 26 71 75 6f   certificate&quo
dd70: 74 3b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  t;</i></dt>.<dd>
dd80: 3c 70 3e 54 68 65 20 63 65 72 74 69 66 69 63 61  <p>The certifica
dd90: 74 65 73 20 69 6e 20 74 68 65 20 43 41 20 66 69  tes in the CA fi
dda0: 6c 65 20 6f 72 20 63 65 72 74 69 66 69 63 61 74  le or certificat
ddb0: 65 20 73 74 6f 72 65 20 65 69 74 68 65 72 20 64  e store either d
ddc0: 6f 20 6e 6f 74 20 68 61 76 65 20 6f 6e 65 20 6f  o not have one o
ddd0: 72 0a 6d 6f 72 65 20 69 73 73 75 65 72 73 20 6f  r.more issuers o
dde0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
ddf0: 65 73 20 79 6f 75 20 61 72 65 20 76 61 6c 69 64  es you are valid
de00: 61 74 69 6e 67 20 6f 72 20 74 68 65 79 20 68 61  ating or they ha
de10: 76 65 20 65 78 70 69 72 65 64 2e 0a 55 73 75 61  ve expired..Usua
de20: 6c 6c 79 20 74 68 69 73 20 6d 65 61 6e 73 20 79  lly this means y
de30: 6f 75 20 6e 65 65 64 20 61 6e 20 75 70 64 61 74  ou need an updat
de40: 65 64 20 43 41 63 65 72 74 20 66 69 6c 65 2e 3c  ed CAcert file.<
de50: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
de60: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 61 63 6b  class="arg">pack
de70: 65 74 20 6c 65 6e 67 74 68 20 74 6f 6f 20 6c 6f  et length too lo
de80: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
de90: 3c 70 3e 43 6c 69 65 6e 74 20 68 61 73 20 74 72  <p>Client has tr
dea0: 69 65 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74  ied to connect t
deb0: 6f 20 61 20 48 54 54 50 20 73 65 72 76 65 72 20  o a HTTP server 
dec0: 6f 6e 20 74 68 65 20 70 6c 61 69 6e 2d 74 65 78  on the plain-tex
ded0: 74 20 70 6f 72 74 20 69 6e 73 74 65 61 64 20 6f  t port instead o
dee0: 66 0a 74 68 65 20 53 53 4c 2f 54 4c 53 20 70 6f  f.the SSL/TLS po
def0: 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  rt.</p></dd>.<dt
df00: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
df10: 75 6e 65 78 70 65 63 74 65 64 20 65 6f 66 20 77  unexpected eof w
df20: 68 69 6c 65 20 72 65 61 64 69 6e 67 3c 2f 69 3e  hile reading</i>
df30: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
df40: 20 70 65 65 72 20 68 61 73 20 63 6c 6f 73 65 64   peer has closed
df50: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20   the connection 
df60: 77 69 74 68 6f 75 74 20 73 65 6e 64 69 6e 67 20  without sending 
df70: 74 68 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65 20  the &quot;close 
df80: 6e 6f 74 69 66 79 26 71 75 6f 74 3b 20 73 68 75  notify&quot; shu
df90: 74 64 6f 77 6e 0a 61 6c 65 72 74 2e 20 53 6f 6d  tdown.alert. Som
dfa0: 65 20 73 65 72 76 65 72 73 20 77 69 6c 6c 20 74  e servers will t
dfb0: 65 72 6d 69 6e 61 74 65 20 74 68 65 20 63 6f 6e  erminate the con
dfc0: 6e 65 63 74 69 6f 6e 20 61 66 74 65 72 20 74 68  nection after th
dfd0: 65 20 66 69 6c 65 20 6f 72 20 77 65 62 70 61 67  e file or webpag
dfe0: 65 20 68 61 73 0a 62 65 65 6e 20 73 65 6e 74 20  e has.been sent 
dff0: 77 69 74 68 6f 75 74 20 73 65 6e 64 69 6e 67 20  without sending 
e000: 74 68 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65 20  the &quot;close 
e010: 6e 6f 74 69 66 79 26 71 75 6f 74 3b 20 6d 65 73  notify&quot; mes
e020: 73 61 67 65 2e 20 49 6e 20 74 68 69 73 20 63 61  sage. In this ca
e030: 73 65 2c 20 69 74 20 73 68 6f 75 6c 64 0a 6e 6f  se, it should.no
e040: 74 20 72 65 73 75 6c 74 20 69 6e 20 61 20 6c 6f  t result in a lo
e050: 73 73 20 6f 66 20 64 61 74 61 2e 3c 2f 70 3e 3c  ss of data.</p><
e060: 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73  /dd>.<dt><i clas
e070: 73 3d 22 61 72 67 22 3e 77 72 6f 6e 67 20 76 65  s="arg">wrong ve
e080: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 3c 2f 69 3e  rsion number</i>
e090: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6c 69  </dt>.<dd><p>Cli
e0a0: 65 6e 74 20 68 61 73 20 74 72 69 65 64 20 74 6f  ent has tried to
e0b0: 20 63 6f 6e 6e 65 63 74 20 74 6f 20 61 20 6e 6f   connect to a no
e0c0: 6e 2d 48 54 54 50 20 73 65 72 76 65 72 20 6f 6e  n-HTTP server on
e0d0: 20 61 20 6e 6f 6e 2d 54 4c 53 20 28 69 2e 65 2e   a non-TLS (i.e.
e0e0: 20 70 6c 61 69 6e 20 74 65 78 74 29 20 70 6f 72   plain text) por
e0f0: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  t.</p></dd>.</dl
e100: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
e110: 3d 22 73 65 65 2d 61 6c 73 6f 22 20 63 6c 61 73  ="see-also" clas
e120: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
e130: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
e140: 3d 22 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20  ="see-also">See 
e150: 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  Also</a></h2>.<p
e160: 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a  ><a href="https:
e170: 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72  //www.openssl.or
e180: 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c  g/">OpenSSL</a>,
e190: 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 3c 2f 70   http, socket</p
e1a0: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
e1b0: 3d 22 6b 65 79 77 6f 72 64 73 22 20 63 6c 61 73  ="keywords" clas
e1c0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
e1d0: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
e1e0: 3d 22 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77  ="keywords">Keyw
e1f0: 6f 72 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  ords</a></h2>.<p
e200: 3e 49 2f 4f 2c 20 49 50 20 41 64 64 72 65 73 73  >I/O, IP Address
e210: 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20  , OpenSSL, SSL, 
e220: 54 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53  TCP, TLS, TclTLS
e230: 2c 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49  , asynchronous I
e240: 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74 69 66  /O, bind, certif
e250: 69 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20  icate, channel, 
e260: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61  connection, doma
e270: 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68  in name, host, h
e280: 74 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e  ttps, network, n
e290: 65 74 77 6f 72 6b 20 61 64 64 72 65 73 73 2c 20  etwork address, 
e2a0: 73 6f 63 6b 65 74 2c 20 74 6c 73 3c 2f 70 3e 0a  socket, tls</p>.
e2b0: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
e2c0: 63 61 74 65 67 6f 72 79 22 20 63 6c 61 73 73 3d  category" class=
e2d0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
e2e0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
e2f0: 63 61 74 65 67 6f 72 79 22 3e 43 61 74 65 67 6f  category">Catego
e300: 72 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 74  ry</a></h2>.<p>t
e310: 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  ls</p>.</div>.<d
e320: 69 76 20 69 64 3d 22 63 6f 70 79 72 69 67 68 74  iv id="copyright
e330: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
e340: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
e350: 61 20 6e 61 6d 65 3d 22 63 6f 70 79 72 69 67 68  a name="copyrigh
e360: 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e  t">Copyright</a>
e370: 3c 2f 68 32 3e 0a 3c 70 3e 43 6f 70 79 72 69 67  </h2>.<p>Copyrig
e380: 68 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d  ht &copy; 1999 M
e390: 61 74 74 20 4e 65 77 6d 61 6e 3c 62 72 3e 0a 43  att Newman<br>.C
e3a0: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20  opyright &copy; 
e3b0: 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79  2004 Starfish Sy
e3c0: 73 74 65 6d 73 3c 62 72 3e 0a 43 6f 70 79 72 69  stems<br>.Copyri
e3d0: 67 68 74 20 26 63 6f 70 79 3b 20 32 30 32 34 20  ght &copy; 2024 
e3e0: 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 3c 2f 70  Brian O'Hagan</p
e3f0: 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 3c  >.</div>.</div><
e400: 2f 62 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a        /body></html>.