Hex Artifact Content

Artifact 578249bf4cc2c9f4f249e4b5d9977a772ad36937fad8bead831fc5f363fe8065:


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 31 20  e">tls(n) 2.0b1 
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 65 2d 61 6c 73 6f   href="#see-also
0f10: 22 3e 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f  ">See Also</a></
0f20: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  li>.<li class="d
0f30: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
0f40: 3e 3c 61 20 68 72 65 66 3d 22 23 6b 65 79 77 6f  ><a href="#keywo
0f50: 72 64 73 22 3e 4b 65 79 77 6f 72 64 73 3c 2f 61  rds">Keywords</a
0f60: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73  ></li>.<li class
0f70: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
0f80: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 63 61  on"><a href="#ca
0f90: 74 65 67 6f 72 79 22 3e 43 61 74 65 67 6f 72 79  tegory">Category
0fa0: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0fb0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
0fc0: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0fd0: 23 63 6f 70 79 72 69 67 68 74 22 3e 43 6f 70 79  #copyright">Copy
0fe0: 72 69 67 68 74 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  right</a></li>.<
0ff0: 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76  /ul>.</div>.<div
1000: 20 69 64 3d 22 73 79 6e 6f 70 73 69 73 22 20 63   id="synopsis" c
1010: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
1020: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e  ection"><h2><a n
1030: 61 6d 65 3d 22 73 79 6e 6f 70 73 69 73 22 3e 53  ame="synopsis">S
1040: 79 6e 6f 70 73 69 73 3c 2f 61 3e 3c 2f 68 32 3e  ynopsis</a></h2>
1050: 0a 3c 64 69 76 20 63 6c 61 73 73 3d 22 64 6f 63  .<div class="doc
1060: 74 6f 6f 6c 73 5f 73 79 6e 6f 70 73 69 73 22 3e  tools_synopsis">
1070: 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<ul class="doct
1080: 6f 6f 6c 73 5f 72 65 71 75 69 72 65 6d 65 6e 74  ools_requirement
1090: 73 22 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20  s">.<li>package 
10a0: 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73  require <b class
10b0: 3d 22 70 6b 67 6e 61 6d 65 22 3e 54 63 6c 20 38  ="pkgname">Tcl 8
10c0: 2e 35 2d 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 6c 69  .5-</b></li>.<li
10d0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
10e0: 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61   <b class="pkgna
10f0: 6d 65 22 3e 74 6c 73 20 32 2e 30 62 31 3c 2f 62  me">tls 2.0b1</b
1100: 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 75 6c  ></li>.</ul>.<ul
1110: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
1120: 5f 73 79 6e 74 61 78 22 3e 0a 3c 6c 69 3e 3c 61  _syntax">.<li><a
1130: 20 68 72 65 66 3d 22 23 31 22 3e 3c 62 20 63 6c   href="#1"><b cl
1140: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69  ass="cmd">tls::i
1150: 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c  nit</b> <span cl
1160: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
1170: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f  ass="arg">-optio
1180: 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  n</i>?</span> <s
1190: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
11a0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
11b0: 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  value</i>?</span
11c0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
11d0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
11e0: 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75  rg">-option valu
11f0: 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  e ...</i>?</span
1200: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
1210: 61 20 68 72 65 66 3d 22 23 32 22 3e 3c 62 20 63  a href="#2"><b c
1220: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1230: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 73 70 61 6e  socket</b> <span
1240: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1250: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1260: 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  tion</i>?</span>
1270: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
1280: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
1290: 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73  g">value</i>?</s
12a0: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
12b0: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
12c0: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76  ="arg">-option v
12d0: 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73  alue ...</i>?</s
12e0: 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  pan> <i class="a
12f0: 72 67 22 3e 68 6f 73 74 3c 2f 69 3e 20 3c 69 20  rg">host</i> <i 
1300: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 6f 72 74  class="arg">port
1310: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  </i></a></li>.<l
1320: 69 3e 3c 61 20 68 72 65 66 3d 22 23 33 22 3e 3c  i><a href="#3"><
1330: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1340: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 62  s::socket</b> <b
1350: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
1360: 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20 63  -server</b> <i c
1370: 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6d 6d 61  lass="arg">comma
1380: 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61  nd</i> <span cla
1390: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
13a0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
13b0: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
13c0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
13d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
13e0: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  alue</i>?</span>
13f0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
1400: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
1410: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65  g">-option value
1420: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e   ...</i>?</span>
1430: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
1440: 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69  port</i></a></li
1450: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
1460: 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  4"><b class="cmd
1470: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
1480: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1490: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70  >channel</i> <sp
14a0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
14b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
14c0: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
14d0: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
14e0: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
14f0: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
1500: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1510: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1520: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
1530: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
1540: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  /span></a></li>.
1550: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 35 22  <li><a href="#5"
1560: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
1570: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62  tls::unimport</b
1580: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1590: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
15a0: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
15b0: 66 3d 22 23 36 22 3e 3c 62 20 63 6c 61 73 73 3d  f="#6"><b class=
15c0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61 6e 64 73  "cmd">tls::hands
15d0: 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  hake</b> <i clas
15e0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
15f0: 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  /i></a></li>.<li
1600: 3e 3c 61 20 68 72 65 66 3d 22 23 37 22 3e 3c 62  ><a href="#7"><b
1610: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
1620: 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70  ::status</b> <sp
1630: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
1640: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
1650: 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73  ">-local</b>?</s
1660: 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  pan> <i class="a
1670: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  rg">channel</i><
1680: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
1690: 68 72 65 66 3d 22 23 38 22 3e 3c 62 20 63 6c 61  href="#8"><b cla
16a0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 6f  ss="cmd">tls::co
16b0: 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20  nnection</b> <i 
16c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
16d0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e  nel</i></a></li>
16e0: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 39  .<li><a href="#9
16f0: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
1700: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62  >tls::ciphers</b
1710: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1720: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1730: 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e  rg">protocol</i>
1740: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63  ?</span> <span c
1750: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
1760: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f  lass="arg">verbo
1770: 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  se</i>?</span> <
1780: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
1790: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
17a0: 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c  >supported</i>?<
17b0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  /span></a></li>.
17c0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 30  <li><a href="#10
17d0: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
17e0: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
17f0: 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  /b></a></li>.<li
1800: 3e 3c 61 20 68 72 65 66 3d 22 23 31 31 22 3e 3c  ><a href="#11"><
1810: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1820: 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f  s::version</b></
1830: 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f  a></li>.</ul>.</
1840: 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76  div>.</div>.<div
1850: 20 69 64 3d 22 73 65 63 74 69 6f 6e 31 22 20 63   id="section1" c
1860: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
1870: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e  ection"><h2><a n
1880: 61 6d 65 3d 22 73 65 63 74 69 6f 6e 31 22 3e 44  ame="section1">D
1890: 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c 2f  escription</a></
18a0: 68 32 3e 0a 3c 70 3e 54 68 69 73 20 65 78 74 65  h2>.<p>This exte
18b0: 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65 73 20 54  nsion provides T
18c0: 43 4c 20 73 63 72 69 70 74 20 61 63 63 65 73 73  CL script access
18d0: 20 74 6f 20 73 65 63 75 72 65 20 73 6f 63 6b 65   to secure socke
18e0: 74 20 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73  t communications
18f0: 0a 75 73 69 6e 67 20 74 68 65 20 54 72 61 6e 73  .using the Trans
1900: 70 6f 72 74 20 4c 61 79 65 72 20 53 65 63 75 72  port Layer Secur
1910: 69 74 79 20 28 54 4c 53 29 20 70 72 6f 74 6f 63  ity (TLS) protoc
1920: 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64 65 73 20  ol. It provides 
1930: 61 20 67 65 6e 65 72 69 63 0a 62 69 6e 64 69 6e  a generic.bindin
1940: 67 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74  g to <a href="ht
1950: 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73  tps://www.openss
1960: 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c  l.org/">OpenSSL<
1970: 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 20 74  /a>, utilizing t
1980: 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 73 79 73  he.<b class="sys
1990: 63 6d 64 22 3e 54 63 6c 5f 53 74 61 63 6b 43 68  cmd">Tcl_StackCh
19a0: 61 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49 20 69 6e  annel</b> API in
19b0: 20 54 43 4c 20 38 2e 34 20 6f 72 20 6c 61 74 65   TCL 8.4 or late
19c0: 72 2e 0a 54 68 65 73 65 20 73 6f 63 6b 65 74 73  r..These sockets
19d0: 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 20   behave exactly 
19e0: 74 68 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e  the same as chan
19f0: 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69  nels created usi
1a00: 6e 67 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a  ng the built-in.
1a10: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
1a20: 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d  ">socket</b> com
1a30: 6d 61 6e 64 2c 20 62 75 74 20 70 72 6f 76 69 64  mand, but provid
1a40: 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74  e additional opt
1a50: 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 72 6f 6c  ions for control
1a60: 6c 69 6e 67 0a 74 68 65 20 53 53 4c 2f 54 4c 53  ling.the SSL/TLS
1a70: 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 0a 3c 2f   session.</p>.</
1a80: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65  div>.<div id="se
1a90: 63 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64  ction2" class="d
1aa0: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
1ab0: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65  ><h2><a name="se
1ac0: 63 74 69 6f 6e 32 22 3e 43 6f 6d 70 61 74 69 62  ction2">Compatib
1ad0: 69 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c  ility</a></h2>.<
1ae0: 70 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e  p>This extension
1af0: 20 69 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77   is compatible w
1b00: 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e  ith OpenSSL 1.1.
1b10: 31 20 6f 72 20 6c 61 74 65 72 2e 20 49 74 20 72  1 or later. It r
1b20: 65 71 75 69 72 65 73 20 54 63 6c 0a 76 65 72 73  equires Tcl.vers
1b30: 69 6f 6e 20 38 2e 35 20 6f 72 20 6c 61 74 65 72  ion 8.5 or later
1b40: 20 61 6e 64 20 77 69 6c 6c 20 77 6f 72 6b 20 77   and will work w
1b50: 69 74 68 20 54 63 6c 20 39 2e 30 2e 3c 2f 70 3e  ith Tcl 9.0.</p>
1b60: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d  .</div>.<div id=
1b70: 22 73 65 63 74 69 6f 6e 33 22 20 63 6c 61 73 73  "section3" class
1b80: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
1b90: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d  on"><h2><a name=
1ba0: 22 73 65 63 74 69 6f 6e 33 22 3e 43 6f 6d 6d 61  "section3">Comma
1bb0: 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e  nds</a></h2>.<p>
1bc0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72  The following ar
1bd0: 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64 73 20 70  e the commands p
1be0: 72 6f 76 69 64 65 64 20 62 79 20 74 68 65 20 54  rovided by the T
1bf0: 63 4c 54 4c 53 20 70 61 63 6b 61 67 65 2e 20 53  cLTLS package. S
1c00: 65 65 20 74 68 65 0a 3c 73 70 61 6e 20 63 6c 61  ee the.<span cla
1c10: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
1c20: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 37 22  href="#section7"
1c30: 3e 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 73  >Examples</a></s
1c40: 70 61 6e 3e 20 66 6f 72 20 65 78 61 6d 70 6c 65  pan> for example
1c50: 20 75 73 61 67 65 20 61 6e 64 20 74 68 65 20 26   usage and the &
1c60: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66  quot;<b class="f
1c70: 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71  ile">demos</b>&q
1c80: 75 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66  uot; directory f
1c90: 6f 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20  or.more example 
1ca0: 75 73 61 67 65 2e 3c 2f 70 3e 0a 3c 64 6c 20 63  usage.</p>.<dl c
1cb0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
1cc0: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
1cd0: 3e 3c 61 20 6e 61 6d 65 3d 22 31 22 3e 3c 62 20  ><a name="1"><b 
1ce0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
1cf0: 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 6e 20  :init</b> <span 
1d00: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1d10: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1d20: 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  ion</i>?</span> 
1d30: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1d40: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1d50: 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70  ">value</i>?</sp
1d60: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  an> <span class=
1d70: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
1d80: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61  "arg">-option va
1d90: 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70  lue ...</i>?</sp
1da0: 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  an></a></dt>.<dd
1db0: 3e 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e  ><p>Optional fun
1dc0: 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65  ction to set the
1dd0: 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73   default options
1de0: 20 75 73 65 64 20 62 79 20 3c 62 20 63 6c 61 73   used by <b clas
1df0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63  s="cmd">tls::soc
1e00: 6b 65 74 3c 2f 62 3e 2e 20 49 66 20 79 6f 75 0a  ket</b>. If you.
1e10: 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63  call <b class="c
1e20: 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c  md">tls::import<
1e30: 2f 62 3e 20 64 69 72 65 63 74 6c 79 2c 20 74 68  /b> directly, th
1e40: 65 20 76 61 6c 75 65 73 20 73 65 74 20 62 79 20  e values set by 
1e50: 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 76  this command hav
1e60: 65 20 6e 6f 20 65 66 66 65 63 74 2e 0a 54 68 69  e no effect..Thi
1e70: 73 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f 72  s command suppor
1e80: 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61  ts all of the sa
1e90: 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68  me options as th
1ea0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
1eb0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
1ec0: 20 63 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67 68   command,.though
1ed0: 20 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69   you should limi
1ee0: 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74  t your options t
1ef0: 6f 20 6f 6e 6c 79 20 74 68 65 20 54 4c 53 20 72  o only the TLS r
1f00: 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e  elated ones.</p>
1f10: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d  </dd>.<dt><a nam
1f20: 65 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22  e="2"><b class="
1f30: 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  cmd">tls::socket
1f40: 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  </b> <span class
1f50: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
1f60: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f  ="arg">-option</
1f70: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1f80: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1f90: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c   class="arg">val
1fa0: 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  ue</i>?</span> <
1fb0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
1fc0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
1fd0: 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e  >-option value .
1fe0: 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  ..</i>?</span> <
1ff0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f  i class="arg">ho
2000: 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d  st</i> <i class=
2010: 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f  "arg">port</i></
2020: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  a></dt>.<dd><p>T
2030: 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 20  his is a helper 
2040: 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74  function that ut
2050: 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72  ilizes the under
2060: 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 3c  lying commands <
2070: 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22  b class="syscmd"
2080: 3e 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20  >socket</b>.and 
2090: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
20a0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 74  ls::import</b> t
20b0: 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 6f 6e  o create the con
20c0: 6e 65 63 74 69 6f 6e 2e 20 49 74 20 62 65 68 61  nection. It beha
20d0: 76 65 73 20 74 68 65 20 73 61 6d 65 20 61 73 20  ves the same as 
20e0: 74 68 65 0a 6e 61 74 69 76 65 20 54 43 4c 20 3c  the.native TCL <
20f0: 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22  b class="syscmd"
2100: 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d  >socket</b> comm
2110: 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 73 75  and, but also su
2120: 70 70 6f 72 74 73 20 74 68 65 20 3c 62 20 63 6c  pports the <b cl
2130: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69  ass="cmd">tls::i
2140: 6d 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e  mport</b>.comman
2150: 64 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f  d options with o
2160: 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70  ne additional op
2170: 74 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 6e 73  tion. It returns
2180: 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e   the channel han
2190: 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e  dle id.for the n
21a0: 65 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 0a 3c  ew socket.</p>.<
21b0: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
21c0: 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74  ls_options">.<dt
21d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
21e0: 6e 22 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61  n">-autoserverna
21f0: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
2200: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f  "arg">bool</i></
2210: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 66 20 3c 62  dt>.<dd><p>If <b
2220: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
2230: 72 75 65 3c 2f 62 3e 2c 20 61 75 74 6f 6d 61 74  rue</b>, automat
2240: 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20 3c  ically set the <
2250: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
2260: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e  >-servername</b>
2270: 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 74 68 65   argument to the
2280: 0a 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 20 61  .<em>host</em> a
2290: 72 67 75 6d 65 6e 74 2e 20 50 72 69 6f 72 20 74  rgument. Prior t
22a0: 6f 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68  o TclTLS 2.0, th
22b0: 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20  e default is <b 
22c0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61  class="const">fa
22d0: 6c 73 65 3c 2f 62 3e 2e 0a 53 74 61 72 74 69 6e  lse</b>..Startin
22e0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
22f0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   the default is 
2300: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
2310: 3e 74 72 75 65 3c 2f 62 3e 20 75 6e 6c 65 73 73  >true</b> unless
2320: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
2330: 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f  n">-servername</
2340: 62 3e 0a 69 73 20 61 6c 73 6f 20 73 70 65 63 69  b>.is also speci
2350: 66 69 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  fied.</p></dd>.<
2360: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  /dl></dd>.<dt><a
2370: 20 6e 61 6d 65 3d 22 33 22 3e 3c 62 20 63 6c 61   name="3"><b cla
2380: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f  ss="cmd">tls::so
2390: 63 6b 65 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73  cket</b> <b clas
23a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76  s="option">-serv
23b0: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  er</b> <i class=
23c0: 22 61 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69  "arg">command</i
23d0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
23e0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
23f0: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
2400: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
2410: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
2420: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
2430: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
2440: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
2450: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
2460: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
2470: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63  /i>?</span> <i c
2480: 6c 61 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c  lass="arg">port<
2490: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  /i></a></dt>.<dd
24a0: 3e 3c 70 3e 53 61 6d 65 20 61 73 20 70 72 65 76  ><p>Same as prev
24b0: 69 6f 75 73 2c 20 62 75 74 20 69 6e 73 74 65 61  ious, but instea
24c0: 64 20 63 72 65 61 74 65 73 20 61 20 73 65 72 76  d creates a serv
24d0: 65 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 63 6c  er socket for cl
24e0: 69 65 6e 74 73 20 74 6f 20 63 6f 6e 6e 65 63 74  ients to connect
24f0: 20 74 6f 0a 6a 75 73 74 20 6c 69 6b 65 20 74 68   to.just like th
2500: 65 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 3d 22  e Tcl <b class="
2510: 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 20 2d  syscmd">socket -
2520: 73 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d 6d 61  server</b> comma
2530: 6e 64 2e 20 49 74 20 72 65 74 75 72 6e 73 20 74  nd. It returns t
2540: 68 65 20 63 68 61 6e 6e 65 6c 0a 68 61 6e 64 6c  he channel.handl
2550: 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65 77  e id for the new
2560: 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f 64 64   socket.</p></dd
2570: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 34  >.<dt><a name="4
2580: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
2590: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e  >tls::import</b>
25a0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
25b0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70 61  channel</i> <spa
25c0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
25d0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
25e0: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  ption</i>?</span
25f0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
2600: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
2610: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f  rg">value</i>?</
2620: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
2630: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
2640: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20  s="arg">-option 
2650: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f  value ...</i>?</
2660: 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  span></a></dt>.<
2670: 64 64 3e 3c 70 3e 53 74 61 72 74 20 54 4c 53 20  dd><p>Start TLS 
2680: 65 6e 63 72 79 70 74 69 6f 6e 20 6f 6e 20 54 43  encryption on TC
2690: 4c 20 63 68 61 6e 6e 65 6c 20 3c 69 20 63 6c 61  L channel <i cla
26a0: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
26b0: 3c 2f 69 3e 20 76 69 61 20 61 20 73 74 61 63 6b  </i> via a stack
26c0: 65 64 20 63 68 61 6e 6e 65 6c 2e 20 49 74 0a 6e  ed channel. It.n
26d0: 65 65 64 20 6e 6f 74 20 62 65 20 61 20 73 6f 63  eed not be a soc
26e0: 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 70 72  ket, but must pr
26f0: 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 74 69  ovide bi-directi
2700: 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f 20  onal flow. Also 
2710: 73 65 74 73 20 73 65 73 73 69 6f 6e 0a 70 61 72  sets session.par
2720: 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20  ameters for SSL 
2730: 68 61 6e 64 73 68 61 6b 65 2e 20 56 61 6c 69 64  handshake. Valid
2740: 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 3c 2f 70   options are:</p
2750: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
2760: 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a  tools_options">.
2770: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
2780: 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62 3e 20  tion">-alpn</b> 
2790: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c  <i class="arg">l
27a0: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ist</i></dt>.<dd
27b0: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 70 72 6f 74  ><p>List of prot
27c0: 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 64  ocols to offer d
27d0: 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 6f  uring Applicatio
27e0: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
27f0: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 41 4c   Negotiation.(AL
2800: 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65  PN). For example
2810: 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  : <b class="cons
2820: 74 22 3e 68 32 3c 2f 62 3e 20 61 6e 64 20 3c 62  t">h2</b> and <b
2830: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68   class="const">h
2840: 74 74 70 2f 31 2e 31 3c 2f 62 3e 2c 20 62 75 74  ttp/1.1</b>, but
2850: 20 6e 6f 74 20 3c 62 20 63 6c 61 73 73 3d 22 63   not <b class="c
2860: 6f 6e 73 74 22 3e 68 33 3c 2f 62 3e 20 6f 72 0a  onst">h3</b> or.
2870: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
2880: 3e 71 75 69 63 3c 2f 62 3e 2e 20 54 68 69 73 20  >quic</b>. This 
2890: 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f  option is new fo
28a0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
28b0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
28c0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
28d0: 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  dir</b> <i class
28e0: 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72 79  ="arg">directory
28f0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
2900: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64  >Specifies the d
2910: 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74  irectory where t
2920: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
2930: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65  uthority (CA) ce
2940: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a 73  rtificates are.s
2950: 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 61 75  tored. The defau
2960: 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 73  lt is platform s
2970: 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 6e 20  pecific and can 
2980: 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 69 6c  be set at compil
2990: 65 20 74 69 6d 65 2e 20 54 68 65 0a 64 65 66 61  e time. The.defa
29a0: 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61 6e  ult location can
29b0: 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62   be overridden b
29c0: 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  y the <b class="
29d0: 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45  variable">SSL_CE
29e0: 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72  RT_DIR</b> envir
29f0: 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 2e  onment.variable.
2a00: 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73   See <span class
2a10: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
2a20: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43  ef="#section4">C
2a30: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
2a40: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e  ation</a></span>
2a50: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c   for more detail
2a60: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
2a70: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
2a80: 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 3c 69  ">-cafile</b> <i
2a90: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c   class="arg">fil
2aa0: 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ename</i></dt>.<
2ab0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
2ac0: 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68  the file with th
2ad0: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  e Certificate Au
2ae0: 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72  thority (CA) cer
2af0: 74 69 66 69 63 61 74 65 73 20 74 6f 20 75 73 65  tificates to use
2b00: 20 69 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f   in.<b class="co
2b10: 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e 20 66 69 6c  nst">PEM</b> fil
2b20: 65 20 66 6f 72 6d 61 74 2e 20 54 68 65 20 64 65  e format. The de
2b30: 66 61 75 6c 74 20 69 73 20 26 71 75 6f 74 3b 3c  fault is &quot;<
2b40: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63  b class="file">c
2b50: 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74  ert.pem</b>&quot
2b60: 3b 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53 53  ;, in the OpenSS
2b70: 4c 0a 64 69 72 65 63 74 6f 72 79 2e 20 54 68 65  L.directory. The
2b80: 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20 63 61   default file ca
2b90: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20  n be overridden 
2ba0: 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  by the <b class=
2bb0: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
2bc0: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76  ERT_FILE</b> env
2bd0: 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c  ironment.variabl
2be0: 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  e. See <span cla
2bf0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
2c00: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22  href="#section4"
2c10: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  >Certificate Val
2c20: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61  idation</a></spa
2c30: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61  n> for more deta
2c40: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ils.</p></dd>.<d
2c50: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
2c60: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e  on">-castore</b>
2c70: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
2c80: 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  URI</i></dt>.<dd
2c90: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
2ca0: 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75 72  e Uniform Resour
2cb0: 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28 55  ce Identifier (U
2cc0: 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72 74  RI) for the Cert
2cd0: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74  ificate Authorit
2ce0: 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77 68  y.(CA) store, wh
2cf0: 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69 6e  ich may be a sin
2d00: 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72  gle container or
2d10: 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63 6f   a catalog of co
2d20: 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 74 69  ntainers..Starti
2d30: 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20  ng with OpenSSL 
2d40: 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77  3.2 on MS Window
2d50: 73 2c 20 73 65 74 20 74 6f 20 26 71 75 6f 74 3b  s, set to &quot;
2d60: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
2d70: 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e  >org.openssl.win
2d80: 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f  store://</b>&quo
2d90: 74 3b 0a 74 6f 20 75 73 65 20 74 68 65 20 62 75  t;.to use the bu
2da0: 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f 77  ilt-in MS Window
2db0: 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74  s Certificate St
2dc0: 6f 72 65 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63  ore..See <span c
2dd0: 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c  lass="sectref"><
2de0: 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e  a href="#section
2df0: 34 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56  4">Certificate V
2e00: 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73  alidation</a></s
2e10: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65  pan> for more de
2e20: 74 61 69 6c 73 2e 0a 54 68 69 73 20 6f 70 74 69  tails..This opti
2e30: 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  on is new for Tc
2e40: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
2e50: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
2e60: 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69  "option">-certfi
2e70: 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  le</b> <i class=
2e80: 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f  "arg">filename</
2e90: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
2ea0: 70 65 63 69 66 69 65 73 20 74 68 65 20 6e 61 6d  pecifies the nam
2eb0: 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 77 69  e of the file wi
2ec0: 74 68 20 74 68 65 20 63 65 72 74 69 66 69 63 61  th the certifica
2ed0: 74 65 20 74 6f 20 75 73 65 20 69 6e 20 50 45 4d  te to use in PEM
2ee0: 20 66 6f 72 6d 61 74 0a 61 73 20 74 68 65 20 6c   format.as the l
2ef0: 6f 63 61 6c 20 28 63 6c 69 65 6e 74 20 6f 72 20  ocal (client or 
2f00: 73 65 72 76 65 72 29 20 63 65 72 74 69 66 69 63  server) certific
2f10: 61 74 65 2e 20 49 74 20 61 6c 73 6f 20 63 6f 6e  ate. It also con
2f20: 74 61 69 6e 73 20 74 68 65 20 70 75 62 6c 69 63  tains the public
2f30: 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   key.</p></dd>.<
2f40: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
2f50: 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e 20 3c  ion">-cert</b> <
2f60: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74  i class="arg">st
2f70: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
2f80: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
2f90: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 74  he certificate t
2fa0: 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65  o use as a DER e
2fb0: 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 58  ncoded string (X
2fc0: 2e 35 30 39 20 44 45 52 29 2e 3c 2f 70 3e 3c 2f  .509 DER).</p></
2fd0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
2fe0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68 65  ="option">-ciphe
2ff0: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
3000: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
3010: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
3020: 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 20 6f  ifies the list o
3030: 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 73 65  f ciphers to use
3040: 20 66 6f 72 20 54 4c 53 20 31 2e 32 20 61 6e 64   for TLS 1.2 and
3050: 20 65 61 72 6c 69 65 72 20 63 6f 6e 6e 65 63 74   earlier connect
3060: 69 6f 6e 73 2e 0a 53 74 72 69 6e 67 20 69 73 20  ions..String is 
3070: 61 20 63 6f 6c 6f 6e 20 26 71 75 6f 74 3b 3c 62  a colon &quot;<b
3080: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 3a   class="const">:
3090: 3c 2f 62 3e 26 71 75 6f 74 3b 20 73 65 70 61 72  </b>&quot; separ
30a0: 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70  ated list of cip
30b0: 68 65 72 73 2e 0a 43 69 70 68 65 72 73 20 63 61  hers..Ciphers ca
30c0: 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 75 73  n be combined us
30d0: 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 3c 62  ing the &quot;<b
30e0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b   class="const">+
30f0: 3c 2f 62 3e 26 71 75 6f 74 3b 20 63 68 61 72 61  </b>&quot; chara
3100: 63 74 65 72 2e 0a 50 72 65 66 69 78 65 73 20 63  cter..Prefixes c
3110: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 65  an be used to pe
3120: 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d 6f 76 65  rmanently remove
3130: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
3140: 22 63 6f 6e 73 74 22 3e 21 3c 2f 62 3e 26 71 75  "const">!</b>&qu
3150: 6f 74 3b 2c 20 64 65 6c 65 74 65 20 26 71 75 6f  ot;, delete &quo
3160: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  t;<b class="cons
3170: 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20  t">-</b>&quot;, 
3180: 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68 65 20 65  or.move to the e
3190: 6e 64 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  nd &quot;<b clas
31a0: 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c 2f 62 3e 26  s="const">+</b>&
31b0: 71 75 6f 74 3b 20 61 20 73 70 65 63 69 66 69 65  quot; a specifie
31c0: 64 20 63 69 70 68 65 72 2e 0a 4b 65 79 77 6f 72  d cipher..Keywor
31d0: 64 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  ds <b class="con
31e0: 73 74 22 3e 40 53 54 52 45 4e 47 54 48 3c 2f 62  st">@STRENGTH</b
31f0: 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67 6f 72  > (sort by algor
3200: 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 74 68 29  ithm key length)
3210: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  ,.<b class="cons
3220: 74 22 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62  t">@SECLEVEL=</b
3230: 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20 28 73 65 74  ><em>n</em> (set
3240: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20   security level 
3250: 74 6f 20 6e 29 2c 20 61 6e 64 0a 3c 62 20 63 6c  to n), and.<b cl
3260: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 44 45 46 41  ass="const">DEFA
3270: 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65 66  ULT</b> (use def
3280: 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73 74  ault cipher list
3290: 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 29  , at start only)
32a0: 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 70 65   can also be spe
32b0: 63 69 66 69 65 64 2e 0a 53 65 65 20 74 68 65 20  cified..See the 
32c0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
32d0: 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e 6f 72  /docs.openssl.or
32e0: 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70  g/master/man1/op
32f0: 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f  enssl-ciphers/#o
3300: 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53 4c 3c  ptions">OpenSSL<
3310: 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f  /a>.documentatio
3320: 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 20 6c  n for the full l
3330: 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c  ist of valid val
3340: 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ues.</p></dd>.<d
3350: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3360: 6f 6e 22 3e 2d 63 69 70 68 65 72 73 75 69 74 65  on">-ciphersuite
3370: 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  s</b> <i class="
3380: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
3390: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
33a0: 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 20 6f  ifies the list o
33b0: 66 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20  f cipher suites 
33c0: 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31  to use for TLS 1
33d0: 2e 33 20 61 73 20 61 20 63 6f 6c 6f 6e 0a 26 71  .3 as a colon.&q
33e0: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f  uot;<b class="co
33f0: 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b  nst">:</b>&quot;
3400: 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20   separated list 
3410: 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 20  of cipher suite 
3420: 6e 61 6d 65 73 2e 20 53 65 65 20 74 68 65 0a 3c  names. See the.<
3430: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
3440: 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67  docs.openssl.org
3450: 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70 65  /master/man1/ope
3460: 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f 70  nssl-ciphers/#op
3470: 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53 4c 3c 2f  tions">OpenSSL</
3480: 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e  a>.documentation
3490: 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 20 6c 69   for the full li
34a0: 73 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75  st of valid valu
34b0: 65 73 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20  es..This option 
34c0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
34d0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
34e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
34f0: 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  tion">-command</
3500: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
3510: 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f  ">callback</i></
3520: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
3530: 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63  fies the callbac
3540: 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65 20  k command to be 
3550: 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72  invoked at sever
3560: 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67  al points during
3570: 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20 74   the.handshake t
3580: 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 74  o pass errors, t
3590: 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69  racing informati
35a0: 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f 6c  on, and protocol
35b0: 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65 20 3c   messages..See <
35c0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
35d0: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
35e0: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63  ection5">Callbac
35f0: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73  k Options</a></s
3600: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e  pan> for more in
3610: 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  fo.</p></dd>.<dt
3620: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3630: 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f 62 3e  n">-dhparams</b>
3640: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3650: 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74  filename</i></dt
3660: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
3670: 65 73 20 74 68 65 20 44 69 66 66 69 65 2d 48 65  es the Diffie-He
3680: 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 61 6d  llman (DH) param
3690: 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70 3e 3c  eters file.</p><
36a0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
36b0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 66  s="option">-keyf
36c0: 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ile</b> <i class
36d0: 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c  ="arg">filename<
36e0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
36f0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 70 72  Specifies the pr
3700: 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20  ivate key file. 
3710: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 74  The default is t
3720: 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65 0a 73  o use the file.s
3730: 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 20  pecified by the 
3740: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3750: 22 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20  ">-certfile</b> 
3760: 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  option.</p></dd>
3770: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
3780: 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20  ption">-key</b> 
3790: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
37a0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
37b0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
37c0: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20  the private key 
37d0: 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20  to use as a DER 
37e0: 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28  encoded string (
37f0: 50 4b 43 53 23 31 20 44 45 52 29 2e 3c 2f 70 3e  PKCS#1 DER).</p>
3800: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3810: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6d 6f 64  ss="option">-mod
3820: 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  el</b> <i class=
3830: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
3840: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f  ></dt>.<dd><p>Fo
3850: 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c  rce this channel
3860: 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61   to share the sa
3870: 6d 65 20 3c 69 20 63 6c 61 73 73 3d 22 74 65 72  me <i class="ter
3880: 6d 22 3e 53 53 4c 5f 43 54 58 3c 2f 69 3e 20 73  m">SSL_CTX</i> s
3890: 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65 0a  tructure as the.
38a0: 73 70 65 63 69 66 69 65 64 20 3c 69 20 63 6c 61  specified <i cla
38b0: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
38c0: 3c 2f 69 3e 2c 20 61 6e 64 20 74 68 65 72 65 66  </i>, and theref
38d0: 6f 72 65 20 73 68 61 72 65 20 63 6f 6e 66 69 67  ore share config
38e0: 2c 20 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 63  , callbacks, etc
38f0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3900: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3910: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c  >-password</b> <
3920: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61  i class="arg">ca
3930: 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a  llback</i></dt>.
3940: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
3950: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f   the callback co
3960: 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20  mmand to invoke 
3970: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65  when OpenSSL nee
3980: 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a 70  ds to obtain a.p
3990: 61 73 73 77 6f 72 64 2e 20 54 68 69 73 20 69 73  assword. This is
39a0: 20 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20   typically used 
39b0: 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72  to unlock the pr
39c0: 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63  ivate key of a c
39d0: 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 65 20  ertificate..The 
39e0: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20  callback should 
39f0: 72 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72  return a passwor
3a00: 64 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20 6f  d string. This o
3a10: 70 74 69 6f 6e 20 68 61 73 20 63 68 61 6e 67 65  ption has change
3a20: 64 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 2e 38  d for.TclTLS 1.8
3a30: 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73  . See <span clas
3a40: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
3a50: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e  ref="#section5">
3a60: 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73  Callback Options
3a70: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20  </a></span> for 
3a80: 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f  more info.</p></
3a90: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
3aa0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f  ="option">-post_
3ab0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69  handshake</b> <i
3ac0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
3ad0: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
3ae0: 70 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e  p>Allow post-han
3af0: 64 73 68 61 6b 65 20 73 65 73 73 69 6f 6e 20 74  dshake session t
3b00: 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e 20 54  icket updates. T
3b10: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65  his option is ne
3b20: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
3b30: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3b40: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3b50: 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c 69  >-request</b> <i
3b60: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
3b70: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
3b80: 70 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 74  p>Request a cert
3b90: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65  ificate from the
3ba0: 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65   peer during the
3bb0: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20   SSL handshake. 
3bc0: 54 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a 74  This is needed.t
3bd0: 6f 20 64 6f 20 43 65 72 74 69 66 69 63 61 74 65  o do Certificate
3be0: 20 56 61 6c 69 64 61 74 69 6f 6e 2e 20 53 74 61   Validation. Sta
3bf0: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20  rting in TclTLS 
3c00: 31 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c 74  1.8, the default
3c10: 20 69 73 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is.<b class="co
3c20: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f  nst">true</b> fo
3c30: 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74  r client connect
3c40: 69 6f 6e 73 2e 20 53 74 61 72 74 69 6e 67 20 69  ions. Starting i
3c50: 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 69 66  n TclTLS 2.0, if
3c60: 20 73 65 74 20 74 6f 0a 3c 62 20 63 6c 61 73 73   set to.<b class
3c70: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
3c80: 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d  b> and <b class=
3c90: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72  "option">-requir
3ca0: 65 3c 2f 62 3e 20 69 73 20 3c 62 20 63 6c 61 73  e</b> is <b clas
3cb0: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f  s="const">true</
3cc0: 62 3e 2c 20 74 68 65 6e 20 74 68 69 73 20 77 69  b>, then this wi
3cd0: 6c 6c 20 62 65 0a 6f 76 65 72 72 69 64 64 65 6e  ll be.overridden
3ce0: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   to <b class="co
3cf0: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 53  nst">true</b>. S
3d00: 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  ee <span class="
3d10: 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66  sectref"><a href
3d20: 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65 72  ="#section4">Cer
3d30: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
3d40: 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66  ion</a></span> f
3d50: 6f 72 0a 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e  or.more details.
3d60: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
3d70: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
3d80: 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 3c 69 20  -require</b> <i 
3d90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
3da0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3db0: 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 64  >Require a valid
3dc0: 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f   certificate fro
3dd0: 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e  m the peer durin
3de0: 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68  g the SSL handsh
3df0: 61 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73 0a  ake. If this is.
3e00: 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65  set to true, the
3e10: 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  n <b class="opti
3e20: 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e  on">-request</b>
3e30: 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65   must also be se
3e40: 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20  t to true and a 
3e50: 65 69 74 68 65 72 0a 3c 62 20 63 6c 61 73 73 3d  either.<b class=
3e60: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
3e70: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
3e80: 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f  ption">-cafile</
3e90: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
3ea0: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f  tion">-castore</
3eb0: 62 3e 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72  b>, or a platfor
3ec0: 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 62  m default.must b
3ed0: 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72  e provided in or
3ee0: 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20  der to validate 
3ef0: 61 67 61 69 6e 73 74 2e 20 54 68 65 20 64 65 66  against. The def
3f00: 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31  ault in TclTLS 1
3f10: 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76  .8 and.earlier v
3f20: 65 72 73 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c  ersions is <b cl
3f30: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73  ass="const">fals
3f40: 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20  e</b> since not 
3f50: 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61  all platforms ha
3f60: 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20  ve certificates 
3f70: 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69  to.validate agai
3f80: 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f  nst in a form co
3f90: 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70  mpatible with Op
3fa0: 65 6e 53 53 4c 2e 20 53 74 61 72 74 69 6e 67 20  enSSL. Starting 
3fb0: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 0a 74  in TclTLS 2.0,.t
3fc0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
3fd0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
3fe0: 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65  rue</b> for clie
3ff0: 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 0a  nt connections..
4000: 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  See <span class=
4010: 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65  "sectref"><a hre
4020: 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65  f="#section4">Ce
4030: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61  rtificate Valida
4040: 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20  tion</a></span> 
4050: 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73  for more details
4060: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4070: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4080: 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c  >-security_level
4090: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
40a0: 72 67 22 3e 69 6e 74 65 67 65 72 3c 2f 69 3e 3c  rg">integer</i><
40b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
40c0: 69 66 69 65 73 20 74 68 65 20 73 65 63 75 72 69  ifies the securi
40d0: 74 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 65 20  ty level (value 
40e0: 66 72 6f 6d 20 30 20 74 6f 20 35 29 2e 20 54 68  from 0 to 5). Th
40f0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
4100: 20 61 66 66 65 63 74 73 0a 74 68 65 20 61 6c 6c   affects.the all
4110: 6f 77 65 64 20 63 69 70 68 65 72 20 73 75 69 74  owed cipher suit
4120: 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67  e encryption alg
4130: 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 74  orithms, support
4140: 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a 73  ed ECC curves,.s
4150: 75 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 75  upported signatu
4160: 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 44  re algorithms, D
4170: 48 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a 65  H parameter size
4180: 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 6b  s, certificate k
4190: 65 79 20 73 69 7a 65 73 0a 61 6e 64 20 73 69 67  ey sizes.and sig
41a0: 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d  nature algorithm
41b0: 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69  s. The default i
41c0: 73 20 31 20 70 72 69 6f 72 20 74 6f 20 4f 70 65  s 1 prior to Ope
41d0: 6e 53 53 4c 20 33 2e 32 20 61 6e 64 20 32 0a 74  nSSL 3.2 and 2.t
41e0: 68 65 72 65 61 66 74 65 72 2e 20 4c 65 76 65 6c  hereafter. Level
41f0: 20 33 20 61 6e 64 20 68 69 67 68 65 72 20 64 69   3 and higher di
4200: 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f  sable support fo
4210: 72 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  r session ticket
4220: 73 20 61 6e 64 0a 6f 6e 6c 79 20 61 63 63 65 70  s and.only accep
4230: 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20  t cipher suites 
4240: 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72  that provide for
4250: 77 61 72 64 20 73 65 63 72 65 63 79 2e 0a 54 68  ward secrecy..Th
4260: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77  is option is new
4270: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
4280: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
4290: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
42a0: 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20 63  -server</b> <i c
42b0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
42c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
42d0: 53 70 65 63 69 66 69 65 73 20 77 68 65 74 68 65  Specifies whethe
42e0: 72 20 74 6f 20 61 63 74 20 61 73 20 61 20 73 65  r to act as a se
42f0: 72 76 65 72 20 61 6e 64 20 72 65 73 70 6f 6e 64  rver and respond
4300: 20 77 69 74 68 20 61 20 73 65 72 76 65 72 20 68   with a server h
4310: 61 6e 64 73 68 61 6b 65 20 77 68 65 6e 20 61 0a  andshake when a.
4320: 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 73 20  client connects 
4330: 61 6e 64 20 70 72 6f 76 69 64 65 73 20 61 20 63  and provides a c
4340: 6c 69 65 6e 74 20 68 61 6e 64 73 68 61 6b 65 2e  lient handshake.
4350: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
4360: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4370: 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c  >false</b>.</p><
4380: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
4390: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76  s="option">-serv
43a0: 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c  ername</b> <i cl
43b0: 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 6e 61  ass="arg">hostna
43c0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  me</i></dt>.<dd>
43d0: 3c 70 3e 53 70 65 63 69 66 79 20 74 68 65 20 70  <p>Specify the p
43e0: 65 65 72 27 73 20 68 6f 73 74 6e 61 6d 65 2e 20  eer's hostname. 
43f0: 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20  This is used to 
4400: 73 65 74 20 74 68 65 20 54 4c 53 20 53 65 72 76  set the TLS Serv
4410: 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69  er Name Indicati
4420: 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 69  on.(SNI) extensi
4430: 6f 6e 2e 20 53 65 74 20 74 68 69 73 20 74 6f 20  on. Set this to 
4440: 74 68 65 20 65 78 70 65 63 74 65 64 20 73 65 72  the expected ser
4450: 76 65 72 6e 61 6d 65 20 69 6e 20 74 68 65 20 73  vername in the s
4460: 65 72 76 65 72 27 73 20 63 65 72 74 69 66 69 63  erver's certific
4470: 61 74 65 0a 6f 72 20 6f 6e 65 20 6f 66 20 74 68  ate.or one of th
4480: 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72 6e  e Subject Altern
4490: 61 74 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 2e  ate Names (SAN).
44a0: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c   Starting in Tcl
44b0: 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 20 77 69  TLS 2.0, this wi
44c0: 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f 20 74 68  ll.default to th
44d0: 65 20 68 6f 73 74 20 66 6f 72 20 74 68 65 20 3c  e host for the <
44e0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
44f0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f  s::socket</b> co
4500: 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  mmand.</p></dd>.
4510: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
4520: 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f 6e 5f 69  tion">-session_i
4530: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
4540: 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69  arg">binary_stri
4550: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
4560: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
4570: 20 73 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 72   session id to r
4580: 65 73 75 6d 65 20 61 20 73 65 73 73 69 6f 6e 2e  esume a session.
4590: 20 4e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 79   Not supported y
45a0: 65 74 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20  et..This option 
45b0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
45c0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
45d0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
45e0: 74 69 6f 6e 22 3e 2d 73 73 6c 32 3c 2f 62 3e 20  tion">-ssl2</b> 
45f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
4600: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
4610: 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  ><p>Enable use o
4620: 66 20 53 53 4c 20 76 32 2e 54 68 65 20 64 65 66  f SSL v2.The def
4630: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4640: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
4650: 62 3e 2e 0a 4f 70 65 6e 53 53 4c 20 31 2e 31 2b  b>..OpenSSL 1.1+
4660: 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f   no longer suppo
4670: 72 74 73 20 53 53 4c 20 76 32 2c 20 73 6f 20 74  rts SSL v2, so t
4680: 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 65  his may not have
4690: 20 61 6e 79 20 65 66 66 65 63 74 2e 0a 53 65 65   any effect..See
46a0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
46b0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  md">tls::protoco
46c0: 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66  ls</b> command f
46d0: 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f  or supported pro
46e0: 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  tocols.</p></dd>
46f0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4700: 70 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c 2f 62 3e  ption">-ssl3</b>
4710: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
4720: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
4730: 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20  d><p>Enable use 
4740: 6f 66 20 53 53 4c 20 76 33 2e 20 54 68 65 20 64  of SSL v3. The d
4750: 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61  efault is <b cla
4760: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65  ss="const">false
4770: 3c 2f 62 3e 2e 20 53 74 61 72 74 69 6e 67 20 69  </b>. Starting i
4780: 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 0a 75 73  n TclTLS 1.8,.us
4790: 65 20 6f 66 20 53 53 4c 20 76 33 20 69 66 20 6f  e of SSL v3 if o
47a0: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 76 69  nly available vi
47b0: 61 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65  a a compile time
47c0: 20 6f 70 74 69 6f 6e 2e 0a 53 65 65 20 74 68 65   option..See the
47d0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
47e0: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f  tls::protocols</
47f0: 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73  b> command for s
4800: 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f  upported protoco
4810: 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ls.</p></dd>.<dt
4820: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
4830: 6e 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69 20  n">-tls1</b> <i 
4840: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
4850: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
4860: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
4870: 4c 53 20 76 31 2e 20 53 74 61 72 74 69 6e 67 20  LS v1. Starting 
4880: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74  in TclTLS 2.0, t
4890: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
48a0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66   class="const">f
48b0: 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a 20  alse</b>..Note: 
48c0: 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20 53 48  TLS 1.0 needs SH
48d0: 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77  A1 to operate, w
48e0: 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61  hich is only ava
48f0: 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69  ilable in securi
4900: 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20 4f  ty level.0 for O
4910: 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53 65  pen SSL 3.0+. Se
4920: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  e the <b class="
4930: 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69 74  option">-securit
4940: 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 6f 70 74 69  y_level</b> opti
4950: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  on.</p></dd>.<dt
4960: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
4970: 6e 22 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e 20 3c  n">-tls1.1</b> <
4980: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
4990: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
49a0: 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  <p>Enable use of
49b0: 20 54 4c 53 20 76 31 2e 31 2e 20 53 74 61 72 74   TLS v1.1. Start
49c0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e  ing in TclTLS 2.
49d0: 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69  0, the default i
49e0: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  s <b class="cons
49f0: 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f  t">false</b>..No
4a00: 74 65 3a 20 54 4c 53 20 31 2e 31 20 6e 65 65 64  te: TLS 1.1 need
4a10: 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61 74  s SHA1 to operat
4a20: 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c 79  e, which is only
4a30: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 65   available in se
4a40: 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 66  curity level.0 f
4a50: 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b  or Open SSL 3.0+
4a60: 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61  . See the <b cla
4a70: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63  ss="option">-sec
4a80: 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20  urity_level</b> 
4a90: 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  option.</p></dd>
4aa0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4ab0: 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32 3c 2f  ption">-tls1.2</
4ac0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4ad0: 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">bool</i></dt>.
4ae0: 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73  <dd><p>Enable us
4af0: 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 2e 20 54  e of TLS v1.2. T
4b00: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
4b10: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
4b20: 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64  rue</b>.</p></dd
4b30: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
4b40: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 33 3c  option">-tls1.3<
4b50: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
4b60: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
4b70: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75  .<dd><p>Enable u
4b80: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 2e 20  se of TLS v1.3. 
4b90: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  The default is <
4ba0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4bb0: 74 72 75 65 3c 2f 62 3e 2e 20 54 68 69 73 20 69  true</b>. This i
4bc0: 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65  s only available
4bd0: 0a 73 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f  .starting with O
4be0: 70 65 6e 53 53 4c 20 31 2e 31 2e 31 20 61 6e 64  penSSL 1.1.1 and
4bf0: 20 54 63 6c 54 4c 53 20 31 2e 37 2e 3c 2f 70 3e   TclTLS 1.7.</p>
4c00: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
4c10: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
4c20: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  idatecommand</b>
4c30: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
4c40: 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74  callback</i></dt
4c50: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
4c60: 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20  es the callback 
4c70: 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b  command to invok
4c80: 65 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68  e to validate th
4c90: 65 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61  e peer certifica
4ca0: 74 65 73 0a 61 6e 64 20 6f 74 68 65 72 20 63 6f  tes.and other co
4cb0: 6e 66 69 67 20 69 6e 66 6f 20 64 75 72 69 6e 67  nfig info during
4cc0: 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65   the protocol ne
4cd0: 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 65 2e  gotiation phase.
4ce0: 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 73 65   This can be use
4cf0: 64 0a 62 79 20 54 43 4c 20 73 63 72 69 70 74 73  d.by TCL scripts
4d00: 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69   to perform thei
4d10: 72 20 6f 77 6e 20 43 65 72 74 69 66 69 63 61 74  r own Certificat
4d20: 65 20 56 61 6c 69 64 61 74 69 6f 6e 20 74 6f 20  e Validation to 
4d30: 73 75 70 70 6c 65 6d 65 6e 74 20 74 68 65 0a 64  supplement the.d
4d40: 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f  efault validatio
4d50: 6e 20 70 72 6f 76 69 64 65 64 20 62 79 20 4f 70  n provided by Op
4d60: 65 6e 53 53 4c 2e 20 54 68 65 20 73 63 72 69 70  enSSL. The scrip
4d70: 74 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61 20  t must return a 
4d80: 62 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74 6f 20  boolean true.to 
4d90: 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e 65 67  continue the neg
4da0: 6f 74 69 61 74 69 6f 6e 2e 20 53 65 65 20 3c 73  otiation. See <s
4db0: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
4dc0: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
4dd0: 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b  ction5">Callback
4de0: 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70   Options</a></sp
4df0: 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66  an> for more inf
4e00: 6f 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69  o..This option i
4e10: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
4e20: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
4e30: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  /dl></dd>.<dt><a
4e40: 20 6e 61 6d 65 3d 22 35 22 3e 3c 62 20 63 6c 61   name="5"><b cla
4e50: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e  ss="cmd">tls::un
4e60: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
4e70: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
4e80: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  l</i></a></dt>.<
4e90: 64 64 3e 3c 70 3e 43 6f 6d 70 6c 69 6d 65 6e 74  dd><p>Compliment
4ea0: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d   to <b class="cm
4eb0: 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  d">tls::import</
4ec0: 62 3e 2e 20 55 73 65 64 20 74 6f 20 72 65 6d 6f  b>. Used to remo
4ed0: 76 65 20 74 68 65 20 74 6f 70 20 6c 65 76 65 6c  ve the top level
4ee0: 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c   stacked channel
4ef0: 0a 66 72 6f 6d 20 3c 69 20 63 6c 61 73 73 3d 22  .from <i class="
4f00: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  arg">channel</i>
4f10: 2e 20 54 68 69 73 20 75 6e 73 74 61 63 6b 73 20  . This unstacks 
4f20: 74 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f  the encryption o
4f30: 66 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c 20  f a regular TCL 
4f40: 63 68 61 6e 6e 65 6c 2e 20 41 6e 0a 65 72 72 6f  channel. An.erro
4f50: 72 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20 54  r is thrown if T
4f60: 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74 6f  LS is not the to
4f70: 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65  p stacked channe
4f80: 6c 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e  l type.</p></dd>
4f90: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 36 22  .<dt><a name="6"
4fa0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
4fb0: 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f  tls::handshake</
4fc0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4fd0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
4fe0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f  ></dt>.<dd><p>Fo
4ff0: 72 63 65 73 20 74 68 65 20 54 4c 53 20 6e 65 67  rces the TLS neg
5000: 6f 74 69 61 74 69 6f 6e 20 68 61 6e 64 73 68 61  otiation handsha
5010: 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 65  ke to take place
5020: 20 69 6d 6d 65 64 69 61 74 65 6c 79 2c 20 61 6e   immediately, an
5030: 64 20 72 65 74 75 72 6e 73 20 30 0a 69 66 20 68  d returns 0.if h
5040: 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c  andshake is stil
5050: 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e  l in progress (n
5060: 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72  on-blocking), or
5070: 20 31 20 69 66 20 74 68 65 20 68 61 6e 64 73 68   1 if the handsh
5080: 61 6b 65 20 77 61 73 0a 73 75 63 63 65 73 73 66  ake was.successf
5090: 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73  ul. If the hands
50a0: 68 61 6b 65 20 66 61 69 6c 65 64 2c 20 61 6e 20  hake failed, an 
50b0: 65 72 72 6f 72 20 77 69 6c 6c 20 62 65 20 72 65  error will be re
50c0: 74 75 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e  turned.</p></dd>
50d0: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 37 22  .<dt><a name="7"
50e0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
50f0: 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20  tls::status</b> 
5100: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
5110: 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  ">?<b class="opt
5120: 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f  ion">-local</b>?
5130: 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73  </span> <i class
5140: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
5150: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  i></a></dt>.<dd>
5160: 3c 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63  <p>Returns the c
5170: 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66  urrent status of
5180: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e   an SSL channel.
5190: 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61   The result is a
51a0: 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c   list of key-val
51b0: 75 65 0a 70 61 69 72 73 20 64 65 73 63 72 69 62  ue.pairs describ
51c0: 69 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65 72  ing the SSL, cer
51d0: 74 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63 65  tificate, and ce
51e0: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69  rtificate verifi
51f0: 63 61 74 69 6f 6e 20 73 74 61 74 75 73 2e 20 49  cation status. I
5200: 66 0a 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68  f.the SSL handsh
5210: 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20  ake has not yet 
5220: 63 6f 6d 70 6c 65 74 65 64 2c 20 61 6e 20 65 6d  completed, an em
5230: 70 74 79 20 6c 69 73 74 20 69 73 20 72 65 74 75  pty list is retu
5240: 72 6e 65 64 2e 20 49 66 20 74 68 65 0a 3c 62 20  rned. If the.<b 
5250: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
5260: 6c 6f 63 61 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e  local</b> option
5270: 20 69 73 20 73 70 65 63 69 66 69 65 64 2c 20 74   is specified, t
5280: 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 65  hen the local ce
5290: 72 74 69 66 69 63 61 74 65 20 69 73 20 75 73 65  rtificate is use
52a0: 64 2e 20 52 65 74 75 72 6e 65 64 0a 76 61 6c 75  d. Returned.valu
52b0: 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0a  es include:</p>.
52c0: 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 70  <p>SSL Status</p
52d0: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
52e0: 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e  tools_definition
52f0: 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  s">.<dt><b class
5300: 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e  ="variable">alpn
5310: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5320: 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e  rg">protocol</i>
5330: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
5340: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74   protocol select
5350: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61  ed after Applica
5360: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f  tion-Layer Proto
5370: 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20  col Negotiation 
5380: 28 41 4c 50 4e 29 2e 0a 54 68 69 73 20 76 61 6c  (ALPN)..This val
5390: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
53a0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
53b0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
53c0: 22 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65  "variable">ciphe
53d0: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
53e0: 61 72 67 22 3e 63 69 70 68 65 72 3c 2f 69 3e 3c  arg">cipher</i><
53f0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
5400: 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69  current cipher i
5410: 6e 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 65  n use for the se
5420: 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ssion.</p></dd>.
5430: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5440: 72 69 61 62 6c 65 22 3e 70 65 65 72 6e 61 6d 65  riable">peername
5450: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5460: 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74  rg">name</i></dt
5470: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 65 65  >.<dd><p>The pee
5480: 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63  rname from the c
5490: 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73  ertificate..This
54a0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
54b0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
54c0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
54d0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70  ass="variable">p
54e0: 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20 63  rotocol</b> <i c
54f0: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69  lass="arg">versi
5500: 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  on</i></dt>.<dd>
5510: 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  <p>The protocol 
5520: 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72  version used for
5530: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a   the connection:
5540: 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53   SSL2, SSL3, TLS
5550: 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e  1, TLS1.1, TLS1.
5560: 32 2c 0a 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e  2,.TLS1.3, or un
5570: 6b 6e 6f 77 6e 2e 20 54 68 69 73 20 76 61 6c 75  known. This valu
5580: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
5590: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
55a0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
55b0: 76 61 72 69 61 62 6c 65 22 3e 73 62 69 74 73 3c  variable">sbits<
55c0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
55d0: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  g">n</i></dt>.<d
55e0: 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20  d><p>The number 
55f0: 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72  of bits used for
5600: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79   the session key
5610: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5620: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5630: 65 22 3e 73 69 67 6e 61 74 75 72 65 48 61 73 68  e">signatureHash
5640: 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69  Algorithm</b> <i
5650: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67   class="arg">alg
5660: 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a  orithm</i></dt>.
5670: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e 61  <dd><p>The signa
5680: 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69  ture hash algori
5690: 74 68 6d 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  thm..This value 
56a0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
56b0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
56c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
56d0: 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72  riable">signatur
56e0: 65 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  eType</b> <i cla
56f0: 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f 69  ss="arg">type</i
5700: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
5710: 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65  e signature type
5720: 20 76 61 6c 75 65 2e 0a 54 68 69 73 20 76 61 6c   value..This val
5730: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5740: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5750: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5760: 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66  "variable">verif
5770: 79 44 65 70 74 68 3c 2f 62 3e 20 3c 69 20 63 6c  yDepth</b> <i cl
5780: 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c  ass="arg">n</i><
5790: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69  /dt>.<dd><p>Maxi
57a0: 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68  mum depth for th
57b0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68  e certificate ch
57c0: 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ain verification
57d0: 2e 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31 2c  . Default is -1,
57e0: 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 0a 54   to check all..T
57f0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
5800: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
5810: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5820: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5830: 22 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 62 3e  ">verifyMode</b>
5840: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5850: 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  list</i></dt>.<d
5860: 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65 72  d><p>List of cer
5870: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63  tificate verific
5880: 61 74 69 6f 6e 20 6d 6f 64 65 73 2e 0a 54 68 69  ation modes..Thi
5890: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
58a0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
58b0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
58c0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
58d0: 76 65 72 69 66 79 52 65 73 75 6c 74 3c 2f 62 3e  verifyResult</b>
58e0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
58f0: 72 65 73 75 6c 74 3c 2f 69 3e 3c 2f 64 74 3e 0a  result</i></dt>.
5900: 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61  <dd><p>Certifica
5910: 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20  te verification 
5920: 72 65 73 75 6c 74 2e 0a 54 68 69 73 20 76 61 6c  result..This val
5930: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5940: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5950: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5960: 22 76 61 72 69 61 62 6c 65 22 3e 63 61 5f 6e 61  "variable">ca_na
5970: 6d 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  mes</b> <i class
5980: 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c  ="arg">list</i><
5990: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74  /dt>.<dd><p>List
59a0: 20 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 63   of the Certific
59b0: 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20  ate Authorities 
59c0: 75 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 74  used to create t
59d0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a  he certificate..
59e0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
59f0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
5a00: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  .</p></dd>.</dl>
5a10: 0a 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20  .<p>Certificate 
5a20: 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63  Status</p>.<dl c
5a30: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
5a40: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
5a50: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5a60: 62 6c 65 22 3e 61 6c 6c 3c 2f 62 3e 20 3c 69 20  ble">all</b> <i 
5a70: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
5a80: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
5a90: 3c 70 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63  <p>Dump of all c
5aa0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 2e  ertificate info.
5ab0: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
5ac0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
5ad0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
5ae0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5af0: 6c 65 22 3e 76 65 72 73 69 6f 6e 3c 2f 62 3e 20  le">version</b> 
5b00: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
5b10: 61 6c 75 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  alue</i></dt>.<d
5b20: 64 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 66 69  d><p>The certifi
5b30: 63 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 70  cate version.</p
5b40: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5b50: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
5b60: 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 62 3e 20  erialNumber</b> 
5b70: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
5b80: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
5b90: 64 64 3e 3c 70 3e 54 68 65 20 73 65 72 69 61 6c  dd><p>The serial
5ba0: 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63   number of the c
5bb0: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20  ertificate as a 
5bc0: 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73  hex string..This
5bd0: 20 76 61 6c 75 65 20 77 61 73 20 63 68 61 6e 67   value was chang
5be0: 65 64 20 66 72 6f 6d 20 73 65 72 69 61 6c 20 69  ed from serial i
5bf0: 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  n TclTLS 1.8.</p
5c00: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5c10: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
5c20: 69 67 6e 61 74 75 72 65 3c 2f 62 3e 20 3c 69 20  ignature</b> <i 
5c30: 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f  class="arg">algo
5c40: 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rithm</i></dt>.<
5c50: 64 64 3e 3c 70 3e 43 69 70 68 65 72 20 61 6c 67  dd><p>Cipher alg
5c60: 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20  orithm used for 
5c70: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  certificate sign
5c80: 61 74 75 72 65 2e 0a 54 68 69 73 20 76 61 6c 75  ature..This valu
5c90: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
5ca0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
5cb0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5cc0: 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72  variable">issuer
5cd0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5ce0: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
5cf0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64  dt>.<dd><p>The d
5d00: 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d  istinguished nam
5d10: 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65  e (DN) of the ce
5d20: 72 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72  rtificate issuer
5d30: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5d40: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5d50: 65 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62 3e  e">notBefore</b>
5d60: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5d70: 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  date</i></dt>.<d
5d80: 64 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e 6e 69  d><p>The beginni
5d90: 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65 20 63  ng date of the c
5da0: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64  ertificate valid
5db0: 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ity.</p></dd>.<d
5dc0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5dd0: 61 62 6c 65 22 3e 6e 6f 74 41 66 74 65 72 3c 2f  able">notAfter</
5de0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5df0: 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">date</i></dt>.
5e00: 3c 64 64 3e 3c 70 3e 54 68 65 20 65 78 70 69 72  <dd><p>The expir
5e10: 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68  ation date of th
5e20: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61  e certificate va
5e30: 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e  lidity.</p></dd>
5e40: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5e50: 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74  ariable">subject
5e60: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5e70: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
5e80: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64  dt>.<dd><p>The d
5e90: 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d  istinguished nam
5ea0: 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65  e (DN) of the ce
5eb0: 72 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 63  rtificate subjec
5ec0: 74 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64  t. Fields includ
5ed0: 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28  e: Common.Name (
5ee0: 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f  CN), Organizatio
5ef0: 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20  n (O), Locality 
5f00: 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61  or City (L), Sta
5f10: 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28  te or Province (
5f20: 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20  S), and.Country 
5f30: 4e 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c 2f 64  Name (C).</p></d
5f40: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5f50: 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65  "variable">issue
5f60: 72 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69  rUniqueID</b> <i
5f70: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
5f80: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
5f90: 3e 3c 70 3e 54 68 65 20 69 73 73 75 65 72 20 75  ><p>The issuer u
5fa0: 6e 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20 76  nique id..This v
5fb0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
5fc0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
5fd0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5fe0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62  s="variable">sub
5ff0: 6a 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 62 3e  jectUniqueID</b>
6000: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6010: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
6020: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65  <dd><p>The subje
6030: 63 74 20 75 6e 69 71 75 65 20 69 64 2e 0a 54 68  ct unique id..Th
6040: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20  is value is new 
6050: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
6060: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6070: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6080: 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c  >num_extensions<
6090: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
60a0: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  g">n</i></dt>.<d
60b0: 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 63  d><p>Number of c
60c0: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e  ertificate exten
60d0: 73 69 6f 6e 73 2e 0a 54 68 69 73 20 76 61 6c 75  sions..This valu
60e0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
60f0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
6100: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6110: 76 61 72 69 61 62 6c 65 22 3e 65 78 74 65 6e 73  variable">extens
6120: 69 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ions</b> <i clas
6130: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e  s="arg">list</i>
6140: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73  </dt>.<dd><p>Lis
6150: 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65  t of certificate
6160: 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73   extension names
6170: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
6180: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
6190: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
61a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
61b0: 62 6c 65 22 3e 61 75 74 68 6f 72 69 74 79 4b 65  ble">authorityKe
61c0: 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20  yIdentifier</b> 
61d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
61e0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
61f0: 64 64 3e 3c 70 3e 41 75 74 68 6f 72 69 74 79 20  dd><p>Authority 
6200: 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 20 28  Key Identifier (
6210: 41 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73 75  AKI) of the Issu
6220: 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 61  ing CA certifica
6230: 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 20 74  te that signed t
6240: 68 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63 61  he.SSL certifica
6250: 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69  te as a hex stri
6260: 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d  ng. This value m
6270: 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 20 76  atches the SKI v
6280: 61 6c 75 65 20 6f 66 20 74 68 65 0a 49 6e 74 65  alue of the.Inte
6290: 72 6d 65 64 69 61 74 65 20 43 41 20 63 65 72 74  rmediate CA cert
62a0: 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61  ificate..This va
62b0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
62c0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
62d0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
62e0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a  ="variable">subj
62f0: 65 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72  ectKeyIdentifier
6300: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6310: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
6320: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 75 62 6a 65  dt>.<dd><p>Subje
6330: 63 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65  ct Key Identifie
6340: 72 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66 20  r (SKI) hash of 
6350: 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69  the public key i
6360: 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66  nside the certif
6370: 69 63 61 74 65 20 61 73 20 61 0a 68 65 78 20 73  icate as a.hex s
6380: 74 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20 69  tring. Used to i
6390: 64 65 6e 74 69 66 79 20 63 65 72 74 69 66 69 63  dentify certific
63a0: 61 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61 69  ates that contai
63b0: 6e 20 61 20 70 61 72 74 69 63 75 6c 61 72 20 70  n a particular p
63c0: 75 62 6c 69 63 20 6b 65 79 2e 0a 54 68 69 73 20  ublic key..This 
63d0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
63e0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
63f0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6400: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75  ss="variable">su
6410: 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 62 3e  bjectAltName</b>
6420: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6430: 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  list</i></dt>.<d
6440: 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c  d><p>List of all
6450: 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20   of the Subject 
6460: 41 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65  Alternative Name
6470: 73 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e  s (SAN) includin
6480: 67 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20  g domain names, 
6490: 73 75 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64  sub.domains, and
64a0: 20 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68   IP addresses th
64b0: 61 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62  at are secured b
64c0: 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  y the certificat
64d0: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  e..This value is
64e0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
64f0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
6500: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6510: 61 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e 20 3c  able">ocsp</b> <
6520: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69  i class="arg">li
6530: 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  st</i></dt>.<dd>
6540: 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f  <p>List of all O
6550: 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 74  nline Certificat
6560: 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 6f  e Status Protoco
6570: 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74 68  l (OCSP) URLs th
6580: 61 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 74  at can be used t
6590: 6f 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c 69  o.check the vali
65a0: 64 69 74 79 20 6f 66 20 74 68 69 73 20 63 65 72  dity of this cer
65b0: 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76  tificate..This v
65c0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
65d0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
65e0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
65f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 65 72  s="variable">cer
6600: 74 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c 69 20  tificate</b> <i 
6610: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74  class="arg">cert
6620: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6630: 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64  >The PEM encoded
6640: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70   certificate.</p
6650: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6660: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6670: 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68  ignatureAlgorith
6680: 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  m</b> <i class="
6690: 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f  arg">algorithm</
66a0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43  i></dt>.<dd><p>C
66b0: 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20  ipher algorithm 
66c0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72  used for the cer
66d0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
66e0: 72 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  re..This value i
66f0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
6700: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
6710: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6720: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65  iable">signature
6730: 56 61 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  Value</b> <i cla
6740: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
6750: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6760: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
6770: 61 74 75 72 65 20 61 73 20 61 20 68 65 78 20 73  ature as a hex s
6780: 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75  tring..This valu
6790: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
67a0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
67b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
67c0: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
67d0: 75 72 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c 69  ureDigest</b> <i
67e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72   class="arg">ver
67f0: 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  sion</i></dt>.<d
6800: 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65  d><p>Certificate
6810: 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20   signing digest 
6820: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e  as a hex string.
6830: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
6840: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
6850: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
6860: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6870: 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67  le">publicKeyAlg
6880: 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c  orithm</b> <i cl
6890: 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69  ass="arg">algori
68a0: 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  thm</i></dt>.<dd
68b0: 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20  ><p>Certificate 
68c0: 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63  signature public
68d0: 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 0a   key algorithm..
68e0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
68f0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
6900: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
6910: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
6920: 65 22 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 62 3e  e">publicKey</b>
6930: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6940: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
6950: 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61  <dd><p>Certifica
6960: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62  te signature pub
6970: 6c 69 63 20 6b 65 79 20 61 73 20 61 20 68 65 78  lic key as a hex
6980: 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61   string..This va
6990: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
69a0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
69b0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
69c0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 62 69 74 73  ="variable">bits
69d0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
69e0: 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rg">n</i></dt>.<
69f0: 64 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20  dd><p>Number of 
6a00: 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65  bits used for ce
6a10: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
6a20: 75 72 65 20 6b 65 79 2e 0a 54 68 69 73 20 76 61  ure key..This va
6a30: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
6a40: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
6a50: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6a60: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 6c 66  ="variable">self
6a70: 5f 73 69 67 6e 65 64 3c 2f 62 3e 20 3c 69 20 63  _signed</b> <i c
6a80: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65  lass="arg">boole
6a90: 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  an</i></dt>.<dd>
6aa0: 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 63  <p>Whether the c
6ab0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
6ac0: 74 75 72 65 20 69 73 20 73 65 6c 66 20 73 69 67  ture is self sig
6ad0: 6e 65 64 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  ned..This value 
6ae0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6af0: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6b00: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6b10: 72 69 61 62 6c 65 22 3e 73 68 61 31 5f 68 61 73  riable">sha1_has
6b20: 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  h</b> <i class="
6b30: 61 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64  arg">hash</i></d
6b40: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 53 48  t>.<dd><p>The SH
6b50: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63  A1 hash of the c
6b60: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20  ertificate as a 
6b70: 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73  hex string..This
6b80: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6b90: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6ba0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6bb0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6bc0: 68 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20 3c  ha256_hash</b> <
6bd0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61  i class="arg">ha
6be0: 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  sh</i></dt>.<dd>
6bf0: 3c 70 3e 54 68 65 20 53 48 41 32 35 36 20 68 61  <p>The SHA256 ha
6c00: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
6c10: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
6c20: 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75  tring..This valu
6c30: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  e is new for Tcl
6c40: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
6c50: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
6c60: 3e 3c 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 20  ><a name="8"><b 
6c70: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
6c80: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20  :connection</b> 
6c90: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
6ca0: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f  hannel</i></a></
6cb0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72  dt>.<dd><p>Retur
6cc0: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63  ns the current c
6cd0: 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73  onnection status
6ce0: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e   of an SSL chann
6cf0: 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69  el. The result i
6d00: 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d  s a list.of key-
6d10: 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63  value pairs desc
6d20: 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65  ribing the conne
6d30: 63 74 69 6f 6e 2e 0a 54 68 69 73 20 63 6f 6d 6d  ction..This comm
6d40: 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54  and is new for T
6d50: 63 6c 54 4c 53 20 31 2e 38 2e 20 52 65 74 75 72  clTLS 1.8. Retur
6d60: 6e 65 64 20 76 61 6c 75 65 73 20 69 6e 63 6c 75  ned values inclu
6d70: 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53  de:</p>.<p>SSL S
6d80: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  tatus</p>.<dl cl
6d90: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
6da0: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
6db0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6dc0: 6c 65 22 3e 73 74 61 74 65 3c 2f 62 3e 20 3c 69  le">state</b> <i
6dd0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61   class="arg">sta
6de0: 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  te</i></dt>.<dd>
6df0: 3c 70 3e 53 74 61 74 65 20 6f 66 20 74 68 65 20  <p>State of the 
6e00: 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c  connection.</p><
6e10: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6e20: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 72  s="variable">ser
6e30: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63  vername</b> <i c
6e40: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c  lass="arg">name<
6e50: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6e60: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20  The name of the 
6e70: 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72  connected to ser
6e80: 76 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ver.</p></dd>.<d
6e90: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6ea0: 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  able">protocol</
6eb0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6ec0: 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64  ">version</i></d
6ed0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72  t>.<dd><p>The pr
6ee0: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75  otocol version u
6ef0: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e  sed for the conn
6f00: 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53  ection: SSL2, SS
6f10: 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31  L3, TLS1, TLS1.1
6f20: 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33  , TLS1.2, TLS1.3
6f30: 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70  , or unknown.</p
6f40: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6f50: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 72  ass="variable">r
6f60: 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c  enegotiation_all
6f70: 6f 77 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  owed</b> <i clas
6f80: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c  s="arg">boolean<
6f90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6fa0: 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c  Whether protocol
6fb0: 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69   renegotiation i
6fc0: 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e  s supported or n
6fd0: 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ot.</p></dd>.<dt
6fe0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6ff0: 62 6c 65 22 3e 73 65 63 75 72 69 74 79 5f 6c 65  ble">security_le
7000: 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  vel</b> <i class
7010: 3d 22 61 72 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e  ="arg">level</i>
7020: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
7030: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20   security level 
7040: 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69  used for selecti
7050: 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b  on of ciphers, k
7060: 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 70  ey size, etc.</p
7070: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
7080: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
7090: 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 62  ession_reused</b
70a0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
70b0: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74  >boolean</i></dt
70c0: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72  >.<dd><p>Whether
70d0: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73   the session has
70e0: 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20   been reused or 
70f0: 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  not.</p></dd>.<d
7100: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7110: 61 62 6c 65 22 3e 69 73 5f 73 65 72 76 65 72 3c  able">is_server<
7120: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7130: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f  g">boolean</i></
7140: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68  dt>.<dd><p>Wheth
7150: 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  er the connectio
7160: 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20  n is configured 
7170: 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29 20  as a server (1) 
7180: 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f  or client (0).</
7190: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
71a0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
71b0: 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 62 3e 20  compression</b> 
71c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
71d0: 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ode</i></dt>.<dd
71e0: 3e 3c 70 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20  ><p>Compression 
71f0: 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e  method.</p></dd>
7200: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7210: 61 72 69 61 62 6c 65 22 3e 65 78 70 61 6e 73 69  ariable">expansi
7220: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
7230: 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f  "arg">mode</i></
7240: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 78 70 61 6e  dt>.<dd><p>Expan
7250: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e  sion method.</p>
7260: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7270: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61  ss="variable">ca
7280: 4c 69 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  List</b> <i clas
7290: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e  s="arg">list</i>
72a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73  </dt>.<dd><p>Lis
72b0: 74 20 6f 66 20 43 65 72 74 69 66 69 63 61 74 65  t of Certificate
72c0: 20 41 75 74 68 6f 72 69 74 69 65 73 20 28 43 41   Authorities (CA
72d0: 29 20 66 6f 72 20 58 2e 35 30 39 20 63 65 72 74  ) for X.509 cert
72e0: 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64  ificate.</p></dd
72f0: 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 69 70 68 65  >.</dl>.<p>Ciphe
7300: 72 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63  r Info</p>.<dl c
7310: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
7320: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
7330: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
7340: 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20  ble">cipher</b> 
7350: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
7360: 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ipher</i></dt>.<
7370: 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 6e  dd><p>The curren
7380: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20  t cipher in use 
7390: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  for the connecti
73a0: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  on.</p></dd>.<dt
73b0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
73c0: 62 6c 65 22 3e 73 74 61 6e 64 61 72 64 5f 6e 61  ble">standard_na
73d0: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
73e0: 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f  "arg">name</i></
73f0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73  dt>.<dd><p>The s
7400: 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65  tandard RFC name
7410: 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c   of cipher.</p><
7420: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7430: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 67  s="variable">alg
7440: 6f 72 69 74 68 6d 5f 62 69 74 73 3c 2f 62 3e 20  orithm_bits</b> 
7450: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
7460: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7470: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70  >The number of p
7480: 72 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73  rocessed bits us
7490: 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f  ed for cipher.</
74a0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
74b0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
74c0: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 62 3e 20  secret_bits</b> 
74d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
74e0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
74f0: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73  >The number of s
7500: 65 63 72 65 74 20 62 69 74 73 20 75 73 65 64 20  ecret bits used 
7510: 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c  for cipher.</p><
7520: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7530: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 69 6e  s="variable">min
7540: 5f 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20  _version</b> <i 
7550: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73  class="arg">vers
7560: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ion</i></dt>.<dd
7570: 3e 3c 70 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20  ><p>The minimum 
7580: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e  protocol version
7590: 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e   for cipher.</p>
75a0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
75b0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69  ss="variable">ci
75c0: 70 68 65 72 5f 69 73 5f 61 65 61 64 3c 2f 62 3e  pher_is_aead</b>
75d0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
75e0: 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e  boolean</i></dt>
75f0: 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20  .<dd><p>Whether 
7600: 74 68 65 20 63 69 70 68 65 72 20 69 73 20 41 75  the cipher is Au
7610: 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72  thenticated Encr
7620: 79 70 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f  yption with Asso
7630: 63 69 61 74 65 64 20 44 61 74 61 20 28 41 45 41  ciated Data (AEA
7640: 44 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  D).</p></dd>.<dt
7650: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
7660: 62 6c 65 22 3e 63 69 70 68 65 72 5f 69 64 3c 2f  ble">cipher_id</
7670: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
7680: 22 3e 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ">id</i></dt>.<d
7690: 64 3e 3c 70 3e 54 68 65 20 4f 70 65 6e 53 53 4c  d><p>The OpenSSL
76a0: 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 70 3e 3c   cipher id.</p><
76b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
76c0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 64 65 73  s="variable">des
76d0: 63 72 69 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20  cription</b> <i 
76e0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
76f0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
7700: 3c 70 3e 41 20 74 65 78 74 20 64 65 73 63 72 69  <p>A text descri
7710: 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70  ption of the cip
7720: 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  her.</p></dd>.<d
7730: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7740: 61 62 6c 65 22 3e 68 61 6e 64 73 68 61 6b 65 5f  able">handshake_
7750: 64 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c  digest</b> <i cl
7760: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61  ass="arg">boolea
7770: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
7780: 70 3e 44 69 67 65 73 74 20 75 73 65 64 20 64 75  p>Digest used du
7790: 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 2e 3c  ring handshake.<
77a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c  /p></dd>.</dl>.<
77b0: 70 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f  p>Session Info</
77c0: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
77d0: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
77e0: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
77f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70  s="variable">alp
7800: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
7810: 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69  arg">protocol</i
7820: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
7830: 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63  e protocol selec
7840: 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63  ted after Applic
7850: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74  ation-Layer Prot
7860: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e  ocol Negotiation
7870: 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64   (ALPN).</p></dd
7880: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7890: 76 61 72 69 61 62 6c 65 22 3e 72 65 73 75 6d 61  variable">resuma
78a0: 62 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ble</b> <i class
78b0: 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f  ="arg">boolean</
78c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57  i></dt>.<dd><p>W
78d0: 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 69  hether the sessi
78e0: 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 75 6d 65  on can be resume
78f0: 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64  d or not.</p></d
7900: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7910: 22 76 61 72 69 61 62 6c 65 22 3e 73 74 61 72 74  "variable">start
7920: 5f 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  _time</b> <i cla
7930: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73  ss="arg">seconds
7940: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7950: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73  >Time since sess
7960: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73  ion started in s
7970: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f  econds since epo
7980: 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ch.</p></dd>.<dt
7990: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
79a0: 62 6c 65 22 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e  ble">timeout</b>
79b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
79c0: 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e  seconds</i></dt>
79d0: 0a 3c 64 64 3e 3c 70 3e 4d 61 78 20 64 75 72 61  .<dd><p>Max dura
79e0: 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20  tion of session 
79f0: 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72  in seconds befor
7a00: 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c  e time-out.</p><
7a10: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7a20: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6c 69 66  s="variable">lif
7a30: 65 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  etime</b> <i cla
7a40: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73  ss="arg">seconds
7a50: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7a60: 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20  >Session ticket 
7a70: 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 20 69 6e  lifetime hint in
7a80: 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64   seconds.</p></d
7a90: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7aa0: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69  "variable">sessi
7ab0: 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  on_id</b> <i cla
7ac0: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f  ss="arg">binary_
7ad0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
7ae0: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65  <dd><p>Unique se
7af0: 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65  ssion id for use
7b00: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65   in resuming the
7b10: 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64   session.</p></d
7b20: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7b30: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69  "variable">sessi
7b40: 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62 3e 20 3c 69  on_ticket</b> <i
7b50: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e   class="arg">bin
7b60: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  ary_string</i></
7b70: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75  dt>.<dd><p>Uniqu
7b80: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  e session ticket
7b90: 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75   for use in resu
7ba0: 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e  ming the session
7bb0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
7bc0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
7bd0: 65 22 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61  e">ticket_app_da
7be0: 74 61 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ta</b> <i class=
7bf0: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72  "arg">binary_str
7c00: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
7c10: 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69  ><p>Unique sessi
7c20: 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69 63  on ticket applic
7c30: 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c  ation data.</p><
7c40: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7c50: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 61 73  s="variable">mas
7c60: 74 65 72 5f 6b 65 79 3c 2f 62 3e 20 3c 69 20 63  ter_key</b> <i c
7c70: 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72  lass="arg">binar
7c80: 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  y_string</i></dt
7c90: 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20  >.<dd><p>Unique 
7ca0: 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b  session master k
7cb0: 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ey.</p></dd>.<dt
7cc0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
7cd0: 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 63 61 63  ble">session_cac
7ce0: 68 65 5f 6d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63  he_mode</b> <i c
7cf0: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c  lass="arg">mode<
7d00: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
7d10: 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64  Server cache mod
7d20: 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65  e (client, serve
7d30: 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 70 3e  r, or both).</p>
7d40: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
7d50: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 39 22  .<dt><a name="9"
7d60: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
7d70: 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e  tls::ciphers</b>
7d80: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
7d90: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
7da0: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f  g">protocol</i>?
7db0: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
7dc0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
7dd0: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73  ass="arg">verbos
7de0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
7df0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
7e00: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
7e10: 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f  supported</i>?</
7e20: 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  span></a></dt>.<
7e30: 64 64 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61 6e  dd><p>Without an
7e40: 79 20 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72 65  y options, it re
7e50: 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20  turns a list of 
7e60: 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63 20 63 69  all symmetric ci
7e70: 70 68 65 72 73 20 66 6f 72 20 75 73 65 20 77 69  phers for use wi
7e80: 74 68 20 74 68 65 0a 3c 69 20 63 6c 61 73 73 3d  th the.<i class=
7e90: 22 61 72 67 22 3e 2d 63 69 70 68 65 72 3c 2f 69  "arg">-cipher</i
7ea0: 3e 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20 3c  > option. With <
7eb0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72  i class="arg">pr
7ec0: 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c 79  otocol</i>, only
7ed0: 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70   the ciphers sup
7ee0: 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 0a  ported for that.
7ef0: 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 74  protocol are ret
7f00: 75 72 6e 65 64 2e 20 53 65 65 20 74 68 65 20 3c  urned. See the <
7f10: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
7f20: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e  s::protocols</b>
7f30: 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 65   command for the
7f40: 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f   supported.proto
7f50: 63 6f 6c 73 2e 20 49 66 20 3c 69 20 63 6c 61 73  cols. If <i clas
7f60: 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c  s="arg">verbose<
7f70: 2f 69 3e 20 69 73 20 73 70 65 63 69 66 69 65 64  /i> is specified
7f80: 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 20   as true then a 
7f90: 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72  verbose, human r
7fa0: 65 61 64 61 62 6c 65 0a 6c 69 73 74 20 69 73 20  eadable.list is 
7fb0: 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 61 64  returned with ad
7fc0: 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61  ditional informa
7fd0: 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68  tion on the ciph
7fe0: 65 72 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d  er. If <i class=
7ff0: 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c  "arg">supported<
8000: 2f 69 3e 0a 69 73 20 73 70 65 63 69 66 69 65 64  /i>.is specified
8010: 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f   as true, then o
8020: 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20  nly the ciphers 
8030: 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72  supported for pr
8040: 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c  otocol will be l
8050: 69 73 74 65 64 2e 0a 54 68 65 20 3c 69 20 63 6c  isted..The <i cl
8060: 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72  ass="arg">suppor
8070: 74 65 64 3c 2f 69 3e 20 61 72 67 20 69 73 20 6e  ted</i> arg is n
8080: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
8090: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
80a0: 3c 61 20 6e 61 6d 65 3d 22 31 30 22 3e 3c 62 20  <a name="10"><b 
80b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
80c0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f  :protocols</b></
80d0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52  a></dt>.<dd><p>R
80e0: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66  eturns a list of
80f0: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 53   the supported S
8100: 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c 73  SL/TLS protocols
8110: 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 20 61  . Valid values a
8120: 72 65 3a 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f  re:.<b class="co
8130: 6e 73 74 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c  nst">ssl2</b>, <
8140: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
8150: 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  ssl3</b>, <b cla
8160: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 3c  ss="const">tls1<
8170: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
8180: 6f 6e 73 74 22 3e 74 6c 73 31 2e 31 3c 2f 62 3e  onst">tls1.1</b>
8190: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
81a0: 74 22 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20 61  t">tls1.2</b>, a
81b0: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  nd.<b class="con
81c0: 73 74 22 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20  st">tls1.3</b>. 
81d0: 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65 6e  Exact list depen
81e0: 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 65  ds on OpenSSL ve
81f0: 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 6c  rsion and compil
8200: 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 0a 54 68  e time flags..Th
8210: 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 65  is command is ne
8220: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
8230: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
8240: 61 20 6e 61 6d 65 3d 22 31 31 22 3e 3c 62 20 63  a name="11"><b c
8250: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
8260: 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c  version</b></a><
8270: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75  /dt>.<dd><p>Retu
8280: 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20  rns the OpenSSL 
8290: 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c  version string.<
82a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c  /p></dd>.</dl>.<
82b0: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
82c0: 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22  ection4" class="
82d0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
82e0: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h2><a name="s
82f0: 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69  ection4">Certifi
8300: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
8310: 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 69 64  /a></h2>.<div id
8320: 3d 22 73 75 62 73 65 63 74 69 6f 6e 31 22 20 63  ="subsection1" c
8330: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
8340: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c  ubsection"><h3><
8350: 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69  a name="subsecti
8360: 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65 72  on1">PKI and Cer
8370: 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f 68  tificates</a></h
8380: 33 3e 0a 3c 70 3e 55 73 69 6e 67 20 74 68 65 20  3>.<p>Using the 
8390: 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 61  Public Key Infra
83a0: 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29 2c  structure (PKI),
83b0: 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61 74   each user creat
83c0: 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65 79  es a private key
83d0: 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79 20   that.only they 
83e0: 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20 61  know about and a
83f0: 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65 79   public key they
8400: 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77 69   can exchange wi
8410: 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75 73  th others for us
8420: 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67 20  e in.encrypting 
8430: 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 20 64  and decrypting d
8440: 61 74 61 2e 20 54 68 65 20 70 72 6f 63 65 73 73  ata. The process
8450: 20 69 73 20 74 68 65 20 73 65 6e 64 65 72 20 65   is the sender e
8460: 6e 63 72 79 70 74 73 20 74 68 65 69 72 20 64 61  ncrypts their da
8470: 74 61 0a 75 73 69 6e 67 20 74 68 65 69 72 20 70  ta.using their p
8480: 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 20 74  rivate key and t
8490: 68 65 20 72 65 63 65 69 76 65 72 27 73 20 70 75  he receiver's pu
84a0: 62 6c 69 63 20 6b 65 79 2e 20 54 68 65 20 64 61  blic key. The da
84b0: 74 61 20 69 73 20 74 68 65 6e 20 73 65 6e 74 0a  ta is then sent.
84c0: 74 6f 20 74 68 65 20 72 65 63 65 69 76 65 72 2e  to the receiver.
84d0: 20 49 6e 20 61 20 73 69 6d 69 6c 61 72 20 6d 61   In a similar ma
84e0: 6e 6e 65 72 2c 20 74 68 65 20 72 65 63 65 69 76  nner, the receiv
84f0: 65 72 20 75 73 65 73 20 74 68 65 69 72 20 70 72  er uses their pr
8500: 69 76 61 74 65 20 6b 65 79 20 61 6e 64 0a 74 68  ivate key and.th
8510: 65 20 73 65 6e 64 65 72 27 73 20 70 75 62 6c 69  e sender's publi
8520: 63 20 6b 65 79 20 74 6f 20 64 65 63 72 79 70 74  c key to decrypt
8530: 20 74 68 65 20 64 61 74 61 2e 20 54 68 69 73 20   the data. This 
8540: 70 72 6f 76 69 64 65 73 20 64 61 74 61 20 69 6e  provides data in
8550: 74 65 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73 75  tegrity, to.ensu
8560: 72 65 20 74 68 65 20 64 61 74 61 20 63 61 6e 27  re the data can'
8570: 74 20 62 65 20 76 69 65 77 65 64 20 6f 72 20 61  t be viewed or a
8580: 6c 74 65 72 65 64 20 64 75 72 69 6e 67 20 74 72  ltered during tr
8590: 61 6e 73 70 6f 72 74 2e 20 53 65 65 20 74 68 65  ansport. See the
85a0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
85b0: 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 61 6e 64 20  n">-key</b> and 
85c0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
85d0: 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 6f  ">-keyfile</b> o
85e0: 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74  ptions for how t
85f0: 6f 20 73 70 65 63 69 66 79 20 74 68 65 20 70 72  o specify the pr
8600: 69 76 61 74 65 20 6b 65 79 2e 0a 41 6c 73 6f 20  ivate key..Also 
8610: 73 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73  see the <b class
8620: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77  ="option">-passw
8630: 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 66  ord</b> option f
8640: 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f 76 69 64  or how to provid
8650: 65 20 74 68 65 20 70 61 73 73 77 6f 72 64 2e 3c  e the password.<
8660: 2f 70 3e 0a 3c 70 3e 49 6e 20 6f 72 64 65 72 20  /p>.<p>In order 
8670: 74 6f 20 70 72 6f 76 69 64 65 20 61 75 74 68 65  to provide authe
8680: 6e 74 69 63 61 74 69 6f 6e 2c 20 69 2e 65 2e 20  ntication, i.e. 
8690: 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e 65  ensuring someone
86a0: 20 69 73 20 77 68 6f 20 74 68 65 79 20 73 61 79   is who they say
86b0: 20 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20 70   they.are, the p
86c0: 75 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 73  ublic key and us
86d0: 65 72 20 69 64 65 6e 74 69 66 69 63 61 74 69 6f  er identificatio
86e0: 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 64  n info is stored
86f0: 20 69 6e 20 61 20 58 2e 35 30 39 0a 63 65 72 74   in a X.509.cert
8700: 69 66 69 63 61 74 65 20 61 6e 64 20 74 68 61 74  ificate and that
8710: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20   certificate is 
8720: 61 75 74 68 65 6e 74 69 63 61 74 65 64 20 28 69  authenticated (i
8730: 2e 65 2e 20 73 69 67 6e 65 64 29 20 62 79 20 61  .e. signed) by a
8740: 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 74   Certificate.Aut
8750: 68 6f 72 69 74 79 20 28 43 41 29 2e 20 55 73 65  hority (CA). Use
8760: 72 73 20 63 61 6e 20 74 68 65 6e 20 65 78 63 68  rs can then exch
8770: 61 6e 67 65 20 74 68 65 73 65 20 63 65 72 74 69  ange these certi
8780: 66 69 63 61 74 65 73 20 64 75 72 69 6e 67 20 74  ficates during t
8790: 68 65 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69 7a  he TLS.initializ
87a0: 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e  ation process an
87b0: 64 20 63 68 65 63 6b 20 74 68 65 6d 20 61 67 61  d check them aga
87c0: 69 6e 73 74 20 74 68 65 20 72 6f 6f 74 20 43 41  inst the root CA
87d0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f   certificates to
87e0: 20 65 6e 73 75 72 65 0a 74 68 65 79 20 61 72 65   ensure.they are
87f0: 20 76 61 6c 69 64 2e 20 54 68 69 73 20 69 73 20   valid. This is 
8800: 68 61 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e 53  handled by OpenS
8810: 53 4c 20 76 69 61 20 74 68 65 20 3c 62 20 63 6c  SL via the <b cl
8820: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65  ass="option">-re
8830: 71 75 65 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c 62  quest</b> and.<b
8840: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8850: 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70 74  -require</b> opt
8860: 69 6f 6e 73 2e 20 53 65 65 20 74 68 65 20 3c 62  ions. See the <b
8870: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8880: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63  -cadir</b>, <b c
8890: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
88a0: 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62  adir</b>, and.<b
88b0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
88c0: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74  -castore</b> opt
88d0: 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20  ions for how to 
88e0: 73 70 65 63 69 66 79 20 77 68 65 72 65 20 74 6f  specify where to
88f0: 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 65 72   find the CA cer
8900: 74 69 66 69 63 61 74 65 73 2e 0a 4f 70 74 69 6f  tificates..Optio
8910: 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74 75  nally, in a futu
8920: 72 65 20 72 65 6c 65 61 73 65 2c 20 74 68 65 79  re release, they
8930: 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 68 65   can also be che
8940: 63 6b 65 64 20 61 67 61 69 6e 73 74 20 74 68 65  cked against the
8950: 20 43 65 72 74 69 66 69 63 61 74 65 0a 52 65 76   Certificate.Rev
8960: 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20 28 43 52  ocation List (CR
8970: 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64 20 63 65  L) of revoked ce
8980: 72 74 69 66 69 63 61 74 65 73 2e 20 43 65 72 74  rtificates. Cert
8990: 69 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c 73  ificates can als
89a0: 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 64  o be.self-signed
89b0: 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20 62  , but they are b
89c0: 79 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 72  y default not tr
89d0: 75 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f 75  usted unless you
89e0: 20 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f 75   add them to you
89f0: 72 0a 63 65 72 74 69 66 69 63 61 74 65 20 73 74  r.certificate st
8a00: 6f 72 65 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70 69  ore.</p>.<p>Typi
8a10: 63 61 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 74  cally when visit
8a20: 69 6e 67 20 77 65 62 20 73 69 74 65 73 2c 20 6f  ing web sites, o
8a30: 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e 74 20 6e  nly the client n
8a40: 65 65 64 73 20 74 6f 20 63 68 65 63 6b 20 74 68  eeds to check th
8a50: 65 20 73 65 72 76 65 72 27 73 0a 63 65 72 74 69  e server's.certi
8a60: 66 69 63 61 74 65 20 74 6f 20 65 6e 73 75 72 65  ficate to ensure
8a70: 20 69 74 20 69 73 20 76 61 6c 69 64 2e 20 54 68   it is valid. Th
8a80: 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e 27 74  e server doesn't
8a90: 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 20 74   need to check t
8aa0: 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 69 66  he client.certif
8ab0: 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 6f 75  icate unless you
8ac0: 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 6e 74   need to authent
8ad0: 69 63 61 74 65 20 77 69 74 68 20 74 68 65 6d 20  icate with them 
8ae0: 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 2e 20 53  to login, etc. S
8af0: 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  ee the.<b class=
8b00: 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f  "option">-cert</
8b10: 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d  b> and <b class=
8b20: 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69  "option">-certfi
8b30: 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 69  le</b> options i
8b40: 66 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 70 72  f you need to pr
8b50: 6f 76 69 64 65 20 61 20 63 65 72 74 69 66 69 63  ovide a certific
8b60: 61 74 65 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a  ate.</p>.</div>.
8b70: 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74  <div id="subsect
8b80: 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion2" class="doc
8b90: 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e  tools_subsection
8ba0: 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h3><a name="s
8bb0: 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d  ubsection2">Summ
8bc0: 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c  ary of command l
8bd0: 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c  ine options</a><
8be0: 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c  /h3>.<p>The foll
8bf0: 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72  owing options ar
8c00: 65 20 75 73 65 64 20 66 6f 72 20 70 65 65 72 20  e used for peer 
8c10: 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69  certificate vali
8c20: 64 61 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c 20  dation:</p>.<dl 
8c30: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
8c40: 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62  options">.<dt><b
8c50: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8c60: 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c  -cadir</b> <i cl
8c70: 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63 74  ass="arg">direct
8c80: 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ory</i></dt>.<dd
8c90: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
8ca0: 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72  e directory wher
8cb0: 65 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  e the Certificat
8cc0: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e Authority (CA)
8cd0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72   certificates ar
8ce0: 65 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 65  e.stored. The de
8cf0: 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72  fault is platfor
8d00: 6d 20 73 70 65 63 69 66 69 63 2c 20 62 75 74 20  m specific, but 
8d10: 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f 74  is usually &quot
8d20: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22  ;<b class="file"
8d30: 3e 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 3c  >/etc/ssl/certs<
8d40: 2f 62 3e 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 6e  /b>&quot; on.Lin
8d50: 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2e  ux/Unix systems.
8d60: 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63   The default loc
8d70: 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65  ation can be ove
8d80: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 0a 3c  rridden by the.<
8d90: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
8da0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c  e">SSL_CERT_DIR<
8db0: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  /b> environment 
8dc0: 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64  variable.</p></d
8dd0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
8de0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
8df0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
8e00: 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e  rg">filename</i>
8e10: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
8e20: 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 20  cifies the file 
8e30: 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 69  with the Certifi
8e40: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28  cate Authority (
8e50: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73  CA) certificates
8e60: 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c   to use in.<b cl
8e70: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c  ass="const">PEM<
8e80: 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e  /b> file format.
8e90: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
8ea0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
8eb0: 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f  file">cert.pem</
8ec0: 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65  b>&quot;, in the
8ed0: 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f   OpenSSL.directo
8ee0: 72 79 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e 69  ry. On Linux/Uni
8ef0: 78 20 73 79 73 74 65 6d 73 2c 20 74 68 69 73 20  x systems, this 
8f00: 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f 74  is usually &quot
8f10: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22  ;<b class="file"
8f20: 3e 2f 65 74 63 2f 73 73 6c 2f 63 61 2d 62 75 6e  >/etc/ssl/ca-bun
8f30: 64 6c 65 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74  dle.pem</b>&quot
8f40: 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 66  ;..The default f
8f50: 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72 72  ile can be overr
8f60: 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62 20  idden by the <b 
8f70: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
8f80: 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f  >SSL_CERT_FILE</
8f90: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76  b> environment.v
8fa0: 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64  ariable.</p></dd
8fb0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
8fc0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
8fd0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
8fe0: 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e  rg">URI</i></dt>
8ff0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
9000: 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65  s the Uniform Re
9010: 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 65  source Identifie
9020: 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 20  r (URI) for the 
9030: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68  Certificate Auth
9040: 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65  ority.(CA) store
9050: 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 61  , which may be a
9060: 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65   single containe
9070: 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f  r or a catalog o
9080: 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74  f containers..St
9090: 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e  arting with Open
90a0: 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69  SSL 3.2 on MS Wi
90b0: 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 71  ndows, set to &q
90c0: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f  uot;<b class="co
90d0: 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c  nst">org.openssl
90e0: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e  .winstore://</b>
90f0: 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68  &quot;.to use th
9100: 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69  e built-in MS Wi
9110: 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74  ndows Certificat
9120: 65 20 53 74 6f 72 65 2e 20 53 74 61 72 74 69 6e  e Store. Startin
9130: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
9140: 20 74 68 69 73 0a 69 73 20 74 68 65 20 64 65 66   this.is the def
9150: 61 75 6c 74 20 69 66 20 3c 62 20 63 6c 61 73 73  ault if <b class
9160: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
9170: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
9180: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
9190: 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73  b>, and <b class
91a0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f  ="option">-casto
91b0: 72 65 3c 2f 62 3e 20 61 72 65 0a 6e 6f 74 20 73  re</b> are.not s
91c0: 70 65 63 69 66 69 65 64 2e 20 54 68 69 73 20 73  pecified. This s
91d0: 74 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72  tore only suppor
91e0: 74 73 20 72 6f 6f 74 20 63 65 72 74 69 66 69 63  ts root certific
91f0: 61 74 65 20 73 74 6f 72 65 73 2e 3c 2f 70 3e 3c  ate stores.</p><
9200: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
9210: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75  s="option">-requ
9220: 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  est</b> <i class
9230: 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c  ="arg">bool</i><
9240: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75  /dt>.<dd><p>Requ
9250: 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74  est a certificat
9260: 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20  e from the peer 
9270: 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68  during the SSL h
9280: 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69  andshake. This i
9290: 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43  s needed.to do C
92a0: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
92b0: 61 74 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20  ation. Starting 
92c0: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74  in TclTLS 1.8, t
92d0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 3c 62  he default is.<b
92e0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
92f0: 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 65  rue</b> for clie
9300: 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20  nt connections. 
9310: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54  Starting in TclT
9320: 4c 53 20 32 2e 30 2c 20 69 66 20 73 65 74 20 74  LS 2.0, if set t
9330: 6f 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  o.<b class="cons
9340: 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64  t">false</b> and
9350: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9360: 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20  n">-require</b> 
9370: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
9380: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68  st">true</b>, th
9390: 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65 0a  en this will be.
93a0: 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 3c 62  overridden to <b
93b0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
93c0: 72 75 65 3c 2f 62 3e 2e 20 49 6e 20 61 64 64 69  rue</b>. In addi
93d0: 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 6e 74  tion, the client
93e0: 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 6e   can manually in
93f0: 73 70 65 63 74 20 61 6e 64 0a 61 63 63 65 70 74  spect and.accept
9400: 20 6f 72 20 72 65 6a 65 63 74 20 65 61 63 68 20   or reject each 
9410: 63 65 72 74 69 66 69 63 61 74 65 20 75 73 69 6e  certificate usin
9420: 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  g the <b class="
9430: 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74  option">-validat
9440: 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74  ecommand</b> opt
9450: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ion.</p></dd>.<d
9460: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
9470: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e  on">-require</b>
9480: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
9490: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
94a0: 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 76  d><p>Require a v
94b0: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65  alid certificate
94c0: 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64   from the peer d
94d0: 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61  uring the SSL ha
94e0: 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73  ndshake. If this
94f0: 20 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c   is.set to true,
9500: 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22   then <b class="
9510: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74  option">-request
9520: 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62  </b> must also b
9530: 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e  e set to true an
9540: 64 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 6c  d a either.<b cl
9550: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
9560: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  dir</b>, <b clas
9570: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69  s="option">-cafi
9580: 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  le</b>, <b class
9590: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f  ="option">-casto
95a0: 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61  re</b>, or a pla
95b0: 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75  tform default.mu
95c0: 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69  st be provided i
95d0: 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64  n order to valid
95e0: 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65  ate against. The
95f0: 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54   default in TclT
9600: 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69  LS 1.8 and.earli
9610: 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 3c  er versions is <
9620: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9630: 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20  false</b> since 
9640: 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d  not all platform
9650: 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61  s have certifica
9660: 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20  tes to.validate 
9670: 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72  against in a for
9680: 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74  m compatible wit
9690: 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72 74  h OpenSSL. Start
96a0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e  ing in TclTLS 2.
96b0: 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69  0,.the default i
96c0: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  s <b class="cons
96d0: 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20  t">true</b> for 
96e0: 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f  client connectio
96f0: 6e 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  ns.</p></dd>.</d
9700: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  l>.</div>.<div i
9710: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 22 20  d="subsection3" 
9720: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
9730: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e  subsection"><h3>
9740: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74  <a name="subsect
9750: 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 63  ion3">When are c
9760: 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69  ommand line opti
9770: 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c  ons needed?</a><
9780: 2f 68 33 3e 0a 3c 70 3e 49 6e 20 54 63 6c 54 4c  /h3>.<p>In TclTL
9790: 53 20 31 2e 38 20 61 6e 64 20 65 61 72 6c 69 65  S 1.8 and earlie
97a0: 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 74  r versions, cert
97b0: 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 69  ificate validati
97c0: 6f 6e 20 69 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f 65  on is.<em>NOT</e
97d0: 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79 20 64 65  m> enabled by de
97e0: 66 61 75 6c 74 2e 20 54 68 69 73 20 6c 69 6d 69  fault. This limi
97f0: 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 6f  tation is due to
9800: 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 63   the lack of a c
9810: 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 74  ommon.cross plat
9820: 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f 66  form database of
9830: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
9840: 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f 76  hority (CA) prov
9850: 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65  ided certificate
9860: 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67  s to.validate ag
9870: 61 69 6e 73 74 2e 20 4d 61 6e 79 20 4c 69 6e 75  ainst. Many Linu
9880: 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 65  x systems native
9890: 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e 53  ly support OpenS
98a0: 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 65  SL and thus have
98b0: 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 63 61  .these certifica
98c0: 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 73  tes installed as
98d0: 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 2c   part of the OS,
98e0: 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 4d   but MacOS and M
98f0: 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f 74  S Windows do not
9900: 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20 54 63 6c  ..Staring in Tcl
9910: 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66  TLS 2.0, the def
9920: 61 75 6c 74 20 66 6f 72 20 63 6c 69 65 6e 74 20  ault for client 
9930: 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 68 61 73 20  connections has 
9940: 62 65 65 6e 20 63 68 61 6e 67 65 64 20 74 6f 0a  been changed to.
9950: 72 65 71 75 69 72 65 20 63 65 72 74 69 66 69 63  require certific
9960: 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 62  ate validation b
9970: 79 20 64 65 66 61 75 6c 74 2e 20 49 6e 20 6f 72  y default. In or
9980: 64 65 72 20 74 6f 20 75 73 65 20 74 68 65 20 3c  der to use the <
9990: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
99a0: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 0a 6f 70  >-require</b>.op
99b0: 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 65  tion, one of the
99c0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 75 73 74 20   following must 
99d0: 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75 6c  be true:</p>.<ul
99e0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
99f0: 5f 69 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69 3e  _itemized">.<li>
9a00: 3c 70 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 20  <p>On Linux and 
9a10: 55 6e 69 78 20 73 79 73 74 65 6d 73 20 77 69 74  Unix systems wit
9a20: 68 20 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61 64  h OpenSSL alread
9a30: 79 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 69  y installed or i
9a40: 66 20 74 68 65 20 43 41 0a 63 65 72 74 69 66 69  f the CA.certifi
9a50: 63 61 74 65 73 20 61 72 65 20 61 76 61 69 6c 61  cates are availa
9a60: 62 6c 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61  ble in PEM forma
9a70: 74 2c 20 61 6e 64 20 69 66 20 74 68 65 79 20 61  t, and if they a
9a80: 72 65 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65  re stored in the
9a90: 0a 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 69  .standard locati
9aa0: 6f 6e 73 2c 20 6f 72 20 69 66 20 74 68 65 20 3c  ons, or if the <
9ab0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
9ac0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c  e">SSL_CERT_DIR<
9ad0: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  /b> or <b class=
9ae0: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
9af0: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e 76  ERT_FILE</b>.env
9b00: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c  ironment variabl
9b10: 65 73 20 61 72 65 20 73 65 74 2c 20 74 68 65 6e  es are set, then
9b20: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9b30: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c  n">-cadir</b>, <
9b40: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9b50: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e 64  >-cadir</b>,.and
9b60: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9b70: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20  n">-castore</b> 
9b80: 61 72 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c 2f  aren't needed.</
9b90: 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 49  p></li>.<li><p>I
9ba0: 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74  f OpenSSL is not
9bb0: 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68   installed in th
9bc0: 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69  e default locati
9bd0: 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e  on, or when usin
9be0: 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57  g Mac OS.or MS W
9bf0: 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53  indows and OpenS
9c00: 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c  SL is installed,
9c10: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76   the <b class="v
9c20: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52  ariable">SSL_CER
9c30: 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72  T_DIR</b> and/or
9c40: 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  .<b class="varia
9c50: 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49  ble">SSL_CERT_FI
9c60: 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65  LE</b> environme
9c70: 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20  nt variables or 
9c80: 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 3c  the one of the <
9c90: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9ca0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 20  >-cadir</b>,.<b 
9cb0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
9cc0: 63 61 64 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c 62  cadir</b>, or <b
9cd0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9ce0: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74  -castore</b> opt
9cf0: 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64 65 66  ions must be def
9d00: 69 6e 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c  ined.</p></li>.<
9d10: 6c 69 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e 64  li><p>On MS Wind
9d20: 6f 77 73 2c 20 73 74 61 72 74 69 6e 67 20 69 6e  ows, starting in
9d30: 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c 20 69 74   OpenSSL 3.2, it
9d40: 20 69 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c 65   is now possible
9d50: 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 0a 62   to access the.b
9d60: 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73 20  uilt-in Windows 
9d70: 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f 72  Certificate Stor
9d80: 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e 20  e from OpenSSL. 
9d90: 54 68 69 73 20 63 61 6e 20 75 74 69 6c 69 7a 65  This can utilize
9da0: 64 20 62 79 0a 73 65 74 74 69 6e 67 20 74 68 65  d by.setting the
9db0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9dc0: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20  n">-castore</b> 
9dd0: 6f 70 74 69 6f 6e 20 74 6f 20 26 71 75 6f 74 3b  option to &quot;
9de0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
9df0: 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e  >org.openssl.win
9e00: 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f  store://</b>&quo
9e10: 74 3b 2e 0a 49 6e 20 54 63 6c 54 4c 53 20 32 2e  t;..In TclTLS 2.
9e20: 30 2c 20 74 68 69 73 20 69 73 20 74 68 65 20 64  0, this is the d
9e30: 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 66 20  efault value if 
9e40: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9e50: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62  ">-cadir</b>,.<b
9e60: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9e70: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 20  -cadir</b>, and 
9e80: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9e90: 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61  ">-castore</b> a
9ea0: 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64  re not specified
9eb0: 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  .</p></li>.<li><
9ec0: 70 3e 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20  p>If OpenSSL is 
9ed0: 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72  not installed or
9ee0: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63   the CA certific
9ef0: 61 74 65 73 20 61 72 65 20 6e 6f 74 20 61 76 61  ates are not ava
9f00: 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d 0a 66 6f  ilable in PEM.fo
9f10: 72 6d 61 74 2c 20 74 68 65 20 43 41 20 63 65 72  rmat, the CA cer
9f20: 74 69 66 69 63 61 74 65 73 20 6d 75 73 74 20 62  tificates must b
9f30: 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 61 6e 64  e downloaded and
9f40: 20 69 6e 73 74 61 6c 6c 65 64 20 77 69 74 68 20   installed with 
9f50: 74 68 65 20 75 73 65 72 0a 73 6f 66 74 77 61 72  the user.softwar
9f60: 65 2e 20 54 68 65 20 43 55 52 4c 20 74 65 61 6d  e. The CURL team
9f70: 20 6d 61 6b 65 73 20 74 68 65 6d 20 61 76 61 69   makes them avai
9f80: 6c 61 62 6c 65 20 61 74 0a 3c 61 20 68 72 65 66  lable at.<a href
9f90: 3d 22 68 74 74 70 73 3a 2f 2f 63 75 72 6c 2e 73  ="https://curl.s
9fa0: 65 2f 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74  e/docs/caextract
9fb0: 2e 68 74 6d 6c 22 3e 43 41 20 63 65 72 74 69 66  .html">CA certif
9fc0: 69 63 61 74 65 73 20 65 78 74 72 61 63 74 65 64  icates extracted
9fd0: 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f 61  .from Mozilla</a
9fe0: 3e 20 69 6e 20 74 68 65 20 26 71 75 6f 74 3b 3c  > in the &quot;<
9ff0: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63  b class="file">c
a000: 61 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75  acert.pem</b>&qu
a010: 6f 74 3b 20 66 69 6c 65 2e 20 59 6f 75 20 6d 75  ot; file. You mu
a020: 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 20 73  st then either s
a030: 65 74 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  et the.<b class=
a040: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
a050: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f  ERT_DIR</b> and/
a060: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  or <b class="var
a070: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
a080: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  FILE</b> environ
a090: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f  ment variables o
a0a0: 72 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22  r the.<b class="
a0b0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
a0c0: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22  b> or <b class="
a0d0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c  option">-cafile<
a0e0: 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74  /b> options to t
a0f0: 68 65 20 43 41 20 63 65 72 74 20 66 69 6c 65 27  he CA cert file'
a100: 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74 69  s install.locati
a110: 6f 6e 2e 20 49 74 20 69 73 20 79 6f 75 72 20 72  on. It is your r
a120: 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f  esponsibility to
a130: 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65 20   keep this file 
a140: 75 70 20 74 6f 20 64 61 74 65 2e 3c 2f 70 3e 3c  up to date.</p><
a150: 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76  /li>.</ul>.</div
a160: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
a170: 3d 22 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 73  ="section5" clas
a180: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
a190: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
a1a0: 3d 22 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c  ="section5">Call
a1b0: 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e  back Options</a>
a1c0: 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20 70 72 65 76  </h2>.<p>As prev
a1d0: 69 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65 64  iously described
a1e0: 2c 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 63  , each channel c
a1f0: 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 69  an be given thei
a200: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a  r own callbacks.
a210: 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d  to handle interm
a220: 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e  ediate processin
a230: 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  g by the OpenSSL
a240: 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20   library, using 
a250: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
a260: 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  tion">-command</
a270: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
a280: 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c  tion">-password<
a290: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73  /b>, and <b clas
a2a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
a2b0: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
a2c0: 20 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 20   options.passed 
a2d0: 74 6f 20 65 69 74 68 65 72 20 6f 66 20 3c 62 20  to either of <b 
a2e0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
a2f0: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 6f 72 20 3c  :socket</b> or <
a300: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
a310: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 0a 55  s::import</b>..U
a320: 6e 6c 69 6b 65 20 70 72 65 76 69 6f 75 73 20 76  nlike previous v
a330: 65 72 73 69 6f 6e 73 20 6f 66 20 54 63 6c 54 4c  ersions of TclTL
a340: 53 2c 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 63  S, only if the c
a350: 61 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65  allback generate
a360: 73 20 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c 6c  s an error,.will
a370: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 73   the <b class="s
a380: 79 73 63 6d 64 22 3e 62 67 65 72 72 6f 72 3c 2f  yscmd">bgerror</
a390: 62 3e 20 63 6f 6d 6d 61 6e 64 20 62 65 20 69 6e  b> command be in
a3a0: 76 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20 65  voked with the e
a3b0: 72 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e  rror information
a3c0: 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69 64 3d 22 73  .</p>.<div id="s
a3d0: 75 62 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73  ubsection4" clas
a3e0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
a3f0: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
a400: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 34  ame="subsection4
a410: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d  ">Values for Com
a420: 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61  mand Callback</a
a430: 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61  ></h3>.<p>The ca
a440: 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c  llback for the <
a450: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
a460: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70  >-command</b> op
a470: 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20  tion is invoked 
a480: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
a490: 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f 70 65  s during the.Ope
a4a0: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61  nSSL handshake a
a4b0: 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69 6e  nd during routin
a4c0: 65 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 53 65  e operations. Se
a4d0: 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20  e below for the 
a4e0: 70 6f 73 73 69 62 6c 65 0a 61 72 67 75 6d 65 6e  possible.argumen
a4f0: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65  ts passed to the
a500: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74   callback script
a510: 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e 65  . Values returne
a520: 64 20 66 72 6f 6d 20 74 68 65 20 63 61 6c 6c 62  d from the callb
a530: 61 63 6b 20 61 72 65 0a 69 67 6e 6f 72 65 64 2e  ack are.ignored.
a540: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
a550: 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73  doctools_options
a560: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  ">.<dt><b class=
a570: 22 6f 70 74 69 6f 6e 22 3e 65 72 72 6f 72 3c 2f  "option">error</
a580: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
a590: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 65 73 73  ">channelId mess
a5a0: 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  age</i></dt>.<dd
a5b0: 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66  ><p>This form of
a5c0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
a5d0: 6f 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e  oked whenever an
a5e0: 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75   error occurs du
a5f0: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c  ring the initial
a600: 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e  .connection, han
a610: 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f  dshake, or I/O o
a620: 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 3c  perations. The <
a630: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65  i class="arg">me
a640: 73 73 61 67 65 3c 2f 69 3e 20 61 72 67 75 6d 65  ssage</i> argume
a650: 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20 74  nt can be.from t
a660: 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c  he Tcl_ErrnoMsg,
a670: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
a680: 6e 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  n <b class="func
a690: 74 69 6f 6e 22 3e 45 52 52 5f 72 65 61 73 6f 6e  tion">ERR_reason
a6a0: 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 3c  _error_string()<
a6b0: 2f 62 3e 2c 0a 6f 72 20 61 20 63 75 73 74 6f 6d  /b>,.or a custom
a6c0: 20 6d 65 73 73 61 67 65 2e 20 54 68 69 73 20 63   message. This c
a6d0: 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66  allback is new f
a6e0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
a6f0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
a700: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 69 6e  lass="option">in
a710: 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  fo</b> <i class=
a720: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
a730: 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73  major minor mess
a740: 61 67 65 20 74 79 70 65 3c 2f 69 3e 3c 2f 64 74  age type</i></dt
a750: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f  >.<dd><p>This fo
a760: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
a770: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65  s invoked by the
a780: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
a790: 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  n.<b class="func
a7a0: 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 69 6e  tion">SSL_set_in
a7b0: 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 62  fo_callback()</b
a7c0: 3e 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69  > during the ini
a7d0: 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20  tial connection 
a7e0: 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f 70  and handshake.op
a7f0: 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 61 72  erations. The ar
a800: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e  guments are:</p>
a810: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
a820: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73  ools_definitions
a830: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  ">.<dt><i class=
a840: 22 61 72 67 22 3e 6d 61 6a 6f 72 3c 2f 69 3e 3c  "arg">major</i><
a850: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 6a 6f  /dt>.<dd><p>Majo
a860: 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65  r category for e
a870: 72 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75 6d  rror. Valid enum
a880: 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d  s are: <b class=
a890: 22 63 6f 6e 73 74 22 3e 68 61 6e 64 73 68 61 6b  "const">handshak
a8a0: 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  e</b>, <b class=
a8b0: 22 63 6f 6e 73 74 22 3e 61 6c 65 72 74 3c 2f 62  "const">alert</b
a8c0: 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >,.<b class="con
a8d0: 73 74 22 3e 63 6f 6e 6e 65 63 74 3c 2f 62 3e 2c  st">connect</b>,
a8e0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
a8f0: 22 3e 61 63 63 65 70 74 3c 2f 62 3e 2e 3c 2f 70  ">accept</b>.</p
a900: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
a910: 61 73 73 3d 22 61 72 67 22 3e 6d 69 6e 6f 72 3c  ass="arg">minor<
a920: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
a930: 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 66  Minor category f
a940: 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20  or error. Valid 
a950: 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c  enums are: <b cl
a960: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 74 61 72  ass="const">star
a970: 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  t</b>, <b class=
a980: 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 3c 2f 62 3e  "const">done</b>
a990: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
a9a0: 74 22 3e 72 65 61 64 3c 2f 62 3e 2c 0a 3c 62 20  t">read</b>,.<b 
a9b0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 72  class="const">wr
a9c0: 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  ite</b>, <b clas
a9d0: 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f 6f 70 3c 2f  s="const">loop</
a9e0: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>, <b class="co
a9f0: 6e 73 74 22 3e 65 78 69 74 3c 2f 62 3e 2e 3c 2f  nst">exit</b>.</
aa00: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
aa10: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61  lass="arg">messa
aa20: 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ge</i></dt>.<dd>
aa30: 3c 70 3e 44 65 73 63 72 69 70 74 69 76 65 20 6d  <p>Descriptive m
aa40: 65 73 73 61 67 65 20 73 74 72 69 6e 67 20 77 68  essage string wh
aa50: 69 63 68 20 6d 61 79 20 62 65 20 67 65 6e 65 72  ich may be gener
aa60: 61 74 65 64 20 65 69 74 68 65 72 20 62 79 0a 3c  ated either by.<
aa70: 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f  b class="functio
aa80: 6e 22 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72  n">SSL_state_str
aa90: 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 20 6f  ing_long()</b> o
aaa0: 72 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  r <b class="func
aab0: 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c 65 72 74 5f  tion">SSL_alert_
aac0: 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67  desc_string_long
aad0: 28 29 3c 2f 62 3e 2c 0a 64 65 70 65 6e 64 69 6e  ()</b>,.dependin
aae0: 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74  g on the context
aaf0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
ab00: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 74 79  i class="arg">ty
ab10: 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  pe</i></dt>.<dd>
ab20: 3c 70 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20 74  <p>For alerts, t
ab30: 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c 75  he possible valu
ab40: 65 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73  es are: <b class
ab50: 3d 22 63 6f 6e 73 74 22 3e 77 61 72 6e 69 6e 67  ="const">warning
ab60: 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22  </b>,.<b class="
ab70: 63 6f 6e 73 74 22 3e 66 61 74 61 6c 3c 2f 62 3e  const">fatal</b>
ab80: 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  , and <b class="
ab90: 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f 77 6e 3c 2f  const">unknown</
aba0: 62 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 20  b>. For others, 
abb0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
abc0: 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73 20 75 73 65  >info</b> is use
abd0: 64 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74  d..This argument
abe0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
abf0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
ac00: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
ac10: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
ac20: 22 3e 6d 65 73 73 61 67 65 3c 2f 62 3e 20 3c 69  ">message</b> <i
ac30: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
ac40: 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 69 6f 6e  nnelId direction
ac50: 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e 74   version content
ac60: 5f 74 79 70 65 20 6d 65 73 73 61 67 65 3c 2f 69  _type message</i
ac70: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
ac80: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
ac90: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62  ack is invoked b
aca0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75  y the OpenSSL fu
acb0: 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d  nction.<b class=
acc0: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73  "function">SSL_s
acd0: 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28  et_msg_callback(
ace0: 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61  )</b> whenever a
acf0: 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e 74   message is sent
ad00: 20 6f 72 20 72 65 63 65 69 76 65 64 20 64 75 72   or received dur
ad10: 69 6e 67 20 74 68 65 0a 69 6e 69 74 69 61 6c 20  ing the.initial 
ad20: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64  connection, hand
ad30: 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70  shake, or I/O op
ad40: 65 72 61 74 69 6f 6e 73 2e 20 49 74 20 69 73 20  erations. It is 
ad50: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 77  only available w
ad60: 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 69 73 20 63  hen.OpenSSL is c
ad70: 6f 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68 65  omplied with the
ad80: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
ad90: 22 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61  ">enable-ssl-tra
ada0: 63 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54  ce</b> option. T
adb0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 0a  his callback is.
adc0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
add0: 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74  .8. The argument
ade0: 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63  s are:</p>.<dl c
adf0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
ae00: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
ae10: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
ae20: 64 69 72 65 63 74 69 6f 6e 3c 2f 69 3e 3c 2f 64  direction</i></d
ae30: 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 72 65 63 74  t>.<dd><p>Direct
ae40: 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 3c 62  ion is either <b
ae50: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 53   class="const">S
ae60: 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c  ent</b> or <b cl
ae70: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 52 65 63 65  ass="const">Rece
ae80: 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64  ived</b>.</p></d
ae90: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
aea0: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69  "arg">version</i
aeb0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 56 65  ></dt>.<dd><p>Ve
aec0: 72 73 69 6f 6e 20 69 73 20 74 68 65 20 70 72 6f  rsion is the pro
aed0: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2e 3c 2f  tocol version.</
aee0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
aef0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6e 74 65  lass="arg">conte
af00: 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e  nt_type</i></dt>
af10: 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74 65 6e 74 20  .<dd><p>Content 
af20: 74 79 70 65 20 69 73 20 74 68 65 20 6d 65 73 73  type is the mess
af30: 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65  age content type
af40: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
af50: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65  i class="arg">me
af60: 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  ssage</i></dt>.<
af70: 64 64 3e 3c 70 3e 4d 65 73 73 61 67 65 20 69 73  dd><p>Message is
af80: 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 6f 6d 20   more info from 
af90: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  the <b class="co
afa0: 6e 73 74 22 3e 53 53 4c 5f 74 72 61 63 65 3c 2f  nst">SSL_trace</
afb0: 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c 2f 64 64 3e  b> API.</p></dd>
afc0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
afd0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
afe0: 22 3e 73 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69  ">session</b> <i
aff0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b000: 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f 69  nnelId session_i
b010: 64 20 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74  d session_ticket
b020: 20 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64   lifetime</i></d
b030: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66  t>.<dd><p>This f
b040: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
b050: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
b060: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
b070: 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  on.<b class="fun
b080: 63 74 69 6f 6e 22 3e 53 53 4c 5f 43 54 58 5f 73  ction">SSL_CTX_s
b090: 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29  ess_set_new_cb()
b0a0: 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61 20  </b> whenever a 
b0b0: 6e 65 77 20 73 65 73 73 69 6f 6e 20 69 64 20 69  new session id i
b0c0: 73 20 73 65 6e 74 20 62 79 20 74 68 65 0a 73 65  s sent by the.se
b0d0: 72 76 65 72 20 64 75 72 69 6e 67 20 74 68 65 20  rver during the 
b0e0: 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69  initial connecti
b0f0: 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65  on and handshake
b100: 20 61 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e 67   and also during
b110: 20 74 68 65 20 73 65 73 73 69 6f 6e 0a 69 66 20   the session.if 
b120: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
b130: 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e 64  tion">-post_hand
b140: 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  shake</b> option
b150: 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e   is set to true.
b160: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69   This callback i
b170: 73 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53  s new for.TclTLS
b180: 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65   1.8. The argume
b190: 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c  nts are:</p>.<dl
b1a0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
b1b0: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c  _definitions">.<
b1c0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
b1d0: 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e  ">session_id</i>
b1e0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73  </dt>.<dd><p>Ses
b1f0: 73 69 6f 6e 20 49 64 20 69 73 20 74 68 65 20 63  sion Id is the c
b200: 75 72 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69  urrent session i
b210: 64 65 6e 74 69 66 69 65 72 3c 2f 70 3e 3c 2f 64  dentifier</p></d
b220: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
b230: 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 74 69  "arg">session_ti
b240: 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  cket</i></dt>.<d
b250: 64 3e 3c 70 3e 54 69 63 6b 65 74 20 69 73 20 74  d><p>Ticket is t
b260: 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65  he session ticke
b270: 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f 64 64 3e 0a  t info</p></dd>.
b280: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
b290: 67 22 3e 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c  g">lifetime</i><
b2a0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 66 65  /dt>.<dd><p>Life
b2b0: 74 69 6d 65 20 69 73 20 74 68 65 20 74 69 63 6b  time is the tick
b2c0: 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73  et lifetime in s
b2d0: 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  econds.</p></dd>
b2e0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  .</dl></dd>.<dt>
b2f0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b300: 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69 20  ">verify</b> <i 
b310: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
b320: 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72 74  nelId depth cert
b330: 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 69   status error</i
b340: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
b350: 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20  is callback was 
b360: 6d 6f 76 65 64 20 74 6f 20 3c 62 20 63 6c 61 73  moved to <b clas
b370: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
b380: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20  datecommand</b> 
b390: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  in TclTLS 1.8.</
b3a0: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f  p></dd>.</dl>.</
b3b0: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75  div>.<div id="su
b3c0: 62 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 73 73  bsection5" class
b3d0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
b3e0: 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61  ction"><h3><a na
b3f0: 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22  me="subsection5"
b400: 3e 56 61 6c 75 65 73 20 66 6f 72 20 50 61 73 73  >Values for Pass
b410: 77 6f 72 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61  word Callback</a
b420: 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61  ></h3>.<p>The ca
b430: 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c  llback for the <
b440: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
b450: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f  >-password</b> o
b460: 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64  ption is invoked
b470: 20 62 79 20 54 63 6c 54 4c 53 20 77 68 65 6e 65   by TclTLS whene
b480: 76 65 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64  ver OpenSSL need
b490: 73 0a 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61  s.to obtain a pa
b4a0: 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c 6f  ssword. See belo
b4b0: 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62  w for the possib
b4c0: 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73  le arguments pas
b4d0: 73 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62  sed to the.callb
b4e0: 61 63 6b 20 73 63 72 69 70 74 2e 20 54 68 65 20  ack script. The 
b4f0: 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70 61  user provided pa
b500: 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63 74  ssword is expect
b510: 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65  ed to be returne
b520: 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 63  d by the.callbac
b530: 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  k.</p>.<dl class
b540: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f  ="doctools_optio
b550: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
b560: 73 3d 22 6f 70 74 69 6f 6e 22 3e 70 61 73 73 77  s="option">passw
b570: 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ord</b> <i class
b580: 3d 22 61 72 67 22 3e 72 77 66 6c 61 67 20 73 69  ="arg">rwflag si
b590: 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ze</i></dt>.<dd>
b5a0: 3c 70 3e 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20  <p>Invoked when 
b5b0: 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69  loading or stori
b5c0: 6e 67 20 61 6e 20 65 6e 63 72 79 70 74 65 64 20  ng an encrypted 
b5d0: 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65 2e  PEM certificate.
b5e0: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61   The arguments a
b5f0: 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  re:</p>.<dl clas
b600: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69  s="doctools_defi
b610: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69  nitions">.<dt><i
b620: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66   class="arg">rwf
b630: 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  lag</i></dt>.<dd
b640: 3e 3c 70 3e 54 68 65 20 72 65 61 64 2f 77 72 69  ><p>The read/wri
b650: 74 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f 72  te flag is 0 for
b660: 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74   reading/decrypt
b670: 69 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 69  ion or 1 for wri
b680: 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 2e  ting/encryption.
b690: 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e 20  .The latter can 
b6a0: 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 65 72  be used to deter
b6b0: 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 6f  mine when to pro
b6c0: 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 6f 20  mpt the user to 
b6d0: 63 6f 6e 66 69 72 6d 2e 0a 54 68 69 73 20 61 72  confirm..This ar
b6e0: 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f  gument is new fo
b6f0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
b700: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
b710: 61 73 73 3d 22 61 72 67 22 3e 73 69 7a 65 3c 2f  ass="arg">size</
b720: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
b730: 68 65 20 73 69 7a 65 20 69 73 20 74 68 65 20 6d  he size is the m
b740: 61 78 69 6d 75 6d 20 6c 65 6e 67 74 68 20 6f 66  aximum length of
b750: 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 69 6e   the password in
b760: 20 62 79 74 65 73 2e 0a 54 68 69 73 20 61 72 67   bytes..This arg
b770: 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72  ument is new for
b780: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
b790: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
b7a0: 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  .</dl>.</div>.<d
b7b0: 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f  iv id="subsectio
b7c0: 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n6" class="docto
b7d0: 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e  ols_subsection">
b7e0: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62  <h3><a name="sub
b7f0: 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65 73  section6">Values
b800: 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43 6f   for Validate Co
b810: 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  mmand Callback</
b820: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63  a></h3>.<p>The c
b830: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20  allback for the 
b840: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b850: 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61  ">-validatecomma
b860: 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73  nd</b> option is
b870: 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20   invoked during 
b880: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 72  the handshake.pr
b890: 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20 66  ocess in order f
b8a0: 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 74 69  or the applicati
b8b0: 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74  on to validate t
b8c0: 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75  he provided valu
b8d0: 65 28 73 29 2e 20 53 65 65 0a 62 65 6c 6f 77 20  e(s). See.below 
b8e0: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65  for the possible
b8f0: 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65   arguments passe
b900: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63  d to the callbac
b910: 6b 20 73 63 72 69 70 74 2e 20 49 66 20 6e 6f 74  k script. If not
b920: 0a 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65 6e  .specified, Open
b930: 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 70 74 20  SSL will accept 
b940: 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 74 69 66  all valid certif
b950: 69 63 61 74 65 73 20 61 6e 64 20 65 78 74 65 6e  icates and exten
b960: 73 69 6f 6e 73 2e 20 54 6f 20 72 65 6a 65 63 74  sions. To reject
b970: 0a 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20 61  .the value and a
b980: 62 6f 72 74 20 74 68 65 20 63 6f 6e 6e 65 63 74  bort the connect
b990: 69 6f 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61 63  ion, the callbac
b9a0: 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20  k should return 
b9b0: 30 2e 20 54 6f 20 61 63 63 65 70 74 20 74 68 65  0. To accept the
b9c0: 0a 76 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69  .value and conti
b9d0: 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  nue the connecti
b9e0: 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65  on, it should re
b9f0: 74 75 72 6e 20 31 2e 20 54 6f 20 72 65 6a 65 63  turn 1. To rejec
ba00: 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74  t the value, but
ba10: 0a 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f  .continue the co
ba20: 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f  nnection, it sho
ba30: 75 6c 64 20 72 65 74 75 72 6e 20 32 2e 20 54 68  uld return 2. Th
ba40: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e  is callback is n
ba50: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
ba60: 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  8.</p>.<dl class
ba70: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f  ="doctools_optio
ba80: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
ba90: 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 6c 70 6e 3c  s="option">alpn<
baa0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
bab0: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f  g">channelId pro
bac0: 74 6f 63 6f 6c 20 6d 61 74 63 68 3c 2f 69 3e 3c  tocol match</i><
bad0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20  /dt>.<dd><p>For 
bae0: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
baf0: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
bb00: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74  s invoked when t
bb10: 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 20 65  he client ALPN e
bb20: 78 74 65 6e 73 69 6f 6e 20 69 73 0a 72 65 63 65  xtension is.rece
bb30: 69 76 65 64 2e 20 49 66 20 3c 69 20 63 6c 61 73  ived. If <i clas
bb40: 73 3d 22 61 72 67 22 3e 6d 61 74 63 68 3c 2f 69  s="arg">match</i
bb50: 3e 20 69 73 20 74 72 75 65 2c 20 74 68 65 6e 20  > is true, then 
bb60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70  <i class="arg">p
bb70: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20 69 73 20 74  rotocol</i> is t
bb80: 68 65 20 66 69 72 73 74 0a 3c 62 20 63 6c 61 73  he first.<b clas
bb90: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e  s="option">-alpn
bba0: 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f 6c 20 6f 70  </b> protocol op
bbb0: 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74  tion in common t
bbc0: 6f 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e  o both the clien
bbd0: 74 20 61 6e 64 20 73 65 72 76 65 72 2e 0a 49 66  t and server..If
bbe0: 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20   not, the first 
bbf0: 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64  client specified
bc00: 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65   protocol is use
bc10: 64 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b  d. This callback
bc20: 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 72   is called.after
bc30: 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 53   the Hello and S
bc40: 4e 49 20 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70  NI callbacks.</p
bc50: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
bc60: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 68 65 6c  ass="option">hel
bc70: 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  lo</b> <i class=
bc80: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
bc90: 73 65 72 76 65 72 6e 61 6d 65 20 73 65 73 73 69  servername sessi
bca0: 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  on_id</i></dt>.<
bcb0: 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72  dd><p>For server
bcc0: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20  s, this form of 
bcd0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
bce0: 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65 6e  ked during clien
bcf0: 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 65 0a  t hello message.
bd00: 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 65 20  processing. The 
bd10: 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 74 68  purpose is so th
bd20: 65 20 73 65 72 76 65 72 20 63 61 6e 20 73 65 6c  e server can sel
bd30: 65 63 74 20 74 68 65 20 61 70 70 72 6f 70 72 69  ect the appropri
bd40: 61 74 65 20 63 65 72 74 69 66 69 63 61 74 65 0a  ate certificate.
bd50: 74 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 74 68  to present to th
bd60: 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74 6f  e client, and to
bd70: 20 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f 6e 66   make other conf
bd80: 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 73 74  iguration adjust
bd90: 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 0a 74  ments relevant.t
bda0: 6f 20 74 68 61 74 20 73 65 72 76 65 72 20 6e 61  o that server na
bdb0: 6d 65 20 61 6e 64 20 69 74 73 20 63 6f 6e 66 69  me and its confi
bdc0: 67 75 72 61 74 69 6f 6e 2e 20 49 74 20 69 73 20  guration. It is 
bdd0: 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74 68  called before th
bde0: 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 0a 63  e SNI and ALPN.c
bdf0: 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f 64  allbacks.</p></d
be00: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
be10: 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 3c 2f 62 3e  "option">sni</b>
be20: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
be30: 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72  channelId server
be40: 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  name</i></dt>.<d
be50: 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72 73  d><p>For servers
be60: 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  , this form of c
be70: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
be80: 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 72 76  ed when the Serv
be90: 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69  er Name Indicati
bea0: 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 69  on.(SNI) extensi
beb0: 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 2e 20  on is received. 
bec0: 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  The <i class="ar
bed0: 67 22 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69  g">servername</i
bee0: 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68  > argument is th
bef0: 65 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64 65  e client.provide
bf00: 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 73 70  d server name sp
bf10: 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 3c  ecified in the <
bf20: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
bf30: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e  >-servername</b>
bf40: 20 6f 70 74 69 6f 6e 2e 20 54 68 65 0a 70 75 72   option. The.pur
bf50: 70 6f 73 65 20 69 73 20 73 6f 20 77 68 65 6e 20  pose is so when 
bf60: 61 20 73 65 72 76 65 72 20 73 75 70 70 6f 72 74  a server support
bf70: 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73  s multiple names
bf80: 2c 20 74 68 65 20 72 69 67 68 74 20 63 65 72 74  , the right cert
bf90: 69 66 69 63 61 74 65 0a 63 61 6e 20 62 65 20 75  ificate.can be u
bfa0: 73 65 64 2e 20 49 74 20 69 73 20 63 61 6c 6c 65  sed. It is calle
bfb0: 64 20 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c  d after the Hell
bfc0: 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62  o callback but b
bfd0: 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63  efore the ALPN.c
bfe0: 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e 3c 2f 64 64  allback.</p></dd
bff0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
c000: 6f 70 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f  option">verify</
c010: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
c020: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74  ">channelId dept
c030: 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72  h cert status er
c040: 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ror</i></dt>.<dd
c050: 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66  ><p>This form of
c060: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
c070: 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20  oked by OpenSSL 
c080: 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69  when a new certi
c090: 66 69 63 61 74 65 20 69 73 20 72 65 63 65 69 76  ficate is receiv
c0a0: 65 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72  ed.from the peer
c0b0: 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 20  . It allows the 
c0c0: 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b 20  client to check 
c0d0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
c0e0: 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 65 73  verification.res
c0f0: 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20  ults and choose 
c100: 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69  whether to conti
c110: 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69  nue or not. It i
c120: 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63  s called for eac
c130: 68 0a 63 65 72 74 69 66 69 63 61 74 65 20 69 6e  h.certificate in
c140: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
c150: 20 63 68 61 69 6e 2e 20 54 68 69 73 20 63 61 6c   chain. This cal
c160: 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 20  lback was moved 
c170: 66 72 6f 6d 0a 3c 62 20 63 6c 61 73 73 3d 22 6f  from.<b class="o
c180: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
c190: 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e  /b> in TclTLS 1.
c1a0: 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73  8. The arguments
c1b0: 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c   are:</p>.<dl cl
c1c0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
c1d0: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
c1e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
c1f0: 65 70 74 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  epth</i></dt>.<d
c200: 64 3e 3c 70 3e 54 68 65 20 64 65 70 74 68 20 69  d><p>The depth i
c210: 73 20 74 68 65 20 69 6e 74 65 67 65 72 20 64 65  s the integer de
c220: 70 74 68 20 6f 66 20 74 68 65 20 63 65 72 74 69  pth of the certi
c230: 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 65  ficate in the ce
c240: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c  rtificate chain,
c250: 0a 77 68 65 72 65 20 30 20 69 73 20 74 68 65 20  .where 0 is the 
c260: 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65  peer certificate
c270: 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75   and higher valu
c280: 65 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74  es going up to t
c290: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 41  he Certificate.A
c2a0: 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f  uthority (CA).</
c2b0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
c2c0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74 3c  lass="arg">cert<
c2d0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
c2e0: 54 68 65 20 63 65 72 74 20 61 72 67 75 6d 65 6e  The cert argumen
c2f0: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b  t is a list of k
c300: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73  ey-value pairs s
c310: 69 6d 69 6c 61 72 20 74 6f 20 74 68 6f 73 65 20  imilar to those 
c320: 72 65 74 75 72 6e 65 64 20 62 79 0a 3c 62 20 63  returned by.<b c
c330: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
c340: 73 74 61 74 75 73 3c 2f 62 3e 2e 3c 2f 70 3e 3c  status</b>.</p><
c350: 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73  /dd>.<dt><i clas
c360: 73 3d 22 61 72 67 22 3e 73 74 61 74 75 73 3c 2f  s="arg">status</
c370: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
c380: 68 65 20 73 74 61 74 75 73 20 61 72 67 75 6d 65  he status argume
c390: 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 61  nt is the boolea
c3a0: 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68  n validity of th
c3b0: 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 69 66  e current certif
c3c0: 69 63 61 74 65 20 77 68 65 72 65 20 30 0a 69 73  icate where 0.is
c3d0: 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 69   invalid and 1 i
c3e0: 73 20 76 61 6c 69 64 2e 3c 2f 70 3e 3c 2f 64 64  s valid.</p></dd
c3f0: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
c400: 61 72 67 22 3e 65 72 72 6f 72 3c 2f 69 3e 3c 2f  arg">error</i></
c410: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65  dt>.<dd><p>The e
c420: 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69 73  rror argument is
c430: 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61   the error messa
c440: 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65  ge, if any, gene
c450: 72 61 74 65 64 20 62 79 0a 3c 62 20 63 6c 61 73  rated by.<b clas
c460: 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 58 35 30  s="function">X50
c470: 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f  9_STORE_CTX_get_
c480: 65 72 72 6f 72 28 29 3c 2f 62 3e 2e 3c 2f 70 3e  error()</b>.</p>
c490: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
c4a0: 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65 66 65 72 65  .</dl>.<p>Refere
c4b0: 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69  nce implementati
c4c0: 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c  ons of these cal
c4d0: 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69  lbacks are provi
c4e0: 64 65 64 20 69 6e 20 26 71 75 6f 74 3b 3c 62 20  ded in &quot;<b 
c4f0: 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c 73  class="file">tls
c500: 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 0a 61  .tcl</b>&quot;.a
c510: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  s <b class="cmd"
c520: 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f  >tls::callback</
c530: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  b>, <b class="cm
c540: 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64  d">tls::password
c550: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
c560: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61  ss="cmd">tls::va
c570: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
c580: 62 3e 0a 72 65 73 70 65 63 74 69 76 65 6c 79 2e  b>.respectively.
c590: 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73 65   Note that these
c5a0: 20 61 72 65 20 6f 6e 6c 79 20 3c 65 6d 3e 73 61   are only <em>sa
c5b0: 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d  mple</em> implem
c5c0: 65 6e 74 61 74 69 6f 6e 73 2e 20 49 6e 20 61 20  entations. In a 
c5d0: 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20 64  more.realistic d
c5e0: 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 6f  eployment you wo
c5f0: 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 72  uld specify your
c600: 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63   own callback sc
c610: 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c  ripts on each TL
c620: 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20  S.channel using 
c630: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
c640: 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  tion">-command</
c650: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
c660: 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c  tion">-password<
c670: 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73  /b>, and.<b clas
c680: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
c690: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
c6a0: 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70   options.</p>.<p
c6b0: 3e 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68  >The default beh
c6c0: 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c  avior when the <
c6d0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
c6e0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 61 6e  >-command</b> an
c6f0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  d <b class="opti
c700: 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f  on">-validate_co
c710: 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e  mmand</b>.option
c720: 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66  s are not specif
c730: 69 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54  ied, is for TclT
c740: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
c750: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
c760: 72 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69  rary.callbacks i
c770: 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64  nternally. The d
c780: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20  efault behavior 
c790: 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73  when the <b clas
c7a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73  s="option">-pass
c7b0: 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 0a  word</b> option.
c7c0: 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64  is not specified
c7d0: 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74   is for TclTLS t
c7e0: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73  o process the as
c7f0: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79  sociated library
c800: 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61 74   callbacks by.at
c810: 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c  tempting to call
c820: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
c830: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62  tls::password</b
c840: 3e 2e 20 54 68 65 20 64 69 66 66 65 72 65 6e 63  >. The differenc
c850: 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20  e between these 
c860: 74 77 6f 0a 62 65 68 61 76 69 6f 72 73 20 69 73  two.behaviors is
c870: 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f   a consequence o
c880: 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f  f maintaining co
c890: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68  mpatibility with
c8a0: 20 65 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d 65   earlier.impleme
c8b0: 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70  ntations.</p>.<p
c8c0: 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20  ><em>The use of 
c8d0: 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63 61  the reference ca
c8e0: 6c 6c 62 61 63 6b 73 20 3c 62 20 63 6c 61 73 73  llbacks <b class
c8f0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c  ="cmd">tls::call
c900: 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  back</b>, <b cla
c910: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61  ss="cmd">tls::pa
c920: 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a 61 6e 64 20  ssword</b>,.and 
c930: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
c940: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d  ls::validate_com
c950: 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 6e 6f 74 20  mand</b> is not 
c960: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 54 68 65  recommended. The
c970: 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64  y may be removed
c980: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c   from future rel
c990: 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a  eases.</em></p>.
c9a0: 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  </div>.</div>.<d
c9b0: 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 36 22  iv id="section6"
c9c0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
c9d0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61  _section"><h2><a
c9e0: 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 36 22   name="section6"
c9f0: 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f 68 32 3e 0a  >Debug</a></h2>.
ca00: 3c 70 3e 46 6f 72 20 6d 6f 73 74 20 64 65 62 75  <p>For most debu
ca10: 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 74 68 65  gging needs, the
ca20: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
ca30: 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e  n">-callback</b>
ca40: 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 65 20 75   option can be u
ca50: 73 65 64 20 74 6f 20 70 72 6f 76 69 64 65 0a 73  sed to provide.s
ca60: 75 66 66 69 63 69 65 6e 74 20 69 6e 73 69 67 68  ufficient insigh
ca70: 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 74 69 6f  t and informatio
ca80: 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 68 61 6e  n on the TLS han
ca90: 64 73 68 61 6b 65 20 61 6e 64 20 70 72 6f 67 72  dshake and progr
caa0: 65 73 73 2e 20 49 66 0a 66 75 72 74 68 65 72 20  ess. If.further 
cab0: 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67 20  troubleshooting 
cac0: 69 6e 73 69 67 68 74 20 69 73 20 6e 65 65 64 65  insight is neede
cad0: 64 2c 20 74 68 65 20 63 6f 6d 70 69 6c 65 20 74  d, the compile t
cae0: 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c 62 20 63 6c  ime option.<b cl
caf0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 2d 65  ass="option">--e
cb00: 6e 61 62 6c 65 2d 64 65 62 75 67 3c 2f 62 3e 20  nable-debug</b> 
cb10: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 67  can be used to g
cb20: 65 74 20 64 65 74 61 69 6c 65 64 20 65 78 65 63  et detailed exec
cb30: 75 74 69 6f 6e 20 66 6c 6f 77 20 73 74 61 74 75  ution flow statu
cb40: 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c 53 20 6b 65  s.</p>.<p>TLS ke
cb50: 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 65  y logging can be
cb60: 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74 74   enabled by sett
cb70: 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d  ing the environm
cb80: 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 20  ent variable.<b 
cb90: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
cba0: 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f  >SSLKEYLOGFILE</
cbb0: 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f  b> to the name o
cbc0: 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f  f the file to lo
cbd0: 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65  g to. Then whene
cbe0: 76 65 72 20 54 4c 53 20 6b 65 79 0a 6d 61 74 65  ver TLS key.mate
cbf0: 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65  rial is generate
cc00: 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74  d or received it
cc10: 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20   will be logged 
cc20: 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69  to the file. Thi
cc30: 73 20 69 73 20 75 73 65 66 75 6c 0a 66 6f 72 20  s is useful.for 
cc40: 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61  logging key data
cc50: 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67   for network log
cc60: 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73  ging tools to us
cc70: 65 20 74 6f 20 64 65 63 72 79 70 74 20 74 68 65  e to decrypt the
cc80: 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c 70 3e 54 68   data.</p>.<p>Th
cc90: 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  e <b class="vari
cca0: 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67  able">tls::debug
ccb0: 3c 2f 62 3e 20 76 61 72 69 61 62 6c 65 20 70 72  </b> variable pr
ccc0: 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69  ovides some addi
ccd0: 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20 6f  tional control o
cce0: 76 65 72 20 74 68 65 0a 64 65 62 75 67 20 6c 6f  ver the.debug lo
ccf0: 67 67 69 6e 67 20 69 6e 20 74 68 65 20 3c 62 20  gging in the <b 
cd00: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
cd10: 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c  :callback</b>, <
cd20: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
cd30: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c  s::password</b>,
cd40: 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63   and.<b class="c
cd50: 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74  md">tls::validat
cd60: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 64 65  e_command</b> de
cd70: 66 61 75 6c 74 20 68 61 6e 64 6c 65 72 73 20 69  fault handlers i
cd80: 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  n &quot;<b class
cd90: 3d 22 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c  ="file">tls.tcl<
cda0: 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 68 65 20 64  /b>&quot;..The d
cdb0: 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 73 20  efault value is 
cdc0: 30 20 77 69 74 68 20 68 69 67 68 65 72 20 76 61  0 with higher va
cdd0: 6c 75 65 73 20 70 72 6f 64 75 63 69 6e 67 20 6d  lues producing m
cde0: 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f  ore diagnostic o
cdf0: 75 74 70 75 74 2c 0a 61 6e 64 20 77 69 6c 6c 20  utput,.and will 
ce00: 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 20 76  also force the v
ce10: 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20  erify method in 
ce20: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
ce30: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e  ls::callback</b>
ce40: 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a 63   to accept the.c
ce50: 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 65 6e  ertificate, even
ce60: 20 69 66 20 69 74 20 69 73 20 69 6e 76 61 6c 69   if it is invali
ce70: 64 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c  d when the <b cl
ce80: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
ce90: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
cea0: 3e 0a 6f 70 74 69 6f 6e 20 69 73 20 73 65 74 20  >.option is set 
ceb0: 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  to <b class="cmd
cec0: 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f  ">tls::validate_
ced0: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e 3c 2f 70 3e  command</b>.</p>
cee0: 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20  .<p><em>The use 
cef0: 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 20  of the variable 
cf00: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
cf10: 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f  le">tls::debug</
cf20: 62 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d  b> is not recomm
cf30: 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 62 65  ended..It may be
cf40: 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75   removed from fu
cf50: 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 3c 2f  ture releases.</
cf60: 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  em></p>.</div>.<
cf70: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 37  div id="section7
cf80: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
cf90: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
cfa0: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 37  a name="section7
cfb0: 22 3e 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f  ">Examples</a></
cfc0: 68 32 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f  h2>.<p>The follo
cfd0: 77 69 6e 67 20 61 72 65 20 65 78 61 6d 70 6c 65  wing are example
cfe0: 20 73 63 72 69 70 74 73 20 74 6f 20 64 6f 77 6e   scripts to down
cff0: 6c 6f 61 64 20 61 20 77 65 62 70 61 67 65 20 61  load a webpage a
d000: 6e 64 20 66 69 6c 65 20 75 73 69 6e 67 20 74 68  nd file using th
d010: 65 0a 68 74 74 70 20 70 61 63 6b 61 67 65 2e 20  e.http package. 
d020: 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  See <span class=
d030: 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65  "sectref"><a hre
d040: 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65  f="#section4">Ce
d050: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61  rtificate Valida
d060: 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20  tion</a></span> 
d070: 66 6f 72 20 77 68 65 6e 20 74 68 65 0a 3c 62 20  for when the.<b 
d080: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
d090: 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c  cadir</b>, <b cl
d0a0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
d0b0: 66 69 6c 65 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62  file</b>, and <b
d0c0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
d0d0: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74  -castore</b> opt
d0e0: 69 6f 6e 73 20 61 72 65 20 61 6c 73 6f 0a 6e 65  ions are also.ne
d0f0: 65 64 65 64 2e 20 53 65 65 20 74 68 65 20 26 71  eded. See the &q
d100: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
d110: 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71 75  le">demos</b>&qu
d120: 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20 66 6f  ot; directory fo
d130: 72 20 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 73  r more example s
d140: 63 72 69 70 74 73 2e 3c 2f 70 3e 0a 3c 70 3e 45  cripts.</p>.<p>E
d150: 78 61 6d 70 6c 65 20 23 31 3a 20 44 6f 77 6e 6c  xample #1: Downl
d160: 6f 61 64 20 61 20 77 65 62 20 70 61 67 65 3c 2f  oad a web page</
d170: 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22 64  p>.<pre class="d
d180: 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22  octools_example"
d190: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  >.package requir
d1a0: 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72  e http.package r
d1b0: 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75  equire tls.set u
d1c0: 72 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f  rl &quot;https:/
d1d0: 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 26 71 75 6f  /www.tcl.tk/&quo
d1e0: 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65  t;.http::registe
d1f0: 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73  r https 443 [lis
d200: 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20  t ::tls::socket 
d210: 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20  -autoservername 
d220: 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 23 20  1 -require 1].# 
d230: 47 65 74 20 55 52 4c 0a 73 65 74 20 74 6f 6b 65  Get URL.set toke
d240: 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20  n [http::geturl 
d250: 24 75 72 6c 5d 0a 23 20 43 68 65 63 6b 20 66 6f  $url].# Check fo
d260: 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 74  r error.if {[htt
d270: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e  p::status $token
d280: 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75  ] ne &quot;ok&qu
d290: 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20  ot;} {.    puts 
d2a0: 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72  [format &quot;Er
d2b0: 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74  ror %s&quot; [ht
d2c0: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65  tp::status $toke
d2d0: 6e 5d 5d 0a 7d 0a 23 20 53 61 76 65 20 77 65 62  n]].}.# Save web
d2e0: 20 70 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65   page to file.se
d2f0: 74 20 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70  t ch [open examp
d300: 6c 65 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 74 73  le.html wb].puts
d310: 20 24 63 68 20 5b 68 74 74 70 3a 3a 64 61 74 61   $ch [http::data
d320: 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 20 24   $token].close $
d330: 63 68 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a 68  ch.# Cleanup.::h
d340: 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f  ttp::cleanup $to
d350: 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 70 3e 45 78  ken.</pre>.<p>Ex
d360: 61 6d 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f  ample #2: Downlo
d370: 61 64 20 61 20 66 69 6c 65 3c 2f 70 3e 0a 3c 70  ad a file</p>.<p
d380: 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  re class="doctoo
d390: 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63  ls_example">.pac
d3a0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74  kage require htt
d3b0: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  p.package requir
d3c0: 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 71  e tls.set url &q
d3d0: 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 69 6b 69  uot;https://wiki
d3e0: 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 73 69  .tcl-lang.org/si
d3f0: 74 65 6d 61 70 2e 78 6d 6c 26 71 75 6f 74 3b 0a  temap.xml&quot;.
d400: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68  http::register h
d410: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a  ttps 443 [list :
d420: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75  :tls::socket -au
d430: 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d  toservername 1 -
d440: 72 65 71 75 69 72 65 20 31 5d 0a 23 20 4f 70 65  require 1].# Ope
d450: 6e 20 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65  n output file.se
d460: 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65  t filename [file
d470: 20 74 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20   tail $url].set 
d480: 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61  ch [open $filena
d490: 6d 65 20 77 62 5d 0a 23 20 47 65 74 20 66 69 6c  me wb].# Get fil
d4a0: 65 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68  e.set token [::h
d4b0: 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c  ttp::geturl $url
d4c0: 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33   -blocksize 6553
d4d0: 36 20 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a  6 -channel $ch].
d4e0: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f  # Check for erro
d4f0: 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61  r.if {[http::sta
d500: 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26  tus $token] ne &
d510: 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b  quot;ok&quot;} {
d520: 0a 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61  .    puts [forma
d530: 74 20 26 71 75 6f 74 3b 45 72 72 6f 72 20 25 73  t &quot;Error %s
d540: 26 71 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74  &quot; [http::st
d550: 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a  atus $token]].}.
d560: 23 20 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20  # Cleanup.close 
d570: 24 63 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61  $ch.::http::clea
d580: 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65  nup $token.</pre
d590: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
d5a0: 3d 22 73 65 63 74 69 6f 6e 38 22 20 63 6c 61 73  ="section8" clas
d5b0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
d5c0: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
d5d0: 3d 22 73 65 63 74 69 6f 6e 38 22 3e 53 70 65 63  ="section8">Spec
d5e0: 69 61 6c 20 43 6f 6e 73 69 64 65 72 61 74 69 6f  ial Consideratio
d5f0: 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54  ns</a></h2>.<p>T
d600: 68 65 20 63 61 70 61 62 69 6c 69 74 69 65 73 20  he capabilities 
d610: 6f 66 20 74 68 69 73 20 70 61 63 6b 61 67 65 20  of this package 
d620: 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75  can vary enormou
d630: 73 6c 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68  sly based upon h
d640: 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f  ow the.linked to
d650: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79   OpenSSL library
d660: 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20   was configured 
d670: 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65 77 20 76  and built. New v
d680: 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f  ersions may obso
d690: 6c 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f  lete.older proto
d6a0: 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64  col versions, ad
d6b0: 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68  d or remove ciph
d6c0: 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61  ers, change defa
d6d0: 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 2e  ult values, etc.
d6e0: 0a 55 73 65 20 74 68 65 20 3c 62 20 63 6c 61 73  .Use the <b clas
d6f0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f  s="cmd">tls::pro
d700: 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61  tocols</b> comma
d710: 6e 64 20 74 6f 20 6f 62 74 61 69 6e 20 74 68 65  nd to obtain the
d720: 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f   supported.proto
d730: 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70  col versions.</p
d740: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
d750: 3d 22 73 65 65 2d 61 6c 73 6f 22 20 63 6c 61 73  ="see-also" clas
d760: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
d770: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
d780: 3d 22 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20  ="see-also">See 
d790: 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  Also</a></h2>.<p
d7a0: 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a  ><a href="https:
d7b0: 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72  //www.openssl.or
d7c0: 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c  g/">OpenSSL</a>,
d7d0: 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 3c 2f 70   http, socket</p
d7e0: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
d7f0: 3d 22 6b 65 79 77 6f 72 64 73 22 20 63 6c 61 73  ="keywords" clas
d800: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
d810: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
d820: 3d 22 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77  ="keywords">Keyw
d830: 6f 72 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  ords</a></h2>.<p
d840: 3e 49 2f 4f 2c 20 49 50 20 41 64 64 72 65 73 73  >I/O, IP Address
d850: 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20  , OpenSSL, SSL, 
d860: 54 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53  TCP, TLS, TclTLS
d870: 2c 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49  , asynchronous I
d880: 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74 69 66  /O, bind, certif
d890: 69 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20  icate, channel, 
d8a0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61  connection, doma
d8b0: 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68  in name, host, h
d8c0: 74 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e  ttps, network, n
d8d0: 65 74 77 6f 72 6b 20 61 64 64 72 65 73 73 2c 20  etwork address, 
d8e0: 73 6f 63 6b 65 74 2c 20 74 6c 73 3c 2f 70 3e 0a  socket, tls</p>.
d8f0: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
d900: 63 61 74 65 67 6f 72 79 22 20 63 6c 61 73 73 3d  category" class=
d910: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
d920: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
d930: 63 61 74 65 67 6f 72 79 22 3e 43 61 74 65 67 6f  category">Catego
d940: 72 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 74  ry</a></h2>.<p>t
d950: 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  ls</p>.</div>.<d
d960: 69 76 20 69 64 3d 22 63 6f 70 79 72 69 67 68 74  iv id="copyright
d970: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
d980: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
d990: 61 20 6e 61 6d 65 3d 22 63 6f 70 79 72 69 67 68  a name="copyrigh
d9a0: 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e  t">Copyright</a>
d9b0: 3c 2f 68 32 3e 0a 3c 70 3e 43 6f 70 79 72 69 67  </h2>.<p>Copyrig
d9c0: 68 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d  ht &copy; 1999 M
d9d0: 61 74 74 20 4e 65 77 6d 61 6e 3c 62 72 3e 0a 43  att Newman<br>.C
d9e0: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20  opyright &copy; 
d9f0: 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79  2004 Starfish Sy
da00: 73 74 65 6d 73 3c 62 72 3e 0a 43 6f 70 79 72 69  stems<br>.Copyri
da10: 67 68 74 20 26 63 6f 70 79 3b 20 32 30 32 34 20  ght &copy; 2024 
da20: 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 3c 2f 70  Brian O'Hagan</p
da30: 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 3c  >.</div>.</div><
da40: 2f 62 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a        /body></html>.