Hex Artifact Content

Artifact bae5afabeb8086e7d1cd47538d261bb4a965ed6944233fd4e791acf9b30f012a:


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 62 32 20  e">tls(n) 2.0b2 
0880: 74 6c 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c  tls &quot;Tcl TL
0890: 53 20 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74  S extension&quot
08a0: 3b 3c 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22  ;</h1>.<div id="
08b0: 6e 61 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63  name" class="doc
08c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
08d0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65  h2><a name="name
08e0: 22 3e 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a  ">Name</a></h2>.
08f0: 3c 70 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67  <p>tls - binding
0900: 20 74 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   to the OpenSSL 
0910: 6c 69 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72  library for encr
0920: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64  ypted socket and
0930: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d   I/O channel com
0940: 6d 75 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a  munications</p>.
0950: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
0960: 74 6f 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  toc" class="doct
0970: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68  ools_section"><h
0980: 32 3e 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e  2><a name="toc">
0990: 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74  Table Of Content
09a0: 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63  s</a></h2>.<ul c
09b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74  lass="doctools_t
09c0: 6f 63 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  oc">.<li class="
09d0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
09e0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22  "><a href="#toc"
09f0: 3e 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e  >Table Of Conten
0a00: 74 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ts</a></li>.<li 
0a10: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0a20: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0a30: 3d 22 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e  ="#synopsis">Syn
0a40: 6f 70 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  opsis</a></li>.<
0a50: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0a60: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  ls_section"><a h
0a70: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e  ref="#section1">
0a80: 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c  Description</a><
0a90: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0aa0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
0ab0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
0ac0: 69 6f 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69 6c  ion2">Compatibil
0ad0: 69 74 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ity</a></li>.<li
0ae0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0af0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0b00: 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 6f  f="#section3">Co
0b10: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  mmands</a></li>.
0b20: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0b30: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0b40: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22  href="#section4"
0b50: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  >Certificate Val
0b60: 69 64 61 74 69 6f 6e 3c 2f 61 3e 0a 3c 75 6c 3e  idation</a>.<ul>
0b70: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
0b80: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
0b90: 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73 65  ><a href="#subse
0ba0: 63 74 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20  ction1">PKI and 
0bb0: 43 65 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e  Certificates</a>
0bc0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0bd0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63  "doctools_subsec
0be0: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
0bf0: 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d  subsection2">Sum
0c00: 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20  mary of command 
0c10: 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e  line options</a>
0c20: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0c30: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63  "doctools_subsec
0c40: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
0c50: 73 75 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65  subsection3">Whe
0c60: 6e 20 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69  n are command li
0c70: 6e 65 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65  ne options neede
0c80: 64 3f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c  d?</a></li>.</ul
0c90: 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73  >.</li>.<li clas
0ca0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
0cb0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0cc0: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63  ection5">Callbac
0cd0: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 0a 3c 75  k Options</a>.<u
0ce0: 6c 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  l>.<li class="do
0cf0: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f  ctools_subsectio
0d00: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62  n"><a href="#sub
0d10: 73 65 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73  section4">Values
0d20: 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c   for Command Cal
0d30: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  lback</a></li>.<
0d40: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0d50: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
0d60: 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74  a href="#subsect
0d70: 69 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72  ion5">Values for
0d80: 20 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61   Password Callba
0d90: 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ck</a></li>.<li 
0da0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0db0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  subsection"><a h
0dc0: 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e  ref="#subsection
0dd0: 36 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61  6">Values for Va
0de0: 6c 69 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43  lidate Command C
0df0: 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e  allback</a></li>
0e00: 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69  .</ul>.</li>.<li
0e10: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0e20: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0e30: 66 3d 22 23 73 65 63 74 69 6f 6e 36 22 3e 44 65  f="#section6">De
0e40: 62 75 67 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  bug</a></li>.<li
0e50: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0e60: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0e70: 66 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e 45 78  f="#section7">Ex
0e80: 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  amples</a></li>.
0e90: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0ea0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0eb0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 38 22  href="#section8"
0ec0: 3e 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65  >Special Conside
0ed0: 72 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e  rations</a></li>
0ee0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
0ef0: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61  ools_section"><a
0f00: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 39   href="#section9
0f10: 22 3e 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73  ">Error Messages
0f20: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0f30: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
0f40: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0f50: 23 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41  #see-also">See A
0f60: 6c 73 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  lso</a></li>.<li
0f70: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0f80: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0f90: 66 3d 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65  f="#keywords">Ke
0fa0: 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  ywords</a></li>.
0fb0: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0fc0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0fd0: 68 72 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22  href="#category"
0fe0: 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c  >Category</a></l
0ff0: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
1000: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
1010: 3c 61 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69  <a href="#copyri
1020: 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f  ght">Copyright</
1030: 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f  a></li>.</ul>.</
1040: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79  div>.<div id="sy
1050: 6e 6f 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64  nopsis" class="d
1060: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
1070: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79  ><h2><a name="sy
1080: 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73  nopsis">Synopsis
1090: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63  </a></h2>.<div c
10a0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
10b0: 79 6e 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c  ynopsis">.<ul cl
10c0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65  ass="doctools_re
10d0: 71 75 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69  quirements">.<li
10e0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
10f0: 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61   <b class="pkgna
1100: 6d 65 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e  me">Tcl 8.5-</b>
1110: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67  </li>.<li>packag
1120: 65 20 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61  e require <b cla
1130: 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73  ss="pkgname">tls
1140: 20 32 2e 30 62 32 3c 2f 62 3e 3c 2f 6c 69 3e 0a   2.0b2</b></li>.
1150: 3c 2f 75 6c 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d  </ul>.<ul class=
1160: 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78  "doctools_syntax
1170: 22 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  ">.<li><a href="
1180: 23 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #1"><b class="cm
1190: 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e  d">tls::init</b>
11a0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
11b0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
11c0: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
11d0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
11e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
11f0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
1200: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1210: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1220: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1230: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
1240: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f  i>?</span></a></
1250: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  li>.<li><a href=
1260: 22 23 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  "#2"><b class="c
1270: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
1280: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /b> <span class=
1290: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
12a0: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
12b0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
12c0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
12d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
12e0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
12f0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1300: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1310: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
1320: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  .</i>?</span> <i
1330: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73   class="arg">hos
1340: 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</i> <i class="
1350: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
1360: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1370: 65 66 3d 22 23 33 22 3e 3c 62 20 63 6c 61 73 73  ef="#3"><b class
1380: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
1390: 65 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d  et</b> <b class=
13a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72  "option">-server
13b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
13c0: 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20  rg">command</i> 
13d0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
13e0: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
13f0: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
1400: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1410: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1420: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
1430: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
1440: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1450: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1460: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
1470: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1480: 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69  ss="arg">port</i
1490: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
14a0: 61 20 68 72 65 66 3d 22 23 34 22 3e 3c 62 20 63  a href="#4"><b c
14b0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
14c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
14d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
14e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73  l</i> <span clas
14f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1500: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1510: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1520: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1530: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1540: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1550: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1560: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1570: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1580: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
1590: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
15a0: 68 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c 61  href="#5"><b cla
15b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74  ss="cmd">tls::st
15c0: 61 72 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c  arttls</b> <i cl
15d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
15e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73  l</i> <span clas
15f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1600: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1610: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1620: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1630: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1640: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1650: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1660: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1670: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1680: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
1690: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
16a0: 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63 6c 61  href="#6"><b cla
16b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61  ss="cmd">tls::ha
16c0: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63  ndshake</b> <i c
16d0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
16e0: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  el</i></a></li>.
16f0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 37 22  <li><a href="#7"
1700: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
1710: 74 6c 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f 62  tls::shutdown</b
1720: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1730: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
1740: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
1750: 66 3d 22 23 38 22 3e 3c 62 20 63 6c 61 73 73 3d  f="#8"><b class=
1760: 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70  "cmd">tls::unimp
1770: 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ort</b> <i class
1780: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
1790: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e  i></a></li>.<li>
17a0: 3c 61 20 68 72 65 66 3d 22 23 39 22 3e 3c 62 20  <a href="#9"><b 
17b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
17c0: 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e 20 3c 69 20  :unstack</b> <i 
17d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
17e0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e  nel</i></a></li>
17f0: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31  .<li><a href="#1
1800: 30 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  0"><b class="cmd
1810: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62  ">tls::status</b
1820: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1830: 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f  pt">?<b class="o
1840: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62  ption">-local</b
1850: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1860: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
1870: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  </i></a></li>.<l
1880: 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 31 22 3e  i><a href="#11">
1890: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
18a0: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f  ls::connection</
18b0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
18c0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
18d0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
18e0: 65 66 3d 22 23 31 32 22 3e 3c 62 20 63 6c 61 73  ef="#12"><b clas
18f0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70  s="cmd">tls::cip
1900: 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63  hers</b> <span c
1910: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
1920: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f  lass="arg">proto
1930: 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  col</i>?</span> 
1940: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1950: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1960: 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f  ">verbose</i>?</
1970: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1980: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1990: 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65  s="arg">supporte
19a0: 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61  d</i>?</span></a
19b0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
19c0: 65 66 3d 22 23 31 33 22 3e 3c 62 20 63 6c 61 73  ef="#13"><b clas
19d0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f  s="cmd">tls::pro
19e0: 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f  tocols</b></a></
19f0: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  li>.<li><a href=
1a00: 22 23 31 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22  "#14"><b class="
1a10: 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f  cmd">tls::versio
1a20: 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  n</b></a></li>.<
1a30: 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69  /ul>.</div>.</di
1a40: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  v>.<div id="sect
1a50: 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion1" class="doc
1a60: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
1a70: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
1a80: 69 6f 6e 31 22 3e 44 65 73 63 72 69 70 74 69 6f  ion1">Descriptio
1a90: 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68  n</a></h2>.<p>Th
1aa0: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f  is extension pro
1ab0: 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 74  vides TCL script
1ac0: 20 61 63 63 65 73 73 20 74 6f 20 53 65 63 75 72   access to Secur
1ad0: 65 20 53 6f 63 6b 65 74 20 4c 61 79 65 72 20 28  e Socket Layer (
1ae0: 53 53 4c 29 0a 63 6f 6d 6d 75 6e 69 63 61 74 69  SSL).communicati
1af0: 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20 54 72  ons using the Tr
1b00: 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65  ansport Layer Se
1b10: 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f  curity (TLS) pro
1b20: 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64  tocol. It provid
1b30: 65 73 20 61 0a 67 65 6e 65 72 69 63 20 62 69 6e  es a.generic bin
1b40: 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 3d  ding to <a href=
1b50: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65  "https://www.ope
1b60: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53  nssl.org/">OpenS
1b70: 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e  SL</a>, utilizin
1b80: 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22  g the.<b class="
1b90: 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74 61 63  syscmd">Tcl_Stac
1ba0: 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49  kChannel</b> API
1bb0: 20 69 6e 20 54 43 4c 20 38 2e 34 20 6f 72 20 6c   in TCL 8.4 or l
1bc0: 61 74 65 72 2e 20 54 68 65 73 65 20 73 6f 63 6b  ater. These sock
1bd0: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74  ets behave exact
1be0: 6c 79 0a 74 68 65 20 73 61 6d 65 20 61 73 20 63  ly.the same as c
1bf0: 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20  hannels created 
1c00: 75 73 69 6e 67 20 74 68 65 20 62 75 69 6c 74 2d  using the built-
1c10: 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73  in <b class="sys
1c20: 63 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20  cmd">socket</b> 
1c30: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 0a 70 72 6f  command, but.pro
1c40: 76 69 64 65 20 61 64 64 69 74 69 6f 6e 61 6c 20  vide additional 
1c50: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74  options for cont
1c60: 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53 4c 2f  rolling the SSL/
1c70: 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e  TLS session.</p>
1c80: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d  .</div>.<div id=
1c90: 22 73 65 63 74 69 6f 6e 32 22 20 63 6c 61 73 73  "section2" class
1ca0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
1cb0: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d  on"><h2><a name=
1cc0: 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f 6d 70 61  "section2">Compa
1cd0: 74 69 62 69 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32  tibility</a></h2
1ce0: 3e 0a 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73  >.<p>This extens
1cf0: 69 6f 6e 20 69 73 20 63 6f 6d 70 61 74 69 62 6c  ion is compatibl
1d00: 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 31  e with OpenSSL 1
1d10: 2e 31 2e 31 20 6f 72 20 6c 61 74 65 72 2e 20 49  .1.1 or later. I
1d20: 74 20 72 65 71 75 69 72 65 73 20 54 63 6c 0a 76  t requires Tcl.v
1d30: 65 72 73 69 6f 6e 20 38 2e 35 20 6f 72 20 6c 61  ersion 8.5 or la
1d40: 74 65 72 20 61 6e 64 20 77 69 6c 6c 20 77 6f 72  ter and will wor
1d50: 6b 20 77 69 74 68 20 54 63 6c 20 39 2e 30 2e 3c  k with Tcl 9.0.<
1d60: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  /p>.</div>.<div 
1d70: 69 64 3d 22 73 65 63 74 69 6f 6e 33 22 20 63 6c  id="section3" cl
1d80: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
1d90: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
1da0: 6d 65 3d 22 73 65 63 74 69 6f 6e 33 22 3e 43 6f  me="section3">Co
1db0: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a  mmands</a></h2>.
1dc0: 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  <p>The following
1dd0: 20 61 72 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64   are the command
1de0: 73 20 70 72 6f 76 69 64 65 64 20 62 79 20 74 68  s provided by th
1df0: 65 20 54 63 4c 54 4c 53 20 70 61 63 6b 61 67 65  e TcLTLS package
1e00: 2e 20 53 65 65 0a 3c 73 70 61 6e 20 63 6c 61 73  . See.<span clas
1e10: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
1e20: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e  ref="#section7">
1e30: 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 73 70  Examples</a></sp
1e40: 61 6e 3e 20 66 6f 72 20 65 78 61 6d 70 6c 65 20  an> for example 
1e50: 75 73 61 67 65 20 61 6e 64 20 74 68 65 20 26 71  usage and the &q
1e60: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
1e70: 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71 75  le">demos</b>&qu
1e80: 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66 6f  ot; directory fo
1e90: 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 75  r.more example u
1ea0: 73 61 67 65 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  sage.</p>.<dl cl
1eb0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
1ec0: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
1ed0: 3c 61 20 6e 61 6d 65 3d 22 31 22 3e 3c 62 20 63  <a name="1"><b c
1ee0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1ef0: 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63  init</b> <span c
1f00: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
1f10: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69  lass="arg">-opti
1f20: 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  on</i>?</span> <
1f30: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
1f40: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
1f50: 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61  >value</i>?</spa
1f60: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1f70: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1f80: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c  arg">-option val
1f90: 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61  ue ...</i>?</spa
1fa0: 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  n></a></dt>.<dd>
1fb0: 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63  <p>Optional func
1fc0: 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20  tion to set the 
1fd0: 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20  default options 
1fe0: 75 73 65 64 20 62 79 20 3c 62 20 63 6c 61 73 73  used by <b class
1ff0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
2000: 65 74 3c 2f 62 3e 2e 20 49 66 20 79 6f 75 0a 63  et</b>. If you.c
2010: 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  all <b class="cm
2020: 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  d">tls::import</
2030: 62 3e 20 64 69 72 65 63 74 6c 79 2c 20 74 68 65  b> directly, the
2040: 20 76 61 6c 75 65 73 20 73 65 74 20 62 79 20 74   values set by t
2050: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76 65  his command have
2060: 20 6e 6f 20 65 66 66 65 63 74 2e 0a 54 68 69 73   no effect..This
2070: 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74   command support
2080: 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61 6d  s all of the sam
2090: 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65  e options as the
20a0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
20b0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
20c0: 63 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67 68 20  command,.though 
20d0: 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74  you should limit
20e0: 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f   your options to
20f0: 20 6f 6e 6c 79 20 74 68 65 20 54 4c 53 20 72 65   only the TLS re
2100: 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c  lated ones.</p><
2110: 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65  /dd>.<dt><a name
2120: 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  ="2"><b class="c
2130: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
2140: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /b> <span class=
2150: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
2160: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
2170: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
2180: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
2190: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
21a0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
21b0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
21c0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
21d0: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
21e0: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  .</i>?</span> <i
21f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73   class="arg">hos
2200: 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</i> <i class="
2210: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
2220: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
2230: 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66  is is a helper f
2240: 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69  unction that uti
2250: 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c  lizes the underl
2260: 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 3c 62  ying commands <b
2270: 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e   class="syscmd">
2280: 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c  socket</b>.and <
2290: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
22a0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f  s::import</b> to
22b0: 20 63 72 65 61 74 65 20 74 68 65 20 63 6f 6e 6e   create the conn
22c0: 65 63 74 69 6f 6e 2e 20 49 74 20 62 65 68 61 76  ection. It behav
22d0: 65 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 74  es the same as t
22e0: 68 65 0a 6e 61 74 69 76 65 20 54 43 4c 20 3c 62  he.native TCL <b
22f0: 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e   class="syscmd">
2300: 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61  socket</b> comma
2310: 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 73 75 70  nd, but also sup
2320: 70 6f 72 74 73 20 74 68 65 20 3c 62 20 63 6c 61  ports the <b cla
2330: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d  ss="cmd">tls::im
2340: 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64  port</b>.command
2350: 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e   options with on
2360: 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74  e additional opt
2370: 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 6e 73 20  ion. It returns 
2380: 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e 64  the channel hand
2390: 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e 65  le id.for the ne
23a0: 77 20 73 6f 63 6b 65 74 2e 20 41 64 64 69 74 69  w socket. Additi
23b0: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 61 72 65  onal options are
23c0: 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  :</p>.<dl class=
23d0: 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e  "doctools_option
23e0: 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  s">.<dt><b class
23f0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 75 74 6f 73  ="option">-autos
2400: 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69  ervername</b> <i
2410: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
2420: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
2430: 70 3e 49 66 20 3c 62 20 63 6c 61 73 73 3d 22 63  p>If <b class="c
2440: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20  onst">true</b>, 
2450: 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65  automatically se
2460: 74 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  t the <b class="
2470: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e  option">-servern
2480: 61 6d 65 3c 2f 62 3e 20 61 72 67 75 6d 65 6e 74  ame</b> argument
2490: 20 74 6f 20 74 68 65 0a 3c 65 6d 3e 68 6f 73 74   to the.<em>host
24a0: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 2e 20  </em> argument. 
24b0: 50 72 69 6f 72 20 74 6f 20 54 63 6c 54 4c 53 20  Prior to TclTLS 
24c0: 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74  2.0, the default
24d0: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
24e0: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a  nst">false</b>..
24f0: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54  Starting in TclT
2500: 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61  LS 2.0, the defa
2510: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
2520: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e  "const">true</b>
2530: 20 75 6e 6c 65 73 73 20 3c 62 20 63 6c 61 73 73   unless <b class
2540: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65  ="option">-serve
2550: 72 6e 61 6d 65 3c 2f 62 3e 0a 69 73 20 61 6c 73  rname</b>.is als
2560: 6f 20 73 70 65 63 69 66 69 65 64 2e 3c 2f 70 3e  o specified.</p>
2570: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
2580: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 33 22  .<dt><a name="3"
2590: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
25a0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
25b0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
25c0: 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69  ">-server</b> <i
25d0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6d   class="arg">com
25e0: 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e 20 63  mand</i> <span c
25f0: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
2600: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69  lass="arg">-opti
2610: 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  on</i>?</span> <
2620: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
2630: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
2640: 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61  >value</i>?</spa
2650: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
2660: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2670: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c  arg">-option val
2680: 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61  ue ...</i>?</spa
2690: 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  n> <i class="arg
26a0: 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f  ">port</i></a></
26b0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 61 6d 65 20  dt>.<dd><p>Same 
26c0: 61 73 20 70 72 65 76 69 6f 75 73 20 63 6f 6d 6d  as previous comm
26d0: 61 6e 64 2c 20 62 75 74 20 69 6e 73 74 65 61 64  and, but instead
26e0: 20 63 72 65 61 74 65 73 20 61 20 73 65 72 76 65   creates a serve
26f0: 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c 69  r socket for cli
2700: 65 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 63 74 20  ents to.connect 
2710: 74 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74 68 65  to just like the
2720: 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 3d 22 73   Tcl <b class="s
2730: 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 20 2d 73  yscmd">socket -s
2740: 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e  erver</b> comman
2750: 64 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74 68  d. It returns th
2760: 65 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65  e.channel handle
2770: 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65 77 20   id for the new 
2780: 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  socket.</p></dd>
2790: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 34 22  .<dt><a name="4"
27a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
27b0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20  tls::import</b> 
27c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
27d0: 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e  hannel</i> <span
27e0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
27f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
2800: 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  tion</i>?</span>
2810: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
2820: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
2830: 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73  g">value</i>?</s
2840: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
2850: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
2860: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76  ="arg">-option v
2870: 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73  alue ...</i>?</s
2880: 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64  pan></a></dt>.<d
2890: 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  d></dd>.<dt><a n
28a0: 61 6d 65 3d 22 35 22 3e 3c 62 20 63 6c 61 73 73  ame="5"><b class
28b0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 72  ="cmd">tls::star
28c0: 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ttls</b> <i clas
28d0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
28e0: 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /i> <span class=
28f0: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
2900: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
2910: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
2920: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
2930: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
2940: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
2950: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
2960: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
2970: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
2980: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61  .</i>?</span></a
2990: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74  ></dt>.<dd><p>St
29a0: 61 72 74 20 54 4c 53 20 65 6e 63 72 79 70 74 69  art TLS encrypti
29b0: 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 6e 6e 65  on on TCL channe
29c0: 6c 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  l <i class="arg"
29d0: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 76 69 61  >channel</i> via
29e0: 20 61 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e   a stacked chann
29f0: 65 6c 2e 20 49 74 0a 6e 65 65 64 20 6e 6f 74 20  el. It.need not 
2a00: 62 65 20 61 20 73 6f 63 6b 65 74 2c 20 62 75 74  be a socket, but
2a10: 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 69   must provide bi
2a20: 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f  -directional flo
2a30: 77 2e 20 41 6c 73 6f 20 73 65 74 73 20 73 65 73  w. Also sets ses
2a40: 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65 72 73 20  sion.parameters 
2a50: 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b  for SSL handshak
2a60: 65 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73  e. Valid options
2a70: 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c   are:</p>.<dl cl
2a80: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70  ass="doctools_op
2a90: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
2aa0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61  lass="option">-a
2ab0: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  lpn</b> <i class
2ac0: 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c  ="arg">list</i><
2ad0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74  /dt>.<dd><p>List
2ae0: 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f   of protocols to
2af0: 20 6f 66 66 65 72 20 64 75 72 69 6e 67 20 41 70   offer during Ap
2b00: 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20  plication-Layer 
2b10: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61  Protocol Negotia
2b20: 74 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20 46 6f 72  tion.(ALPN). For
2b30: 20 65 78 61 6d 70 6c 65 3a 20 3c 62 20 63 6c 61   example: <b cla
2b40: 73 73 3d 22 63 6f 6e 73 74 22 3e 68 32 3c 2f 62  ss="const">h2</b
2b50: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  > and <b class="
2b60: 63 6f 6e 73 74 22 3e 68 74 74 70 2f 31 2e 31 3c  const">http/1.1<
2b70: 2f 62 3e 2c 20 62 75 74 20 6e 6f 74 20 3c 62 20  /b>, but not <b 
2b80: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 33  class="const">h3
2b90: 3c 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c 61 73 73  </b> or.<b class
2ba0: 3d 22 63 6f 6e 73 74 22 3e 71 75 69 63 3c 2f 62  ="const">quic</b
2bb0: 3e 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 69  >. This option i
2bc0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
2bd0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
2be0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
2bf0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20  ion">-cadir</b> 
2c00: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
2c10: 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74  irectory</i></dt
2c20: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
2c30: 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79  es the directory
2c40: 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69   where the Certi
2c50: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79  ficate Authority
2c60: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74   (CA) certificat
2c70: 65 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54  es are.stored. T
2c80: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c  he default is pl
2c90: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20  atform specific 
2ca0: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61  and can be set a
2cb0: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20  t compile time. 
2cc0: 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61  The.default loca
2cd0: 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72  tion can be over
2ce0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62  ridden by the <b
2cf0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
2d00: 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f  ">SSL_CERT_DIR</
2d10: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76  b> environment.v
2d20: 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70  ariable. See <sp
2d30: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65  an class="sectre
2d40: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  f"><a href="#sec
2d50: 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61  tion4">Certifica
2d60: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
2d70: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72  ></span> for mor
2d80: 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f  e details.</p></
2d90: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
2da0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c  ="option">-cafil
2db0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
2dc0: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69  arg">filename</i
2dd0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
2de0: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65  ecifies the file
2df0: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66   with the Certif
2e00: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
2e10: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
2e20: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63  s to use in.<b c
2e30: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d  lass="const">PEM
2e40: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74  </b> file format
2e50: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
2e60: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
2e70: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c  "file">cert.pem<
2e80: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68  /b>&quot;, in th
2e90: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74  e OpenSSL.direct
2ea0: 6f 72 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74  ory. The default
2eb0: 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65   file can be ove
2ec0: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c  rridden by the <
2ed0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
2ee0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45  e">SSL_CERT_FILE
2ef0: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
2f00: 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c  .variable. See <
2f10: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
2f20: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
2f30: 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69  ection4">Certifi
2f40: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
2f50: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
2f60: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e  ore details.</p>
2f70: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
2f80: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73  ss="option">-cas
2f90: 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tore</b> <i clas
2fa0: 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c  s="arg">URI</i><
2fb0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
2fc0: 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72  ifies the Unifor
2fd0: 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74  m Resource Ident
2fe0: 69 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20  ifier (URI) for 
2ff0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
3000: 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73  Authority.(CA) s
3010: 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20  tore, which may 
3020: 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74  be a single cont
3030: 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c  ainer or a catal
3040: 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73  og of containers
3050: 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20  ..Starting with 
3060: 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d  OpenSSL 3.2 on M
3070: 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74  S Windows, set t
3080: 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  o &quot;<b class
3090: 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65  ="const">org.ope
30a0: 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f  nssl.winstore://
30b0: 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73  </b>&quot;.to us
30c0: 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d  e the built-in M
30d0: 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66  S Windows Certif
30e0: 69 63 61 74 65 20 53 74 6f 72 65 2e 0a 53 65 65  icate Store..See
30f0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65   <span class="se
3100: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22  ctref"><a href="
3110: 23 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69  #section4">Certi
3120: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f  ficate Validatio
3130: 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  n</a></span> for
3140: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a 54   more details..T
3150: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65  his option is ne
3160: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
3170: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3180: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3190: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 3c  >-certfile</b> <
31a0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69  i class="arg">fi
31b0: 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  lename</i></dt>.
31c0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
31d0: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65   the name of the
31e0: 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 63   file with the c
31f0: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73  ertificate to us
3200: 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0a  e in PEM format.
3210: 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 28 63 6c  as the local (cl
3220: 69 65 6e 74 20 6f 72 20 73 65 72 76 65 72 29 20  ient or server) 
3230: 63 65 72 74 69 66 69 63 61 74 65 2e 20 49 74 20  certificate. It 
3240: 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68  also contains th
3250: 65 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 70  e public key.</p
3260: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
3270: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65  ass="option">-ce
3280: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
3290: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
32a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
32b0: 63 69 66 69 65 73 20 74 68 65 20 63 65 72 74 69  cifies the certi
32c0: 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 61 73  ficate to use as
32d0: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73   a DER encoded s
32e0: 74 72 69 6e 67 20 28 58 2e 35 30 39 20 44 45 52  tring (X.509 DER
32f0: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
3300: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3310: 22 3e 2d 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69  ">-cipher</b> <i
3320: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
3330: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
3340: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
3350: 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  e list of cipher
3360: 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53  s to use for TLS
3370: 20 31 2e 32 20 61 6e 64 20 65 61 72 6c 69 65 72   1.2 and earlier
3380: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 0a 53 74   connections..St
3390: 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20  ring is a colon 
33a0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
33b0: 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f  const">:</b>&quo
33c0: 74 3b 20 73 65 70 61 72 61 74 65 64 20 6c 69 73  t; separated lis
33d0: 74 20 6f 66 20 63 69 70 68 65 72 73 2e 0a 43 69  t of ciphers..Ci
33e0: 70 68 65 72 73 20 63 61 6e 20 62 65 20 63 6f 6d  phers can be com
33f0: 62 69 6e 65 64 20 75 73 69 6e 67 20 74 68 65 20  bined using the 
3400: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
3410: 63 6f 6e 73 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f  const">+</b>&quo
3420: 74 3b 20 63 68 61 72 61 63 74 65 72 2e 0a 50 72  t; character..Pr
3430: 65 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 73  efixes can be us
3440: 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c  ed to permanentl
3450: 79 20 72 65 6d 6f 76 65 20 26 71 75 6f 74 3b 3c  y remove &quot;<
3460: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
3470: 21 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 64 65 6c  !</b>&quot;, del
3480: 65 74 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61  ete &quot;<b cla
3490: 73 73 3d 22 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e  ss="const">-</b>
34a0: 26 71 75 6f 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20  &quot;, or.move 
34b0: 74 6f 20 74 68 65 20 65 6e 64 20 26 71 75 6f 74  to the end &quot
34c0: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
34d0: 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 61 20  ">+</b>&quot; a 
34e0: 73 70 65 63 69 66 69 65 64 20 63 69 70 68 65 72  specified cipher
34f0: 2e 0a 4b 65 79 77 6f 72 64 73 20 3c 62 20 63 6c  ..Keywords <b cl
3500: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 40 53 54 52  ass="const">@STR
3510: 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20  ENGTH</b> (sort 
3520: 62 79 20 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79  by algorithm key
3530: 20 6c 65 6e 67 74 68 29 2c 0a 3c 62 20 63 6c 61   length),.<b cla
3540: 73 73 3d 22 63 6f 6e 73 74 22 3e 40 53 45 43 4c  ss="const">@SECL
3550: 45 56 45 4c 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f  EVEL=</b><em>n</
3560: 65 6d 3e 20 28 73 65 74 20 73 65 63 75 72 69 74  em> (set securit
3570: 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61  y level to n), a
3580: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  nd.<b class="con
3590: 73 74 22 3e 44 45 46 41 55 4c 54 3c 2f 62 3e 20  st">DEFAULT</b> 
35a0: 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 69 70  (use default cip
35b0: 68 65 72 20 6c 69 73 74 2c 20 61 74 20 73 74 61  her list, at sta
35c0: 72 74 20 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73  rt only) can als
35d0: 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e 0a  o be specified..
35e0: 53 65 65 20 74 68 65 20 3c 61 20 68 72 65 66 3d  See the <a href=
35f0: 22 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70  "https://docs.op
3600: 65 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72  enssl.org/master
3610: 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69  /man1/openssl-ci
3620: 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e  phers/#options">
3630: 4f 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75  OpenSSL</a>.docu
3640: 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68  mentation for th
3650: 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76  e full list of v
3660: 61 6c 69 64 20 76 61 6c 75 65 73 2e 3c 2f 70 3e  alid values.</p>
3670: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3680: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70  ss="option">-cip
3690: 68 65 72 73 75 69 74 65 73 3c 2f 62 3e 20 3c 69  hersuites</b> <i
36a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
36b0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
36c0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
36d0: 65 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72  e list of cipher
36e0: 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 20 66   suites to use f
36f0: 6f 72 20 54 4c 53 20 31 2e 33 20 61 73 20 61 20  or TLS 1.3 as a 
3700: 63 6f 6c 6f 6e 0a 26 71 75 6f 74 3b 3c 62 20 63  colon.&quot;<b c
3710: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f  lass="const">:</
3720: 62 3e 26 71 75 6f 74 3b 20 73 65 70 61 72 61 74  b>&quot; separat
3730: 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65  ed list of ciphe
3740: 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 53  r suite names. S
3750: 65 65 20 74 68 65 0a 3c 61 20 68 72 65 66 3d 22  ee the.<a href="
3760: 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65  https://docs.ope
3770: 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f  nssl.org/master/
3780: 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70  man1/openssl-cip
3790: 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f  hers/#options">O
37a0: 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d  penSSL</a>.docum
37b0: 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65  entation for the
37c0: 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61   full list of va
37d0: 6c 69 64 20 76 61 6c 75 65 73 2e 0a 54 68 69 73  lid values..This
37e0: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66   option is new f
37f0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
3800: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
3810: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
3820: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c  ommand</b> <i cl
3830: 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61  ass="arg">callba
3840: 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ck</i></dt>.<dd>
3850: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
3860: 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e   callback comman
3870: 64 20 74 6f 20 62 65 20 69 6e 76 6f 6b 65 64 20  d to be invoked 
3880: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
3890: 73 20 64 75 72 69 6e 67 20 74 68 65 0a 68 61 6e  s during the.han
38a0: 64 73 68 61 6b 65 20 74 6f 20 70 61 73 73 20 65  dshake to pass e
38b0: 72 72 6f 72 73 2c 20 74 72 61 63 69 6e 67 20 69  rrors, tracing i
38c0: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20  nformation, and 
38d0: 70 72 6f 74 6f 63 6f 6c 20 6d 65 73 73 61 67 65  protocol message
38e0: 73 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  s..See <span cla
38f0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
3900: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22  href="#section5"
3910: 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e  >Callback Option
3920: 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  s</a></span> for
3930: 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c   more info.</p><
3940: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
3950: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 64 68 70 61  s="option">-dhpa
3960: 72 61 6d 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  rams</b> <i clas
3970: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65  s="arg">filename
3980: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3990: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 44  >Specifies the D
39a0: 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 28 44  iffie-Hellman (D
39b0: 48 29 20 70 61 72 61 6d 65 74 65 72 73 20 66 69  H) parameters fi
39c0: 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  le.</p></dd>.<dt
39d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
39e0: 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20  n">-keyfile</b> 
39f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66  <i class="arg">f
3a00: 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e  ilename</i></dt>
3a10: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
3a20: 73 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  s the private ke
3a30: 79 20 66 69 6c 65 2e 20 54 68 65 20 64 65 66 61  y file. The defa
3a40: 75 6c 74 20 69 73 20 74 6f 20 75 73 65 20 74 68  ult is to use th
3a50: 65 20 66 69 6c 65 0a 73 70 65 63 69 66 69 65 64  e file.specified
3a60: 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73   by the <b class
3a70: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66  ="option">-certf
3a80: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c  ile</b> option.<
3a90: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
3aa0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
3ab0: 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  key</b> <i class
3ac0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
3ad0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
3ae0: 65 63 69 66 69 65 73 20 74 68 65 20 70 72 69 76  ecifies the priv
3af0: 61 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61  ate key to use a
3b00: 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20  s a DER encoded 
3b10: 73 74 72 69 6e 67 20 28 50 4b 43 53 23 31 20 44  string (PKCS#1 D
3b20: 45 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ER).</p></dd>.<d
3b30: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3b40: 6f 6e 22 3e 2d 6d 6f 64 65 6c 3c 2f 62 3e 20 3c  on">-model</b> <
3b50: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
3b60: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  annel</i></dt>.<
3b70: 64 64 3e 3c 70 3e 46 6f 72 63 65 20 74 68 69 73  dd><p>Force this
3b80: 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72   channel to shar
3b90: 65 20 74 68 65 20 73 61 6d 65 20 3c 69 20 63 6c  e the same <i cl
3ba0: 61 73 73 3d 22 74 65 72 6d 22 3e 53 53 4c 5f 43  ass="term">SSL_C
3bb0: 54 58 3c 2f 69 3e 20 73 74 72 75 63 74 75 72 65  TX</i> structure
3bc0: 20 61 73 20 74 68 65 0a 73 70 65 63 69 66 69 65   as the.specifie
3bd0: 64 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  d <i class="arg"
3be0: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2c 20 61 6e  >channel</i>, an
3bf0: 64 20 74 68 65 72 65 66 6f 72 65 20 73 68 61 72  d therefore shar
3c00: 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c 6c 62 61  e config, callba
3c10: 63 6b 73 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64  cks, etc.</p></d
3c20: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3c30: 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f  "option">-passwo
3c40: 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rd</b> <i class=
3c50: 22 61 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f  "arg">callback</
3c60: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
3c70: 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c  pecifies the cal
3c80: 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f  lback command to
3c90: 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65   invoke when Ope
3ca0: 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62  nSSL needs to ob
3cb0: 74 61 69 6e 20 61 0a 70 61 73 73 77 6f 72 64 2e  tain a.password.
3cc0: 20 54 68 69 73 20 69 73 20 74 79 70 69 63 61 6c   This is typical
3cd0: 6c 79 20 75 73 65 64 20 74 6f 20 75 6e 6c 6f 63  ly used to unloc
3ce0: 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  k the private ke
3cf0: 79 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61  y of a certifica
3d00: 74 65 2e 0a 54 68 65 20 63 61 6c 6c 62 61 63 6b  te..The callback
3d10: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61   should return a
3d20: 20 70 61 73 73 77 6f 72 64 20 73 74 72 69 6e 67   password string
3d30: 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 68 61  . This option ha
3d40: 73 20 63 68 61 6e 67 65 64 20 66 6f 72 0a 54 63  s changed for.Tc
3d50: 6c 54 4c 53 20 31 2e 38 2e 20 53 65 65 20 3c 73  lTLS 1.8. See <s
3d60: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
3d70: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
3d80: 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b  ction5">Callback
3d90: 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70   Options</a></sp
3da0: 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66  an> for more inf
3db0: 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  o.</p></dd>.<dt>
3dc0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3dd0: 22 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b  ">-post_handshak
3de0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
3df0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
3e00: 74 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20  t>.<dd><p>Allow 
3e10: 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73  post-handshake s
3e20: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70  ession ticket up
3e30: 64 61 74 65 73 2e 20 54 68 69 73 20 6f 70 74 69  dates. This opti
3e40: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  on is new for Tc
3e50: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
3e60: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3e70: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73  "option">-reques
3e80: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
3e90: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
3ea0: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73  t>.<dd><p>Reques
3eb0: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
3ec0: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75  from the peer du
3ed0: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e  ring the SSL han
3ee0: 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20  dshake. This is 
3ef0: 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72  needed.to do Cer
3f00: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
3f10: 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  ion. Starting in
3f20: 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65   TclTLS 1.8, the
3f30: 20 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63   default is.<b c
3f40: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
3f50: 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74  e</b> for client
3f60: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 53 74   connections. St
3f70: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
3f80: 20 32 2e 30 2c 20 69 66 20 73 65 74 20 74 6f 0a   2.0, if set to.
3f90: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
3fa0: 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 20 3c  >false</b> and <
3fb0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3fc0: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73  >-require</b> is
3fd0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
3fe0: 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e  ">true</b>, then
3ff0: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a 6f 76   this will be.ov
4000: 65 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63  erridden to <b c
4010: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
4020: 65 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e  e</b>..See <span
4030: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22   class="sectref"
4040: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69  ><a href="#secti
4050: 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65  on4">Certificate
4060: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c   Validation</a><
4070: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20  /span> for more 
4080: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  details.</p></dd
4090: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
40a0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65  option">-require
40b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
40c0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
40d0: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65  >.<dd><p>Require
40e0: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69   a valid certifi
40f0: 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65  cate from the pe
4100: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53  er during the SS
4110: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20  L handshake. If 
4120: 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74  this is.set to t
4130: 72 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61  rue, then <b cla
4140: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71  ss="option">-req
4150: 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c  uest</b> must al
4160: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75  so be set to tru
4170: 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 3c  e and a either.<
4180: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4190: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20  >-cadir</b>, <b 
41a0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
41b0: 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63  cafile</b>, <b c
41c0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
41d0: 61 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61  astore</b>, or a
41e0: 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c   platform defaul
41f0: 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64  t.must be provid
4200: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76  ed in order to v
4210: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e  alidate against.
4220: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e 20   The default in 
4230: 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65  TclTLS 1.8 and.e
4240: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20  arlier versions 
4250: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4260: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69  st">false</b> si
4270: 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74  nce not all plat
4280: 66 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69  forms have certi
4290: 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64  ficates to.valid
42a0: 61 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61  ate against in a
42b0: 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65   form compatible
42c0: 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53   with OpenSSL. S
42d0: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c  tarting in TclTL
42e0: 53 20 32 2e 30 2c 0a 74 68 65 20 64 65 66 61 75  S 2.0,.the defau
42f0: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  lt is <b class="
4300: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20  const">true</b> 
4310: 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65  for client conne
4320: 63 74 69 6f 6e 73 2e 0a 53 65 65 20 3c 73 70 61  ctions..See <spa
4330: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
4340: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
4350: 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74  ion4">Certificat
4360: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
4370: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
4380: 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64   details.</p></d
4390: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
43a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69  "option">-securi
43b0: 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20  ty_level</b> <i 
43c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 6e 74 65  class="arg">inte
43d0: 67 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ger</i></dt>.<dd
43e0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
43f0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
4400: 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74   (value from 0 t
4410: 6f 20 35 29 2e 20 54 68 65 20 73 65 63 75 72 69  o 5). The securi
4420: 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73  ty level affects
4430: 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70  .the allowed cip
4440: 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 79 70  her suite encryp
4450: 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c  tion algorithms,
4460: 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 20 63   supported ECC c
4470: 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64  urves,.supported
4480: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
4490: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65  ithms, DH parame
44a0: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69  ter sizes, certi
44b0: 66 69 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73  ficate key sizes
44c0: 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61  .and signature a
44d0: 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64  lgorithms. The d
44e0: 65 66 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f  efault is 1 prio
44f0: 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32  r to OpenSSL 3.2
4500: 20 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65   and 2.thereafte
4510: 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68  r. Level 3 and h
4520: 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75  igher disable su
4530: 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f  pport for sessio
4540: 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e  n tickets and.on
4550: 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 65 72  ly accept cipher
4560: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f   suites that pro
4570: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63  vide forward sec
4580: 72 65 63 79 2e 0a 54 68 69 73 20 6f 70 74 69 6f  recy..This optio
4590: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  n is new for Tcl
45a0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
45b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
45c0: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c  option">-server<
45d0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
45e0: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
45f0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
4600: 73 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74  s whether to act
4610: 20 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64   as a server and
4620: 20 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20   respond with a 
4630: 73 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65  server handshake
4640: 20 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63   when a.client c
4650: 6f 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76  onnects and prov
4660: 69 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61  ides a client ha
4670: 6e 64 73 68 61 6b 65 2e 20 54 68 65 20 64 65 66  ndshake. The def
4680: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4690: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
46a0: 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  b>.</p></dd>.<dt
46b0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
46c0: 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f  n">-servername</
46d0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
46e0: 22 3e 68 6f 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f  ">hostname</i></
46f0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
4700: 66 79 20 74 68 65 20 70 65 65 72 27 73 20 68 6f  fy the peer's ho
4710: 73 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20  stname. This is 
4720: 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20  used to set the 
4730: 54 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 20  TLS Server Name 
4740: 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29  Indication.(SNI)
4750: 20 65 78 74 65 6e 73 69 6f 6e 2e 20 53 65 74 20   extension. Set 
4760: 74 68 69 73 20 74 6f 20 74 68 65 20 65 78 70 65  this to the expe
4770: 63 74 65 64 20 73 65 72 76 65 72 6e 61 6d 65 20  cted servername 
4780: 69 6e 20 74 68 65 20 73 65 72 76 65 72 27 73 20  in the server's 
4790: 63 65 72 74 69 66 69 63 61 74 65 0a 6f 72 20 6f  certificate.or o
47a0: 6e 65 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63  ne of the Subjec
47b0: 74 20 41 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65  t Alternate Name
47c0: 73 20 28 53 41 4e 29 2e 20 53 74 61 72 74 69 6e  s (SAN). Startin
47d0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
47e0: 20 74 68 69 73 20 77 69 6c 6c 0a 64 65 66 61 75   this will.defau
47f0: 6c 74 20 74 6f 20 74 68 65 20 68 6f 73 74 20 66  lt to the host f
4800: 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73  rom the <b class
4810: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
4820: 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c  et</b> command.<
4830: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4840: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4850: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c  session_id</b> <
4860: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69  i class="arg">bi
4870: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c  nary_string</i><
4880: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
4890: 69 66 69 65 73 20 74 68 65 20 73 65 73 73 69 6f  ifies the sessio
48a0: 6e 20 69 64 20 74 6f 20 72 65 73 75 6d 65 20 61  n id to resume a
48b0: 20 73 65 73 73 69 6f 6e 2e 20 4e 6f 74 20 73 75   session. Not su
48c0: 70 70 6f 72 74 65 64 20 79 65 74 2e 0a 54 68 69  pported yet..Thi
48d0: 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20  s option is new 
48e0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
48f0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4900: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4910: 73 73 6c 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ssl2</b> <i clas
4920: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
4930: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61  </dt>.<dd><p>Ena
4940: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
4950: 32 2e 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  2.The default is
4960: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
4970: 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4f 70 65  ">false</b>..Ope
4980: 6e 53 53 4c 20 31 2e 31 2b 20 6e 6f 20 6c 6f 6e  nSSL 1.1+ no lon
4990: 67 65 72 20 73 75 70 70 6f 72 74 73 20 53 53 4c  ger supports SSL
49a0: 20 76 32 2c 20 73 6f 20 74 68 69 73 20 6d 61 79   v2, so this may
49b0: 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 65 66   not have any ef
49c0: 66 65 63 74 2e 0a 53 65 65 20 74 68 65 20 3c 62  fect..See the <b
49d0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
49e0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20  ::protocols</b> 
49f0: 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70  command for supp
4a00: 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e  orted protocols.
4a10: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
4a20: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
4a30: 2d 73 73 6c 33 3c 2f 62 3e 20 3c 69 20 63 6c 61  -ssl3</b> <i cla
4a40: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69  ss="arg">bool</i
4a50: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e  ></dt>.<dd><p>En
4a60: 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20  able use of SSL 
4a70: 76 33 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  v3. The default 
4a80: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4a90: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 20 53  st">false</b>. S
4aa0: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c  tarting in TclTL
4ab0: 53 20 31 2e 38 2c 0a 75 73 65 20 6f 66 20 53 53  S 1.8,.use of SS
4ac0: 4c 20 76 33 20 69 66 20 6f 6e 6c 79 20 61 76 61  L v3 if only ava
4ad0: 69 6c 61 62 6c 65 20 76 69 61 20 61 20 63 6f 6d  ilable via a com
4ae0: 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e  pile time option
4af0: 2e 0a 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61  ..See the <b cla
4b00: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72  ss="cmd">tls::pr
4b10: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d  otocols</b> comm
4b20: 61 6e 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65  and for supporte
4b30: 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e  d protocols.</p>
4b40: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
4b50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73  ss="option">-tls
4b60: 31 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  1</b> <i class="
4b70: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
4b80: 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65  t>.<dd><p>Enable
4b90: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 20   use of TLS v1. 
4ba0: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54  Starting in TclT
4bb0: 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61  LS 2.0, the defa
4bc0: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
4bd0: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62  "const">false</b
4be0: 3e 2e 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 30  >..Note: TLS 1.0
4bf0: 20 6e 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f   needs SHA1 to o
4c00: 70 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73  perate, which is
4c10: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20   only available 
4c20: 69 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65  in security leve
4c30: 6c 0a 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c  l.0 for Open SSL
4c40: 20 33 2e 30 2b 2e 20 53 65 65 20 74 68 65 20 3c   3.0+. See the <
4c50: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4c60: 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c  >-security_level
4c70: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e  </b> option.</p>
4c80: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
4c90: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73  ss="option">-tls
4ca0: 31 2e 31 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  1.1</b> <i class
4cb0: 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c  ="arg">bool</i><
4cc0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62  /dt>.<dd><p>Enab
4cd0: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31  le use of TLS v1
4ce0: 2e 31 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20  .1. Starting in 
4cf0: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20  TclTLS 2.0, the 
4d00: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c  default is <b cl
4d10: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73  ass="const">fals
4d20: 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a 20 54 4c 53  e</b>..Note: TLS
4d30: 20 31 2e 31 20 6e 65 65 64 73 20 53 48 41 31 20   1.1 needs SHA1 
4d40: 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63  to operate, whic
4d50: 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61  h is only availa
4d60: 62 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79 20  ble in security 
4d70: 6c 65 76 65 6c 0a 30 20 66 6f 72 20 4f 70 65 6e  level.0 for Open
4d80: 20 53 53 4c 20 33 2e 30 2b 2e 20 53 65 65 20 74   SSL 3.0+. See t
4d90: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
4da0: 69 6f 6e 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c  ion">-security_l
4db0: 65 76 65 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e  evel</b> option.
4dc0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
4dd0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
4de0: 2d 74 6c 73 31 2e 32 3c 2f 62 3e 20 3c 69 20 63  -tls1.2</b> <i c
4df0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
4e00: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
4e10: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
4e20: 53 20 76 31 2e 32 2e 20 54 68 65 20 64 65 66 61  S v1.2. The defa
4e30: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
4e40: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e  "const">true</b>
4e50: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4e60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4e70: 3e 2d 74 6c 73 31 2e 33 3c 2f 62 3e 20 3c 69 20  >-tls1.3</b> <i 
4e80: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
4e90: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
4ea0: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
4eb0: 4c 53 20 76 31 2e 33 2e 20 54 68 65 20 64 65 66  LS v1.3. The def
4ec0: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4ed0: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62  ="const">true</b
4ee0: 3e 2e 20 54 68 69 73 20 69 73 20 6f 6e 6c 79 20  >. This is only 
4ef0: 61 76 61 69 6c 61 62 6c 65 0a 73 74 61 72 74 69  available.starti
4f00: 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20  ng with OpenSSL 
4f10: 31 2e 31 2e 31 20 61 6e 64 20 54 63 6c 54 4c 53  1.1.1 and TclTLS
4f20: 20 31 2e 37 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.7.</p></dd>.<
4f30: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
4f40: 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f  ion">-validateco
4f50: 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  mmand</b> <i cla
4f60: 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61 63  ss="arg">callbac
4f70: 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  k</i></dt>.<dd><
4f80: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
4f90: 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64  callback command
4fa0: 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76 61   to invoke to va
4fb0: 6c 69 64 61 74 65 20 74 68 65 20 70 65 65 72 20  lidate the peer 
4fc0: 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 6e 64  certificates.and
4fd0: 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 20 69 6e   other config in
4fe0: 66 6f 20 64 75 72 69 6e 67 20 74 68 65 20 70 72  fo during the pr
4ff0: 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 69  otocol negotiati
5000: 6f 6e 20 70 68 61 73 65 2e 20 54 68 69 73 20 63  on phase. This c
5010: 61 6e 20 62 65 20 75 73 65 64 0a 62 79 20 54 43  an be used.by TC
5020: 4c 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 72  L scripts to per
5030: 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 6e 20 43  form their own C
5040: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
5050: 61 74 69 6f 6e 20 74 6f 20 73 75 70 70 6c 65 6d  ation to supplem
5060: 65 6e 74 20 74 68 65 0a 64 65 66 61 75 6c 74 20  ent the.default 
5070: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69  validation provi
5080: 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e 20  ded by OpenSSL. 
5090: 54 68 65 20 73 63 72 69 70 74 20 6d 75 73 74 20  The script must 
50a0: 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 61 6e  return a boolean
50b0: 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69 6e 75   true.to continu
50c0: 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74 69 6f  e the negotiatio
50d0: 6e 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  n. See <span cla
50e0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
50f0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22  href="#section5"
5100: 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e  >Callback Option
5110: 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  s</a></span> for
5120: 20 6d 6f 72 65 20 69 6e 66 6f 2e 0a 54 68 69 73   more info..This
5130: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66   option is new f
5140: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
5150: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64  p></dd>.</dl></d
5160: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  d>.<dt><a name="
5170: 36 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  6"><b class="cmd
5180: 22 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65  ">tls::handshake
5190: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
51a0: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  rg">channel</i><
51b0: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
51c0: 46 6f 72 63 65 73 20 74 68 65 20 54 4c 53 20 6e  Forces the TLS n
51d0: 65 67 6f 74 69 61 74 69 6f 6e 20 68 61 6e 64 73  egotiation hands
51e0: 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c 61  hake to take pla
51f0: 63 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 2c 20  ce immediately, 
5200: 61 6e 64 20 72 65 74 75 72 6e 73 20 30 0a 69 66  and returns 0.if
5210: 20 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74   handshake is st
5220: 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20  ill in progress 
5230: 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20  (non-blocking), 
5240: 6f 72 20 31 20 69 66 20 74 68 65 20 68 61 6e 64  or 1 if the hand
5250: 73 68 61 6b 65 20 77 61 73 0a 73 75 63 63 65 73  shake was.succes
5260: 73 66 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e  sful. If the han
5270: 64 73 68 61 6b 65 20 66 61 69 6c 65 64 2c 20 61  dshake failed, a
5280: 6e 20 65 72 72 6f 72 20 77 69 6c 6c 20 62 65 20  n error will be 
5290: 72 65 74 75 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64  returned.</p></d
52a0: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  d>.<dt><a name="
52b0: 37 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  7"><b class="cmd
52c0: 22 3e 74 6c 73 3a 3a 73 68 75 74 64 6f 77 6e 3c  ">tls::shutdown<
52d0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
52e0: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  g">channel</i></
52f0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 2f 64 64  a></dt>.<dd></dd
5300: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 38  >.<dt><a name="8
5310: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
5320: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f  >tls::unimport</
5330: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5340: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
5350: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 2f 64 64 3e  ></dt>.<dd></dd>
5360: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 39 22  .<dt><a name="9"
5370: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
5380: 74 6c 73 3a 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e  tls::unstack</b>
5390: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
53a0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
53b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73  /dt>.<dd><p>This
53c0: 20 74 65 72 6d 69 6e 61 74 65 73 20 74 68 65 20   terminates the 
53d0: 53 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 20  SSL/TLS session 
53e0: 62 79 20 73 65 6e 64 69 6e 67 20 74 68 65 20 26  by sending the &
53f0: 71 75 6f 74 3b 63 6c 6f 73 65 5f 6e 6f 74 69 66  quot;close_notif
5400: 79 26 71 75 6f 74 3b 20 6d 65 73 73 61 67 65 20  y&quot; message 
5410: 61 6e 64 0a 72 65 6d 6f 76 65 73 20 74 68 65 20  and.removes the 
5420: 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 6b 65  top level stacke
5430: 64 20 63 68 61 6e 6e 65 6c 20 66 72 6f 6d 20 3c  d channel from <
5440: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
5450: 61 6e 6e 65 6c 3c 2f 69 3e 2c 20 62 75 74 20 69  annel</i>, but i
5460: 74 20 64 6f 65 73 20 6e 6f 74 20 63 6c 6f 73 65  t does not close
5470: 0a 74 68 65 20 73 6f 63 6b 65 74 2e 20 49 74 20  .the socket. It 
5480: 69 73 20 74 68 65 20 63 6f 6d 70 6c 69 6d 65 6e  is the complimen
5490: 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63  t to <b class="c
54a0: 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c  md">tls::import<
54b0: 2f 62 3e 20 62 79 20 65 6e 64 69 6e 67 20 65 6e  /b> by ending en
54c0: 63 72 79 70 74 69 6f 6e 20 6f 66 0a 61 20 54 43  cryption of.a TC
54d0: 4c 20 63 68 61 6e 6e 65 6c 2e 20 41 6e 20 65 72  L channel. An er
54e0: 72 6f 72 20 69 73 20 74 68 72 6f 77 6e 20 69 66  ror is thrown if
54f0: 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20   TLS is not the 
5500: 74 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e  top stacked chan
5510: 6e 65 6c 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64  nel type.</p></d
5520: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  d>.<dt><a name="
5530: 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  10"><b class="cm
5540: 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f  d">tls::status</
5550: 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  b> <span class="
5560: 6f 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22  opt">?<b class="
5570: 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f  option">-local</
5580: 62 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c  b>?</span> <i cl
5590: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
55a0: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  l</i></a></dt>.<
55b0: 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74 68  dd><p>Returns th
55c0: 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 75 73  e current status
55d0: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e   of an SSL chann
55e0: 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69  el. The result i
55f0: 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d  s a list of key-
5600: 76 61 6c 75 65 0a 70 61 69 72 73 20 64 65 73 63  value.pairs desc
5610: 72 69 62 69 6e 67 20 74 68 65 20 53 53 4c 2c 20  ribing the SSL, 
5620: 63 65 72 74 69 66 69 63 61 74 65 2c 20 61 6e 64  certificate, and
5630: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72   certificate ver
5640: 69 66 69 63 61 74 69 6f 6e 20 73 74 61 74 75 73  ification status
5650: 2e 20 49 66 0a 74 68 65 20 53 53 4c 20 68 61 6e  . If.the SSL han
5660: 64 73 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79  dshake has not y
5670: 65 74 20 63 6f 6d 70 6c 65 74 65 64 2c 20 61 6e  et completed, an
5680: 20 65 6d 70 74 79 20 6c 69 73 74 20 69 73 20 72   empty list is r
5690: 65 74 75 72 6e 65 64 2e 20 49 66 20 74 68 65 0a  eturned. If the.
56a0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
56b0: 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 20 6f 70 74  ">-local</b> opt
56c0: 69 6f 6e 20 69 73 20 73 70 65 63 69 66 69 65 64  ion is specified
56d0: 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c  , then the local
56e0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20   certificate is 
56f0: 75 73 65 64 2e 0a 52 65 74 75 72 6e 65 64 20 76  used..Returned v
5700: 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f  alues include:</
5710: 70 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73  p>.<p>SSL Status
5720: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
5730: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
5740: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
5750: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61  ass="variable">a
5760: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  lpn</b> <i class
5770: 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c  ="arg">protocol<
5780: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5790: 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c  The protocol sel
57a0: 65 63 74 65 64 20 61 66 74 65 72 20 41 70 70 6c  ected after Appl
57b0: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72  ication-Layer Pr
57c0: 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69  otocol Negotiati
57d0: 6f 6e 20 28 41 4c 50 4e 29 2e 0a 54 68 69 73 20  on (ALPN)..This 
57e0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
57f0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
5800: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5810: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69  ss="variable">ci
5820: 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  pher</b> <i clas
5830: 73 3d 22 61 72 67 22 3e 63 69 70 68 65 72 3c 2f  s="arg">cipher</
5840: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
5850: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65  he current ciphe
5860: 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65  r in use for the
5870: 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64   session.</p></d
5880: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5890: 22 76 61 72 69 61 62 6c 65 22 3e 70 65 65 72 6e  "variable">peern
58a0: 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ame</b> <i class
58b0: 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c  ="arg">name</i><
58c0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
58d0: 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68  peername from th
58e0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54  e certificate..T
58f0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
5900: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
5910: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5920: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5930: 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c  ">protocol</b> <
5940: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
5950: 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rsion</i></dt>.<
5960: 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63  dd><p>The protoc
5970: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20  ol version used 
5980: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  for the connecti
5990: 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20  on: SSL2, SSL3, 
59a0: 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c  TLS1, TLS1.1, TL
59b0: 53 31 2e 32 2c 0a 54 4c 53 31 2e 33 2c 20 6f 72  S1.2,.TLS1.3, or
59c0: 20 75 6e 6b 6e 6f 77 6e 2e 20 54 68 69 73 20 76   unknown. This v
59d0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
59e0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
59f0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5a00: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 62 69  s="variable">sbi
5a10: 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ts</b> <i class=
5a20: 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e  "arg">n</i></dt>
5a30: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62  .<dd><p>The numb
5a40: 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20  er of bits used 
5a50: 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20  for the session 
5a60: 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  key.</p></dd>.<d
5a70: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5a80: 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 48  able">signatureH
5a90: 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e  ashAlgorithm</b>
5aa0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5ab0: 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64  algorithm</i></d
5ac0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69  t>.<dd><p>The si
5ad0: 67 6e 61 74 75 72 65 20 68 61 73 68 20 61 6c 67  gnature hash alg
5ae0: 6f 72 69 74 68 6d 2e 0a 54 68 69 73 20 76 61 6c  orithm..This val
5af0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5b00: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5b10: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5b20: 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61  "variable">signa
5b30: 74 75 72 65 54 79 70 65 3c 2f 62 3e 20 3c 69 20  tureType</b> <i 
5b40: 63 6c 61 73 73 3d 22 61 72 67 22 3e 74 79 70 65  class="arg">type
5b50: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5b60: 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74  >The signature t
5b70: 79 70 65 20 76 61 6c 75 65 2e 0a 54 68 69 73 20  ype value..This 
5b80: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
5b90: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
5ba0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5bb0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65  ss="variable">ve
5bc0: 72 69 66 79 44 65 70 74 68 3c 2f 62 3e 20 3c 69  rifyDepth</b> <i
5bd0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f   class="arg">n</
5be0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d  i></dt>.<dd><p>M
5bf0: 61 78 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72  aximum depth for
5c00: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
5c10: 20 63 68 61 69 6e 20 76 65 72 69 66 69 63 61 74   chain verificat
5c20: 69 6f 6e 2e 20 44 65 66 61 75 6c 74 20 69 73 20  ion. Default is 
5c30: 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c  -1, to check all
5c40: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
5c50: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
5c60: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
5c70: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5c80: 62 6c 65 22 3e 76 65 72 69 66 79 4d 6f 64 65 3c  ble">verifyMode<
5c90: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5ca0: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e  g">list</i></dt>
5cb0: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20  .<dd><p>List of 
5cc0: 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69  certificate veri
5cd0: 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 73 2e 0a  fication modes..
5ce0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
5cf0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
5d00: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5d10: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5d20: 65 22 3e 76 65 72 69 66 79 52 65 73 75 6c 74 3c  e">verifyResult<
5d30: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5d40: 67 22 3e 72 65 73 75 6c 74 3c 2f 69 3e 3c 2f 64  g">result</i></d
5d50: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66  t>.<dd><p>Certif
5d60: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69  icate verificati
5d70: 6f 6e 20 72 65 73 75 6c 74 2e 0a 54 68 69 73 20  on result..This 
5d80: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
5d90: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
5da0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5db0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61  ss="variable">ca
5dc0: 5f 6e 61 6d 65 73 3c 2f 62 3e 20 3c 69 20 63 6c  _names</b> <i cl
5dd0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f  ass="arg">list</
5de0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c  i></dt>.<dd><p>L
5df0: 69 73 74 20 6f 66 20 74 68 65 20 43 65 72 74 69  ist of the Certi
5e00: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 69  ficate Authoriti
5e10: 65 73 20 75 73 65 64 20 74 6f 20 63 72 65 61 74  es used to creat
5e20: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  e the certificat
5e30: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  e..This value is
5e40: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
5e50: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  1.8.</p></dd>.</
5e60: 64 6c 3e 0a 3c 70 3e 43 65 72 74 69 66 69 63 61  dl>.<p>Certifica
5e70: 74 65 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64  te Status</p>.<d
5e80: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
5e90: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
5ea0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5eb0: 72 69 61 62 6c 65 22 3e 61 6c 6c 3c 2f 62 3e 20  riable">all</b> 
5ec0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
5ed0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
5ee0: 64 64 3e 3c 70 3e 44 75 6d 70 20 6f 66 20 61 6c  dd><p>Dump of al
5ef0: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e  l certificate in
5f00: 66 6f 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  fo..This value i
5f10: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
5f20: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
5f30: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5f40: 69 61 62 6c 65 22 3e 76 65 72 73 69 6f 6e 3c 2f  iable">version</
5f50: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5f60: 22 3e 76 61 6c 75 65 3c 2f 69 3e 3c 2f 64 74 3e  ">value</i></dt>
5f70: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74  .<dd><p>The cert
5f80: 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e  ificate version.
5f90: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5fa0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5fb0: 22 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f  ">serialNumber</
5fc0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5fd0: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  ">string</i></dt
5fe0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 72  >.<dd><p>The ser
5ff0: 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68  ial number of th
6000: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  e certificate as
6010: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 0a 54   a hex string..T
6020: 68 69 73 20 76 61 6c 75 65 20 77 61 73 20 63 68  his value was ch
6030: 61 6e 67 65 64 20 66 72 6f 6d 20 73 65 72 69 61  anged from seria
6040: 6c 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e  l in TclTLS 1.8.
6050: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6060: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6070: 22 3e 73 69 67 6e 61 74 75 72 65 3c 2f 62 3e 20  ">signature</b> 
6080: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61  <i class="arg">a
6090: 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74  lgorithm</i></dt
60a0: 3e 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 20  >.<dd><p>Cipher 
60b0: 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66  algorithm used f
60c0: 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73  or certificate s
60d0: 69 67 6e 61 74 75 72 65 2e 0a 54 68 69 73 20 76  ignature..This v
60e0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
60f0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6100: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6110: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73  s="variable">iss
6120: 75 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  uer</b> <i class
6130: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
6140: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
6150: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20  e distinguished 
6160: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65  name (DN) of the
6170: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 73   certificate iss
6180: 75 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  uer.</p></dd>.<d
6190: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
61a0: 61 62 6c 65 22 3e 6e 6f 74 42 65 66 6f 72 65 3c  able">notBefore<
61b0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
61c0: 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e  g">date</i></dt>
61d0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 62 65 67 69  .<dd><p>The begi
61e0: 6e 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68  nning date of th
61f0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61  e certificate va
6200: 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e  lidity.</p></dd>
6210: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6220: 61 72 69 61 62 6c 65 22 3e 6e 6f 74 41 66 74 65  ariable">notAfte
6230: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
6240: 61 72 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64  arg">date</i></d
6250: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65 78  t>.<dd><p>The ex
6260: 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 6f 66  piration date of
6270: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
6280: 20 76 61 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f   validity.</p></
6290: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
62a0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a  ="variable">subj
62b0: 65 63 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ect</b> <i class
62c0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
62d0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
62e0: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20  e distinguished 
62f0: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65  name (DN) of the
6300: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62   certificate sub
6310: 6a 65 63 74 2e 20 46 69 65 6c 64 73 20 69 6e 63  ject. Fields inc
6320: 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d  lude: Common.Nam
6330: 65 20 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61  e (CN), Organiza
6340: 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69  tion (O), Locali
6350: 74 79 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20  ty or City (L), 
6360: 53 74 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63  State or Provinc
6370: 65 20 28 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74  e (S), and.Count
6380: 72 79 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 70 3e  ry Name (C).</p>
6390: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
63a0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73  ss="variable">is
63b0: 73 75 65 72 55 6e 69 71 75 65 49 44 3c 2f 62 3e  suerUniqueID</b>
63c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
63d0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
63e0: 3c 64 64 3e 3c 70 3e 54 68 65 20 69 73 73 75 65  <dd><p>The issue
63f0: 72 20 75 6e 69 71 75 65 20 69 64 2e 0a 54 68 69  r unique id..Thi
6400: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
6410: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
6420: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6430: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6440: 73 75 62 6a 65 63 74 55 6e 69 71 75 65 49 44 3c  subjectUniqueID<
6450: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6460: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
6470: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 75  t>.<dd><p>The su
6480: 62 6a 65 63 74 20 75 6e 69 71 75 65 20 69 64 2e  bject unique id.
6490: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
64a0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
64b0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
64c0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
64d0: 6c 65 22 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f  le">num_extensio
64e0: 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ns</b> <i class=
64f0: 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e  "arg">n</i></dt>
6500: 0a 3c 64 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f  .<dd><p>Number o
6510: 66 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78  f certificate ex
6520: 74 65 6e 73 69 6f 6e 73 2e 0a 54 68 69 73 20 76  tensions..This v
6530: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
6540: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6550: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6560: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 65 78 74  s="variable">ext
6570: 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63  ensions</b> <i c
6580: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c  lass="arg">list<
6590: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
65a0: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63  List of certific
65b0: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61  ate extension na
65c0: 6d 65 73 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  mes..This value 
65d0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
65e0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
65f0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6600: 72 69 61 62 6c 65 22 3e 61 75 74 68 6f 72 69 74  riable">authorit
6610: 79 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f  yKeyIdentifier</
6620: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6630: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  ">string</i></dt
6640: 3e 0a 3c 64 64 3e 3c 70 3e 41 75 74 68 6f 72 69  >.<dd><p>Authori
6650: 74 79 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65  ty Key Identifie
6660: 72 20 28 41 4b 49 29 20 6f 66 20 74 68 65 20 49  r (AKI) of the I
6670: 73 73 75 69 6e 67 20 43 41 20 63 65 72 74 69 66  ssuing CA certif
6680: 69 63 61 74 65 20 74 68 61 74 20 73 69 67 6e 65  icate that signe
6690: 64 20 74 68 65 0a 53 53 4c 20 63 65 72 74 69 66  d the.SSL certif
66a0: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
66b0: 74 72 69 6e 67 2e 20 54 68 69 73 20 76 61 6c 75  tring. This valu
66c0: 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b  e matches the SK
66d0: 49 20 76 61 6c 75 65 20 6f 66 20 74 68 65 0a 49  I value of the.I
66e0: 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41 20 63  ntermediate CA c
66f0: 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73  ertificate..This
6700: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6710: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6720: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6730: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6740: 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 66  ubjectKeyIdentif
6750: 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ier</b> <i class
6760: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
6770: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 75  ></dt>.<dd><p>Su
6780: 62 6a 65 63 74 20 4b 65 79 20 49 64 65 6e 74 69  bject Key Identi
6790: 66 69 65 72 20 28 53 4b 49 29 20 68 61 73 68 20  fier (SKI) hash 
67a0: 6f 66 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65  of the public ke
67b0: 79 20 69 6e 73 69 64 65 20 74 68 65 20 63 65 72  y inside the cer
67c0: 74 69 66 69 63 61 74 65 20 61 73 20 61 0a 68 65  tificate as a.he
67d0: 78 20 73 74 72 69 6e 67 2e 20 55 73 65 64 20 74  x string. Used t
67e0: 6f 20 69 64 65 6e 74 69 66 79 20 63 65 72 74 69  o identify certi
67f0: 66 69 63 61 74 65 73 20 74 68 61 74 20 63 6f 6e  ficates that con
6800: 74 61 69 6e 20 61 20 70 61 72 74 69 63 75 6c 61  tain a particula
6810: 72 20 70 75 62 6c 69 63 20 6b 65 79 2e 0a 54 68  r public key..Th
6820: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20  is value is new 
6830: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
6840: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6850: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6860: 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c  >subjectAltName<
6870: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6880: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e  g">list</i></dt>
6890: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20  .<dd><p>List of 
68a0: 61 6c 6c 20 6f 66 20 74 68 65 20 53 75 62 6a 65  all of the Subje
68b0: 63 74 20 41 6c 74 65 72 6e 61 74 69 76 65 20 4e  ct Alternative N
68c0: 61 6d 65 73 20 28 53 41 4e 29 20 69 6e 63 6c 75  ames (SAN) inclu
68d0: 64 69 6e 67 20 64 6f 6d 61 69 6e 20 6e 61 6d 65  ding domain name
68e0: 73 2c 20 73 75 62 0a 64 6f 6d 61 69 6e 73 2c 20  s, sub.domains, 
68f0: 61 6e 64 20 49 50 20 61 64 64 72 65 73 73 65 73  and IP addresses
6900: 20 74 68 61 74 20 61 72 65 20 73 65 63 75 72 65   that are secure
6910: 64 20 62 79 20 74 68 65 20 63 65 72 74 69 66 69  d by the certifi
6920: 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65  cate..This value
6930: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
6940: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
6950: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6960: 61 72 69 61 62 6c 65 22 3e 6f 63 73 70 3c 2f 62  ariable">ocsp</b
6970: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6980: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >list</i></dt>.<
6990: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c  dd><p>List of al
69a0: 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69  l Online Certifi
69b0: 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74  cate Status Prot
69c0: 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73  ocol (OCSP) URLs
69d0: 20 74 68 61 74 20 63 61 6e 20 62 65 20 75 73 65   that can be use
69e0: 64 20 74 6f 0a 63 68 65 63 6b 20 74 68 65 20 76  d to.check the v
69f0: 61 6c 69 64 69 74 79 20 6f 66 20 74 68 69 73 20  alidity of this 
6a00: 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69  certificate..Thi
6a10: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
6a20: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
6a30: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6a40: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6a50: 63 65 72 74 69 66 69 63 61 74 65 3c 2f 62 3e 20  certificate</b> 
6a60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
6a70: 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ert</i></dt>.<dd
6a80: 3e 3c 70 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f  ><p>The PEM enco
6a90: 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 2e  ded certificate.
6aa0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6ab0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6ac0: 22 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72  ">signatureAlgor
6ad0: 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ithm</b> <i clas
6ae0: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68  s="arg">algorith
6af0: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  m</i></dt>.<dd><
6b00: 70 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74  p>Cipher algorit
6b10: 68 6d 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  hm used for the 
6b20: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  certificate sign
6b30: 61 74 75 72 65 2e 0a 54 68 69 73 20 76 61 6c 75  ature..This valu
6b40: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
6b50: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
6b60: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6b70: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
6b80: 75 72 65 56 61 6c 75 65 3c 2f 62 3e 20 3c 69 20  ureValue</b> <i 
6b90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
6ba0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
6bb0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  <p>Certificate s
6bc0: 69 67 6e 61 74 75 72 65 20 61 73 20 61 20 68 65  ignature as a he
6bd0: 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76  x string..This v
6be0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
6bf0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6c00: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6c10: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67  s="variable">sig
6c20: 6e 61 74 75 72 65 44 69 67 65 73 74 3c 2f 62 3e  natureDigest</b>
6c30: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6c40: 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e  version</i></dt>
6c50: 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63  .<dd><p>Certific
6c60: 61 74 65 20 73 69 67 6e 69 6e 67 20 64 69 67 65  ate signing dige
6c70: 73 74 20 61 73 20 61 20 68 65 78 20 73 74 72 69  st as a hex stri
6c80: 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  ng..This value i
6c90: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
6ca0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
6cb0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6cc0: 69 61 62 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79  iable">publicKey
6cd0: 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69  Algorithm</b> <i
6ce0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67   class="arg">alg
6cf0: 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a  orithm</i></dt>.
6d00: 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61  <dd><p>Certifica
6d10: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62  te signature pub
6d20: 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68  lic key algorith
6d30: 6d 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  m..This value is
6d40: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
6d50: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
6d60: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6d70: 61 62 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79 3c  able">publicKey<
6d80: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6d90: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
6da0: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66  t>.<dd><p>Certif
6db0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
6dc0: 70 75 62 6c 69 63 20 6b 65 79 20 61 73 20 61 20  public key as a 
6dd0: 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73  hex string..This
6de0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6df0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6e00: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6e10: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 62  ass="variable">b
6e20: 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  its</b> <i class
6e30: 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74  ="arg">n</i></dt
6e40: 3e 0a 3c 64 64 3e 3c 70 3e 4e 75 6d 62 65 72 20  >.<dd><p>Number 
6e50: 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72  of bits used for
6e60: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67   certificate sig
6e70: 6e 61 74 75 72 65 20 6b 65 79 2e 0a 54 68 69 73  nature key..This
6e80: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6e90: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6ea0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6eb0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6ec0: 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 62 3e 20 3c  elf_signed</b> <
6ed0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
6ee0: 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  olean</i></dt>.<
6ef0: 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68  dd><p>Whether th
6f00: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69  e certificate si
6f10: 67 6e 61 74 75 72 65 20 69 73 20 73 65 6c 66 20  gnature is self 
6f20: 73 69 67 6e 65 64 2e 0a 54 68 69 73 20 76 61 6c  signed..This val
6f30: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
6f40: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
6f50: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6f60: 22 76 61 72 69 61 62 6c 65 22 3e 73 68 61 31 5f  "variable">sha1_
6f70: 68 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  hash</b> <i clas
6f80: 73 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f 69 3e  s="arg">hash</i>
6f90: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
6fa0: 20 53 48 41 31 20 68 61 73 68 20 6f 66 20 74 68   SHA1 hash of th
6fb0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  e certificate as
6fc0: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 0a 54   a hex string..T
6fd0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
6fe0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
6ff0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7000: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7010: 22 3e 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 62  ">sha256_hash</b
7020: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7030: 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >hash</i></dt>.<
7040: 64 64 3e 3c 70 3e 54 68 65 20 53 48 41 32 35 36  dd><p>The SHA256
7050: 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72   hash of the cer
7060: 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65  tificate as a he
7070: 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76  x string..This v
7080: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
7090: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
70a0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
70b0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 31 22  <dt><a name="11"
70c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
70d0: 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c  tls::connection<
70e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
70f0: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  g">channel</i></
7100: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52  a></dt>.<dd><p>R
7110: 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65  eturns the curre
7120: 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74  nt connection st
7130: 61 74 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63  atus of an SSL c
7140: 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 75  hannel. The resu
7150: 6c 74 20 69 73 20 61 20 6c 69 73 74 0a 6f 66 20  lt is a list.of 
7160: 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20  key-value pairs 
7170: 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 63  describing the c
7180: 6f 6e 6e 65 63 74 69 6f 6e 2e 0a 54 68 69 73 20  onnection..This 
7190: 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20 66  command is new f
71a0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 20 52  or TclTLS 1.8. R
71b0: 65 74 75 72 6e 65 64 20 76 61 6c 75 65 73 20 69  eturned values i
71c0: 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53  nclude:</p>.<p>S
71d0: 53 4c 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64  SL Status</p>.<d
71e0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
71f0: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
7200: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7210: 72 69 61 62 6c 65 22 3e 73 74 61 74 65 3c 2f 62  riable">state</b
7220: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7230: 3e 73 74 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  >state</i></dt>.
7240: 3c 64 64 3e 3c 70 3e 53 74 61 74 65 20 6f 66 20  <dd><p>State of 
7250: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c  the connection.<
7260: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7270: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7280: 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20  >servername</b> 
7290: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
72a0: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ame</i></dt>.<dd
72b0: 3e 3c 70 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20  ><p>The name of 
72c0: 74 68 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f  the connected to
72d0: 20 73 65 72 76 65 72 2e 3c 2f 70 3e 3c 2f 64 64   server.</p></dd
72e0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
72f0: 76 61 72 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63  variable">protoc
7300: 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ol</b> <i class=
7310: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69  "arg">version</i
7320: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
7330: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69  e protocol versi
7340: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  on used for the 
7350: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32  connection: SSL2
7360: 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c  , SSL3, TLS1, TL
7370: 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c  S1.1, TLS1.2, TL
7380: 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e  S1.3, or unknown
7390: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
73a0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
73b0: 65 22 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e  e">renegotiation
73c0: 5f 61 6c 6c 6f 77 65 64 3c 2f 62 3e 20 3c 69 20  _allowed</b> <i 
73d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
73e0: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ean</i></dt>.<dd
73f0: 3e 3c 70 3e 57 68 65 74 68 65 72 20 70 72 6f 74  ><p>Whether prot
7400: 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69  ocol renegotiati
7410: 6f 6e 20 69 73 20 73 75 70 70 6f 72 74 65 64 20  on is supported 
7420: 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  or not.</p></dd>
7430: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7440: 61 72 69 61 62 6c 65 22 3e 73 65 63 75 72 69 74  ariable">securit
7450: 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63  y_level</b> <i c
7460: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 65 76 65 6c  lass="arg">level
7470: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7480: 3e 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65  >The security le
7490: 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c  vel used for sel
74a0: 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72  ection of cipher
74b0: 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63  s, key size, etc
74c0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
74d0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
74e0: 65 22 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65  e">session_reuse
74f0: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
7500: 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e  arg">boolean</i>
7510: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65  </dt>.<dd><p>Whe
7520: 74 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e  ther the session
7530: 20 68 61 73 20 62 65 65 6e 20 72 65 75 73 65 64   has been reused
7540: 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64   or not.</p></dd
7550: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7560: 76 61 72 69 61 62 6c 65 22 3e 69 73 5f 73 65 72  variable">is_ser
7570: 76 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ver</b> <i class
7580: 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f  ="arg">boolean</
7590: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57  i></dt>.<dd><p>W
75a0: 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65  hether the conne
75b0: 63 74 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75  ction is configu
75c0: 72 65 64 20 61 73 20 61 20 73 65 72 76 65 72 20  red as a server 
75d0: 28 31 29 20 6f 72 20 63 6c 69 65 6e 74 20 28 30  (1) or client (0
75e0: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
75f0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7600: 6c 65 22 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c  le">compression<
7610: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7620: 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e  g">mode</i></dt>
7630: 0a 3c 64 64 3e 3c 70 3e 43 6f 6d 70 72 65 73 73  .<dd><p>Compress
7640: 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c  ion method.</p><
7650: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7660: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 65 78 70  s="variable">exp
7670: 61 6e 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c  ansion</b> <i cl
7680: 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f  ass="arg">mode</
7690: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45  i></dt>.<dd><p>E
76a0: 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 2e  xpansion method.
76b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
76c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
76d0: 22 3e 63 61 4c 69 73 74 3c 2f 62 3e 20 3c 69 20  ">caList</b> <i 
76e0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74  class="arg">list
76f0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7700: 3e 4c 69 73 74 20 6f 66 20 43 65 72 74 69 66 69  >List of Certifi
7710: 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73  cate Authorities
7720: 20 28 43 41 29 20 66 6f 72 20 58 2e 35 30 39 20   (CA) for X.509 
7730: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e  certificate.</p>
7740: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43  </dd>.</dl>.<p>C
7750: 69 70 68 65 72 20 49 6e 66 6f 3c 2f 70 3e 0a 3c  ipher Info</p>.<
7760: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
7770: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
7780: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7790: 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 3c  ariable">cipher<
77a0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
77b0: 67 22 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64  g">cipher</i></d
77c0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75  t>.<dd><p>The cu
77d0: 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20  rrent cipher in 
77e0: 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e  use for the conn
77f0: 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ection.</p></dd>
7800: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7810: 61 72 69 61 62 6c 65 22 3e 73 74 61 6e 64 61 72  ariable">standar
7820: 64 5f 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c  d_name</b> <i cl
7830: 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f  ass="arg">name</
7840: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
7850: 68 65 20 73 74 61 6e 64 61 72 64 20 52 46 43 20  he standard RFC 
7860: 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e 3c  name of cipher.<
7870: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7880: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7890: 3e 61 6c 67 6f 72 69 74 68 6d 5f 62 69 74 73 3c  >algorithm_bits<
78a0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
78b0: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  g">n</i></dt>.<d
78c0: 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20  d><p>The number 
78d0: 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 74  of processed bit
78e0: 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 65  s used for ciphe
78f0: 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  r.</p></dd>.<dt>
7900: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7910: 6c 65 22 3e 73 65 63 72 65 74 5f 62 69 74 73 3c  le">secret_bits<
7920: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7930: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  g">n</i></dt>.<d
7940: 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20  d><p>The number 
7950: 6f 66 20 73 65 63 72 65 74 20 62 69 74 73 20 75  of secret bits u
7960: 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c  sed for cipher.<
7970: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7980: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7990: 3e 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f 62 3e  >min_version</b>
79a0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
79b0: 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e  version</i></dt>
79c0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6d 69 6e 69  .<dd><p>The mini
79d0: 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72  mum protocol ver
79e0: 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 2e  sion for cipher.
79f0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
7a00: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
7a10: 22 3e 63 69 70 68 65 72 5f 69 73 5f 61 65 61 64  ">cipher_is_aead
7a20: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7a30: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
7a40: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74  /dt>.<dd><p>Whet
7a50: 68 65 72 20 74 68 65 20 63 69 70 68 65 72 20 69  her the cipher i
7a60: 73 20 41 75 74 68 65 6e 74 69 63 61 74 65 64 20  s Authenticated 
7a70: 45 6e 63 72 79 70 74 69 6f 6e 20 77 69 74 68 20  Encryption with 
7a80: 41 73 73 6f 63 69 61 74 65 64 20 44 61 74 61 20  Associated Data 
7a90: 28 41 45 41 44 29 2e 3c 2f 70 3e 3c 2f 64 64 3e  (AEAD).</p></dd>
7aa0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7ab0: 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 5f  ariable">cipher_
7ac0: 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  id</b> <i class=
7ad0: 22 61 72 67 22 3e 69 64 3c 2f 69 3e 3c 2f 64 74  "arg">id</i></dt
7ae0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 4f 70 65  >.<dd><p>The Ope
7af0: 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c  nSSL cipher id.<
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 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 62 3e  >description</b>
7b30: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
7b40: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
7b50: 3c 64 64 3e 3c 70 3e 41 20 74 65 78 74 20 64 65  <dd><p>A text de
7b60: 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65  scription of the
7b70: 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64   cipher.</p></dd
7b80: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7b90: 76 61 72 69 61 62 6c 65 22 3e 68 61 6e 64 73 68  variable">handsh
7ba0: 61 6b 65 5f 64 69 67 65 73 74 3c 2f 62 3e 20 3c  ake_digest</b> <
7bb0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
7bc0: 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  olean</i></dt>.<
7bd0: 64 64 3e 3c 70 3e 44 69 67 65 73 74 20 75 73 65  dd><p>Digest use
7be0: 64 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61  d during handsha
7bf0: 6b 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  ke.</p></dd>.</d
7c00: 6c 3e 0a 3c 70 3e 53 65 73 73 69 6f 6e 20 49 6e  l>.<p>Session In
7c10: 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  fo</p>.<dl class
7c20: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e  ="doctools_defin
7c30: 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  itions">.<dt><b 
7c40: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7c50: 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  >alpn</b> <i cla
7c60: 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f  ss="arg">protoco
7c70: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
7c80: 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73  p>The protocol s
7c90: 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70  elected after Ap
7ca0: 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20  plication-Layer 
7cb0: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61  Protocol Negotia
7cc0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e  tion (ALPN).</p>
7cd0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7ce0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 72 65  ss="variable">re
7cf0: 73 75 6d 61 62 6c 65 3c 2f 62 3e 20 3c 69 20 63  sumable</b> <i c
7d00: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65  lass="arg">boole
7d10: 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  an</i></dt>.<dd>
7d20: 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 73  <p>Whether the s
7d30: 65 73 73 69 6f 6e 20 63 61 6e 20 62 65 20 72 65  ession can be re
7d40: 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70  sumed or not.</p
7d50: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
7d60: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
7d70: 74 61 72 74 5f 74 69 6d 65 3c 2f 62 3e 20 3c 69  tart_time</b> <i
7d80: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63   class="arg">sec
7d90: 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  onds</i></dt>.<d
7da0: 64 3e 3c 70 3e 54 69 6d 65 20 73 69 6e 63 65 20  d><p>Time since 
7db0: 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65 64 20  session started 
7dc0: 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 65  in seconds since
7dd0: 20 65 70 6f 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e   epoch.</p></dd>
7de0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7df0: 61 72 69 61 62 6c 65 22 3e 74 69 6d 65 6f 75 74  ariable">timeout
7e00: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7e10: 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c  rg">seconds</i><
7e20: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 20  /dt>.<dd><p>Max 
7e30: 64 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 73  duration of sess
7e40: 69 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 62  ion in seconds b
7e50: 65 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c  efore time-out.<
7e60: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7e70: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7e80: 3e 6c 69 66 65 74 69 6d 65 3c 2f 62 3e 20 3c 69  >lifetime</b> <i
7e90: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63   class="arg">sec
7ea0: 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  onds</i></dt>.<d
7eb0: 64 3e 3c 70 3e 53 65 73 73 69 6f 6e 20 74 69 63  d><p>Session tic
7ec0: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e  ket lifetime hin
7ed0: 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70  t in seconds.</p
7ee0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
7ef0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
7f00: 65 73 73 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69  ession_id</b> <i
7f10: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e   class="arg">bin
7f20: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  ary_string</i></
7f30: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75  dt>.<dd><p>Uniqu
7f40: 65 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72  e session id for
7f50: 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67   use in resuming
7f60: 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70   the session.</p
7f70: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
7f80: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
7f90: 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62  ession_ticket</b
7fa0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7fb0: 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f  >binary_string</
7fc0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55  i></dt>.<dd><p>U
7fd0: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69  nique session ti
7fe0: 63 6b 65 74 20 66 6f 72 20 75 73 65 20 69 6e 20  cket for use in 
7ff0: 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73  resuming the ses
8000: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  sion.</p></dd>.<
8010: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
8020: 69 61 62 6c 65 22 3e 74 69 63 6b 65 74 5f 61 70  iable">ticket_ap
8030: 70 5f 64 61 74 61 3c 2f 62 3e 20 3c 69 20 63 6c  p_data</b> <i cl
8040: 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79  ass="arg">binary
8050: 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  _string</i></dt>
8060: 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73  .<dd><p>Unique s
8070: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70  ession ticket ap
8080: 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c  plication data.<
8090: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
80a0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
80b0: 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 62 3e 20  >master_key</b> 
80c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
80d0: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e  inary_string</i>
80e0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69  </dt>.<dd><p>Uni
80f0: 71 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74  que session mast
8100: 65 72 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e  er key.</p></dd>
8110: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
8120: 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e  ariable">session
8130: 5f 63 61 63 68 65 5f 6d 6f 64 65 3c 2f 62 3e 20  _cache_mode</b> 
8140: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
8150: 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ode</i></dt>.<dd
8160: 3e 3c 70 3e 53 65 72 76 65 72 20 63 61 63 68 65  ><p>Server cache
8170: 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c 20 73   mode (client, s
8180: 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 68 29 2e  erver, or both).
8190: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c  </p></dd>.</dl><
81a0: 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65  /dd>.<dt><a name
81b0: 3d 22 31 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="12"><b class="
81c0: 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65 72  cmd">tls::cipher
81d0: 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  s</b> <span clas
81e0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
81f0: 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c  s="arg">protocol
8200: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
8210: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
8220: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
8230: 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61  erbose</i>?</spa
8240: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
8250: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
8260: 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f  arg">supported</
8270: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f  i>?</span></a></
8280: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 69 74 68 6f  dt>.<dd><p>Witho
8290: 75 74 20 61 6e 79 20 6f 70 74 69 6f 6e 73 2c 20  ut any options, 
82a0: 69 74 20 72 65 74 75 72 6e 73 20 61 20 6c 69 73  it returns a lis
82b0: 74 20 6f 66 20 61 6c 6c 20 73 79 6d 6d 65 74 72  t of all symmetr
82c0: 69 63 20 63 69 70 68 65 72 73 20 66 6f 72 20 75  ic ciphers for u
82d0: 73 65 20 77 69 74 68 20 74 68 65 0a 3c 69 20 63  se with the.<i c
82e0: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 63 69 70 68  lass="arg">-ciph
82f0: 65 72 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 20 57  er</i> option. W
8300: 69 74 68 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  ith <i class="ar
8310: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c  g">protocol</i>,
8320: 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72   only the cipher
8330: 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20  s supported for 
8340: 74 68 61 74 0a 70 72 6f 74 6f 63 6f 6c 20 61 72  that.protocol ar
8350: 65 20 72 65 74 75 72 6e 65 64 2e 20 53 65 65 20  e returned. See 
8360: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  the <b class="cm
8370: 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  d">tls::protocol
8380: 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f  s</b> command fo
8390: 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a  r the supported.
83a0: 70 72 6f 74 6f 63 6f 6c 73 2e 20 49 66 20 3c 69  protocols. If <i
83b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72   class="arg">ver
83c0: 62 6f 73 65 3c 2f 69 3e 20 69 73 20 73 70 65 63  bose</i> is spec
83d0: 69 66 69 65 64 20 61 73 20 74 72 75 65 20 74 68  ified as true th
83e0: 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68 75  en a verbose, hu
83f0: 6d 61 6e 20 72 65 61 64 61 62 6c 65 0a 6c 69 73  man readable.lis
8400: 74 20 69 73 20 72 65 74 75 72 6e 65 64 20 77 69  t is returned wi
8410: 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e  th additional in
8420: 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65  formation on the
8430: 20 63 69 70 68 65 72 2e 20 49 66 20 3c 69 20 63   cipher. If <i c
8440: 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f  lass="arg">suppo
8450: 72 74 65 64 3c 2f 69 3e 0a 69 73 20 73 70 65 63  rted</i>.is spec
8460: 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74  ified as true, t
8470: 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70  hen only the cip
8480: 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66  hers supported f
8490: 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c  or protocol will
84a0: 20 62 65 20 6c 69 73 74 65 64 2e 0a 54 68 65 20   be listed..The 
84b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
84c0: 75 70 70 6f 72 74 65 64 3c 2f 69 3e 20 61 72 67  upported</i> arg
84d0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
84e0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
84f0: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 33  .<dt><a name="13
8500: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
8510: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
8520: 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  /b></a></dt>.<dd
8530: 3e 3c 70 3e 52 65 74 75 72 6e 73 20 61 20 6c 69  ><p>Returns a li
8540: 73 74 20 6f 66 20 74 68 65 20 73 75 70 70 6f 72  st of the suppor
8550: 74 65 64 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74  ted SSL/TLS prot
8560: 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20 76 61 6c  ocols. Valid val
8570: 75 65 73 20 61 72 65 3a 0a 3c 62 20 63 6c 61 73  ues are:.<b clas
8580: 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c 32 3c 2f  s="const">ssl2</
8590: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>, <b class="co
85a0: 6e 73 74 22 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c  nst">ssl3</b>, <
85b0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
85c0: 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  tls1</b>, <b cla
85d0: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e  ss="const">tls1.
85e0: 31 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  1</b>, <b class=
85f0: 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 32 3c 2f  "const">tls1.2</
8600: 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73  b>, and.<b class
8610: 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 33 3c  ="const">tls1.3<
8620: 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73 74 20  /b>. Exact list 
8630: 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53  depends on OpenS
8640: 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 63  SL version and c
8650: 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 67  ompile time flag
8660: 73 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20  s..This command 
8670: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
8680: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
8690: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 34 22  <dt><a name="14"
86a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
86b0: 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e  tls::version</b>
86c0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </a></dt>.<dd><p
86d0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65  >Returns the Ope
86e0: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72  nSSL version str
86f0: 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  ing.</p></dd>.</
8700: 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  dl>.</div>.<div 
8710: 69 64 3d 22 73 65 63 74 69 6f 6e 34 22 20 63 6c  id="section4" cl
8720: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
8730: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
8740: 6d 65 3d 22 73 65 63 74 69 6f 6e 34 22 3e 43 65  me="section4">Ce
8750: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61  rtificate Valida
8760: 74 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64  tion</a></h2>.<d
8770: 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f  iv id="subsectio
8780: 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n1" class="docto
8790: 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e  ols_subsection">
87a0: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62  <h3><a name="sub
87b0: 73 65 63 74 69 6f 6e 31 22 3e 50 4b 49 20 61 6e  section1">PKI an
87c0: 64 20 43 65 72 74 69 66 69 63 61 74 65 73 3c 2f  d Certificates</
87d0: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 55 73 69 6e 67  a></h3>.<p>Using
87e0: 20 74 68 65 20 50 75 62 6c 69 63 20 4b 65 79 20   the Public Key 
87f0: 49 6e 66 72 61 73 74 72 75 63 74 75 72 65 20 28  Infrastructure (
8800: 50 4b 49 29 2c 20 65 61 63 68 20 75 73 65 72 20  PKI), each user 
8810: 63 72 65 61 74 65 73 20 61 20 70 72 69 76 61 74  creates a privat
8820: 65 20 6b 65 79 20 74 68 61 74 0a 6f 6e 6c 79 20  e key that.only 
8830: 74 68 65 79 20 6b 6e 6f 77 20 61 62 6f 75 74 20  they know about 
8840: 61 6e 64 20 61 20 70 75 62 6c 69 63 20 6b 65 79  and a public key
8850: 20 74 68 65 79 20 63 61 6e 20 65 78 63 68 61 6e   they can exchan
8860: 67 65 20 77 69 74 68 20 6f 74 68 65 72 73 20 66  ge with others f
8870: 6f 72 20 75 73 65 20 69 6e 0a 65 6e 63 72 79 70  or use in.encryp
8880: 74 69 6e 67 20 61 6e 64 20 64 65 63 72 79 70 74  ting and decrypt
8890: 69 6e 67 20 64 61 74 61 2e 20 54 68 65 20 70 72  ing data. The pr
88a0: 6f 63 65 73 73 20 69 73 20 74 68 65 20 73 65 6e  ocess is the sen
88b0: 64 65 72 20 65 6e 63 72 79 70 74 73 20 74 68 65  der encrypts the
88c0: 69 72 20 64 61 74 61 0a 75 73 69 6e 67 20 74 68  ir data.using th
88d0: 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 79 20  eir private key 
88e0: 61 6e 64 20 74 68 65 20 72 65 63 65 69 76 65 72  and the receiver
88f0: 27 73 20 70 75 62 6c 69 63 20 6b 65 79 2e 20 54  's public key. T
8900: 68 65 20 64 61 74 61 20 69 73 20 74 68 65 6e 20  he data is then 
8910: 73 65 6e 74 0a 74 6f 20 74 68 65 20 72 65 63 65  sent.to the rece
8920: 69 76 65 72 2e 20 49 6e 20 61 20 73 69 6d 69 6c  iver. In a simil
8930: 61 72 20 6d 61 6e 6e 65 72 2c 20 74 68 65 20 72  ar manner, the r
8940: 65 63 65 69 76 65 72 20 75 73 65 73 20 74 68 65  eceiver uses the
8950: 69 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 61  ir private key a
8960: 6e 64 0a 74 68 65 20 73 65 6e 64 65 72 27 73 20  nd.the sender's 
8970: 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 20 64 65  public key to de
8980: 63 72 79 70 74 20 74 68 65 20 64 61 74 61 2e 20  crypt the data. 
8990: 54 68 69 73 20 70 72 6f 76 69 64 65 73 20 64 61  This provides da
89a0: 74 61 20 69 6e 74 65 67 72 69 74 79 2c 20 74 6f  ta integrity, to
89b0: 0a 65 6e 73 75 72 65 20 74 68 65 20 64 61 74 61  .ensure the data
89c0: 20 63 61 6e 27 74 20 62 65 20 76 69 65 77 65 64   can't be viewed
89d0: 20 6f 72 20 61 6c 74 65 72 65 64 20 64 75 72 69   or altered duri
89e0: 6e 67 20 74 72 61 6e 73 70 6f 72 74 2e 20 53 65  ng transport. Se
89f0: 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22  e the.<b class="
8a00: 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e  option">-key</b>
8a10: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f   and <b class="o
8a20: 70 74 69 6f 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c  ption">-keyfile<
8a30: 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20  /b> options for 
8a40: 68 6f 77 20 74 6f 20 73 70 65 63 69 66 79 20 74  how to specify t
8a50: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 2e 0a  he private key..
8a60: 41 6c 73 6f 20 73 65 65 20 74 68 65 20 3c 62 20  Also see the <b 
8a70: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8a80: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74  password</b> opt
8a90: 69 6f 6e 20 66 6f 72 20 68 6f 77 20 74 6f 20 70  ion for how to p
8aa0: 72 6f 76 69 64 65 20 74 68 65 20 70 61 73 73 77  rovide the passw
8ab0: 6f 72 64 2e 3c 2f 70 3e 0a 3c 70 3e 49 6e 20 6f  ord.</p>.<p>In o
8ac0: 72 64 65 72 20 74 6f 20 70 72 6f 76 69 64 65 20  rder to provide 
8ad0: 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 2c 20  authentication, 
8ae0: 69 2e 65 2e 20 65 6e 73 75 72 69 6e 67 20 73 6f  i.e. ensuring so
8af0: 6d 65 6f 6e 65 20 69 73 20 77 68 6f 20 74 68 65  meone is who the
8b00: 79 20 73 61 79 20 74 68 65 79 0a 61 72 65 2c 20  y say they.are, 
8b10: 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61  the public key a
8b20: 6e 64 20 75 73 65 72 20 69 64 65 6e 74 69 66 69  nd user identifi
8b30: 63 61 74 69 6f 6e 20 69 6e 66 6f 20 69 73 20 73  cation info is s
8b40: 74 6f 72 65 64 20 69 6e 20 61 20 58 2e 35 30 39  tored in a X.509
8b50: 0a 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64  .certificate and
8b60: 20 74 68 61 74 20 63 65 72 74 69 66 69 63 61 74   that certificat
8b70: 65 20 69 73 20 61 75 74 68 65 6e 74 69 63 61 74  e is authenticat
8b80: 65 64 20 28 69 2e 65 2e 20 73 69 67 6e 65 64 29  ed (i.e. signed)
8b90: 20 62 79 20 61 20 43 65 72 74 69 66 69 63 61 74   by a Certificat
8ba0: 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e.Authority (CA)
8bb0: 2e 20 55 73 65 72 73 20 63 61 6e 20 74 68 65 6e  . Users can then
8bc0: 20 65 78 63 68 61 6e 67 65 20 74 68 65 73 65 20   exchange these 
8bd0: 63 65 72 74 69 66 69 63 61 74 65 73 20 64 75 72  certificates dur
8be0: 69 6e 67 20 74 68 65 20 54 4c 53 0a 69 6e 69 74  ing the TLS.init
8bf0: 69 61 6c 69 7a 61 74 69 6f 6e 20 70 72 6f 63 65  ialization proce
8c00: 73 73 20 61 6e 64 20 63 68 65 63 6b 20 74 68 65  ss and check the
8c10: 6d 20 61 67 61 69 6e 73 74 20 74 68 65 20 72 6f  m against the ro
8c20: 6f 74 20 43 41 20 63 65 72 74 69 66 69 63 61 74  ot CA certificat
8c30: 65 73 20 74 6f 20 65 6e 73 75 72 65 0a 74 68 65  es to ensure.the
8c40: 79 20 61 72 65 20 76 61 6c 69 64 2e 20 54 68 69  y are valid. Thi
8c50: 73 20 69 73 20 68 61 6e 64 6c 65 64 20 62 79 20  s is handled by 
8c60: 4f 70 65 6e 53 53 4c 20 76 69 61 20 74 68 65 20  OpenSSL via the 
8c70: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
8c80: 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 61  ">-request</b> a
8c90: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  nd.<b class="opt
8ca0: 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62  ion">-require</b
8cb0: 3e 20 6f 70 74 69 6f 6e 73 2e 20 53 65 65 20 74  > options. See t
8cc0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
8cd0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c  ion">-cadir</b>,
8ce0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
8cf0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 61  n">-cadir</b>, a
8d00: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  nd.<b class="opt
8d10: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
8d20: 3e 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f  > options for ho
8d30: 77 20 74 6f 20 73 70 65 63 69 66 79 20 77 68 65  w to specify whe
8d40: 72 65 20 74 6f 20 66 69 6e 64 20 74 68 65 20 43  re to find the C
8d50: 41 20 63 65 72 74 69 66 69 63 61 74 65 73 2e 0a  A certificates..
8d60: 4f 70 74 69 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61  Optionally, in a
8d70: 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 2c   future release,
8d80: 20 74 68 65 79 20 63 61 6e 20 61 6c 73 6f 20 62   they can also b
8d90: 65 20 63 68 65 63 6b 65 64 20 61 67 61 69 6e 73  e checked agains
8da0: 74 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  t the Certificat
8db0: 65 0a 52 65 76 6f 63 61 74 69 6f 6e 20 4c 69 73  e.Revocation Lis
8dc0: 74 20 28 43 52 4c 29 20 6f 66 20 72 65 76 6f 6b  t (CRL) of revok
8dd0: 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73 2e  ed certificates.
8de0: 20 43 65 72 74 69 66 69 63 61 74 65 73 20 63 61   Certificates ca
8df0: 6e 20 61 6c 73 6f 20 62 65 0a 73 65 6c 66 2d 73  n also be.self-s
8e00: 69 67 6e 65 64 2c 20 62 75 74 20 74 68 65 79 20  igned, but they 
8e10: 61 72 65 20 62 79 20 64 65 66 61 75 6c 74 20 6e  are by default n
8e20: 6f 74 20 74 72 75 73 74 65 64 20 75 6e 6c 65 73  ot trusted unles
8e30: 73 20 79 6f 75 20 61 64 64 20 74 68 65 6d 20 74  s you add them t
8e40: 6f 20 79 6f 75 72 0a 63 65 72 74 69 66 69 63 61  o your.certifica
8e50: 74 65 20 73 74 6f 72 65 2e 3c 2f 70 3e 0a 3c 70  te store.</p>.<p
8e60: 3e 54 79 70 69 63 61 6c 6c 79 20 77 68 65 6e 20  >Typically when 
8e70: 76 69 73 69 74 69 6e 67 20 77 65 62 20 73 69 74  visiting web sit
8e80: 65 73 2c 20 6f 6e 6c 79 20 74 68 65 20 63 6c 69  es, only the cli
8e90: 65 6e 74 20 6e 65 65 64 73 20 74 6f 20 63 68 65  ent needs to che
8ea0: 63 6b 20 74 68 65 20 73 65 72 76 65 72 27 73 0a  ck the server's.
8eb0: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 65  certificate to e
8ec0: 6e 73 75 72 65 20 69 74 20 69 73 20 76 61 6c 69  nsure it is vali
8ed0: 64 2e 20 54 68 65 20 73 65 72 76 65 72 20 64 6f  d. The server do
8ee0: 65 73 6e 27 74 20 6e 65 65 64 20 74 6f 20 63 68  esn't need to ch
8ef0: 65 63 6b 20 74 68 65 20 63 6c 69 65 6e 74 0a 63  eck the client.c
8f00: 65 72 74 69 66 69 63 61 74 65 20 75 6e 6c 65 73  ertificate unles
8f10: 73 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 61 75  s you need to au
8f20: 74 68 65 6e 74 69 63 61 74 65 20 77 69 74 68 20  thenticate with 
8f30: 74 68 65 6d 20 74 6f 20 6c 6f 67 69 6e 2c 20 65  them to login, e
8f40: 74 63 2e 20 53 65 65 20 74 68 65 0a 3c 62 20 63  tc. See the.<b c
8f50: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
8f60: 65 72 74 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63  ert</b> and <b c
8f70: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
8f80: 65 72 74 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69  ertfile</b> opti
8f90: 6f 6e 73 20 69 66 20 79 6f 75 20 6e 65 65 64 20  ons if you need 
8fa0: 74 6f 20 70 72 6f 76 69 64 65 20 61 20 63 65 72  to provide a cer
8fb0: 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 0a 3c 2f  tificate.</p>.</
8fc0: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75  div>.<div id="su
8fd0: 62 73 65 63 74 69 6f 6e 32 22 20 63 6c 61 73 73  bsection2" class
8fe0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
8ff0: 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61  ction"><h3><a na
9000: 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 32 22  me="subsection2"
9010: 3e 53 75 6d 6d 61 72 79 20 6f 66 20 63 6f 6d 6d  >Summary of comm
9020: 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73  and line options
9030: 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65  </a></h3>.<p>The
9040: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 69 6f   following optio
9050: 6e 73 20 61 72 65 20 75 73 65 64 20 66 6f 72 20  ns are used for 
9060: 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65  peer certificate
9070: 20 76 61 6c 69 64 61 74 69 6f 6e 3a 3c 2f 70 3e   validation:</p>
9080: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
9090: 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c  ools_options">.<
90a0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
90b0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20  ion">-cadir</b> 
90c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
90d0: 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74  irectory</i></dt
90e0: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
90f0: 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79  es the directory
9100: 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69   where the Certi
9110: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79  ficate Authority
9120: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74   (CA) certificat
9130: 65 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54  es are.stored. T
9140: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c  he default is pl
9150: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 2c  atform specific,
9160: 20 62 75 74 20 69 73 20 75 73 75 61 6c 6c 79 20   but is usually 
9170: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
9180: 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f 63  file">/etc/ssl/c
9190: 65 72 74 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 6f  erts</b>&quot; o
91a0: 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 73  n.Linux/Unix sys
91b0: 74 65 6d 73 2e 20 54 68 65 20 64 65 66 61 75 6c  tems. The defaul
91c0: 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20 62  t location can b
91d0: 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20  e overridden by 
91e0: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61  the.<b class="va
91f0: 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54  riable">SSL_CERT
9200: 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  _DIR</b> environ
9210: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f  ment variable.</
9220: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
9230: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
9240: 61 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  afile</b> <i cla
9250: 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d  ss="arg">filenam
9260: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
9270: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
9280: 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 43 65  file with the Ce
9290: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
92a0: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69  ity (CA) certifi
92b0: 63 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0a  cates to use in.
92c0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
92d0: 3e 50 45 4d 3c 2f 62 3e 20 66 69 6c 65 20 66 6f  >PEM</b> file fo
92e0: 72 6d 61 74 2e 20 54 68 65 20 64 65 66 61 75 6c  rmat. The defaul
92f0: 74 20 69 73 20 26 71 75 6f 74 3b 3c 62 20 63 6c  t is &quot;<b cl
9300: 61 73 73 3d 22 66 69 6c 65 22 3e 63 65 72 74 2e  ass="file">cert.
9310: 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 69  pem</b>&quot;, i
9320: 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69  n the OpenSSL.di
9330: 72 65 63 74 6f 72 79 2e 20 4f 6e 20 4c 69 6e 75  rectory. On Linu
9340: 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2c 20  x/Unix systems, 
9350: 74 68 69 73 20 69 73 20 75 73 75 61 6c 6c 79 20  this is usually 
9360: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
9370: 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f 63  file">/etc/ssl/c
9380: 61 2d 62 75 6e 64 6c 65 2e 70 65 6d 3c 2f 62 3e  a-bundle.pem</b>
9390: 26 71 75 6f 74 3b 2e 0a 54 68 65 20 64 65 66 61  &quot;..The defa
93a0: 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20  ult file can be 
93b0: 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68  overridden by th
93c0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  e <b class="vari
93d0: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46  able">SSL_CERT_F
93e0: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d  ILE</b> environm
93f0: 65 6e 74 0a 76 61 72 69 61 62 6c 65 2e 3c 2f 70  ent.variable.</p
9400: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
9410: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
9420: 73 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  store</b> <i cla
9430: 73 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e  ss="arg">URI</i>
9440: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
9450: 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f  cifies the Unifo
9460: 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e  rm Resource Iden
9470: 74 69 66 69 65 72 20 28 55 52 49 29 20 66 6f 72  tifier (URI) for
9480: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65   the Certificate
9490: 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20   Authority.(CA) 
94a0: 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79  store, which may
94b0: 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e   be a single con
94c0: 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61  tainer or a cata
94d0: 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72  log of container
94e0: 73 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68  s..Starting with
94f0: 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20   OpenSSL 3.2 on 
9500: 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20  MS Windows, set 
9510: 74 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  to &quot;<b clas
9520: 73 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70  s="const">org.op
9530: 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f  enssl.winstore:/
9540: 2f 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75  /</b>&quot;.to u
9550: 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20  se the built-in 
9560: 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69  MS Windows Certi
9570: 66 69 63 61 74 65 20 53 74 6f 72 65 2e 20 53 74  ficate Store. St
9580: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
9590: 20 32 2e 30 2c 20 74 68 69 73 0a 69 73 20 74 68   2.0, this.is th
95a0: 65 20 64 65 66 61 75 6c 74 20 69 66 20 3c 62 20  e default if <b 
95b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
95c0: 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c  cadir</b>, <b cl
95d0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
95e0: 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20  dir</b>, and <b 
95f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
9600: 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61 72 65 0a  castore</b> are.
9610: 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2e 20 54  not specified. T
9620: 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 73  his store only s
9630: 75 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 72  upports root cer
9640: 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 2e  tificate stores.
9650: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
9660: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9670: 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c 69 20  -request</b> <i 
9680: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
9690: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
96a0: 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69  >Request a certi
96b0: 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20  ficate from the 
96c0: 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20  peer during the 
96d0: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 54  SSL handshake. T
96e0: 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a 74 6f  his is needed.to
96f0: 20 64 6f 20 43 65 72 74 69 66 69 63 61 74 65 20   do Certificate 
9700: 56 61 6c 69 64 61 74 69 6f 6e 2e 20 53 74 61 72  Validation. Star
9710: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 31  ting in TclTLS 1
9720: 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20  .8, the default 
9730: 69 73 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is.<b class="con
9740: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72  st">true</b> for
9750: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69   client connecti
9760: 6f 6e 73 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  ons. Starting in
9770: 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 69 66 20   TclTLS 2.0, if 
9780: 73 65 74 20 74 6f 0a 3c 62 20 63 6c 61 73 73 3d  set to.<b class=
9790: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62  "const">false</b
97a0: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  > and <b class="
97b0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65  option">-require
97c0: 3c 2f 62 3e 20 69 73 20 3c 62 20 63 6c 61 73 73  </b> is <b class
97d0: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62  ="const">true</b
97e0: 3e 2c 20 74 68 65 6e 20 74 68 69 73 20 77 69 6c  >, then this wil
97f0: 6c 20 62 65 0a 6f 76 65 72 72 69 64 64 65 6e 20  l be.overridden 
9800: 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  to <b class="con
9810: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 49 6e  st">true</b>. In
9820: 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 63   addition, the c
9830: 6c 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c  lient can manual
9840: 6c 79 20 69 6e 73 70 65 63 74 20 61 6e 64 0a 61  ly inspect and.a
9850: 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74 20  ccept or reject 
9860: 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74 65  each certificate
9870: 20 75 73 69 6e 67 20 74 68 65 20 3c 62 20 63 6c   using the <b cl
9880: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
9890: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
98a0: 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64  > option.</p></d
98b0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
98c0: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72  "option">-requir
98d0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
98e0: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
98f0: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72  t>.<dd><p>Requir
9900: 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66  e a valid certif
9910: 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70  icate from the p
9920: 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53  eer during the S
9930: 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66  SL handshake. If
9940: 20 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20   this is.set to 
9950: 74 72 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c  true, then <b cl
9960: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65  ass="option">-re
9970: 71 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61  quest</b> must a
9980: 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72  lso be set to tr
9990: 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a  ue and a either.
99a0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
99b0: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62  ">-cadir</b>, <b
99c0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
99d0: 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20  -cafile</b>, <b 
99e0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
99f0: 63 61 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20  castore</b>, or 
9a00: 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75  a platform defau
9a10: 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69  lt.must be provi
9a20: 64 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20  ded in order to 
9a30: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74  validate against
9a40: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e  . The default in
9a50: 20 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a   TclTLS 1.8 and.
9a60: 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73  earlier versions
9a70: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
9a80: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73  nst">false</b> s
9a90: 69 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61  ince not all pla
9aa0: 74 66 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74  tforms have cert
9ab0: 69 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69  ificates to.vali
9ac0: 64 61 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20  date against in 
9ad0: 61 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c  a form compatibl
9ae0: 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 20  e with OpenSSL. 
9af0: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54  Starting in TclT
9b00: 4c 53 20 32 2e 30 2c 0a 74 68 65 20 64 65 66 61  LS 2.0,.the defa
9b10: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
9b20: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e  "const">true</b>
9b30: 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e   for client conn
9b40: 65 63 74 69 6f 6e 73 2e 3c 2f 70 3e 3c 2f 64 64  ections.</p></dd
9b50: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c  >.</dl>.</div>.<
9b60: 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69  div id="subsecti
9b70: 6f 6e 33 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on3" class="doct
9b80: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
9b90: 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75  ><h3><a name="su
9ba0: 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65 6e 20  bsection3">When 
9bb0: 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65  are command line
9bc0: 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65 64 3f   options needed?
9bd0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 49 6e 20  </a></h3>.<p>In 
9be0: 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 20 65  TclTLS 1.8 and e
9bf0: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 2c  arlier versions,
9c00: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c   certificate val
9c10: 69 64 61 74 69 6f 6e 20 69 73 0a 3c 65 6d 3e 4e  idation is.<em>N
9c20: 4f 54 3c 2f 65 6d 3e 20 65 6e 61 62 6c 65 64 20  OT</em> enabled 
9c30: 62 79 20 64 65 66 61 75 6c 74 2e 20 54 68 69 73  by default. This
9c40: 20 6c 69 6d 69 74 61 74 69 6f 6e 20 69 73 20 64   limitation is d
9c50: 75 65 20 74 6f 20 74 68 65 20 6c 61 63 6b 20 6f  ue to the lack o
9c60: 66 20 61 20 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73  f a common.cross
9c70: 20 70 6c 61 74 66 6f 72 6d 20 64 61 74 61 62 61   platform databa
9c80: 73 65 20 6f 66 20 43 65 72 74 69 66 69 63 61 74  se of Certificat
9c90: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e Authority (CA)
9ca0: 20 70 72 6f 76 69 64 65 64 20 63 65 72 74 69 66   provided certif
9cb0: 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61  icates to.valida
9cc0: 74 65 20 61 67 61 69 6e 73 74 2e 20 4d 61 6e 79  te against. Many
9cd0: 20 4c 69 6e 75 78 20 73 79 73 74 65 6d 73 20 6e   Linux systems n
9ce0: 61 74 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20  atively support 
9cf0: 4f 70 65 6e 53 53 4c 20 61 6e 64 20 74 68 75 73  OpenSSL and thus
9d00: 20 68 61 76 65 0a 74 68 65 73 65 20 63 65 72 74   have.these cert
9d10: 69 66 69 63 61 74 65 73 20 69 6e 73 74 61 6c 6c  ificates install
9d20: 65 64 20 61 73 20 70 61 72 74 20 6f 66 20 74 68  ed as part of th
9d30: 65 20 4f 53 2c 20 62 75 74 20 4d 61 63 4f 53 20  e OS, but MacOS 
9d40: 61 6e 64 20 4d 53 20 57 69 6e 64 6f 77 73 20 64  and MS Windows d
9d50: 6f 20 6e 6f 74 2e 0a 53 74 61 72 69 6e 67 20 69  o not..Staring i
9d60: 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68  n TclTLS 2.0, th
9d70: 65 20 64 65 66 61 75 6c 74 20 66 6f 72 20 63 6c  e default for cl
9d80: 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73  ient connections
9d90: 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e 67 65   has been change
9da0: 64 20 74 6f 0a 72 65 71 75 69 72 65 20 63 65 72  d to.require cer
9db0: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74  tificate validat
9dc0: 69 6f 6e 20 62 79 20 64 65 66 61 75 6c 74 2e 20  ion by default. 
9dd0: 49 6e 20 6f 72 64 65 72 20 74 6f 20 75 73 65 20  In order to use 
9de0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
9df0: 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f  tion">-require</
9e00: 62 3e 0a 6f 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f  b>.option, one o
9e10: 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20  f the following 
9e20: 6d 75 73 74 20 62 65 20 74 72 75 65 3a 3c 2f 70  must be true:</p
9e30: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<ul class="doc
9e40: 74 6f 6f 6c 73 5f 69 74 65 6d 69 7a 65 64 22 3e  tools_itemized">
9e50: 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78  .<li><p>On Linux
9e60: 20 61 6e 64 20 55 6e 69 78 20 73 79 73 74 65 6d   and Unix system
9e70: 73 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 61  s with OpenSSL a
9e80: 6c 72 65 61 64 79 20 69 6e 73 74 61 6c 6c 65 64  lready installed
9e90: 20 6f 72 20 69 66 20 74 68 65 20 43 41 0a 63 65   or if the CA.ce
9ea0: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 20 61  rtificates are a
9eb0: 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d 20  vailable in PEM 
9ec0: 66 6f 72 6d 61 74 2c 20 61 6e 64 20 69 66 20 74  format, and if t
9ed0: 68 65 79 20 61 72 65 20 73 74 6f 72 65 64 20 69  hey are stored i
9ee0: 6e 20 74 68 65 0a 73 74 61 6e 64 61 72 64 20 6c  n the.standard l
9ef0: 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20 69 66 20  ocations, or if 
9f00: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  the <b class="va
9f10: 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54  riable">SSL_CERT
9f20: 5f 44 49 52 3c 2f 62 3e 20 6f 72 20 3c 62 20 63  _DIR</b> or <b c
9f30: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
9f40: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62  SSL_CERT_FILE</b
9f50: 3e 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61  >.environment va
9f60: 72 69 61 62 6c 65 73 20 61 72 65 20 73 65 74 2c  riables are set,
9f70: 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22   then <b class="
9f80: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
9f90: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
9fa0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
9fb0: 2c 0a 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  ,.and <b class="
9fc0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
9fd0: 3c 2f 62 3e 20 61 72 65 6e 27 74 20 6e 65 65 64  </b> aren't need
9fe0: 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ed.</p></li>.<li
9ff0: 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c 20 69  ><p>If OpenSSL i
a000: 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20  s not installed 
a010: 69 6e 20 74 68 65 20 64 65 66 61 75 6c 74 20 6c  in the default l
a020: 6f 63 61 74 69 6f 6e 2c 20 6f 72 20 77 68 65 6e  ocation, or when
a030: 20 75 73 69 6e 67 20 4d 61 63 20 4f 53 0a 6f 72   using Mac OS.or
a040: 20 4d 53 20 57 69 6e 64 6f 77 73 20 61 6e 64 20   MS Windows and 
a050: 4f 70 65 6e 53 53 4c 20 69 73 20 69 6e 73 74 61  OpenSSL is insta
a060: 6c 6c 65 64 2c 20 74 68 65 20 3c 62 20 63 6c 61  lled, the <b cla
a070: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
a080: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61  L_CERT_DIR</b> a
a090: 6e 64 2f 6f 72 0a 3c 62 20 63 6c 61 73 73 3d 22  nd/or.<b class="
a0a0: 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45  variable">SSL_CE
a0b0: 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69  RT_FILE</b> envi
a0c0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65  ronment variable
a0d0: 73 20 6f 72 20 74 68 65 20 6f 6e 65 20 6f 66 20  s or the one of 
a0e0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
a0f0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
a100: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  ,.<b class="opti
a110: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20  on">-cadir</b>, 
a120: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  or <b class="opt
a130: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
a140: 3e 20 6f 70 74 69 6f 6e 73 20 6d 75 73 74 20 62  > options must b
a150: 65 20 64 65 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f  e defined.</p></
a160: 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53  li>.<li><p>On MS
a170: 20 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69   Windows, starti
a180: 6e 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 2e  ng in OpenSSL 3.
a190: 32 2c 20 69 74 20 69 73 20 6e 6f 77 20 70 6f 73  2, it is now pos
a1a0: 73 69 62 6c 65 20 74 6f 20 61 63 63 65 73 73 20  sible to access 
a1b0: 74 68 65 0a 62 75 69 6c 74 2d 69 6e 20 57 69 6e  the.built-in Win
a1c0: 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65  dows Certificate
a1d0: 20 53 74 6f 72 65 20 66 72 6f 6d 20 4f 70 65 6e   Store from Open
a1e0: 53 53 4c 2e 20 54 68 69 73 20 63 61 6e 20 62 65  SSL. This can be
a1f0: 20 75 74 69 6c 69 7a 65 64 20 62 79 0a 73 65 74   utilized by.set
a200: 74 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73  ting the <b clas
a210: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
a220: 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 74  ore</b> option t
a230: 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  o &quot;<b class
a240: 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65  ="const">org.ope
a250: 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f  nssl.winstore://
a260: 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a 49 6e 20 54  </b>&quot;..In T
a270: 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 20  clTLS 2.0, this 
a280: 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 76  is the default v
a290: 61 6c 75 65 20 69 66 20 3c 62 20 63 6c 61 73 73  alue if <b class
a2a0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
a2b0: 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22  </b>,.<b class="
a2c0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
a2d0: 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73  b>, and <b class
a2e0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f  ="option">-casto
a2f0: 72 65 3c 2f 62 3e 20 61 72 65 20 6e 6f 74 20 73  re</b> are not s
a300: 70 65 63 69 66 69 65 64 2e 3c 2f 70 3e 3c 2f 6c  pecified.</p></l
a310: 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20 4f 70 65  i>.<li><p>If Ope
a320: 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74  nSSL is not inst
a330: 61 6c 6c 65 64 20 6f 72 20 74 68 65 20 43 41 20  alled or the CA 
a340: 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65  certificates are
a350: 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 69   not available i
a360: 6e 20 50 45 4d 0a 66 6f 72 6d 61 74 2c 20 74 68  n PEM.format, th
a370: 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65  e CA certificate
a380: 73 20 6d 75 73 74 20 62 65 20 64 6f 77 6e 6c 6f  s must be downlo
a390: 61 64 65 64 20 61 6e 64 20 69 6e 73 74 61 6c 6c  aded and install
a3a0: 65 64 20 77 69 74 68 20 74 68 65 20 75 73 65 72  ed with the user
a3b0: 0a 73 6f 66 74 77 61 72 65 2e 20 54 68 65 20 43  .software. The C
a3c0: 55 52 4c 20 74 65 61 6d 20 6d 61 6b 65 73 20 74  URL team makes t
a3d0: 68 65 6d 20 61 76 61 69 6c 61 62 6c 65 20 61 74  hem available at
a3e0: 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a  .<a href="https:
a3f0: 2f 2f 63 75 72 6c 2e 73 65 2f 64 6f 63 73 2f 63  //curl.se/docs/c
a400: 61 65 78 74 72 61 63 74 2e 68 74 6d 6c 22 3e 43  aextract.html">C
a410: 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 65  A certificates e
a420: 78 74 72 61 63 74 65 64 0a 66 72 6f 6d 20 4d 6f  xtracted.from Mo
a430: 7a 69 6c 6c 61 3c 2f 61 3e 20 69 6e 20 74 68 65  zilla</a> in the
a440: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
a450: 22 66 69 6c 65 22 3e 63 61 63 65 72 74 2e 70 65  "file">cacert.pe
a460: 6d 3c 2f 62 3e 26 71 75 6f 74 3b 20 66 69 6c 65  m</b>&quot; file
a470: 2e 20 59 6f 75 20 6d 75 73 74 20 74 68 65 6e 20  . You must then 
a480: 65 69 74 68 65 72 20 73 65 74 20 74 68 65 0a 3c  either set the.<
a490: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
a4a0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c  e">SSL_CERT_DIR<
a4b0: 2f 62 3e 20 61 6e 64 2f 6f 72 20 3c 62 20 63 6c  /b> and/or <b cl
a4c0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53  ass="variable">S
a4d0: 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e  SL_CERT_FILE</b>
a4e0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72   environment var
a4f0: 69 61 62 6c 65 73 20 6f 72 20 74 68 65 0a 3c 62  iables or the.<b
a500: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
a510: 2d 63 61 64 69 72 3c 2f 62 3e 20 6f 72 20 3c 62  -cadir</b> or <b
a520: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
a530: 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69  -cafile</b> opti
a540: 6f 6e 73 20 74 6f 20 74 68 65 20 43 41 20 63 65  ons to the CA ce
a550: 72 74 20 66 69 6c 65 27 73 20 69 6e 73 74 61 6c  rt file's instal
a560: 6c 0a 6c 6f 63 61 74 69 6f 6e 2e 20 49 74 20 69  l.location. It i
a570: 73 20 79 6f 75 72 20 72 65 73 70 6f 6e 73 69 62  s your responsib
a580: 69 6c 69 74 79 20 74 6f 20 6b 65 65 70 20 74 68  ility to keep th
a590: 69 73 20 66 69 6c 65 20 75 70 20 74 6f 20 64 61  is file up to da
a5a0: 74 65 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 2f 75  te.</p></li>.</u
a5b0: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e  l>.</div>.</div>
a5c0: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f  .<div id="sectio
a5d0: 6e 35 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n5" class="docto
a5e0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
a5f0: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f  ><a name="sectio
a600: 6e 35 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74  n5">Callback Opt
a610: 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  ions</a></h2>.<p
a620: 3e 41 73 20 70 72 65 76 69 6f 75 73 6c 79 20 64  >As previously d
a630: 65 73 63 72 69 62 65 64 2c 20 65 61 63 68 20 63  escribed, each c
a640: 68 61 6e 6e 65 6c 20 63 61 6e 20 62 65 20 67 69  hannel can be gi
a650: 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61  ven their own ca
a660: 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c  llbacks.to handl
a670: 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70  e intermediate p
a680: 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 68 65  rocessing by the
a690: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79   OpenSSL library
a6a0: 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 62 20 63  , using the.<b c
a6b0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
a6c0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63  ommand</b>, <b c
a6d0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70  lass="option">-p
a6e0: 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64  assword</b>, and
a6f0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
a700: 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d  n">-validate_com
a710: 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73  mand</b> options
a720: 0a 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 65  .passed to eithe
a730: 72 20 6f 66 20 3c 62 20 63 6c 61 73 73 3d 22 63  r of <b class="c
a740: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
a750: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  /b> or <b class=
a760: 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72  "cmd">tls::impor
a770: 74 3c 2f 62 3e 2e 0a 55 6e 6c 69 6b 65 20 70 72  t</b>..Unlike pr
a780: 65 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 20  evious versions 
a790: 6f 66 20 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20  of TclTLS, only 
a7a0: 69 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20  if the callback 
a7b0: 67 65 6e 65 72 61 74 65 73 20 61 6e 20 65 72 72  generates an err
a7c0: 6f 72 2c 0a 77 69 6c 6c 20 74 68 65 20 3c 62 20  or,.will the <b 
a7d0: 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 62  class="syscmd">b
a7e0: 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61  gerror</b> comma
a7f0: 6e 64 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 69  nd be invoked wi
a800: 74 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66  th the error inf
a810: 6f 72 6d 61 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64  ormation.</p>.<d
a820: 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f  iv id="subsectio
a830: 6e 34 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n4" class="docto
a840: 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e  ols_subsection">
a850: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62  <h3><a name="sub
a860: 73 65 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73  section4">Values
a870: 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c   for Command Cal
a880: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c  lback</a></h3>.<
a890: 70 3e 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 66  p>The callback f
a8a0: 6f 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  or the <b class=
a8b0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e  "option">-comman
a8c0: 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20  d</b> option is 
a8d0: 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72  invoked at sever
a8e0: 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67  al points during
a8f0: 20 74 68 65 0a 4f 70 65 6e 53 53 4c 20 68 61 6e   the.OpenSSL han
a900: 64 73 68 61 6b 65 20 61 6e 64 20 64 75 72 69 6e  dshake and durin
a910: 67 20 72 6f 75 74 69 6e 65 20 6f 70 65 72 61 74  g routine operat
a920: 69 6f 6e 73 2e 20 53 65 65 20 62 65 6c 6f 77 20  ions. See below 
a930: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65  for the possible
a940: 0a 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65  .arguments passe
a950: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63  d to the callbac
a960: 6b 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 73  k script. Values
a970: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74   returned from t
a980: 68 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 0a  he callback are.
a990: 69 67 6e 6f 72 65 64 2e 3c 2f 70 3e 0a 3c 64 6c  ignored.</p>.<dl
a9a0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
a9b0: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  _options">.<dt><
a9c0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
a9d0: 3e 65 72 72 6f 72 3c 2f 62 3e 20 3c 69 20 63 6c  >error</b> <i cl
a9e0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
a9f0: 6c 49 64 20 6d 65 73 73 61 67 65 3c 2f 69 3e 3c  lId message</i><
aa00: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73  /dt>.<dd><p>This
aa10: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
aa20: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65  k is invoked whe
aa30: 6e 65 76 65 72 20 61 6e 20 65 72 72 6f 72 20 6f  never an error o
aa40: 63 63 75 72 73 20 64 75 72 69 6e 67 20 74 68 65  ccurs during the
aa50: 20 69 6e 69 74 69 61 6c 0a 63 6f 6e 6e 65 63 74   initial.connect
aa60: 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20  ion, handshake, 
aa70: 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e  or I/O operation
aa80: 73 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73 3d  s. The <i class=
aa90: 22 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69  "arg">message</i
aaa0: 3e 20 61 72 67 75 6d 65 6e 74 20 63 61 6e 20 62  > argument can b
aab0: 65 0a 66 72 6f 6d 20 74 68 65 20 54 63 6c 5f 45  e.from the Tcl_E
aac0: 72 72 6e 6f 4d 73 67 2c 20 4f 70 65 6e 53 53 4c  rrnoMsg, OpenSSL
aad0: 20 66 75 6e 63 74 69 6f 6e 20 3c 62 20 63 6c 61   function <b cla
aae0: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 45 52  ss="function">ER
aaf0: 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73  R_reason_error_s
ab00: 74 72 69 6e 67 28 29 3c 2f 62 3e 2c 0a 6f 72 20  tring()</b>,.or 
ab10: 61 20 63 75 73 74 6f 6d 20 6d 65 73 73 61 67 65  a custom message
ab20: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  . This callback 
ab30: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
ab40: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
ab50: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
ab60: 74 69 6f 6e 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c  tion">info</b> <
ab70: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
ab80: 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72 20 6d 69  annelId major mi
ab90: 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65  nor message type
aba0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
abb0: 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61  >This form of ca
abc0: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
abd0: 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  d by the OpenSSL
abe0: 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61   function.<b cla
abf0: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53  ss="function">SS
ac00: 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62  L_set_info_callb
ac10: 61 63 6b 28 29 3c 2f 62 3e 20 64 75 72 69 6e 67  ack()</b> during
ac20: 20 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e   the initial con
ac30: 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64  nection and hand
ac40: 73 68 61 6b 65 0a 6f 70 65 72 61 74 69 6f 6e 73  shake.operations
ac50: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20  . The arguments 
ac60: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  are:</p>.<dl cla
ac70: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
ac80: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  initions">.<dt><
ac90: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 61  i class="arg">ma
aca0: 6a 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  jor</i></dt>.<dd
acb0: 3e 3c 70 3e 4d 61 6a 6f 72 20 63 61 74 65 67 6f  ><p>Major catego
acc0: 72 79 20 66 6f 72 20 65 72 72 6f 72 2e 20 56 61  ry for error. Va
acd0: 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c  lid enums are: <
ace0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
acf0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 2c 20 3c  handshake</b>, <
ad00: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
ad10: 61 6c 65 72 74 3c 2f 62 3e 2c 0a 3c 62 20 63 6c  alert</b>,.<b cl
ad20: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 63 6f 6e 6e  ass="const">conn
ad30: 65 63 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  ect</b>, <b clas
ad40: 73 3d 22 63 6f 6e 73 74 22 3e 61 63 63 65 70 74  s="const">accept
ad50: 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  </b>.</p></dd>.<
ad60: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
ad70: 22 3e 6d 69 6e 6f 72 3c 2f 69 3e 3c 2f 64 74 3e  ">minor</i></dt>
ad80: 0a 3c 64 64 3e 3c 70 3e 4d 69 6e 6f 72 20 63 61  .<dd><p>Minor ca
ad90: 74 65 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72  tegory for error
ada0: 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72  . Valid enums ar
adb0: 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  e: <b class="con
adc0: 73 74 22 3e 73 74 61 72 74 3c 2f 62 3e 2c 20 3c  st">start</b>, <
add0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
ade0: 64 6f 6e 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  done</b>, <b cla
adf0: 73 73 3d 22 63 6f 6e 73 74 22 3e 72 65 61 64 3c  ss="const">read<
ae00: 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63  /b>,.<b class="c
ae10: 6f 6e 73 74 22 3e 77 72 69 74 65 3c 2f 62 3e 2c  onst">write</b>,
ae20: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
ae30: 22 3e 6c 6f 6f 70 3c 2f 62 3e 2c 20 3c 62 20 63  ">loop</b>, <b c
ae40: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 65 78 69  lass="const">exi
ae50: 74 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  t</b>.</p></dd>.
ae60: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
ae70: 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f  g">message</i></
ae80: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 65 73 63 72  dt>.<dd><p>Descr
ae90: 69 70 74 69 76 65 20 6d 65 73 73 61 67 65 20 73  iptive message s
aea0: 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 20  tring which may 
aeb0: 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 74  be generated eit
aec0: 68 65 72 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d  her by.<b class=
aed0: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73  "function">SSL_s
aee0: 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67  tate_string_long
aef0: 28 29 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61  ()</b> or <b cla
af00: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53  ss="function">SS
af10: 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 74 72  L_alert_desc_str
af20: 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0a  ing_long()</b>,.
af30: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65  depending on the
af40: 20 63 6f 6e 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64   context.</p></d
af50: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
af60: 22 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f  "arg">type</i></
af70: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 61  dt>.<dd><p>For a
af80: 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69  lerts, the possi
af90: 62 6c 65 20 76 61 6c 75 65 73 20 61 72 65 3a 20  ble values are: 
afa0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
afb0: 3e 77 61 72 6e 69 6e 67 3c 2f 62 3e 2c 0a 3c 62  >warning</b>,.<b
afc0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66   class="const">f
afd0: 61 74 61 6c 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62  atal</b>, and <b
afe0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 75   class="const">u
aff0: 6e 6b 6e 6f 77 6e 3c 2f 62 3e 2e 20 46 6f 72 20  nknown</b>. For 
b000: 6f 74 68 65 72 73 2c 20 3c 62 20 63 6c 61 73 73  others, <b class
b010: 3d 22 63 6f 6e 73 74 22 3e 69 6e 66 6f 3c 2f 62  ="const">info</b
b020: 3e 20 69 73 20 75 73 65 64 2e 0a 54 68 69 73 20  > is used..This 
b030: 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20  argument is new 
b040: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
b050: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
b060: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
b070: 3d 22 6f 70 74 69 6f 6e 22 3e 6d 65 73 73 61 67  ="option">messag
b080: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
b090: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64  arg">channelId d
b0a0: 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e  irection version
b0b0: 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 6d 65   content_type me
b0c0: 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ssage</i></dt>.<
b0d0: 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20  dd><p>This form 
b0e0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69  of callback is i
b0f0: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70  nvoked by the Op
b100: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c  enSSL function.<
b110: 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f  b class="functio
b120: 6e 22 3e 53 53 4c 5f 73 65 74 5f 6d 73 67 5f 63  n">SSL_set_msg_c
b130: 61 6c 6c 62 61 63 6b 28 29 3c 2f 62 3e 20 77 68  allback()</b> wh
b140: 65 6e 65 76 65 72 20 61 20 6d 65 73 73 61 67 65  enever a message
b150: 20 69 73 20 73 65 6e 74 20 6f 72 20 72 65 63 65   is sent or rece
b160: 69 76 65 64 20 64 75 72 69 6e 67 20 74 68 65 0a  ived during the.
b170: 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69  initial connecti
b180: 6f 6e 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f  on, handshake, o
b190: 72 20 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73  r I/O operations
b1a0: 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61  . It is only ava
b1b0: 69 6c 61 62 6c 65 20 77 68 65 6e 0a 4f 70 65 6e  ilable when.Open
b1c0: 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 20  SSL is complied 
b1d0: 77 69 74 68 20 74 68 65 20 3c 62 20 63 6c 61 73  with the <b clas
b1e0: 73 3d 22 63 6f 6e 73 74 22 3e 65 6e 61 62 6c 65  s="const">enable
b1f0: 2d 73 73 6c 2d 74 72 61 63 65 3c 2f 62 3e 20 6f  -ssl-trace</b> o
b200: 70 74 69 6f 6e 2e 20 54 68 69 73 20 63 61 6c 6c  ption. This call
b210: 62 61 63 6b 20 69 73 0a 6e 65 77 20 66 6f 72 20  back is.new for 
b220: 54 63 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20  TclTLS 1.8. The 
b230: 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f  arguments are:</
b240: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
b250: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
b260: 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73  ns">.<dt><i clas
b270: 73 3d 22 61 72 67 22 3e 64 69 72 65 63 74 69 6f  s="arg">directio
b280: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
b290: 70 3e 44 69 72 65 63 74 69 6f 6e 20 69 73 20 65  p>Direction is e
b2a0: 69 74 68 65 72 20 3c 62 20 63 6c 61 73 73 3d 22  ither <b class="
b2b0: 63 6f 6e 73 74 22 3e 53 65 6e 74 3c 2f 62 3e 20  const">Sent</b> 
b2c0: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  or <b class="con
b2d0: 73 74 22 3e 52 65 63 65 69 76 65 64 3c 2f 62 3e  st">Received</b>
b2e0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
b2f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
b300: 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rsion</i></dt>.<
b310: 64 64 3e 3c 70 3e 56 65 72 73 69 6f 6e 20 69 73  dd><p>Version is
b320: 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65   the protocol ve
b330: 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  rsion.</p></dd>.
b340: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
b350: 67 22 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c  g">content_type<
b360: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
b370: 43 6f 6e 74 65 6e 74 20 74 79 70 65 20 69 73 20  Content type is 
b380: 74 68 65 20 6d 65 73 73 61 67 65 20 63 6f 6e 74  the message cont
b390: 65 6e 74 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64  ent type.</p></d
b3a0: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
b3b0: 22 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69  "arg">message</i
b3c0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 65  ></dt>.<dd><p>Me
b3d0: 73 73 61 67 65 20 69 73 20 6d 6f 72 65 20 69 6e  ssage is more in
b3e0: 66 6f 20 66 72 6f 6d 20 74 68 65 20 3c 62 20 63  fo from the <b c
b3f0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 53 53 4c  lass="const">SSL
b400: 5f 74 72 61 63 65 3c 2f 62 3e 20 41 50 49 2e 3c  _trace</b> API.<
b410: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
b420: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
b430: 3d 22 6f 70 74 69 6f 6e 22 3e 73 65 73 73 69 6f  ="option">sessio
b440: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
b450: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73  arg">channelId s
b460: 65 73 73 69 6f 6e 5f 69 64 20 73 65 73 73 69 6f  ession_id sessio
b470: 6e 5f 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d  n_ticket lifetim
b480: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
b490: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  p>This form of c
b4a0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
b4b0: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ed by the OpenSS
b4c0: 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c  L function.<b cl
b4d0: 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53  ass="function">S
b4e0: 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73 65 74 5f  SL_CTX_sess_set_
b4f0: 6e 65 77 5f 63 62 28 29 3c 2f 62 3e 20 77 68 65  new_cb()</b> whe
b500: 6e 65 76 65 72 20 61 20 6e 65 77 20 73 65 73 73  never a new sess
b510: 69 6f 6e 20 69 64 20 69 73 20 73 65 6e 74 20 62  ion id is sent b
b520: 79 20 74 68 65 0a 73 65 72 76 65 72 20 64 75 72  y the.server dur
b530: 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 20  ing the initial 
b540: 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68  connection and h
b550: 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 61 6c 73  andshake and als
b560: 6f 20 64 75 72 69 6e 67 20 74 68 65 20 73 65 73  o during the ses
b570: 73 69 6f 6e 0a 69 66 20 74 68 65 20 3c 62 20 63  sion.if the <b c
b580: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70  lass="option">-p
b590: 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 62  ost_handshake</b
b5a0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73 65 74 20  > option is set 
b5b0: 74 6f 20 74 72 75 65 2e 20 54 68 69 73 20 63 61  to true. This ca
b5c0: 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f  llback is new fo
b5d0: 72 0a 54 63 6c 54 4c 53 20 31 2e 38 2e 20 54 68  r.TclTLS 1.8. Th
b5e0: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a  e arguments are:
b5f0: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
b600: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
b610: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ions">.<dt><i cl
b620: 61 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69 6f  ass="arg">sessio
b630: 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  n_id</i></dt>.<d
b640: 64 3e 3c 70 3e 53 65 73 73 69 6f 6e 20 49 64 20  d><p>Session Id 
b650: 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73  is the current s
b660: 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65  ession identifie
b670: 72 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  r</p></dd>.<dt><
b680: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65  i class="arg">se
b690: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e  ssion_ticket</i>
b6a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 63  </dt>.<dd><p>Tic
b6b0: 6b 65 74 20 69 73 20 74 68 65 20 73 65 73 73 69  ket is the sessi
b6c0: 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 3c 2f  on ticket info</
b6d0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
b6e0: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 66 65 74  lass="arg">lifet
b6f0: 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ime</i></dt>.<dd
b700: 3e 3c 70 3e 4c 69 66 65 74 69 6d 65 20 69 73 20  ><p>Lifetime is 
b710: 74 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74  the ticket lifet
b720: 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c  ime in seconds.<
b730: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
b740: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
b750: 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69 66 79  ="option">verify
b760: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
b770: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65  rg">channelId de
b780: 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20  pth cert status 
b790: 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  error</i></dt>.<
b7a0: 64 64 3e 3c 70 3e 54 68 69 73 20 63 61 6c 6c 62  dd><p>This callb
b7b0: 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 20 74 6f  ack was moved to
b7c0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
b7d0: 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d  n">-validatecomm
b7e0: 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c  and</b> in TclTL
b7f0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
b800: 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  </dl>.</div>.<di
b810: 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e  v id="subsection
b820: 35 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  5" class="doctoo
b830: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
b840: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73  h3><a name="subs
b850: 65 63 74 69 6f 6e 35 22 3e 56 61 6c 75 65 73 20  ection5">Values 
b860: 66 6f 72 20 50 61 73 73 77 6f 72 64 20 43 61 6c  for Password Cal
b870: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c  lback</a></h3>.<
b880: 70 3e 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 66  p>The callback f
b890: 6f 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  or the <b class=
b8a0: 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f  "option">-passwo
b8b0: 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73  rd</b> option is
b8c0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 54 63 6c 54   invoked by TclT
b8d0: 4c 53 20 77 68 65 6e 65 76 65 72 20 4f 70 65 6e  LS whenever Open
b8e0: 53 53 4c 20 6e 65 65 64 73 0a 74 6f 20 6f 62 74  SSL needs.to obt
b8f0: 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20  ain a password. 
b900: 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68  See below for th
b910: 65 20 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d  e possible argum
b920: 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74  ents passed to t
b930: 68 65 0a 63 61 6c 6c 62 61 63 6b 20 73 63 72 69  he.callback scri
b940: 70 74 2e 20 54 68 65 20 75 73 65 72 20 70 72 6f  pt. The user pro
b950: 76 69 64 65 64 20 70 61 73 73 77 6f 72 64 20 69  vided password i
b960: 73 20 65 78 70 65 63 74 65 64 20 74 6f 20 62 65  s expected to be
b970: 20 72 65 74 75 72 6e 65 64 20 62 79 20 74 68 65   returned by the
b980: 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e 0a 3c  .callback.</p>.<
b990: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
b9a0: 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74  ls_options">.<dt
b9b0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
b9c0: 6e 22 3e 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20  n">password</b> 
b9d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72  <i class="arg">r
b9e0: 77 66 6c 61 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f  wflag size</i></
b9f0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b  dt>.<dd><p>Invok
ba00: 65 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20  ed when loading 
ba10: 6f 72 20 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e  or storing an en
ba20: 63 72 79 70 74 65 64 20 50 45 4d 20 63 65 72 74  crypted PEM cert
ba30: 69 66 69 63 61 74 65 2e 20 54 68 65 20 61 72 67  ificate. The arg
ba40: 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a  uments are:</p>.
ba50: 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <dl class="docto
ba60: 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22  ols_definitions"
ba70: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
ba80: 61 72 67 22 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c  arg">rwflag</i><
ba90: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
baa0: 72 65 61 64 2f 77 72 69 74 65 20 66 6c 61 67 20  read/write flag 
bab0: 69 73 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67  is 0 for reading
bac0: 2f 64 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31  /decryption or 1
bad0: 20 66 6f 72 20 77 72 69 74 69 6e 67 2f 65 6e 63   for writing/enc
bae0: 72 79 70 74 69 6f 6e 2e 0a 54 68 65 20 6c 61 74  ryption..The lat
baf0: 74 65 72 20 63 61 6e 20 62 65 20 75 73 65 64 20  ter can be used 
bb00: 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68 65  to determine whe
bb10: 6e 20 74 6f 20 70 72 6f 6d 70 74 20 74 68 65 20  n to prompt the 
bb20: 75 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 6d 2e  user to confirm.
bb30: 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69  .This argument i
bb40: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
bb50: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
bb60: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
bb70: 22 3e 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">size</i></dt>.
bb80: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 7a 65 20  <dd><p>The size 
bb90: 69 73 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 6c  is the maximum l
bba0: 65 6e 67 74 68 20 6f 66 20 74 68 65 20 70 61 73  ength of the pas
bbb0: 73 77 6f 72 64 20 69 6e 20 62 79 74 65 73 2e 0a  sword in bytes..
bbc0: 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73  This argument is
bbd0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
bbe0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  1.8.</p></dd>.</
bbf0: 64 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c  dl></dd>.</dl>.<
bc00: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
bc10: 75 62 73 65 63 74 69 6f 6e 36 22 20 63 6c 61 73  ubsection6" clas
bc20: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
bc30: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
bc40: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 36  ame="subsection6
bc50: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61 6c  ">Values for Val
bc60: 69 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43 61  idate Command Ca
bc70: 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a  llback</a></h3>.
bc80: 3c 70 3e 54 68 65 20 63 61 6c 6c 62 61 63 6b 20  <p>The callback 
bc90: 66 6f 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73  for the <b class
bca0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64  ="option">-valid
bcb0: 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f  atecommand</b> o
bcc0: 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64  ption is invoked
bcd0: 20 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64   during the hand
bce0: 73 68 61 6b 65 0a 70 72 6f 63 65 73 73 20 69 6e  shake.process in
bcf0: 20 6f 72 64 65 72 20 66 6f 72 20 74 68 65 20 61   order for the a
bd00: 70 70 6c 69 63 61 74 69 6f 6e 20 74 6f 20 76 61  pplication to va
bd10: 6c 69 64 61 74 65 20 74 68 65 20 70 72 6f 76 69  lidate the provi
bd20: 64 65 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65  ded value(s). Se
bd30: 65 0a 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20  e.below for the 
bd40: 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e  possible argumen
bd50: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65  ts passed to the
bd60: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
bd70: 2e 20 49 66 20 6e 6f 74 0a 73 70 65 63 69 66 69  . If not.specifi
bd80: 65 64 2c 20 4f 70 65 6e 53 53 4c 20 77 69 6c 6c  ed, OpenSSL will
bd90: 20 61 63 63 65 70 74 20 61 6c 6c 20 76 61 6c 69   accept all vali
bda0: 64 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61  d certificates a
bdb0: 6e 64 20 65 78 74 65 6e 73 69 6f 6e 73 2e 20 54  nd extensions. T
bdc0: 6f 20 72 65 6a 65 63 74 0a 74 68 65 20 76 61 6c  o reject.the val
bdd0: 75 65 20 61 6e 64 20 61 62 6f 72 74 20 74 68 65  ue and abort the
bde0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65   connection, the
bdf0: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64   callback should
be00: 20 72 65 74 75 72 6e 20 30 2e 20 54 6f 20 61 63   return 0. To ac
be10: 63 65 70 74 20 74 68 65 0a 76 61 6c 75 65 20 61  cept the.value a
be20: 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20  nd continue the 
be30: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73  connection, it s
be40: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e 20  hould return 1. 
be50: 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61  To reject the va
be60: 6c 75 65 2c 20 62 75 74 0a 63 6f 6e 74 69 6e 75  lue, but.continu
be70: 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  e the connection
be80: 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75  , it should retu
be90: 72 6e 20 32 2e 20 54 68 69 73 20 63 61 6c 6c 62  rn 2. This callb
bea0: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54  ack is new for T
beb0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 0a 3c  clTLS 1.8.</p>.<
bec0: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
bed0: 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74  ls_options">.<dt
bee0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
bef0: 6e 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63  n">alpn</b> <i c
bf00: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
bf10: 65 6c 49 64 20 70 72 6f 74 6f 63 6f 6c 20 6d 61  elId protocol ma
bf20: 74 63 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  tch</i></dt>.<dd
bf30: 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72 73 2c  ><p>For servers,
bf40: 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61   this form of ca
bf50: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
bf60: 64 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e  d when the clien
bf70: 74 20 41 4c 50 4e 20 65 78 74 65 6e 73 69 6f 6e  t ALPN extension
bf80: 20 69 73 0a 72 65 63 65 69 76 65 64 2e 20 49 66   is.received. If
bf90: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
bfa0: 6d 61 74 63 68 3c 2f 69 3e 20 69 73 20 74 72 75  match</i> is tru
bfb0: 65 2c 20 74 68 65 6e 20 3c 69 20 63 6c 61 73 73  e, then <i class
bfc0: 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c  ="arg">protocol<
bfd0: 2f 69 3e 20 69 73 20 74 68 65 20 66 69 72 73 74  /i> is the first
bfe0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
bff0: 6e 22 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 70 72 6f  n">-alpn</b> pro
c000: 74 6f 63 6f 6c 20 6f 70 74 69 6f 6e 20 69 6e 20  tocol option in 
c010: 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 20 74  common to both t
c020: 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 20 73 65  he client and se
c030: 72 76 65 72 2e 0a 49 66 20 6e 6f 74 2c 20 74 68  rver..If not, th
c040: 65 20 66 69 72 73 74 20 63 6c 69 65 6e 74 20 73  e first client s
c050: 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f  pecified protoco
c060: 6c 20 69 73 20 75 73 65 64 2e 20 54 68 69 73 20  l is used. This 
c070: 63 61 6c 6c 62 61 63 6b 20 69 73 20 63 61 6c 6c  callback is call
c080: 65 64 0a 61 66 74 65 72 20 74 68 65 20 48 65 6c  ed.after the Hel
c090: 6c 6f 20 61 6e 64 20 53 4e 49 20 63 61 6c 6c 62  lo and SNI callb
c0a0: 61 63 6b 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  acks.</p></dd>.<
c0b0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
c0c0: 69 6f 6e 22 3e 68 65 6c 6c 6f 3c 2f 62 3e 20 3c  ion">hello</b> <
c0d0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
c0e0: 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e 61  annelId serverna
c0f0: 6d 65 20 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 69  me session_id</i
c100: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f  ></dt>.<dd><p>Fo
c110: 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20  r servers, this 
c120: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
c130: 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69   is invoked duri
c140: 6e 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 20  ng client hello 
c150: 6d 65 73 73 61 67 65 0a 70 72 6f 63 65 73 73 69  message.processi
c160: 6e 67 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20  ng. The purpose 
c170: 69 73 20 73 6f 20 74 68 65 20 73 65 72 76 65 72  is so the server
c180: 20 63 61 6e 20 73 65 6c 65 63 74 20 74 68 65 20   can select the 
c190: 61 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 74  appropriate cert
c1a0: 69 66 69 63 61 74 65 0a 74 6f 20 70 72 65 73 65  ificate.to prese
c1b0: 6e 74 20 74 6f 20 74 68 65 20 63 6c 69 65 6e 74  nt to the client
c1c0: 2c 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74  , and to make ot
c1d0: 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f  her configuratio
c1e0: 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65  n adjustments re
c1f0: 6c 65 76 61 6e 74 0a 74 6f 20 74 68 61 74 20 73  levant.to that s
c200: 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69  erver name and i
c210: 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  ts configuration
c220: 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 62  . It is called b
c230: 65 66 6f 72 65 20 74 68 65 20 53 4e 49 20 61 6e  efore the SNI an
c240: 64 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 73  d ALPN.callbacks
c250: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
c260: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
c270: 3e 73 6e 69 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  >sni</b> <i clas
c280: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49  s="arg">channelI
c290: 64 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e  d servername</i>
c2a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72  </dt>.<dd><p>For
c2b0: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66   servers, this f
c2c0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
c2d0: 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20  is invoked when 
c2e0: 74 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 20  the Server Name 
c2f0: 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29  Indication.(SNI)
c300: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65   extension is re
c310: 63 65 69 76 65 64 2e 20 54 68 65 20 3c 69 20 63  ceived. The <i c
c320: 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 72 76 65  lass="arg">serve
c330: 72 6e 61 6d 65 3c 2f 69 3e 20 61 72 67 75 6d 65  rname</i> argume
c340: 6e 74 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74  nt is the client
c350: 0a 70 72 6f 76 69 64 65 64 20 73 65 72 76 65 72  .provided server
c360: 20 6e 61 6d 65 20 73 70 65 63 69 66 69 65 64 20   name specified 
c370: 69 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  in the <b class=
c380: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72  "option">-server
c390: 6e 61 6d 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e  name</b> option.
c3a0: 20 54 68 65 0a 70 75 72 70 6f 73 65 20 69 73 20   The.purpose is 
c3b0: 73 6f 20 77 68 65 6e 20 61 20 73 65 72 76 65 72  so when a server
c3c0: 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 69 70   supports multip
c3d0: 6c 65 20 6e 61 6d 65 73 2c 20 74 68 65 20 72 69  le names, the ri
c3e0: 67 68 74 20 63 65 72 74 69 66 69 63 61 74 65 0a  ght certificate.
c3f0: 63 61 6e 20 62 65 20 75 73 65 64 2e 20 49 74 20  can be used. It 
c400: 69 73 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20  is called after 
c410: 74 68 65 20 48 65 6c 6c 6f 20 63 61 6c 6c 62 61  the Hello callba
c420: 63 6b 20 62 75 74 20 62 65 66 6f 72 65 20 74 68  ck but before th
c430: 65 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 2e  e ALPN.callback.
c440: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
c450: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
c460: 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69 20 63 6c  verify</b> <i cl
c470: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
c480: 6c 49 64 20 64 65 70 74 68 20 63 65 72 74 20 73  lId depth cert s
c490: 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 69 3e 3c  tatus error</i><
c4a0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73  /dt>.<dd><p>This
c4b0: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
c4c0: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20  k is invoked by 
c4d0: 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e  OpenSSL when a n
c4e0: 65 77 20 63 65 72 74 69 66 69 63 61 74 65 20 69  ew certificate i
c4f0: 73 20 72 65 63 65 69 76 65 64 0a 66 72 6f 6d 20  s received.from 
c500: 74 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c  the peer. It all
c510: 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74  ows the client t
c520: 6f 20 63 68 65 63 6b 20 74 68 65 20 63 65 72 74  o check the cert
c530: 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61  ificate verifica
c540: 74 69 6f 6e 0a 72 65 73 75 6c 74 73 20 61 6e 64  tion.results and
c550: 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 20   choose whether 
c560: 74 6f 20 63 6f 6e 74 69 6e 75 65 20 6f 72 20 6e  to continue or n
c570: 6f 74 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64  ot. It is called
c580: 20 66 6f 72 20 65 61 63 68 0a 63 65 72 74 69 66   for each.certif
c590: 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72  icate in the cer
c5a0: 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2e 20  tificate chain. 
c5b0: 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61  This callback wa
c5c0: 73 20 6d 6f 76 65 64 20 66 72 6f 6d 0a 3c 62 20  s moved from.<b 
c5d0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
c5e0: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 6e 20 54  command</b> in T
c5f0: 63 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61  clTLS 1.8. The a
c600: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70  rguments are:</p
c610: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
c620: 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e  tools_definition
c630: 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  s">.<dt><i class
c640: 3d 22 61 72 67 22 3e 64 65 70 74 68 3c 2f 69 3e  ="arg">depth</i>
c650: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
c660: 20 64 65 70 74 68 20 69 73 20 74 68 65 20 69 6e   depth is the in
c670: 74 65 67 65 72 20 64 65 70 74 68 20 6f 66 20 74  teger depth of t
c680: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69  he certificate i
c690: 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  n the certificat
c6a0: 65 20 63 68 61 69 6e 2c 0a 77 68 65 72 65 20 30  e chain,.where 0
c6b0: 20 69 73 20 74 68 65 20 70 65 65 72 20 63 65 72   is the peer cer
c6c0: 74 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67  tificate and hig
c6d0: 68 65 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67  her values going
c6e0: 20 75 70 20 74 6f 20 74 68 65 20 43 65 72 74 69   up to the Certi
c6f0: 66 69 63 61 74 65 0a 41 75 74 68 6f 72 69 74 79  ficate.Authority
c700: 20 28 43 41 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a   (CA).</p></dd>.
c710: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
c720: 67 22 3e 63 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e  g">cert</i></dt>
c730: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74  .<dd><p>The cert
c740: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c   argument is a l
c750: 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65  ist of key-value
c760: 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72 20 74   pairs similar t
c770: 6f 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64  o those returned
c780: 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6d   by.<b class="cm
c790: 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f  d">tls::status</
c7a0: 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  b>.</p></dd>.<dt
c7b0: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
c7c0: 73 74 61 74 75 73 3c 2f 69 3e 3c 2f 64 74 3e 0a  status</i></dt>.
c7d0: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 74 75  <dd><p>The statu
c7e0: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68  s argument is th
c7f0: 65 20 62 6f 6f 6c 65 61 6e 20 76 61 6c 69 64 69  e boolean validi
c800: 74 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e  ty of the curren
c810: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 77 68  t certificate wh
c820: 65 72 65 20 30 0a 69 73 20 69 6e 76 61 6c 69 64  ere 0.is invalid
c830: 20 61 6e 64 20 31 20 69 73 20 76 61 6c 69 64 2e   and 1 is valid.
c840: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69  </p></dd>.<dt><i
c850: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 65 72 72   class="arg">err
c860: 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  or</i></dt>.<dd>
c870: 3c 70 3e 54 68 65 20 65 72 72 6f 72 20 61 72 67  <p>The error arg
c880: 75 6d 65 6e 74 20 69 73 20 74 68 65 20 65 72 72  ument is the err
c890: 6f 72 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61  or message, if a
c8a0: 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 20 62 79  ny, generated by
c8b0: 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74  .<b class="funct
c8c0: 69 6f 6e 22 3e 58 35 30 39 5f 53 54 4f 52 45 5f  ion">X509_STORE_
c8d0: 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c  CTX_get_error()<
c8e0: 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  /b>.</p></dd>.</
c8f0: 64 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c  dl></dd>.</dl>.<
c900: 70 3e 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c  p>Reference impl
c910: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74  ementations of t
c920: 68 65 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61  hese callbacks a
c930: 72 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 26  re provided in &
c940: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66  quot;<b class="f
c950: 69 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e  ile">tls.tcl</b>
c960: 26 71 75 6f 74 3b 0a 61 73 20 3c 62 20 63 6c 61  &quot;.as <b cla
c970: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61  ss="cmd">tls::ca
c980: 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63  llback</b>, <b c
c990: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
c9a0: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e  password</b>, an
c9b0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  d <b class="cmd"
c9c0: 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63  >tls::validate_c
c9d0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 72 65 73 70 65  ommand</b>.respe
c9e0: 63 74 69 76 65 6c 79 2e 20 4e 6f 74 65 20 74 68  ctively. Note th
c9f0: 61 74 20 74 68 65 73 65 20 61 72 65 20 6f 6e 6c  at these are onl
ca00: 79 20 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d  y <em>sample</em
ca10: 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e  > implementation
ca20: 73 2e 20 49 6e 20 61 20 6d 6f 72 65 0a 72 65 61  s. In a more.rea
ca30: 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e  listic deploymen
ca40: 74 20 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63  t you would spec
ca50: 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c  ify your own cal
ca60: 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e  lback scripts on
ca70: 20 65 61 63 68 20 54 4c 53 0a 63 68 61 6e 6e 65   each TLS.channe
ca80: 6c 20 75 73 69 6e 67 20 74 68 65 20 3c 62 20 63  l using the <b c
ca90: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
caa0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63  ommand</b>, <b c
cab0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70  lass="option">-p
cac0: 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64  assword</b>, and
cad0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
cae0: 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d  n">-validate_com
caf0: 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73  mand</b> options
cb00: 2e 3c 2f 70 3e 0a 3c 70 3e 54 68 65 20 64 65 66  .</p>.<p>The def
cb10: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68  ault behavior wh
cb20: 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  en the <b class=
cb30: 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e  "option">-comman
cb40: 64 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61  d</b> and <b cla
cb50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
cb60: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62  idate_command</b
cb70: 3e 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f  >.options are no
cb80: 74 20 73 70 65 63 69 66 69 65 64 2c 20 69 73 20  t specified, is 
cb90: 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72  for TclTLS to pr
cba0: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69  ocess the associ
cbb0: 61 74 65 64 20 6c 69 62 72 61 72 79 0a 63 61 6c  ated library.cal
cbc0: 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c  lbacks internall
cbd0: 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 62  y. The default b
cbe0: 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65  ehavior when the
cbf0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
cc00: 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e  n">-password</b>
cc10: 20 6f 70 74 69 6f 6e 0a 69 73 20 6e 6f 74 20 73   option.is not s
cc20: 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20  pecified is for 
cc30: 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73  TclTLS to proces
cc40: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64  s the associated
cc50: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63   library callbac
cc60: 6b 73 20 62 79 0a 61 74 74 65 6d 70 74 69 6e 67  ks by.attempting
cc70: 20 74 6f 20 63 61 6c 6c 20 3c 62 20 63 6c 61 73   to call <b clas
cc80: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73  s="cmd">tls::pas
cc90: 73 77 6f 72 64 3c 2f 62 3e 2e 20 54 68 65 20 64  sword</b>. The d
cca0: 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65  ifference betwee
ccb0: 6e 20 74 68 65 73 65 20 74 77 6f 0a 62 65 68 61  n these two.beha
ccc0: 76 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65  viors is a conse
ccd0: 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61  quence of mainta
cce0: 69 6e 69 6e 67 20 63 6f 6d 70 61 74 69 62 69 6c  ining compatibil
ccf0: 69 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 72  ity with earlier
cd00: 0a 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73  .implementations
cd10: 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65  .</p>.<p><em>The
cd20: 20 75 73 65 20 6f 66 20 74 68 65 20 72 65 66 65   use of the refe
cd30: 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 20  rence callbacks 
cd40: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
cd50: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e  ls::callback</b>
cd60: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  , <b class="cmd"
cd70: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f  >tls::password</
cd80: 62 3e 2c 0a 61 6e 64 20 3c 62 20 63 6c 61 73 73  b>,.and <b class
cd90: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69  ="cmd">tls::vali
cda0: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
cdb0: 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e   is not recommen
cdc0: 64 65 64 2e 20 54 68 65 79 20 6d 61 79 20 62 65  ded. They may be
cdd0: 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75   removed from fu
cde0: 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 3c 2f  ture releases.</
cdf0: 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  em></p>.</div>.<
ce00: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
ce10: 65 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22  ection6" class="
ce20: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
ce30: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h2><a name="s
ce40: 65 63 74 69 6f 6e 36 22 3e 44 65 62 75 67 3c 2f  ection6">Debug</
ce50: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 46 6f 72 20 6d  a></h2>.<p>For m
ce60: 6f 73 74 20 64 65 62 75 67 67 69 6e 67 20 6e 65  ost debugging ne
ce70: 65 64 73 2c 20 74 68 65 20 3c 62 20 63 6c 61 73  eds, the <b clas
ce80: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c  s="option">-call
ce90: 62 61 63 6b 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20  back</b> option 
cea0: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70  can be used to p
ceb0: 72 6f 76 69 64 65 0a 73 75 66 66 69 63 69 65 6e  rovide.sufficien
cec0: 74 20 69 6e 73 69 67 68 74 20 61 6e 64 20 69 6e  t insight and in
ced0: 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65  formation on the
cee0: 20 54 4c 53 20 68 61 6e 64 73 68 61 6b 65 20 61   TLS handshake a
cef0: 6e 64 20 70 72 6f 67 72 65 73 73 2e 20 49 66 0a  nd progress. If.
cf00: 66 75 72 74 68 65 72 20 74 72 6f 75 62 6c 65 73  further troubles
cf10: 68 6f 6f 74 69 6e 67 20 69 6e 73 69 67 68 74 20  hooting insight 
cf20: 69 73 20 6e 65 65 64 65 64 2c 20 74 68 65 20 63  is needed, the c
cf30: 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69  ompile time opti
cf40: 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  on.<b class="opt
cf50: 69 6f 6e 22 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65  ion">--enable-de
cf60: 62 75 67 3c 2f 62 3e 20 63 61 6e 20 62 65 20 75  bug</b> can be u
cf70: 73 65 64 20 74 6f 20 67 65 74 20 64 65 74 61 69  sed to get detai
cf80: 6c 65 64 20 65 78 65 63 75 74 69 6f 6e 20 66 6c  led execution fl
cf90: 6f 77 20 73 74 61 74 75 73 2e 3c 2f 70 3e 0a 3c  ow status.</p>.<
cfa0: 70 3e 54 4c 53 20 6b 65 79 20 6c 6f 67 67 69 6e  p>TLS key loggin
cfb0: 67 20 63 61 6e 20 62 65 20 65 6e 61 62 6c 65 64  g can be enabled
cfc0: 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20   by setting the 
cfd0: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  environment vari
cfe0: 61 62 6c 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76  able.<b class="v
cff0: 61 72 69 61 62 6c 65 22 3e 53 53 4c 4b 45 59 4c  ariable">SSLKEYL
d000: 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f 20 74 68  OGFILE</b> to th
d010: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69  e name of the fi
d020: 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e 20 54 68  le to log to. Th
d030: 65 6e 20 77 68 65 6e 65 76 65 72 20 54 4c 53 20  en whenever TLS 
d040: 6b 65 79 0a 6d 61 74 65 72 69 61 6c 20 69 73 20  key.material is 
d050: 67 65 6e 65 72 61 74 65 64 20 6f 72 20 72 65 63  generated or rec
d060: 65 69 76 65 64 20 69 74 20 77 69 6c 6c 20 62 65  eived it will be
d070: 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 65 20 66   logged to the f
d080: 69 6c 65 2e 20 54 68 69 73 20 69 73 20 75 73 65  ile. This is use
d090: 66 75 6c 0a 66 6f 72 20 6c 6f 67 67 69 6e 67 20  ful.for logging 
d0a0: 6b 65 79 20 64 61 74 61 20 66 6f 72 20 6e 65 74  key data for net
d0b0: 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f  work logging too
d0c0: 6c 73 20 74 6f 20 75 73 65 20 74 6f 20 64 65 63  ls to use to dec
d0d0: 72 79 70 74 20 74 68 65 20 64 61 74 61 2e 3c 2f  rypt the data.</
d0e0: 70 3e 0a 3c 70 3e 54 68 65 20 3c 62 20 63 6c 61  p>.<p>The <b cla
d0f0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 6c  ss="variable">tl
d100: 73 3a 3a 64 65 62 75 67 3c 2f 62 3e 20 76 61 72  s::debug</b> var
d110: 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73  iable provides s
d120: 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63  ome additional c
d130: 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 0a  ontrol over the.
d140: 64 65 62 75 67 20 6c 6f 67 67 69 6e 67 20 69 6e  debug logging in
d150: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
d160: 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63  md">tls::callbac
d170: 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  k</b>, <b class=
d180: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77  "cmd">tls::passw
d190: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20  ord</b>, and.<b 
d1a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
d1b0: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e  :validate_comman
d1c0: 64 3c 2f 62 3e 20 64 65 66 61 75 6c 74 20 68 61  d</b> default ha
d1d0: 6e 64 6c 65 72 73 20 69 6e 20 26 71 75 6f 74 3b  ndlers in &quot;
d1e0: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e  <b class="file">
d1f0: 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74  tls.tcl</b>&quot
d200: 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 76  ;..The default v
d210: 61 6c 75 65 20 69 73 20 30 20 77 69 74 68 20 68  alue is 0 with h
d220: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f  igher values pro
d230: 64 75 63 69 6e 67 20 6d 6f 72 65 20 64 69 61 67  ducing more diag
d240: 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 0a 61  nostic output,.a
d250: 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72  nd will also for
d260: 63 65 20 74 68 65 20 76 65 72 69 66 79 20 6d 65  ce the verify me
d270: 74 68 6f 64 20 69 6e 20 3c 62 20 63 6c 61 73 73  thod in <b class
d280: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c  ="cmd">tls::call
d290: 62 61 63 6b 3c 2f 62 3e 20 74 6f 20 61 63 63 65  back</b> to acce
d2a0: 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 61  pt the.certifica
d2b0: 74 65 2c 20 65 76 65 6e 20 69 66 20 69 74 20 69  te, even if it i
d2c0: 73 20 69 6e 76 61 6c 69 64 20 77 68 65 6e 20 74  s invalid when t
d2d0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
d2e0: 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f  ion">-validateco
d2f0: 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e  mmand</b>.option
d300: 20 69 73 20 73 65 74 20 74 6f 20 3c 62 20 63 6c   is set to <b cl
d310: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76  ass="cmd">tls::v
d320: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c  alidate_command<
d330: 2f 62 3e 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e  /b>.</p>.<p><em>
d340: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 76  The use of the v
d350: 61 72 69 61 62 6c 65 20 3c 62 20 63 6c 61 73 73  ariable <b class
d360: 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a  ="variable">tls:
d370: 3a 64 65 62 75 67 3c 2f 62 3e 20 69 73 20 6e 6f  :debug</b> is no
d380: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49  t recommended..I
d390: 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64  t may be removed
d3a0: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c   from future rel
d3b0: 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a  eases.</em></p>.
d3c0: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
d3d0: 73 65 63 74 69 6f 6e 37 22 20 63 6c 61 73 73 3d  section7" class=
d3e0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
d3f0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
d400: 73 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d 70 6c  section7">Exampl
d410: 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54  es</a></h2>.<p>T
d420: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65  he following are
d430: 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73   example scripts
d440: 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 61 20 77   to download a w
d450: 65 62 70 61 67 65 20 61 6e 64 20 66 69 6c 65 20  ebpage and file 
d460: 75 73 69 6e 67 20 74 68 65 0a 68 74 74 70 20 70  using the.http p
d470: 61 63 6b 61 67 65 2e 20 53 65 65 20 3c 73 70 61  ackage. See <spa
d480: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
d490: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
d4a0: 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74  ion4">Certificat
d4b0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
d4c0: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 77 68 65 6e  </span> for when
d4d0: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f   the.<b class="o
d4e0: 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62  ption">-cadir</b
d4f0: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  >, <b class="opt
d500: 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e  ion">-cafile</b>
d510: 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  , and <b class="
d520: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
d530: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 61 72 65  </b> options are
d540: 20 61 6c 73 6f 0a 6e 65 65 64 65 64 2e 20 53 65   also.needed. Se
d550: 65 20 74 68 65 20 26 71 75 6f 74 3b 3c 62 20 63  e the &quot;<b c
d560: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 64 65 6d 6f  lass="file">demo
d570: 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 64 69 72 65  s</b>&quot; dire
d580: 63 74 6f 72 79 20 66 6f 72 20 6d 6f 72 65 20 65  ctory for more e
d590: 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73 2e 3c  xample scripts.<
d5a0: 2f 70 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23  /p>.<p>Example #
d5b0: 31 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 20 77 65  1: Download a we
d5c0: 62 20 70 61 67 65 3c 2f 70 3e 0a 3c 70 72 65 20  b page</p>.<pre 
d5d0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
d5e0: 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63 6b 61 67  example">.packag
d5f0: 65 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 70  e require http.p
d600: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74  ackage require t
d610: 6c 73 0a 73 65 74 20 75 72 6c 20 26 71 75 6f 74  ls.set url &quot
d620: 3b 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c  ;https://www.tcl
d630: 2e 74 6b 2f 26 71 75 6f 74 3b 0a 68 74 74 70 3a  .tk/&quot;.http:
d640: 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20  :register https 
d650: 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a  443 [list ::tls:
d660: 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72  :socket -autoser
d670: 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 75 69  vername 1 -requi
d680: 72 65 20 31 5d 0a 23 20 47 65 74 20 55 52 4c 0a  re 1].# Get URL.
d690: 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74 70 3a  set token [http:
d6a0: 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a 23 20  :geturl $url].# 
d6b0: 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f 72 0a  Check for error.
d6c0: 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75  if {[http::statu
d6d0: 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75  s $token] ne &qu
d6e0: 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20  ot;ok&quot;} {. 
d6f0: 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20     puts [format 
d700: 26 71 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71  &quot;Error %s&q
d710: 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74  uot; [http::stat
d720: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20  us $token]].}.# 
d730: 53 61 76 65 20 77 65 62 20 70 61 67 65 20 74 6f  Save web page to
d740: 20 66 69 6c 65 0a 73 65 74 20 63 68 20 5b 6f 70   file.set ch [op
d750: 65 6e 20 65 78 61 6d 70 6c 65 2e 68 74 6d 6c 20  en example.html 
d760: 77 62 5d 0a 70 75 74 73 20 24 63 68 20 5b 68 74  wb].puts $ch [ht
d770: 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65 6e 5d  tp::data $token]
d780: 0a 63 6c 6f 73 65 20 24 63 68 0a 23 20 43 6c 65  .close $ch.# Cle
d790: 61 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65  anup.::http::cle
d7a0: 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72  anup $token.</pr
d7b0: 65 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23 32  e>.<p>Example #2
d7c0: 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 20 66 69 6c  : Download a fil
d7d0: 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73  e</p>.<pre class
d7e0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70  ="doctools_examp
d7f0: 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 71  le">.package req
d800: 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67  uire http.packag
d810: 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 65  e require tls.se
d820: 74 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 70  t url &quot;http
d830: 73 3a 2f 2f 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e  s://wiki.tcl-lan
d840: 67 2e 6f 72 67 2f 73 69 74 65 6d 61 70 2e 78 6d  g.org/sitemap.xm
d850: 6c 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65  l&quot;.http::re
d860: 67 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33  gister https 443
d870: 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f   [list ::tls::so
d880: 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72  cket -autoserver
d890: 6e 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20  name 1 -require 
d8a0: 31 5d 0a 23 20 4f 70 65 6e 20 6f 75 74 70 75 74  1].# Open output
d8b0: 20 66 69 6c 65 0a 73 65 74 20 66 69 6c 65 6e 61   file.set filena
d8c0: 6d 65 20 5b 66 69 6c 65 20 74 61 69 6c 20 24 75  me [file tail $u
d8d0: 72 6c 5d 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e  rl].set ch [open
d8e0: 20 24 66 69 6c 65 6e 61 6d 65 20 77 62 5d 0a 23   $filename wb].#
d8f0: 20 47 65 74 20 66 69 6c 65 0a 73 65 74 20 74 6f   Get file.set to
d900: 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 65 74  ken [::http::get
d910: 75 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 6b 73  url $url -blocks
d920: 69 7a 65 20 36 35 35 33 36 20 2d 63 68 61 6e 6e  ize 65536 -chann
d930: 65 6c 20 24 63 68 5d 0a 23 20 43 68 65 63 6b 20  el $ch].# Check 
d940: 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68  for error.if {[h
d950: 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b  ttp::status $tok
d960: 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26  en] ne &quot;ok&
d970: 71 75 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74  quot;} {.    put
d980: 73 20 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b  s [format &quot;
d990: 45 72 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b  Error %s&quot; [
d9a0: 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f  http::status $to
d9b0: 6b 65 6e 5d 5d 0a 7d 0a 23 20 43 6c 65 61 6e 75  ken]].}.# Cleanu
d9c0: 70 0a 63 6c 6f 73 65 20 24 63 68 0a 3a 3a 68 74  p.close $ch.::ht
d9d0: 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b  tp::cleanup $tok
d9e0: 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e  en.</pre>.</div>
d9f0: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f  .<div id="sectio
da00: 6e 38 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n8" class="docto
da10: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
da20: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f  ><a name="sectio
da30: 6e 38 22 3e 53 70 65 63 69 61 6c 20 43 6f 6e 73  n8">Special Cons
da40: 69 64 65 72 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f  iderations</a></
da50: 68 32 3e 0a 3c 70 3e 54 68 65 20 63 61 70 61 62  h2>.<p>The capab
da60: 69 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73 20  ilities of this 
da70: 70 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72 79  package can vary
da80: 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65   enormously base
da90: 64 20 75 70 6f 6e 20 68 6f 77 20 74 68 65 0a 6c  d upon how the.l
daa0: 69 6e 6b 65 64 20 74 6f 20 4f 70 65 6e 53 53 4c  inked to OpenSSL
dab0: 20 6c 69 62 72 61 72 79 20 77 61 73 20 63 6f 6e   library was con
dac0: 66 69 67 75 72 65 64 20 61 6e 64 20 62 75 69 6c  figured and buil
dad0: 74 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e 73 20  t. New versions 
dae0: 6d 61 79 20 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64  may obsolete.old
daf0: 65 72 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  er protocol vers
db00: 69 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 65 6d  ions, add or rem
db10: 6f 76 65 20 63 69 70 68 65 72 73 2c 20 63 68 61  ove ciphers, cha
db20: 6e 67 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75  nge default valu
db30: 65 73 2c 20 65 74 63 2e 0a 55 73 65 20 74 68 65  es, etc..Use the
db40: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
db50: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f  tls::protocols</
db60: 62 3e 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62  b> command to ob
db70: 74 61 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74  tain the support
db80: 65 64 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  ed.protocol vers
db90: 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e  ions.</p>.</div>
dba0: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f  .<div id="sectio
dbb0: 6e 39 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n9" class="docto
dbc0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
dbd0: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f  ><a name="sectio
dbe0: 6e 39 22 3e 45 72 72 6f 72 20 4d 65 73 73 61 67  n9">Error Messag
dbf0: 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 53  es</a></h2>.<p>S
dc00: 6f 6d 65 20 4f 70 73 6e 53 53 6c 20 65 72 72 6f  ome OpsnSSl erro
dc10: 72 20 6d 65 73 73 61 67 65 73 20 68 61 76 65 20  r messages have 
dc20: 63 72 79 70 74 69 63 20 6d 65 61 6e 69 6e 67 73  cryptic meanings
dc30: 2e 20 54 68 69 73 20 69 73 20 61 20 6c 69 73 74  . This is a list
dc40: 20 6f 66 20 6d 65 73 73 61 67 65 73 0a 61 6c 6f   of messages.alo
dc50: 6e 67 20 77 69 74 68 20 74 68 65 69 72 20 74 72  ng with their tr
dc60: 75 65 20 6d 65 61 6e 69 6e 67 2e 3c 2f 70 3e 0a  ue meaning.</p>.
dc70: 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <dl class="docto
dc80: 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22  ols_definitions"
dc90: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
dca0: 61 72 67 22 3e 70 61 63 6b 65 74 20 6c 65 6e 67  arg">packet leng
dcb0: 74 68 20 74 6f 6f 20 6c 6f 6e 67 3c 2f 69 3e 3c  th too long</i><
dcc0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6c 69 65  /dt>.<dd><p>Clie
dcd0: 6e 74 20 68 61 73 20 74 72 69 65 64 20 74 6f 20  nt has tried to 
dce0: 63 6f 6e 6e 65 63 74 20 74 6f 20 61 20 48 54 54  connect to a HTT
dcf0: 50 20 73 65 72 76 65 72 20 6f 6e 20 74 68 65 20  P server on the 
dd00: 70 6c 61 69 6e 2d 74 65 78 74 20 70 6f 72 74 20  plain-text port 
dd10: 69 6e 73 74 65 61 64 20 6f 66 20 74 68 65 20 53  instead of the S
dd20: 53 4c 2f 54 4c 53 20 70 6f 72 74 2e 3c 2f 70 3e  SL/TLS port.</p>
dd30: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
dd40: 73 73 3d 22 61 72 67 22 3e 75 6e 65 78 70 65 63  ss="arg">unexpec
dd50: 74 65 64 20 65 6f 66 20 77 68 69 6c 65 20 72 65  ted eof while re
dd60: 61 64 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ading</i></dt>.<
dd70: 64 64 3e 3c 70 3e 50 65 65 72 20 68 61 73 20 63  dd><p>Peer has c
dd80: 6c 6f 73 65 64 20 74 68 65 20 63 6f 6e 6e 65 63  losed the connec
dd90: 74 69 6f 6e 20 77 69 74 68 6f 75 74 20 73 65 6e  tion without sen
dda0: 64 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63  ding the &quot;c
ddb0: 6c 6f 73 65 20 6e 6f 74 69 66 79 26 71 75 6f 74  lose notify&quot
ddc0: 3b 20 73 68 75 74 64 6f 77 6e 20 61 6c 65 72 74  ; shutdown alert
ddd0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
dde0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 77 72  i class="arg">wr
ddf0: 6f 6e 67 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62  ong version numb
de00: 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  er</i></dt>.<dd>
de10: 3c 70 3e 43 6c 69 65 6e 74 20 68 61 73 20 74 72  <p>Client has tr
de20: 69 65 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74  ied to connect t
de30: 6f 20 61 20 6e 6f 6e 2d 48 54 54 50 20 73 65 72  o a non-HTTP ser
de40: 76 65 72 20 6f 6e 20 61 20 6e 6f 6e 2d 54 4c 53  ver on a non-TLS
de50: 20 28 69 2e 65 2e 20 70 6c 61 69 6e 20 74 65 78   (i.e. plain tex
de60: 74 29 20 70 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64  t) port.</p></dd
de70: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c  >.</dl>.</div>.<
de80: 64 69 76 20 69 64 3d 22 73 65 65 2d 61 6c 73 6f  div id="see-also
de90: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
dea0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
deb0: 61 20 6e 61 6d 65 3d 22 73 65 65 2d 61 6c 73 6f  a name="see-also
dec0: 22 3e 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f  ">See Also</a></
ded0: 68 32 3e 0a 3c 70 3e 3c 61 20 68 72 65 66 3d 22  h2>.<p><a href="
dee0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e  https://www.open
def0: 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53  ssl.org/">OpenSS
df00: 4c 3c 2f 61 3e 2c 20 68 74 74 70 2c 20 73 6f 63  L</a>, http, soc
df10: 6b 65 74 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  ket</p>.</div>.<
df20: 64 69 76 20 69 64 3d 22 6b 65 79 77 6f 72 64 73  div id="keywords
df30: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
df40: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
df50: 61 20 6e 61 6d 65 3d 22 6b 65 79 77 6f 72 64 73  a name="keywords
df60: 22 3e 4b 65 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f  ">Keywords</a></
df70: 68 32 3e 0a 3c 70 3e 49 2f 4f 2c 20 49 50 20 41  h2>.<p>I/O, IP A
df80: 64 64 72 65 73 73 2c 20 4f 70 65 6e 53 53 4c 2c  ddress, OpenSSL,
df90: 20 53 53 4c 2c 20 54 43 50 2c 20 54 4c 53 2c 20   SSL, TCP, TLS, 
dfa0: 54 63 6c 54 4c 53 2c 20 61 73 79 6e 63 68 72 6f  TclTLS, asynchro
dfb0: 6e 6f 75 73 20 49 2f 4f 2c 20 62 69 6e 64 2c 20  nous I/O, bind, 
dfc0: 63 65 72 74 69 66 69 63 61 74 65 2c 20 63 68 61  certificate, cha
dfd0: 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 63 74 69 6f 6e  nnel, connection
dfe0: 2c 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 2c 20 68  , domain name, h
dff0: 6f 73 74 2c 20 68 74 74 70 73 2c 20 6e 65 74 77  ost, https, netw
e000: 6f 72 6b 2c 20 6e 65 74 77 6f 72 6b 20 61 64 64  ork, network add
e010: 72 65 73 73 2c 20 73 6f 63 6b 65 74 2c 20 74 6c  ress, socket, tl
e020: 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  s</p>.</div>.<di
e030: 76 20 69 64 3d 22 63 61 74 65 67 6f 72 79 22 20  v id="category" 
e040: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
e050: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
e060: 6e 61 6d 65 3d 22 63 61 74 65 67 6f 72 79 22 3e  name="category">
e070: 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 68 32  Category</a></h2
e080: 3e 0a 3c 70 3e 74 6c 73 3c 2f 70 3e 0a 3c 2f 64  >.<p>tls</p>.</d
e090: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63 6f 70  iv>.<div id="cop
e0a0: 79 72 69 67 68 74 22 20 63 6c 61 73 73 3d 22 64  yright" class="d
e0b0: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
e0c0: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 6f  ><h2><a name="co
e0d0: 70 79 72 69 67 68 74 22 3e 43 6f 70 79 72 69 67  pyright">Copyrig
e0e0: 68 74 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 43  ht</a></h2>.<p>C
e0f0: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20  opyright &copy; 
e100: 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e  1999 Matt Newman
e110: 3c 62 72 3e 0a 43 6f 70 79 72 69 67 68 74 20 26  <br>.Copyright &
e120: 63 6f 70 79 3b 20 32 30 30 34 20 53 74 61 72 66  copy; 2004 Starf
e130: 69 73 68 20 53 79 73 74 65 6d 73 3c 62 72 3e 0a  ish Systems<br>.
e140: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
e150: 20 32 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61   2024 Brian O'Ha
e160: 67 61 6e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  gan</p>.</div>.<
e170: 2f 64 69 76 3e 3c 2f 62 6f 64 79 3e 3c 2f 68 74  /div></body></ht
e180: 6d 6c 3e 0a                                      ml>.