Hex Artifact Content

Artifact 951be1872d328a77b5e4f645e0f38762f92db33d6d9d40af63975816b3a22fc7:


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 63 74 69 6f 6e 39   href="#section9
0f10: 22 3e 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73  ">Error Messages
0f20: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0f30: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
0f40: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0f50: 23 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41  #see-also">See A
0f60: 6c 73 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  lso</a></li>.<li
0f70: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0f80: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0f90: 66 3d 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65  f="#keywords">Ke
0fa0: 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a  ywords</a></li>.
0fb0: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0fc0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0fd0: 68 72 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22  href="#category"
0fe0: 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c  >Category</a></l
0ff0: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
1000: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
1010: 3c 61 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69  <a href="#copyri
1020: 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f  ght">Copyright</
1030: 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f  a></li>.</ul>.</
1040: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79  div>.<div id="sy
1050: 6e 6f 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64  nopsis" class="d
1060: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
1070: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79  ><h2><a name="sy
1080: 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73  nopsis">Synopsis
1090: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63  </a></h2>.<div c
10a0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
10b0: 79 6e 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c  ynopsis">.<ul cl
10c0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65  ass="doctools_re
10d0: 71 75 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69  quirements">.<li
10e0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  >package require
10f0: 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61   <b class="pkgna
1100: 6d 65 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e  me">Tcl 8.5-</b>
1110: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67  </li>.<li>packag
1120: 65 20 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61  e require <b cla
1130: 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73  ss="pkgname">tls
1140: 20 32 2e 30 62 31 3c 2f 62 3e 3c 2f 6c 69 3e 0a   2.0b1</b></li>.
1150: 3c 2f 75 6c 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d  </ul>.<ul class=
1160: 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78  "doctools_syntax
1170: 22 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  ">.<li><a href="
1180: 23 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #1"><b class="cm
1190: 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e  d">tls::init</b>
11a0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
11b0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
11c0: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
11d0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
11e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
11f0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
1200: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1210: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1220: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1230: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
1240: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f  i>?</span></a></
1250: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  li>.<li><a href=
1260: 22 23 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  "#2"><b class="c
1270: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
1280: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /b> <span class=
1290: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
12a0: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69  "arg">-option</i
12b0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
12c0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
12d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
12e0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  e</i>?</span> <s
12f0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1300: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1310: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e  -option value ..
1320: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  .</i>?</span> <i
1330: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73   class="arg">hos
1340: 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</i> <i class="
1350: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
1360: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1370: 65 66 3d 22 23 33 22 3e 3c 62 20 63 6c 61 73 73  ef="#3"><b class
1380: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
1390: 65 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d  et</b> <b class=
13a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72  "option">-server
13b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
13c0: 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20  rg">command</i> 
13d0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
13e0: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
13f0: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
1400: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1410: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1420: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
1430: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
1440: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1450: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1460: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
1470: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1480: 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69  ss="arg">port</i
1490: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
14a0: 61 20 68 72 65 66 3d 22 23 34 22 3e 3c 62 20 63  a href="#4"><b c
14b0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
14c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
14d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
14e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73  l</i> <span clas
14f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1500: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1510: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1520: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1530: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1540: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1550: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1560: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1570: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1580: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
1590: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
15a0: 68 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c 61  href="#5"><b cla
15b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e  ss="cmd">tls::un
15c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
15d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
15e0: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  l</i></a></li>.<
15f0: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 36 22 3e  li><a href="#6">
1600: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1610: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62  ls::handshake</b
1620: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1630: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
1640: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
1650: 66 3d 22 23 37 22 3e 3c 62 20 63 6c 61 73 73 3d  f="#7"><b class=
1660: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75  "cmd">tls::statu
1670: 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  s</b> <span clas
1680: 73 3d 22 6f 70 74 22 3e 3f 3c 62 20 63 6c 61 73  s="opt">?<b clas
1690: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61  s="option">-loca
16a0: 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69  l</b>?</span> <i
16b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
16c0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69  nnel</i></a></li
16d0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
16e0: 38 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  8"><b class="cmd
16f0: 22 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f  ">tls::connectio
1700: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
1710: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  arg">channel</i>
1720: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61  </a></li>.<li><a
1730: 20 68 72 65 66 3d 22 23 39 22 3e 3c 62 20 63 6c   href="#9"><b cl
1740: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63  ass="cmd">tls::c
1750: 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e  iphers</b> <span
1760: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1770: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f   class="arg">pro
1780: 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  tocol</i>?</span
1790: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
17a0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
17b0: 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f  rg">verbose</i>?
17c0: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
17d0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
17e0: 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72  ass="arg">suppor
17f0: 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ted</i>?</span><
1800: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20  /a></li>.<li><a 
1810: 68 72 65 66 3d 22 23 31 30 22 3e 3c 62 20 63 6c  href="#10"><b cl
1820: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70  ass="cmd">tls::p
1830: 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e  rotocols</b></a>
1840: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
1850: 66 3d 22 23 31 31 22 3e 3c 62 20 63 6c 61 73 73  f="#11"><b class
1860: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73  ="cmd">tls::vers
1870: 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e  ion</b></a></li>
1880: 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f  .</ul>.</div>.</
1890: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65  div>.<div id="se
18a0: 63 74 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64  ction1" class="d
18b0: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
18c0: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65  ><h2><a name="se
18d0: 63 74 69 6f 6e 31 22 3e 44 65 73 63 72 69 70 74  ction1">Descript
18e0: 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e  ion</a></h2>.<p>
18f0: 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70  This extension p
1900: 72 6f 76 69 64 65 73 20 54 43 4c 20 73 63 72 69  rovides TCL scri
1910: 70 74 20 61 63 63 65 73 73 20 74 6f 20 53 65 63  pt access to Sec
1920: 75 72 65 20 53 6f 63 6b 65 74 20 4c 61 79 65 72  ure Socket Layer
1930: 20 28 53 53 4c 29 0a 63 6f 6d 6d 75 6e 69 63 61   (SSL).communica
1940: 74 69 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20  tions using the 
1950: 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20  Transport Layer 
1960: 53 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70  Security (TLS) p
1970: 72 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76  rotocol. It prov
1980: 69 64 65 73 20 61 0a 67 65 6e 65 72 69 63 20 62  ides a.generic b
1990: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65  inding to <a hre
19a0: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f  f="https://www.o
19b0: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65  penssl.org/">Ope
19c0: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a  nSSL</a>, utiliz
19d0: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  ing the.<b class
19e0: 3d 22 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74  ="syscmd">Tcl_St
19f0: 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41  ackChannel</b> A
1a00: 50 49 20 69 6e 20 54 43 4c 20 38 2e 34 20 6f 72  PI in TCL 8.4 or
1a10: 20 6c 61 74 65 72 2e 20 54 68 65 73 65 20 73 6f   later. These so
1a20: 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 78 61  ckets behave exa
1a30: 63 74 6c 79 0a 74 68 65 20 73 61 6d 65 20 61 73  ctly.the same as
1a40: 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65   channels create
1a50: 64 20 75 73 69 6e 67 20 74 68 65 20 62 75 69 6c  d using the buil
1a60: 74 2d 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 73  t-in <b class="s
1a70: 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62  yscmd">socket</b
1a80: 3e 20 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 0a 70  > command, but.p
1a90: 72 6f 76 69 64 65 20 61 64 64 69 74 69 6f 6e 61  rovide additiona
1aa0: 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f  l options for co
1ab0: 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53  ntrolling the SS
1ac0: 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c 2f  L/TLS session.</
1ad0: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  p>.</div>.<div i
1ae0: 64 3d 22 73 65 63 74 69 6f 6e 32 22 20 63 6c 61  d="section2" cla
1af0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
1b00: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
1b10: 65 3d 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f 6d  e="section2">Com
1b20: 70 61 74 69 62 69 6c 69 74 79 3c 2f 61 3e 3c 2f  patibility</a></
1b30: 68 32 3e 0a 3c 70 3e 54 68 69 73 20 65 78 74 65  h2>.<p>This exte
1b40: 6e 73 69 6f 6e 20 69 73 20 63 6f 6d 70 61 74 69  nsion is compati
1b50: 62 6c 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ble with OpenSSL
1b60: 20 31 2e 31 2e 31 20 6f 72 20 6c 61 74 65 72 2e   1.1.1 or later.
1b70: 20 49 74 20 72 65 71 75 69 72 65 73 20 54 63 6c   It requires Tcl
1b80: 0a 76 65 72 73 69 6f 6e 20 38 2e 35 20 6f 72 20  .version 8.5 or 
1b90: 6c 61 74 65 72 20 61 6e 64 20 77 69 6c 6c 20 77  later and will w
1ba0: 6f 72 6b 20 77 69 74 68 20 54 63 6c 20 39 2e 30  ork with Tcl 9.0
1bb0: 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  .</p>.</div>.<di
1bc0: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 33 22 20  v id="section3" 
1bd0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
1be0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
1bf0: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 33 22 3e  name="section3">
1c00: 43 6f 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32  Commands</a></h2
1c10: 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69  >.<p>The followi
1c20: 6e 67 20 61 72 65 20 74 68 65 20 63 6f 6d 6d 61  ng are the comma
1c30: 6e 64 73 20 70 72 6f 76 69 64 65 64 20 62 79 20  nds provided by 
1c40: 74 68 65 20 54 63 4c 54 4c 53 20 70 61 63 6b 61  the TcLTLS packa
1c50: 67 65 2e 20 53 65 65 0a 3c 73 70 61 6e 20 63 6c  ge. See.<span cl
1c60: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61  ass="sectref"><a
1c70: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 37   href="#section7
1c80: 22 3e 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f  ">Examples</a></
1c90: 73 70 61 6e 3e 20 66 6f 72 20 65 78 61 6d 70 6c  span> for exampl
1ca0: 65 20 75 73 61 67 65 20 61 6e 64 20 74 68 65 20  e usage and the 
1cb0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
1cc0: 66 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26  file">demos</b>&
1cd0: 71 75 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 20  quot; directory 
1ce0: 66 6f 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c 65  for.more example
1cf0: 20 75 73 61 67 65 2e 3c 2f 70 3e 0a 3c 64 6c 20   usage.</p>.<dl 
1d00: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
1d10: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
1d20: 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 22 3e 3c 62  t><a name="1"><b
1d30: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
1d40: 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 6e  ::init</b> <span
1d50: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1d60: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1d70: 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  tion</i>?</span>
1d80: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
1d90: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
1da0: 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73  g">value</i>?</s
1db0: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
1dc0: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
1dd0: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76  ="arg">-option v
1de0: 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73  alue ...</i>?</s
1df0: 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64  pan></a></dt>.<d
1e00: 64 3e 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20 66 75  d><p>Optional fu
1e10: 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68  nction to set th
1e20: 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e  e default option
1e30: 73 20 75 73 65 64 20 62 79 20 3c 62 20 63 6c 61  s used by <b cla
1e40: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f  ss="cmd">tls::so
1e50: 63 6b 65 74 3c 2f 62 3e 2e 20 49 66 20 79 6f 75  cket</b>. If you
1e60: 0a 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22  .call <b class="
1e70: 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  cmd">tls::import
1e80: 3c 2f 62 3e 20 64 69 72 65 63 74 6c 79 2c 20 74  </b> directly, t
1e90: 68 65 20 76 61 6c 75 65 73 20 73 65 74 20 62 79  he values set by
1ea0: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61   this command ha
1eb0: 76 65 20 6e 6f 20 65 66 66 65 63 74 2e 0a 54 68  ve no effect..Th
1ec0: 69 73 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f  is command suppo
1ed0: 72 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73  rts all of the s
1ee0: 61 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74  ame options as t
1ef0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  he <b class="cmd
1f00: 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62  ">tls::socket</b
1f10: 3e 20 63 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 67  > command,.thoug
1f20: 68 20 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d  h you should lim
1f30: 69 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20  it your options 
1f40: 74 6f 20 6f 6e 6c 79 20 74 68 65 20 54 4c 53 20  to only the TLS 
1f50: 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70  related ones.</p
1f60: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61  ></dd>.<dt><a na
1f70: 6d 65 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d  me="2"><b class=
1f80: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
1f90: 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  t</b> <span clas
1fa0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1fb0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1fc0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1fd0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1fe0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1ff0: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
2000: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
2010: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
2020: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
2030: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  ...</i>?</span> 
2040: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68  <i class="arg">h
2050: 6f 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73  ost</i> <i class
2060: 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c  ="arg">port</i><
2070: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
2080: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72  This is a helper
2090: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75   function that u
20a0: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65  tilizes the unde
20b0: 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20  rlying commands 
20c0: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
20d0: 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e 64  ">socket</b>.and
20e0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
20f0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20  tls::import</b> 
2100: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 6f  to create the co
2110: 6e 6e 65 63 74 69 6f 6e 2e 20 49 74 20 62 65 68  nnection. It beh
2120: 61 76 65 73 20 74 68 65 20 73 61 6d 65 20 61 73  aves the same as
2130: 20 74 68 65 0a 6e 61 74 69 76 65 20 54 43 4c 20   the.native TCL 
2140: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
2150: 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d  ">socket</b> com
2160: 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 73  mand, but also s
2170: 75 70 70 6f 72 74 73 20 74 68 65 20 3c 62 20 63  upports the <b c
2180: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
2190: 69 6d 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d 61  import</b>.comma
21a0: 6e 64 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 20  nd options with 
21b0: 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f  one additional o
21c0: 70 74 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 6e  ption. It return
21d0: 73 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61  s the channel ha
21e0: 6e 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20  ndle id.for the 
21f0: 6e 65 77 20 73 6f 63 6b 65 74 2e 20 41 64 64 69  new socket. Addi
2200: 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 61  tional options a
2210: 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  re:</p>.<dl clas
2220: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69  s="doctools_opti
2230: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
2240: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 75 74  ss="option">-aut
2250: 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20  oservername</b> 
2260: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
2270: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
2280: 3e 3c 70 3e 49 66 20 3c 62 20 63 6c 61 73 73 3d  ><p>If <b class=
2290: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e  "const">true</b>
22a0: 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20  , automatically 
22b0: 73 65 74 20 74 68 65 20 3c 62 20 63 6c 61 73 73  set the <b class
22c0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65  ="option">-serve
22d0: 72 6e 61 6d 65 3c 2f 62 3e 20 61 72 67 75 6d 65  rname</b> argume
22e0: 6e 74 20 74 6f 20 74 68 65 0a 3c 65 6d 3e 68 6f  nt to the.<em>ho
22f0: 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74  st</em> argument
2300: 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c 54 4c  . Prior to TclTL
2310: 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 75  S 2.0, the defau
2320: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  lt is <b class="
2330: 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e  const">false</b>
2340: 2e 0a 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63  ..Starting in Tc
2350: 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65  lTLS 2.0, the de
2360: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73  fault is <b clas
2370: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f  s="const">true</
2380: 62 3e 20 75 6e 6c 65 73 73 20 3c 62 20 63 6c 61  b> unless <b cla
2390: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72  ss="option">-ser
23a0: 76 65 72 6e 61 6d 65 3c 2f 62 3e 0a 69 73 20 61  vername</b>.is a
23b0: 6c 73 6f 20 73 70 65 63 69 66 69 65 64 2e 3c 2f  lso specified.</
23c0: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64  p></dd>.</dl></d
23d0: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  d>.<dt><a name="
23e0: 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  3"><b class="cmd
23f0: 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62  ">tls::socket</b
2400: 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  > <b class="opti
2410: 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20  on">-server</b> 
2420: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
2430: 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e  ommand</i> <span
2440: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
2450: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
2460: 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  tion</i>?</span>
2470: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
2480: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
2490: 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73  g">value</i>?</s
24a0: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  pan> <span class
24b0: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
24c0: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76  ="arg">-option v
24d0: 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73  alue ...</i>?</s
24e0: 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  pan> <i class="a
24f0: 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e  rg">port</i></a>
2500: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 61 6d  </dt>.<dd><p>Sam
2510: 65 20 61 73 20 70 72 65 76 69 6f 75 73 20 63 6f  e as previous co
2520: 6d 6d 61 6e 64 2c 20 62 75 74 20 69 6e 73 74 65  mmand, but inste
2530: 61 64 20 63 72 65 61 74 65 73 20 61 20 73 65 72  ad creates a ser
2540: 76 65 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 63  ver socket for c
2550: 6c 69 65 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 63  lients to.connec
2560: 74 20 74 6f 20 6a 75 73 74 20 6c 69 6b 65 20 74  t to just like t
2570: 68 65 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 3d  he Tcl <b class=
2580: 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 20  "syscmd">socket 
2590: 2d 73 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d 6d  -server</b> comm
25a0: 61 6e 64 2e 20 49 74 20 72 65 74 75 72 6e 73 20  and. It returns 
25b0: 74 68 65 0a 63 68 61 6e 6e 65 6c 20 68 61 6e 64  the.channel hand
25c0: 6c 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e 65  le id for the ne
25d0: 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f 64  w socket.</p></d
25e0: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  d>.<dt><a name="
25f0: 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  4"><b class="cmd
2600: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
2610: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2620: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 70  >channel</i> <sp
2630: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
2640: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
2650: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
2660: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
2670: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2680: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
2690: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
26a0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
26b0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
26c0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
26d0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  /span></a></dt>.
26e0: 3c 64 64 3e 3c 70 3e 53 74 61 72 74 20 54 4c 53  <dd><p>Start TLS
26f0: 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f 6e 20 54   encryption on T
2700: 43 4c 20 63 68 61 6e 6e 65 6c 20 3c 69 20 63 6c  CL channel <i cl
2710: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
2720: 6c 3c 2f 69 3e 20 76 69 61 20 61 20 73 74 61 63  l</i> via a stac
2730: 6b 65 64 20 63 68 61 6e 6e 65 6c 2e 20 49 74 0a  ked channel. It.
2740: 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 20 73 6f  need not be a so
2750: 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 70  cket, but must p
2760: 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 74  rovide bi-direct
2770: 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f  ional flow. Also
2780: 20 73 65 74 73 20 73 65 73 73 69 6f 6e 0a 70 61   sets session.pa
2790: 72 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c  rameters for SSL
27a0: 20 68 61 6e 64 73 68 61 6b 65 2e 20 56 61 6c 69   handshake. Vali
27b0: 64 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 3c 2f  d options are:</
27c0: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
27d0: 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e  ctools_options">
27e0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
27f0: 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62 3e  ption">-alpn</b>
2800: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
2810: 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  list</i></dt>.<d
2820: 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 70 72 6f  d><p>List of pro
2830: 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20  tocols to offer 
2840: 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69  during Applicati
2850: 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f  on-Layer Protoco
2860: 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 41  l Negotiation.(A
2870: 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d 70 6c  LPN). For exampl
2880: 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  e: <b class="con
2890: 73 74 22 3e 68 32 3c 2f 62 3e 20 61 6e 64 20 3c  st">h2</b> and <
28a0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
28b0: 68 74 74 70 2f 31 2e 31 3c 2f 62 3e 2c 20 62 75  http/1.1</b>, bu
28c0: 74 20 6e 6f 74 20 3c 62 20 63 6c 61 73 73 3d 22  t not <b class="
28d0: 63 6f 6e 73 74 22 3e 68 33 3c 2f 62 3e 20 6f 72  const">h3</b> or
28e0: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
28f0: 22 3e 71 75 69 63 3c 2f 62 3e 2e 20 54 68 69 73  ">quic</b>. This
2900: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66   option is new f
2910: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
2920: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
2930: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
2940: 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  adir</b> <i clas
2950: 73 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72  s="arg">director
2960: 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  y</i></dt>.<dd><
2970: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
2980: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20  directory where 
2990: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
29a0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63  Authority (CA) c
29b0: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a  ertificates are.
29c0: 73 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 61  stored. The defa
29d0: 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20  ult is platform 
29e0: 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 6e  specific and can
29f0: 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 69   be set at compi
2a00: 6c 65 20 74 69 6d 65 2e 20 54 68 65 0a 64 65 66  le time. The.def
2a10: 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61  ault location ca
2a20: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20  n be overridden 
2a30: 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  by the <b class=
2a40: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
2a50: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69  ERT_DIR</b> envi
2a60: 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65  ronment.variable
2a70: 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73  . See <span clas
2a80: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
2a90: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e  ref="#section4">
2aa0: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69  Certificate Vali
2ab0: 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e  dation</a></span
2ac0: 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69  > for more detai
2ad0: 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ls.</p></dd>.<dt
2ae0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
2af0: 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 3c  n">-cafile</b> <
2b00: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69  i class="arg">fi
2b10: 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  lename</i></dt>.
2b20: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
2b30: 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 74   the file with t
2b40: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
2b50: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65  uthority (CA) ce
2b60: 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 75 73  rtificates to us
2b70: 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 63  e in.<b class="c
2b80: 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e 20 66 69  onst">PEM</b> fi
2b90: 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68 65 20 64  le format. The d
2ba0: 65 66 61 75 6c 74 20 69 73 20 26 71 75 6f 74 3b  efault is &quot;
2bb0: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e  <b class="file">
2bc0: 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f  cert.pem</b>&quo
2bd0: 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53  t;, in the OpenS
2be0: 53 4c 0a 64 69 72 65 63 74 6f 72 79 2e 20 54 68  SL.directory. Th
2bf0: 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20 63  e default file c
2c00: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e  an be overridden
2c10: 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73   by the <b class
2c20: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f  ="variable">SSL_
2c30: 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e  CERT_FILE</b> en
2c40: 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62  vironment.variab
2c50: 6c 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c  le. See <span cl
2c60: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61  ass="sectref"><a
2c70: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34   href="#section4
2c80: 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61  ">Certificate Va
2c90: 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70  lidation</a></sp
2ca0: 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74  an> for more det
2cb0: 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ails.</p></dd>.<
2cc0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
2cd0: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
2ce0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2cf0: 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  >URI</i></dt>.<d
2d00: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
2d10: 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75  he Uniform Resou
2d20: 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28  rce Identifier (
2d30: 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72  URI) for the Cer
2d40: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
2d50: 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77  ty.(CA) store, w
2d60: 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69  hich may be a si
2d70: 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f  ngle container o
2d80: 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63  r a catalog of c
2d90: 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 74  ontainers..Start
2da0: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ing with OpenSSL
2db0: 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f   3.2 on MS Windo
2dc0: 77 73 2c 20 73 65 74 20 74 6f 20 26 71 75 6f 74  ws, set to &quot
2dd0: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
2de0: 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69  ">org.openssl.wi
2df0: 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75  nstore://</b>&qu
2e00: 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68 65 20 62  ot;.to use the b
2e10: 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f  uilt-in MS Windo
2e20: 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53  ws Certificate S
2e30: 74 6f 72 65 2e 0a 53 65 65 20 3c 73 70 61 6e 20  tore..See <span 
2e40: 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e  class="sectref">
2e50: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
2e60: 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65 20  n4">Certificate 
2e70: 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f  Validation</a></
2e80: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64  span> for more d
2e90: 65 74 61 69 6c 73 2e 0a 54 68 69 73 20 6f 70 74  etails..This opt
2ea0: 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54  ion is new for T
2eb0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
2ec0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
2ed0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66  ="option">-certf
2ee0: 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ile</b> <i class
2ef0: 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c  ="arg">filename<
2f00: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
2f10: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6e 61  Specifies the na
2f20: 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 77  me of the file w
2f30: 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69 63  ith the certific
2f40: 61 74 65 20 74 6f 20 75 73 65 20 69 6e 20 50 45  ate to use in PE
2f50: 4d 20 66 6f 72 6d 61 74 0a 61 73 20 74 68 65 20  M format.as the 
2f60: 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74 20 6f 72  local (client or
2f70: 20 73 65 72 76 65 72 29 20 63 65 72 74 69 66 69   server) certifi
2f80: 63 61 74 65 2e 20 49 74 20 61 6c 73 6f 20 63 6f  cate. It also co
2f90: 6e 74 61 69 6e 73 20 74 68 65 20 70 75 62 6c 69  ntains the publi
2fa0: 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  c key.</p></dd>.
2fb0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
2fc0: 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e 20  tion">-cert</b> 
2fd0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
2fe0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
2ff0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
3000: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
3010: 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20  to use as a DER 
3020: 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28  encoded string (
3030: 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 70 3e 3c  X.509 DER).</p><
3040: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
3050: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68  s="option">-ciph
3060: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  er</b> <i class=
3070: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
3080: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
3090: 63 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 20  cifies the list 
30a0: 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 73  of ciphers to us
30b0: 65 20 66 6f 72 20 54 4c 53 20 31 2e 32 20 61 6e  e for TLS 1.2 an
30c0: 64 20 65 61 72 6c 69 65 72 20 63 6f 6e 6e 65 63  d earlier connec
30d0: 74 69 6f 6e 73 2e 0a 53 74 72 69 6e 67 20 69 73  tions..String is
30e0: 20 61 20 63 6f 6c 6f 6e 20 26 71 75 6f 74 3b 3c   a colon &quot;<
30f0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
3100: 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 73 65 70 61  :</b>&quot; sepa
3110: 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69  rated list of ci
3120: 70 68 65 72 73 2e 0a 43 69 70 68 65 72 73 20 63  phers..Ciphers c
3130: 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 75  an be combined u
3140: 73 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 3c  sing the &quot;<
3150: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
3160: 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 63 68 61 72  +</b>&quot; char
3170: 61 63 74 65 72 2e 0a 50 72 65 66 69 78 65 73 20  acter..Prefixes 
3180: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70  can be used to p
3190: 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d 6f 76  ermanently remov
31a0: 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  e &quot;<b class
31b0: 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f 62 3e 26 71  ="const">!</b>&q
31c0: 75 6f 74 3b 2c 20 64 65 6c 65 74 65 20 26 71 75  uot;, delete &qu
31d0: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  ot;<b class="con
31e0: 73 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f 74 3b 2c  st">-</b>&quot;,
31f0: 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68 65 20   or.move to the 
3200: 65 6e 64 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61  end &quot;<b cla
3210: 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c 2f 62 3e  ss="const">+</b>
3220: 26 71 75 6f 74 3b 20 61 20 73 70 65 63 69 66 69  &quot; a specifi
3230: 65 64 20 63 69 70 68 65 72 2e 0a 4b 65 79 77 6f  ed cipher..Keywo
3240: 72 64 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  rds <b class="co
3250: 6e 73 74 22 3e 40 53 54 52 45 4e 47 54 48 3c 2f  nst">@STRENGTH</
3260: 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67 6f  b> (sort by algo
3270: 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 74 68  rithm key length
3280: 29 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  ),.<b class="con
3290: 73 74 22 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f  st">@SECLEVEL=</
32a0: 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20 28 73 65  b><em>n</em> (se
32b0: 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  t security level
32c0: 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 3c 62 20 63   to n), and.<b c
32d0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 44 45 46  lass="const">DEF
32e0: 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65  AULT</b> (use de
32f0: 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73  fault cipher lis
3300: 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79  t, at start only
3310: 29 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 70  ) can also be sp
3320: 65 63 69 66 69 65 64 2e 0a 53 65 65 20 74 68 65  ecified..See the
3330: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a   <a href="https:
3340: 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e 6f  //docs.openssl.o
3350: 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f  rg/master/man1/o
3360: 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23  penssl-ciphers/#
3370: 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53 4c  options">OpenSSL
3380: 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74 69  </a>.documentati
3390: 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 20  on for the full 
33a0: 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 61  list of valid va
33b0: 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  lues.</p></dd>.<
33c0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
33d0: 69 6f 6e 22 3e 2d 63 69 70 68 65 72 73 75 69 74  ion">-ciphersuit
33e0: 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  es</b> <i class=
33f0: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
3400: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
3410: 63 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 20  cifies the list 
3420: 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 73  of cipher suites
3430: 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20   to use for TLS 
3440: 31 2e 33 20 61 73 20 61 20 63 6f 6c 6f 6e 0a 26  1.3 as a colon.&
3450: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63  quot;<b class="c
3460: 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74  onst">:</b>&quot
3470: 3b 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74  ; separated list
3480: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65   of cipher suite
3490: 20 6e 61 6d 65 73 2e 20 53 65 65 20 74 68 65 0a   names. See the.
34a0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
34b0: 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e 6f 72  /docs.openssl.or
34c0: 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f 70  g/master/man1/op
34d0: 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 6f  enssl-ciphers/#o
34e0: 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53 4c 3c  ptions">OpenSSL<
34f0: 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f  /a>.documentatio
3500: 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 20 6c  n for the full l
3510: 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c  ist of valid val
3520: 75 65 73 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e  ues..This option
3530: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
3540: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
3550: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
3560: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
3570: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
3580: 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c  g">callback</i><
3590: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
35a0: 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61  ifies the callba
35b0: 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65  ck command to be
35c0: 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65   invoked at seve
35d0: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e  ral points durin
35e0: 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20  g the.handshake 
35f0: 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20  to pass errors, 
3600: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74  tracing informat
3610: 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f  ion, and protoco
3620: 6c 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65 20  l messages..See 
3630: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
3640: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
3650: 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61  section5">Callba
3660: 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f  ck Options</a></
3670: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69  span> for more i
3680: 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  nfo.</p></dd>.<d
3690: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
36a0: 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f 62  on">-dhparams</b
36b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
36c0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >filename</i></d
36d0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
36e0: 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d 48  ies the Diffie-H
36f0: 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 61  ellman (DH) para
3700: 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70 3e  meters file.</p>
3710: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3720: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79  ss="option">-key
3730: 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  file</b> <i clas
3740: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65  s="arg">filename
3750: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3760: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 70  >Specifies the p
3770: 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 2e  rivate key file.
3780: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
3790: 74 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65 0a  to use the file.
37a0: 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65  specified by the
37b0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
37c0: 6e 22 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e  n">-certfile</b>
37d0: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64   option.</p></dd
37e0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
37f0: 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e  option">-key</b>
3800: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3810: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
3820: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
3830: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
3840: 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52   to use as a DER
3850: 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20   encoded string 
3860: 28 50 4b 43 53 23 31 20 44 45 52 29 2e 3c 2f 70  (PKCS#1 DER).</p
3870: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
3880: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6d 6f  ass="option">-mo
3890: 64 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  del</b> <i class
38a0: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
38b0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46  i></dt>.<dd><p>F
38c0: 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65  orce this channe
38d0: 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73  l to share the s
38e0: 61 6d 65 20 3c 69 20 63 6c 61 73 73 3d 22 74 65  ame <i class="te
38f0: 72 6d 22 3e 53 53 4c 5f 43 54 58 3c 2f 69 3e 20  rm">SSL_CTX</i> 
3900: 73 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65  structure as the
3910: 0a 73 70 65 63 69 66 69 65 64 20 3c 69 20 63 6c  .specified <i cl
3920: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
3930: 6c 3c 2f 69 3e 2c 20 61 6e 64 20 74 68 65 72 65  l</i>, and there
3940: 66 6f 72 65 20 73 68 61 72 65 20 63 6f 6e 66 69  fore share confi
3950: 67 2c 20 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74  g, callbacks, et
3960: 63 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  c.</p></dd>.<dt>
3970: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3980: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20  ">-password</b> 
3990: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
39a0: 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e  allback</i></dt>
39b0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
39c0: 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63  s the callback c
39d0: 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65  ommand to invoke
39e0: 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65   when OpenSSL ne
39f0: 65 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a  eds to obtain a.
3a00: 70 61 73 73 77 6f 72 64 2e 20 54 68 69 73 20 69  password. This i
3a10: 73 20 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64  s typically used
3a20: 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70   to unlock the p
3a30: 72 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20  rivate key of a 
3a40: 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 65  certificate..The
3a50: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64   callback should
3a60: 20 72 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f   return a passwo
3a70: 72 64 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20  rd string. This 
3a80: 6f 70 74 69 6f 6e 20 68 61 73 20 63 68 61 6e 67  option has chang
3a90: 65 64 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 2e  ed for.TclTLS 1.
3aa0: 38 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  8. See <span cla
3ab0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
3ac0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22  href="#section5"
3ad0: 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e  >Callback Option
3ae0: 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  s</a></span> for
3af0: 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c   more info.</p><
3b00: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
3b10: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74  s="option">-post
3b20: 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c  _handshake</b> <
3b30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
3b40: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
3b50: 3c 70 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61  <p>Allow post-ha
3b60: 6e 64 73 68 61 6b 65 20 73 65 73 73 69 6f 6e 20  ndshake session 
3b70: 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e 20  ticket updates. 
3b80: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e  This option is n
3b90: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
3ba0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
3bb0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
3bc0: 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c  ">-request</b> <
3bd0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
3be0: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
3bf0: 3c 70 3e 52 65 71 75 65 73 74 20 61 20 63 65 72  <p>Request a cer
3c00: 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68  tificate from th
3c10: 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68  e peer during th
3c20: 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e  e SSL handshake.
3c30: 20 54 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a   This is needed.
3c40: 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63 61 74  to do Certificat
3c50: 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e 20 53 74  e Validation. St
3c60: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
3c70: 20 31 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c   1.8, the defaul
3c80: 74 20 69 73 0a 3c 62 20 63 6c 61 73 73 3d 22 63  t is.<b class="c
3c90: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66  onst">true</b> f
3ca0: 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63  or client connec
3cb0: 74 69 6f 6e 73 2e 20 53 74 61 72 74 69 6e 67 20  tions. Starting 
3cc0: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 69  in TclTLS 2.0, i
3cd0: 66 20 73 65 74 20 74 6f 0a 3c 62 20 63 6c 61 73  f set to.<b clas
3ce0: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c  s="const">false<
3cf0: 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73  /b> and <b class
3d00: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69  ="option">-requi
3d10: 72 65 3c 2f 62 3e 20 69 73 20 3c 62 20 63 6c 61  re</b> is <b cla
3d20: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c  ss="const">true<
3d30: 2f 62 3e 2c 20 74 68 65 6e 20 74 68 69 73 20 77  /b>, then this w
3d40: 69 6c 6c 20 62 65 0a 6f 76 65 72 72 69 64 64 65  ill be.overridde
3d50: 6e 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63  n to <b class="c
3d60: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20  onst">true</b>. 
3d70: 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  See <span class=
3d80: 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65  "sectref"><a hre
3d90: 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65  f="#section4">Ce
3da0: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61  rtificate Valida
3db0: 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20  tion</a></span> 
3dc0: 66 6f 72 0a 6d 6f 72 65 20 64 65 74 61 69 6c 73  for.more details
3dd0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3de0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3df0: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 3c 69  >-require</b> <i
3e00: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
3e10: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
3e20: 70 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c 69  p>Require a vali
3e30: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72  d certificate fr
3e40: 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 69  om the peer duri
3e50: 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73  ng the SSL hands
3e60: 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73  hake. If this is
3e70: 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68  .set to true, th
3e80: 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  en <b class="opt
3e90: 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62  ion">-request</b
3ea0: 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73  > must also be s
3eb0: 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61  et to true and a
3ec0: 20 65 69 74 68 65 72 0a 3c 62 20 63 6c 61 73 73   either.<b class
3ed0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
3ee0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
3ef0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c  option">-cafile<
3f00: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
3f10: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c  ption">-castore<
3f20: 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f  /b>, or a platfo
3f30: 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20  rm default.must 
3f40: 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f  be provided in o
3f50: 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65  rder to validate
3f60: 20 61 67 61 69 6e 73 74 2e 20 54 68 65 20 64 65   against. The de
3f70: 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20  fault in TclTLS 
3f80: 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20  1.8 and.earlier 
3f90: 76 65 72 73 69 6f 6e 73 20 69 73 20 3c 62 20 63  versions is <b c
3fa0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c  lass="const">fal
3fb0: 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74  se</b> since not
3fc0: 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68   all platforms h
3fd0: 61 76 65 20 63 65 72 74 69 66 69 63 61 74 65 73  ave certificates
3fe0: 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61   to.validate aga
3ff0: 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63  inst in a form c
4000: 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f  ompatible with O
4010: 70 65 6e 53 53 4c 2e 20 53 74 61 72 74 69 6e 67  penSSL. Starting
4020: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 0a   in TclTLS 2.0,.
4030: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
4040: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4050: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69  true</b> for cli
4060: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e  ent connections.
4070: 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73  .See <span class
4080: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
4090: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43  ef="#section4">C
40a0: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
40b0: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e  ation</a></span>
40c0: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c   for more detail
40d0: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
40e0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
40f0: 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65  ">-security_leve
4100: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  l</b> <i class="
4110: 61 72 67 22 3e 69 6e 74 65 67 65 72 3c 2f 69 3e  arg">integer</i>
4120: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
4130: 63 69 66 69 65 73 20 74 68 65 20 73 65 63 75 72  cifies the secur
4140: 69 74 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 65  ity level (value
4150: 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 2e 20 54   from 0 to 5). T
4160: 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65  he security leve
4170: 6c 20 61 66 66 65 63 74 73 0a 74 68 65 20 61 6c  l affects.the al
4180: 6c 6f 77 65 64 20 63 69 70 68 65 72 20 73 75 69  lowed cipher sui
4190: 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c  te encryption al
41a0: 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72  gorithms, suppor
41b0: 74 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a  ted ECC curves,.
41c0: 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74  supported signat
41d0: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20  ure algorithms, 
41e0: 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a  DH parameter siz
41f0: 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20  es, certificate 
4200: 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 20 73 69  key sizes.and si
4210: 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68  gnature algorith
4220: 6d 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ms. The default 
4230: 69 73 20 31 20 70 72 69 6f 72 20 74 6f 20 4f 70  is 1 prior to Op
4240: 65 6e 53 53 4c 20 33 2e 32 20 61 6e 64 20 32 0a  enSSL 3.2 and 2.
4250: 74 68 65 72 65 61 66 74 65 72 2e 20 4c 65 76 65  thereafter. Leve
4260: 6c 20 33 20 61 6e 64 20 68 69 67 68 65 72 20 64  l 3 and higher d
4270: 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 66  isable support f
4280: 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65  or session ticke
4290: 74 73 20 61 6e 64 0a 6f 6e 6c 79 20 61 63 63 65  ts and.only acce
42a0: 70 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73  pt cipher suites
42b0: 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f   that provide fo
42c0: 72 77 61 72 64 20 73 65 63 72 65 63 79 2e 0a 54  rward secrecy..T
42d0: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65  his option is ne
42e0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
42f0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4300: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
4310: 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20  >-server</b> <i 
4320: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
4330: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
4340: 3e 53 70 65 63 69 66 69 65 73 20 77 68 65 74 68  >Specifies wheth
4350: 65 72 20 74 6f 20 61 63 74 20 61 73 20 61 20 73  er to act as a s
4360: 65 72 76 65 72 20 61 6e 64 20 72 65 73 70 6f 6e  erver and respon
4370: 64 20 77 69 74 68 20 61 20 73 65 72 76 65 72 20  d with a server 
4380: 68 61 6e 64 73 68 61 6b 65 20 77 68 65 6e 20 61  handshake when a
4390: 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 73  .client connects
43a0: 20 61 6e 64 20 70 72 6f 76 69 64 65 73 20 61 20   and provides a 
43b0: 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 61 6b 65  client handshake
43c0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
43d0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
43e0: 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c 2f 70 3e  ">false</b>.</p>
43f0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
4400: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72  ss="option">-ser
4410: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63  vername</b> <i c
4420: 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 6e  lass="arg">hostn
4430: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ame</i></dt>.<dd
4440: 3e 3c 70 3e 53 70 65 63 69 66 79 20 74 68 65 20  ><p>Specify the 
4450: 70 65 65 72 27 73 20 68 6f 73 74 6e 61 6d 65 2e  peer's hostname.
4460: 20 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f   This is used to
4470: 20 73 65 74 20 74 68 65 20 54 4c 53 20 53 65 72   set the TLS Ser
4480: 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74  ver Name Indicat
4490: 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73  ion.(SNI) extens
44a0: 69 6f 6e 2e 20 53 65 74 20 74 68 69 73 20 74 6f  ion. Set this to
44b0: 20 74 68 65 20 65 78 70 65 63 74 65 64 20 73 65   the expected se
44c0: 72 76 65 72 6e 61 6d 65 20 69 6e 20 74 68 65 20  rvername in the 
44d0: 73 65 72 76 65 72 27 73 20 63 65 72 74 69 66 69  server's certifi
44e0: 63 61 74 65 0a 6f 72 20 6f 6e 65 20 6f 66 20 74  cate.or one of t
44f0: 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72  he Subject Alter
4500: 6e 61 74 65 20 4e 61 6d 65 73 20 28 53 41 4e 29  nate Names (SAN)
4510: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63  . Starting in Tc
4520: 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 20 77  lTLS 2.0, this w
4530: 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f 20 74  ill.default to t
4540: 68 65 20 68 6f 73 74 20 66 6f 72 20 74 68 65 20  he host for the 
4550: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
4560: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63  ls::socket</b> c
4570: 6f 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c 2f 64 64 3e  ommand.</p></dd>
4580: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4590: 70 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f 6e 5f  ption">-session_
45a0: 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  id</b> <i class=
45b0: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72  "arg">binary_str
45c0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
45d0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
45e0: 65 20 73 65 73 73 69 6f 6e 20 69 64 20 74 6f 20  e session id to 
45f0: 72 65 73 75 6d 65 20 61 20 73 65 73 73 69 6f 6e  resume a session
4600: 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 65 64 20  . Not supported 
4610: 79 65 74 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e  yet..This option
4620: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
4630: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
4640: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4650: 70 74 69 6f 6e 22 3e 2d 73 73 6c 32 3c 2f 62 3e  ption">-ssl2</b>
4660: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
4670: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
4680: 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20  d><p>Enable use 
4690: 6f 66 20 53 53 4c 20 76 32 2e 54 68 65 20 64 65  of SSL v2.The de
46a0: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73  fault is <b clas
46b0: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c  s="const">false<
46c0: 2f 62 3e 2e 0a 4f 70 65 6e 53 53 4c 20 31 2e 31  /b>..OpenSSL 1.1
46d0: 2b 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70  + no longer supp
46e0: 6f 72 74 73 20 53 53 4c 20 76 32 2c 20 73 6f 20  orts SSL v2, so 
46f0: 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76  this may not hav
4700: 65 20 61 6e 79 20 65 66 66 65 63 74 2e 0a 53 65  e any effect..Se
4710: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  e the <b class="
4720: 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63  cmd">tls::protoc
4730: 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20  ols</b> command 
4740: 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72  for supported pr
4750: 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  otocols.</p></dd
4760: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
4770: 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c 2f 62  option">-ssl3</b
4780: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4790: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
47a0: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65  dd><p>Enable use
47b0: 20 6f 66 20 53 53 4c 20 76 33 2e 20 54 68 65 20   of SSL v3. The 
47c0: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c  default is <b cl
47d0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73  ass="const">fals
47e0: 65 3c 2f 62 3e 2e 20 53 74 61 72 74 69 6e 67 20  e</b>. Starting 
47f0: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 0a 75  in TclTLS 1.8,.u
4800: 73 65 20 6f 66 20 53 53 4c 20 76 33 20 69 66 20  se of SSL v3 if 
4810: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 76  only available v
4820: 69 61 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 6d  ia a compile tim
4830: 65 20 6f 70 74 69 6f 6e 2e 0a 53 65 65 20 74 68  e option..See th
4840: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
4850: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
4860: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20  /b> command for 
4870: 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63  supported protoc
4880: 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ols.</p></dd>.<d
4890: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
48a0: 6f 6e 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69  on">-tls1</b> <i
48b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
48c0: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
48d0: 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20  p>Enable use of 
48e0: 54 4c 53 20 76 31 2e 20 53 74 61 72 74 69 6e 67  TLS v1. Starting
48f0: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20   in TclTLS 2.0, 
4900: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
4910: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4920: 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a  false</b>..Note:
4930: 20 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20 53   TLS 1.0 needs S
4940: 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20  HA1 to operate, 
4950: 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76  which is only av
4960: 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72  ailable in secur
4970: 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20  ity level.0 for 
4980: 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53  Open SSL 3.0+. S
4990: 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ee the <b class=
49a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69  "option">-securi
49b0: 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 6f 70 74  ty_level</b> opt
49c0: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ion.</p></dd>.<d
49d0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
49e0: 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e 20  on">-tls1.1</b> 
49f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
4a00: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
4a10: 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  ><p>Enable use o
4a20: 66 20 54 4c 53 20 76 31 2e 31 2e 20 53 74 61 72  f TLS v1.1. Star
4a30: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32  ting in TclTLS 2
4a40: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20  .0, the default 
4a50: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4a60: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e  st">false</b>..N
4a70: 6f 74 65 3a 20 54 4c 53 20 31 2e 31 20 6e 65 65  ote: TLS 1.1 nee
4a80: 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61  ds SHA1 to opera
4a90: 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c  te, which is onl
4aa0: 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73  y available in s
4ab0: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20  ecurity level.0 
4ac0: 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30  for Open SSL 3.0
4ad0: 2b 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c  +. See the <b cl
4ae0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65  ass="option">-se
4af0: 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e  curity_level</b>
4b00: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64   option.</p></dd
4b10: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
4b20: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32 3c  option">-tls1.2<
4b30: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
4b40: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
4b50: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75  .<dd><p>Enable u
4b60: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 2e 20  se of TLS v1.2. 
4b70: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  The default is <
4b80: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
4b90: 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64  true</b>.</p></d
4ba0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
4bb0: 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 33  "option">-tls1.3
4bc0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
4bd0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
4be0: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20  >.<dd><p>Enable 
4bf0: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 2e  use of TLS v1.3.
4c00: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
4c10: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
4c20: 3e 74 72 75 65 3c 2f 62 3e 2e 20 54 68 69 73 20  >true</b>. This 
4c30: 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c  is only availabl
4c40: 65 0a 73 74 61 72 74 69 6e 67 20 77 69 74 68 20  e.starting with 
4c50: 4f 70 65 6e 53 53 4c 20 31 2e 31 2e 31 20 61 6e  OpenSSL 1.1.1 an
4c60: 64 20 54 63 6c 54 4c 53 20 31 2e 37 2e 3c 2f 70  d TclTLS 1.7.</p
4c70: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
4c80: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
4c90: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
4ca0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4cb0: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64  >callback</i></d
4cc0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
4cd0: 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b  ies the callback
4ce0: 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f   command to invo
4cf0: 6b 65 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74  ke to validate t
4d00: 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69 63  he peer certific
4d10: 61 74 65 73 0a 61 6e 64 20 6f 74 68 65 72 20 63  ates.and other c
4d20: 6f 6e 66 69 67 20 69 6e 66 6f 20 64 75 72 69 6e  onfig info durin
4d30: 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e  g the protocol n
4d40: 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 65  egotiation phase
4d50: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 73  . This can be us
4d60: 65 64 0a 62 79 20 54 43 4c 20 73 63 72 69 70 74  ed.by TCL script
4d70: 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65  s to perform the
4d80: 69 72 20 6f 77 6e 20 43 65 72 74 69 66 69 63 61  ir own Certifica
4d90: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 20 74 6f  te Validation to
4da0: 20 73 75 70 70 6c 65 6d 65 6e 74 20 74 68 65 0a   supplement the.
4db0: 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69  default validati
4dc0: 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79 20 4f  on provided by O
4dd0: 70 65 6e 53 53 4c 2e 20 54 68 65 20 73 63 72 69  penSSL. The scri
4de0: 70 74 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61  pt must return a
4df0: 20 62 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74 6f   boolean true.to
4e00: 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e 65   continue the ne
4e10: 67 6f 74 69 61 74 69 6f 6e 2e 20 53 65 65 20 3c  gotiation. See <
4e20: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
4e30: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
4e40: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63  ection5">Callbac
4e50: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73  k Options</a></s
4e60: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e  pan> for more in
4e70: 66 6f 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20  fo..This option 
4e80: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
4e90: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
4ea0: 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  </dl></dd>.<dt><
4eb0: 61 20 6e 61 6d 65 3d 22 35 22 3e 3c 62 20 63 6c  a name="5"><b cl
4ec0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75  ass="cmd">tls::u
4ed0: 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63  nimport</b> <i c
4ee0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
4ef0: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  el</i></a></dt>.
4f00: 3c 64 64 3e 3c 70 3e 43 6f 6d 70 6c 69 6d 65 6e  <dd><p>Complimen
4f10: 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63  t to <b class="c
4f20: 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c  md">tls::import<
4f30: 2f 62 3e 2e 20 55 73 65 64 20 74 6f 20 72 65 6d  /b>. Used to rem
4f40: 6f 76 65 20 74 68 65 20 74 6f 70 20 6c 65 76 65  ove the top leve
4f50: 6c 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65  l stacked channe
4f60: 6c 0a 66 72 6f 6d 20 3c 69 20 63 6c 61 73 73 3d  l.from <i class=
4f70: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
4f80: 3e 2e 20 54 68 69 73 20 75 6e 73 74 61 63 6b 73  >. This unstacks
4f90: 20 74 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20   the encryption 
4fa0: 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c  of a regular TCL
4fb0: 20 63 68 61 6e 6e 65 6c 2e 20 41 6e 0a 65 72 72   channel. An.err
4fc0: 6f 72 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20  or is thrown if 
4fd0: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74  TLS is not the t
4fe0: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  op stacked chann
4ff0: 65 6c 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64  el type.</p></dd
5000: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 36  >.<dt><a name="6
5010: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
5020: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c  >tls::handshake<
5030: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5040: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  g">channel</i></
5050: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46  a></dt>.<dd><p>F
5060: 6f 72 63 65 73 20 74 68 65 20 54 4c 53 20 6e 65  orces the TLS ne
5070: 67 6f 74 69 61 74 69 6f 6e 20 68 61 6e 64 73 68  gotiation handsh
5080: 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c 61 63  ake to take plac
5090: 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 2c 20 61  e immediately, a
50a0: 6e 64 20 72 65 74 75 72 6e 73 20 30 0a 69 66 20  nd returns 0.if 
50b0: 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69  handshake is sti
50c0: 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28  ll in progress (
50d0: 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f  non-blocking), o
50e0: 72 20 31 20 69 66 20 74 68 65 20 68 61 6e 64 73  r 1 if the hands
50f0: 68 61 6b 65 20 77 61 73 0a 73 75 63 63 65 73 73  hake was.success
5100: 66 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64  ful. If the hand
5110: 73 68 61 6b 65 20 66 61 69 6c 65 64 2c 20 61 6e  shake failed, an
5120: 20 65 72 72 6f 72 20 77 69 6c 6c 20 62 65 20 72   error will be r
5130: 65 74 75 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64  eturned.</p></dd
5140: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 37  >.<dt><a name="7
5150: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
5160: 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e  >tls::status</b>
5170: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
5180: 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70  t">?<b class="op
5190: 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e  tion">-local</b>
51a0: 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73  ?</span> <i clas
51b0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
51c0: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  /i></a></dt>.<dd
51d0: 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20  ><p>Returns the 
51e0: 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f  current status o
51f0: 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c  f an SSL channel
5200: 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20  . The result is 
5210: 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61  a list of key-va
5220: 6c 75 65 0a 70 61 69 72 73 20 64 65 73 63 72 69  lue.pairs descri
5230: 62 69 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65  bing the SSL, ce
5240: 72 74 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63  rtificate, and c
5250: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66  ertificate verif
5260: 69 63 61 74 69 6f 6e 20 73 74 61 74 75 73 2e 20  ication status. 
5270: 49 66 0a 74 68 65 20 53 53 4c 20 68 61 6e 64 73  If.the SSL hands
5280: 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74  hake has not yet
5290: 20 63 6f 6d 70 6c 65 74 65 64 2c 20 61 6e 20 65   completed, an e
52a0: 6d 70 74 79 20 6c 69 73 74 20 69 73 20 72 65 74  mpty list is ret
52b0: 75 72 6e 65 64 2e 20 49 66 20 74 68 65 0a 3c 62  urned. If the.<b
52c0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
52d0: 2d 6c 6f 63 61 6c 3c 2f 62 3e 20 6f 70 74 69 6f  -local</b> optio
52e0: 6e 20 69 73 20 73 70 65 63 69 66 69 65 64 2c 20  n is specified, 
52f0: 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63  then the local c
5300: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 75 73  ertificate is us
5310: 65 64 2e 20 52 65 74 75 72 6e 65 64 0a 76 61 6c  ed. Returned.val
5320: 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e  ues include:</p>
5330: 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f  .<p>SSL Status</
5340: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
5350: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
5360: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
5370: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70  s="variable">alp
5380: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
5390: 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69  arg">protocol</i
53a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
53b0: 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63  e protocol selec
53c0: 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63  ted after Applic
53d0: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74  ation-Layer Prot
53e0: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e  ocol Negotiation
53f0: 20 28 41 4c 50 4e 29 2e 0a 54 68 69 73 20 76 61   (ALPN)..This va
5400: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
5410: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
5420: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5430: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68  ="variable">ciph
5440: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  er</b> <i class=
5450: 22 61 72 67 22 3e 63 69 70 68 65 72 3c 2f 69 3e  "arg">cipher</i>
5460: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
5470: 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 20   current cipher 
5480: 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65 20 73  in use for the s
5490: 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ession.</p></dd>
54a0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
54b0: 61 72 69 61 62 6c 65 22 3e 70 65 65 72 6e 61 6d  ariable">peernam
54c0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
54d0: 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  arg">name</i></d
54e0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 65  t>.<dd><p>The pe
54f0: 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20  ername from the 
5500: 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69  certificate..Thi
5510: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
5520: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
5530: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5540: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5550: 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20  protocol</b> <i 
5560: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73  class="arg">vers
5570: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ion</i></dt>.<dd
5580: 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c  ><p>The protocol
5590: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f   version used fo
55a0: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
55b0: 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c  : SSL2, SSL3, TL
55c0: 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31  S1, TLS1.1, TLS1
55d0: 2e 32 2c 0a 54 4c 53 31 2e 33 2c 20 6f 72 20 75  .2,.TLS1.3, or u
55e0: 6e 6b 6e 6f 77 6e 2e 20 54 68 69 73 20 76 61 6c  nknown. This val
55f0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5600: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5610: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5620: 22 76 61 72 69 61 62 6c 65 22 3e 73 62 69 74 73  "variable">sbits
5630: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5640: 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rg">n</i></dt>.<
5650: 64 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72  dd><p>The number
5660: 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f   of bits used fo
5670: 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65  r the session ke
5680: 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  y.</p></dd>.<dt>
5690: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
56a0: 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 48 61 73  le">signatureHas
56b0: 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c  hAlgorithm</b> <
56c0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c  i class="arg">al
56d0: 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e  gorithm</i></dt>
56e0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e  .<dd><p>The sign
56f0: 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72  ature hash algor
5700: 69 74 68 6d 2e 0a 54 68 69 73 20 76 61 6c 75 65  ithm..This value
5710: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
5720: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
5730: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
5740: 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75  ariable">signatu
5750: 72 65 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63 6c  reType</b> <i cl
5760: 61 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f  ass="arg">type</
5770: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
5780: 68 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 70  he signature typ
5790: 65 20 76 61 6c 75 65 2e 0a 54 68 69 73 20 76 61  e value..This va
57a0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
57b0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
57c0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
57d0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69  ="variable">veri
57e0: 66 79 44 65 70 74 68 3c 2f 62 3e 20 3c 69 20 63  fyDepth</b> <i c
57f0: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e  lass="arg">n</i>
5800: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78  </dt>.<dd><p>Max
5810: 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74  imum depth for t
5820: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63  he certificate c
5830: 68 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f  hain verificatio
5840: 6e 2e 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31  n. Default is -1
5850: 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 0a  , to check all..
5860: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65  This value is ne
5870: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
5880: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5890: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
58a0: 65 22 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 62  e">verifyMode</b
58b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
58c0: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >list</i></dt>.<
58d0: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65  dd><p>List of ce
58e0: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69  rtificate verifi
58f0: 63 61 74 69 6f 6e 20 6d 6f 64 65 73 2e 0a 54 68  cation modes..Th
5900: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20  is value is new 
5910: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
5920: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
5930: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5940: 3e 76 65 72 69 66 79 52 65 73 75 6c 74 3c 2f 62  >verifyResult</b
5950: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5960: 3e 72 65 73 75 6c 74 3c 2f 69 3e 3c 2f 64 74 3e  >result</i></dt>
5970: 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63  .<dd><p>Certific
5980: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
5990: 20 72 65 73 75 6c 74 2e 0a 54 68 69 73 20 76 61   result..This va
59a0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54  lue is new for T
59b0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f  clTLS 1.8.</p></
59c0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
59d0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61 5f 6e  ="variable">ca_n
59e0: 61 6d 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ames</b> <i clas
59f0: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e  s="arg">list</i>
5a00: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73  </dt>.<dd><p>Lis
5a10: 74 20 6f 66 20 74 68 65 20 43 65 72 74 69 66 69  t of the Certifi
5a20: 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73  cate Authorities
5a30: 20 75 73 65 64 20 74 6f 20 63 72 65 61 74 65 20   used to create 
5a40: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e  the certificate.
5a50: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
5a60: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
5a70: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  8.</p></dd>.</dl
5a80: 3e 0a 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65  >.<p>Certificate
5a90: 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20   Status</p>.<dl 
5aa0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
5ab0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
5ac0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5ad0: 61 62 6c 65 22 3e 61 6c 6c 3c 2f 62 3e 20 3c 69  able">all</b> <i
5ae0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
5af0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
5b00: 3e 3c 70 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20  ><p>Dump of all 
5b10: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f  certificate info
5b20: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
5b30: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
5b40: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
5b50: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5b60: 62 6c 65 22 3e 76 65 72 73 69 6f 6e 3c 2f 62 3e  ble">version</b>
5b70: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5b80: 76 61 6c 75 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  value</i></dt>.<
5b90: 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 66  dd><p>The certif
5ba0: 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f  icate version.</
5bb0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5bc0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5bd0: 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 62 3e  serialNumber</b>
5be0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5bf0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
5c00: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 72 69 61  <dd><p>The seria
5c10: 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20  l number of the 
5c20: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61  certificate as a
5c30: 20 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69   hex string..Thi
5c40: 73 20 76 61 6c 75 65 20 77 61 73 20 63 68 61 6e  s value was chan
5c50: 67 65 64 20 66 72 6f 6d 20 73 65 72 69 61 6c 20  ged from serial 
5c60: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  in TclTLS 1.8.</
5c70: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5c80: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5c90: 73 69 67 6e 61 74 75 72 65 3c 2f 62 3e 20 3c 69  signature</b> <i
5ca0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67   class="arg">alg
5cb0: 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a  orithm</i></dt>.
5cc0: 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 20 61 6c  <dd><p>Cipher al
5cd0: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72  gorithm used for
5ce0: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67   certificate sig
5cf0: 6e 61 74 75 72 65 2e 0a 54 68 69 73 20 76 61 6c  nature..This val
5d00: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
5d10: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
5d20: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5d30: 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65  "variable">issue
5d40: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
5d50: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
5d60: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
5d70: 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61  distinguished na
5d80: 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63  me (DN) of the c
5d90: 65 72 74 69 66 69 63 61 74 65 20 69 73 73 75 65  ertificate issue
5da0: 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  r.</p></dd>.<dt>
5db0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5dc0: 6c 65 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62  le">notBefore</b
5dd0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5de0: 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >date</i></dt>.<
5df0: 64 64 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e 6e  dd><p>The beginn
5e00: 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65 20  ing date of the 
5e10: 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69  certificate vali
5e20: 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  dity.</p></dd>.<
5e30: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5e40: 69 61 62 6c 65 22 3e 6e 6f 74 41 66 74 65 72 3c  iable">notAfter<
5e50: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5e60: 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e  g">date</i></dt>
5e70: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65 78 70 69  .<dd><p>The expi
5e80: 72 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74  ration date of t
5e90: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76  he certificate v
5ea0: 61 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64  alidity.</p></dd
5eb0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5ec0: 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63  variable">subjec
5ed0: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
5ee0: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
5ef0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
5f00: 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61  distinguished na
5f10: 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63  me (DN) of the c
5f20: 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a 65  ertificate subje
5f30: 63 74 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75  ct. Fields inclu
5f40: 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20  de: Common.Name 
5f50: 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69  (CN), Organizati
5f60: 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79  on (O), Locality
5f70: 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74   or City (L), St
5f80: 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20  ate or Province 
5f90: 28 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79  (S), and.Country
5fa0: 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c 2f   Name (C).</p></
5fb0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5fc0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75  ="variable">issu
5fd0: 65 72 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c  erUniqueID</b> <
5fe0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74  i class="arg">st
5ff0: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
6000: 64 3e 3c 70 3e 54 68 65 20 69 73 73 75 65 72 20  d><p>The issuer 
6010: 75 6e 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20  unique id..This 
6020: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
6030: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
6040: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6050: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75  ss="variable">su
6060: 62 6a 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 62  bjectUniqueID</b
6070: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6080: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  >string</i></dt>
6090: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 75 62 6a  .<dd><p>The subj
60a0: 65 63 74 20 75 6e 69 71 75 65 20 69 64 2e 0a 54  ect unique id..T
60b0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77  his value is new
60c0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
60d0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
60e0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
60f0: 22 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73  ">num_extensions
6100: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6110: 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rg">n</i></dt>.<
6120: 64 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20  dd><p>Number of 
6130: 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65  certificate exte
6140: 6e 73 69 6f 6e 73 2e 0a 54 68 69 73 20 76 61 6c  nsions..This val
6150: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
6160: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
6170: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6180: 22 76 61 72 69 61 62 6c 65 22 3e 65 78 74 65 6e  "variable">exten
6190: 73 69 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61  sions</b> <i cla
61a0: 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69  ss="arg">list</i
61b0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69  ></dt>.<dd><p>Li
61c0: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  st of certificat
61d0: 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65  e extension name
61e0: 73 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73  s..This value is
61f0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
6200: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
6210: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6220: 61 62 6c 65 22 3e 61 75 74 68 6f 72 69 74 79 4b  able">authorityK
6230: 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e  eyIdentifier</b>
6240: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6250: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
6260: 3c 64 64 3e 3c 70 3e 41 75 74 68 6f 72 69 74 79  <dd><p>Authority
6270: 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 20   Key Identifier 
6280: 28 41 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73  (AKI) of the Iss
6290: 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 63  uing CA certific
62a0: 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 20  ate that signed 
62b0: 74 68 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63  the.SSL certific
62c0: 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72  ate as a hex str
62d0: 69 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20  ing. This value 
62e0: 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 20  matches the SKI 
62f0: 76 61 6c 75 65 20 6f 66 20 74 68 65 0a 49 6e 74  value of the.Int
6300: 65 72 6d 65 64 69 61 74 65 20 43 41 20 63 65 72  ermediate CA cer
6310: 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76  tificate..This v
6320: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
6330: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6340: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6350: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62  s="variable">sub
6360: 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65  jectKeyIdentifie
6370: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
6380: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
6390: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 75 62 6a  /dt>.<dd><p>Subj
63a0: 65 63 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69  ect Key Identifi
63b0: 65 72 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66  er (SKI) hash of
63c0: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20   the public key 
63d0: 69 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 69  inside the certi
63e0: 66 69 63 61 74 65 20 61 73 20 61 0a 68 65 78 20  ficate as a.hex 
63f0: 73 74 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20  string. Used to 
6400: 69 64 65 6e 74 69 66 79 20 63 65 72 74 69 66 69  identify certifi
6410: 63 61 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61  cates that conta
6420: 69 6e 20 61 20 70 61 72 74 69 63 75 6c 61 72 20  in a particular 
6430: 70 75 62 6c 69 63 20 6b 65 79 2e 0a 54 68 69 73  public key..This
6440: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f   value is new fo
6450: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
6460: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6470: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6480: 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 62  ubjectAltName</b
6490: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
64a0: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >list</i></dt>.<
64b0: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c  dd><p>List of al
64c0: 6c 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74  l of the Subject
64d0: 20 41 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d   Alternative Nam
64e0: 65 73 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69  es (SAN) includi
64f0: 6e 67 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c  ng domain names,
6500: 20 73 75 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e   sub.domains, an
6510: 64 20 49 50 20 61 64 64 72 65 73 73 65 73 20 74  d IP addresses t
6520: 68 61 74 20 61 72 65 20 73 65 63 75 72 65 64 20  hat are secured 
6530: 62 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61  by the certifica
6540: 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69  te..This value i
6550: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
6560: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
6570: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6580: 69 61 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e 20  iable">ocsp</b> 
6590: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c  <i class="arg">l
65a0: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ist</i></dt>.<dd
65b0: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20  ><p>List of all 
65c0: 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61  Online Certifica
65d0: 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63  te Status Protoc
65e0: 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74  ol (OCSP) URLs t
65f0: 68 61 74 20 63 61 6e 20 62 65 20 75 73 65 64 20  hat can be used 
6600: 74 6f 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c  to.check the val
6610: 69 64 69 74 79 20 6f 66 20 74 68 69 73 20 63 65  idity of this ce
6620: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20  rtificate..This 
6630: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72  value is new for
6640: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e   TclTLS 1.8.</p>
6650: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6660: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 65  ss="variable">ce
6670: 72 74 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c 69  rtificate</b> <i
6680: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72   class="arg">cer
6690: 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  t</i></dt>.<dd><
66a0: 70 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65  p>The PEM encode
66b0: 64 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  d certificate.</
66c0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
66d0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
66e0: 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74  signatureAlgorit
66f0: 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  hm</b> <i class=
6700: 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c  "arg">algorithm<
6710: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6720: 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d  Cipher algorithm
6730: 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 65   used for the ce
6740: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
6750: 75 72 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20  ure..This value 
6760: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
6770: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.8.</p></dd>.
6780: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6790: 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72  riable">signatur
67a0: 65 56 61 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 6c  eValue</b> <i cl
67b0: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
67c0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
67d0: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67  >Certificate sig
67e0: 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 78 20  nature as a hex 
67f0: 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c  string..This val
6800: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
6810: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
6820: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6830: 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61  "variable">signa
6840: 74 75 72 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c  tureDigest</b> <
6850: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
6860: 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rsion</i></dt>.<
6870: 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74  dd><p>Certificat
6880: 65 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74  e signing digest
6890: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67   as a hex string
68a0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20  ..This value is 
68b0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
68c0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
68d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
68e0: 62 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79 41 6c  ble">publicKeyAl
68f0: 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63  gorithm</b> <i c
6900: 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72  lass="arg">algor
6910: 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ithm</i></dt>.<d
6920: 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65  d><p>Certificate
6930: 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69   signature publi
6940: 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e  c key algorithm.
6950: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e  .This value is n
6960: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
6970: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
6980: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6990: 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 62  le">publicKey</b
69a0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
69b0: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  >string</i></dt>
69c0: 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63  .<dd><p>Certific
69d0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75  ate signature pu
69e0: 62 6c 69 63 20 6b 65 79 20 61 73 20 61 20 68 65  blic key as a he
69f0: 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76  x string..This v
6a00: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
6a10: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6a20: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6a30: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 62 69 74  s="variable">bit
6a40: 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  s</b> <i class="
6a50: 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  arg">n</i></dt>.
6a60: 3c 64 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66  <dd><p>Number of
6a70: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63   bits used for c
6a80: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
6a90: 74 75 72 65 20 6b 65 79 2e 0a 54 68 69 73 20 76  ture key..This v
6aa0: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20  alue is new for 
6ab0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
6ac0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6ad0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 6c  s="variable">sel
6ae0: 66 5f 73 69 67 6e 65 64 3c 2f 62 3e 20 3c 69 20  f_signed</b> <i 
6af0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
6b00: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ean</i></dt>.<dd
6b10: 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20  ><p>Whether the 
6b20: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  certificate sign
6b30: 61 74 75 72 65 20 69 73 20 73 65 6c 66 20 73 69  ature is self si
6b40: 67 6e 65 64 2e 0a 54 68 69 73 20 76 61 6c 75 65  gned..This value
6b50: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
6b60: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
6b70: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6b80: 61 72 69 61 62 6c 65 22 3e 73 68 61 31 5f 68 61  ariable">sha1_ha
6b90: 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  sh</b> <i class=
6ba0: 22 61 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f  "arg">hash</i></
6bb0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 53  dt>.<dd><p>The S
6bc0: 48 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20  HA1 hash of the 
6bd0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61  certificate as a
6be0: 20 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69   hex string..Thi
6bf0: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66  s value is new f
6c00: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
6c10: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6c20: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6c30: 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20  sha256_hash</b> 
6c40: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68  <i class="arg">h
6c50: 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ash</i></dt>.<dd
6c60: 3e 3c 70 3e 54 68 65 20 53 48 41 32 35 36 20 68  ><p>The SHA256 h
6c70: 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69  ash of the certi
6c80: 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20  ficate as a hex 
6c90: 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c  string..This val
6ca0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ue is new for Tc
6cb0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
6cc0: 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64  d>.</dl></dd>.<d
6cd0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62  t><a name="8"><b
6ce0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
6cf0: 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e  ::connection</b>
6d00: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6d10: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c  channel</i></a><
6d20: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75  /dt>.<dd><p>Retu
6d30: 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20  rns the current 
6d40: 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75  connection statu
6d50: 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e  s of an SSL chan
6d60: 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20  nel. The result 
6d70: 69 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79  is a list.of key
6d80: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73  -value pairs des
6d90: 63 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e  cribing the conn
6da0: 65 63 74 69 6f 6e 2e 0a 54 68 69 73 20 63 6f 6d  ection..This com
6db0: 6d 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20  mand is new for 
6dc0: 54 63 6c 54 4c 53 20 31 2e 38 2e 20 52 65 74 75  TclTLS 1.8. Retu
6dd0: 72 6e 65 64 20 76 61 6c 75 65 73 20 69 6e 63 6c  rned values incl
6de0: 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20  ude:</p>.<p>SSL 
6df0: 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63  Status</p>.<dl c
6e00: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
6e10: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
6e20: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6e30: 62 6c 65 22 3e 73 74 61 74 65 3c 2f 62 3e 20 3c  ble">state</b> <
6e40: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74  i class="arg">st
6e50: 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ate</i></dt>.<dd
6e60: 3e 3c 70 3e 53 74 61 74 65 20 6f 66 20 74 68 65  ><p>State of the
6e70: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e   connection.</p>
6e80: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6e90: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
6ea0: 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20  rvername</b> <i 
6eb0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65  class="arg">name
6ec0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6ed0: 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65  >The name of the
6ee0: 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65   connected to se
6ef0: 72 76 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  rver.</p></dd>.<
6f00: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6f10: 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c  iable">protocol<
6f20: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6f30: 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f  g">version</i></
6f40: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70  dt>.<dd><p>The p
6f50: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20  rotocol version 
6f60: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e  used for the con
6f70: 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53  nection: SSL2, S
6f80: 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e  SL3, TLS1, TLS1.
6f90: 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e  1, TLS1.2, TLS1.
6fa0: 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f  3, or unknown.</
6fb0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6fc0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6fd0: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c  renegotiation_al
6fe0: 6c 6f 77 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  lowed</b> <i cla
6ff0: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e  ss="arg">boolean
7000: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7010: 3e 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f  >Whether protoco
7020: 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20  l renegotiation 
7030: 69 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20  is supported or 
7040: 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  not.</p></dd>.<d
7050: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7060: 61 62 6c 65 22 3e 73 65 63 75 72 69 74 79 5f 6c  able">security_l
7070: 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  evel</b> <i clas
7080: 73 3d 22 61 72 67 22 3e 6c 65 76 65 6c 3c 2f 69  s="arg">level</i
7090: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
70a0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
70b0: 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74   used for select
70c0: 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20  ion of ciphers, 
70d0: 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f  key size, etc.</
70e0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
70f0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
7100: 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f  session_reused</
7110: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
7120: 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64  ">boolean</i></d
7130: 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65  t>.<dd><p>Whethe
7140: 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68 61  r the session ha
7150: 73 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f 72  s been reused or
7160: 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   not.</p></dd>.<
7170: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7180: 69 61 62 6c 65 22 3e 69 73 5f 73 65 72 76 65 72  iable">is_server
7190: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
71a0: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
71b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74  /dt>.<dd><p>Whet
71c0: 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  her the connecti
71d0: 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64  on is configured
71e0: 20 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29   as a server (1)
71f0: 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c   or client (0).<
7200: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7210: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7220: 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 62 3e  >compression</b>
7230: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
7240: 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  mode</i></dt>.<d
7250: 64 3e 3c 70 3e 43 6f 6d 70 72 65 73 73 69 6f 6e  d><p>Compression
7260: 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64   method.</p></dd
7270: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
7280: 76 61 72 69 61 62 6c 65 22 3e 65 78 70 61 6e 73  variable">expans
7290: 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ion</b> <i class
72a0: 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c  ="arg">mode</i><
72b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 78 70 61  /dt>.<dd><p>Expa
72c0: 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70  nsion method.</p
72d0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
72e0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63  ass="variable">c
72f0: 61 4c 69 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  aList</b> <i cla
7300: 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69  ss="arg">list</i
7310: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69  ></dt>.<dd><p>Li
7320: 73 74 20 6f 66 20 43 65 72 74 69 66 69 63 61 74  st of Certificat
7330: 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 28 43  e Authorities (C
7340: 41 29 20 66 6f 72 20 58 2e 35 30 39 20 63 65 72  A) for X.509 cer
7350: 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64  tificate.</p></d
7360: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 69 70 68  d>.</dl>.<p>Ciph
7370: 65 72 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20  er Info</p>.<dl 
7380: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
7390: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
73a0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
73b0: 61 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e  able">cipher</b>
73c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
73d0: 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a  cipher</i></dt>.
73e0: 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65  <dd><p>The curre
73f0: 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65  nt cipher in use
7400: 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74   for the connect
7410: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ion.</p></dd>.<d
7420: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7430: 61 62 6c 65 22 3e 73 74 61 6e 64 61 72 64 5f 6e  able">standard_n
7440: 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ame</b> <i class
7450: 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c  ="arg">name</i><
7460: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
7470: 73 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d  standard RFC nam
7480: 65 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f 70 3e  e of cipher.</p>
7490: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
74a0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c  ss="variable">al
74b0: 67 6f 72 69 74 68 6d 5f 62 69 74 73 3c 2f 62 3e  gorithm_bits</b>
74c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
74d0: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
74e0: 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20  p>The number of 
74f0: 70 72 6f 63 65 73 73 65 64 20 62 69 74 73 20 75  processed bits u
7500: 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c  sed for cipher.<
7510: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7520: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7530: 3e 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 62 3e  >secret_bits</b>
7540: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
7550: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
7560: 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20  p>The number of 
7570: 73 65 63 72 65 74 20 62 69 74 73 20 75 73 65 64  secret bits used
7580: 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e   for cipher.</p>
7590: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
75a0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 69  ss="variable">mi
75b0: 6e 5f 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69  n_version</b> <i
75c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72   class="arg">ver
75d0: 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  sion</i></dt>.<d
75e0: 64 3e 3c 70 3e 54 68 65 20 6d 69 6e 69 6d 75 6d  d><p>The minimum
75f0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
7600: 6e 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70  n for cipher.</p
7610: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
7620: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63  ass="variable">c
7630: 69 70 68 65 72 5f 69 73 5f 61 65 61 64 3c 2f 62  ipher_is_aead</b
7640: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7650: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74  >boolean</i></dt
7660: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72  >.<dd><p>Whether
7670: 20 74 68 65 20 63 69 70 68 65 72 20 69 73 20 41   the cipher is A
7680: 75 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63  uthenticated Enc
7690: 72 79 70 74 69 6f 6e 20 77 69 74 68 20 41 73 73  ryption with Ass
76a0: 6f 63 69 61 74 65 64 20 44 61 74 61 20 28 41 45  ociated Data (AE
76b0: 41 44 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  AD).</p></dd>.<d
76c0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
76d0: 61 62 6c 65 22 3e 63 69 70 68 65 72 5f 69 64 3c  able">cipher_id<
76e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
76f0: 67 22 3e 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  g">id</i></dt>.<
7700: 64 64 3e 3c 70 3e 54 68 65 20 4f 70 65 6e 53 53  dd><p>The OpenSS
7710: 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 70 3e  L cipher id.</p>
7720: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7730: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 64 65  ss="variable">de
7740: 73 63 72 69 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69  scription</b> <i
7750: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
7760: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
7770: 3e 3c 70 3e 41 20 74 65 78 74 20 64 65 73 63 72  ><p>A text descr
7780: 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69  iption of the ci
7790: 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  pher.</p></dd>.<
77a0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
77b0: 69 61 62 6c 65 22 3e 68 61 6e 64 73 68 61 6b 65  iable">handshake
77c0: 5f 64 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63  _digest</b> <i c
77d0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65  lass="arg">boole
77e0: 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  an</i></dt>.<dd>
77f0: 3c 70 3e 44 69 67 65 73 74 20 75 73 65 64 20 64  <p>Digest used d
7800: 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 2e  uring handshake.
7810: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a  </p></dd>.</dl>.
7820: 3c 70 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c  <p>Session Info<
7830: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64  /p>.<dl class="d
7840: 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69  octools_definiti
7850: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
7860: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c  ss="variable">al
7870: 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  pn</b> <i class=
7880: 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  "arg">protocol</
7890: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
78a0: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65  he protocol sele
78b0: 63 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69  cted after Appli
78c0: 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f  cation-Layer Pro
78d0: 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f  tocol Negotiatio
78e0: 6e 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64  n (ALPN).</p></d
78f0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
7900: 22 76 61 72 69 61 62 6c 65 22 3e 72 65 73 75 6d  "variable">resum
7910: 61 62 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  able</b> <i clas
7920: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c  s="arg">boolean<
7930: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
7940: 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73  Whether the sess
7950: 69 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 75 6d  ion can be resum
7960: 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f  ed or not.</p></
7970: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7980: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 74 61 72  ="variable">star
7990: 74 5f 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c  t_time</b> <i cl
79a0: 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64  ass="arg">second
79b0: 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  s</i></dt>.<dd><
79c0: 70 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73  p>Time since ses
79d0: 73 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20  sion started in 
79e0: 73 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70  seconds since ep
79f0: 6f 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  och.</p></dd>.<d
7a00: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7a10: 61 62 6c 65 22 3e 74 69 6d 65 6f 75 74 3c 2f 62  able">timeout</b
7a20: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7a30: 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74  >seconds</i></dt
7a40: 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 20 64 75 72  >.<dd><p>Max dur
7a50: 61 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e  ation of session
7a60: 20 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f   in seconds befo
7a70: 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e  re time-out.</p>
7a80: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7a90: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6c 69  ss="variable">li
7aa0: 66 65 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c  fetime</b> <i cl
7ab0: 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64  ass="arg">second
7ac0: 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  s</i></dt>.<dd><
7ad0: 70 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  p>Session ticket
7ae0: 20 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 20 69   lifetime hint i
7af0: 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f  n seconds.</p></
7b00: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7b10: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73  ="variable">sess
7b20: 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c  ion_id</b> <i cl
7b30: 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79  ass="arg">binary
7b40: 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  _string</i></dt>
7b50: 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73  .<dd><p>Unique s
7b60: 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73  ession id for us
7b70: 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68  e in resuming th
7b80: 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f  e session.</p></
7b90: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7ba0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73  ="variable">sess
7bb0: 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62 3e 20 3c  ion_ticket</b> <
7bc0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69  i class="arg">bi
7bd0: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c  nary_string</i><
7be0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71  /dt>.<dd><p>Uniq
7bf0: 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65  ue session ticke
7c00: 74 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73  t for use in res
7c10: 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f  uming the sessio
7c20: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  n.</p></dd>.<dt>
7c30: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7c40: 6c 65 22 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64  le">ticket_app_d
7c50: 61 74 61 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ata</b> <i class
7c60: 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74  ="arg">binary_st
7c70: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
7c80: 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73  d><p>Unique sess
7c90: 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69  ion ticket appli
7ca0: 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 70 3e  cation data.</p>
7cb0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7cc0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 61  ss="variable">ma
7cd0: 73 74 65 72 5f 6b 65 79 3c 2f 62 3e 20 3c 69 20  ster_key</b> <i 
7ce0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61  class="arg">bina
7cf0: 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  ry_string</i></d
7d00: 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65  t>.<dd><p>Unique
7d10: 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20   session master 
7d20: 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  key.</p></dd>.<d
7d30: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7d40: 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 63 61  able">session_ca
7d50: 63 68 65 5f 6d 6f 64 65 3c 2f 62 3e 20 3c 69 20  che_mode</b> <i 
7d60: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65  class="arg">mode
7d70: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7d80: 3e 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f  >Server cache mo
7d90: 64 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76  de (client, serv
7da0: 65 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 70  er, or both).</p
7db0: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64  ></dd>.</dl></dd
7dc0: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 39  >.<dt><a name="9
7dd0: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
7de0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62  >tls::ciphers</b
7df0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
7e00: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
7e10: 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e  rg">protocol</i>
7e20: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63  ?</span> <span c
7e30: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
7e40: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f  lass="arg">verbo
7e50: 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  se</i>?</span> <
7e60: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
7e70: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
7e80: 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c  >supported</i>?<
7e90: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  /span></a></dt>.
7ea0: 3c 64 64 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61  <dd><p>Without a
7eb0: 6e 79 20 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72  ny options, it r
7ec0: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66  eturns a list of
7ed0: 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63 20 63   all symmetric c
7ee0: 69 70 68 65 72 73 20 66 6f 72 20 75 73 65 20 77  iphers for use w
7ef0: 69 74 68 20 74 68 65 0a 3c 69 20 63 6c 61 73 73  ith the.<i class
7f00: 3d 22 61 72 67 22 3e 2d 63 69 70 68 65 72 3c 2f  ="arg">-cipher</
7f10: 69 3e 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20  i> option. With 
7f20: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70  <i class="arg">p
7f30: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c  rotocol</i>, onl
7f40: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75  y the ciphers su
7f50: 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74  pported for that
7f60: 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65  .protocol are re
7f70: 74 75 72 6e 65 64 2e 20 53 65 65 20 74 68 65 20  turned. See the 
7f80: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
7f90: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
7fa0: 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68  > command for th
7fb0: 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74  e supported.prot
7fc0: 6f 63 6f 6c 73 2e 20 49 66 20 3c 69 20 63 6c 61  ocols. If <i cla
7fd0: 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65  ss="arg">verbose
7fe0: 3c 2f 69 3e 20 69 73 20 73 70 65 63 69 66 69 65  </i> is specifie
7ff0: 64 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61  d as true then a
8000: 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20   verbose, human 
8010: 72 65 61 64 61 62 6c 65 0a 6c 69 73 74 20 69 73  readable.list is
8020: 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 61   returned with a
8030: 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d  dditional inform
8040: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70  ation on the cip
8050: 68 65 72 2e 20 49 66 20 3c 69 20 63 6c 61 73 73  her. If <i class
8060: 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64  ="arg">supported
8070: 3c 2f 69 3e 0a 69 73 20 73 70 65 63 69 66 69 65  </i>.is specifie
8080: 64 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20  d as true, then 
8090: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73  only the ciphers
80a0: 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70   supported for p
80b0: 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20  rotocol will be 
80c0: 6c 69 73 74 65 64 2e 0a 54 68 65 20 3c 69 20 63  listed..The <i c
80d0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f  lass="arg">suppo
80e0: 72 74 65 64 3c 2f 69 3e 20 61 72 67 20 69 73 20  rted</i> arg is 
80f0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
8100: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  .8.</p></dd>.<dt
8110: 3e 3c 61 20 6e 61 6d 65 3d 22 31 30 22 3e 3c 62  ><a name="10"><b
8120: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
8130: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c  ::protocols</b><
8140: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
8150: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
8160: 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20  f the supported 
8170: 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c  SSL/TLS protocol
8180: 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 20  s. Valid values 
8190: 61 72 65 3a 0a 3c 62 20 63 6c 61 73 73 3d 22 63  are:.<b class="c
81a0: 6f 6e 73 74 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20  onst">ssl2</b>, 
81b0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
81c0: 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c  >ssl3</b>, <b cl
81d0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31  ass="const">tls1
81e0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
81f0: 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 31 3c 2f 62  const">tls1.1</b
8200: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >, <b class="con
8210: 73 74 22 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20  st">tls1.2</b>, 
8220: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f  and.<b class="co
8230: 6e 73 74 22 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e  nst">tls1.3</b>.
8240: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65   Exact list depe
8250: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76  nds on OpenSSL v
8260: 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69  ersion and compi
8270: 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 0a 54  le time flags..T
8280: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e  his command is n
8290: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
82a0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
82b0: 3c 61 20 6e 61 6d 65 3d 22 31 31 22 3e 3c 62 20  <a name="11"><b 
82c0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
82d0: 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e  :version</b></a>
82e0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74  </dt>.<dd><p>Ret
82f0: 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c  urns the OpenSSL
8300: 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e   version string.
8310: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a  </p></dd>.</dl>.
8320: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
8330: 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d  section4" class=
8340: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
8350: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
8360: 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66  section4">Certif
8370: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e  icate Validation
8380: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 69  </a></h2>.<div i
8390: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 31 22 20  d="subsection1" 
83a0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
83b0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e  subsection"><h3>
83c0: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74  <a name="subsect
83d0: 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65  ion1">PKI and Ce
83e0: 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f  rtificates</a></
83f0: 68 33 3e 0a 3c 70 3e 55 73 69 6e 67 20 74 68 65  h3>.<p>Using the
8400: 20 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72   Public Key Infr
8410: 61 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29  astructure (PKI)
8420: 2c 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61  , each user crea
8430: 74 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65  tes a private ke
8440: 79 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79  y that.only they
8450: 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20   know about and 
8460: 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65  a public key the
8470: 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77  y can exchange w
8480: 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75  ith others for u
8490: 73 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67  se in.encrypting
84a0: 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 20   and decrypting 
84b0: 64 61 74 61 2e 20 54 68 65 20 70 72 6f 63 65 73  data. The proces
84c0: 73 20 69 73 20 74 68 65 20 73 65 6e 64 65 72 20  s is the sender 
84d0: 65 6e 63 72 79 70 74 73 20 74 68 65 69 72 20 64  encrypts their d
84e0: 61 74 61 0a 75 73 69 6e 67 20 74 68 65 69 72 20  ata.using their 
84f0: 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 20  private key and 
8500: 74 68 65 20 72 65 63 65 69 76 65 72 27 73 20 70  the receiver's p
8510: 75 62 6c 69 63 20 6b 65 79 2e 20 54 68 65 20 64  ublic key. The d
8520: 61 74 61 20 69 73 20 74 68 65 6e 20 73 65 6e 74  ata is then sent
8530: 0a 74 6f 20 74 68 65 20 72 65 63 65 69 76 65 72  .to the receiver
8540: 2e 20 49 6e 20 61 20 73 69 6d 69 6c 61 72 20 6d  . In a similar m
8550: 61 6e 6e 65 72 2c 20 74 68 65 20 72 65 63 65 69  anner, the recei
8560: 76 65 72 20 75 73 65 73 20 74 68 65 69 72 20 70  ver uses their p
8570: 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 0a 74  rivate key and.t
8580: 68 65 20 73 65 6e 64 65 72 27 73 20 70 75 62 6c  he sender's publ
8590: 69 63 20 6b 65 79 20 74 6f 20 64 65 63 72 79 70  ic key to decryp
85a0: 74 20 74 68 65 20 64 61 74 61 2e 20 54 68 69 73  t the data. This
85b0: 20 70 72 6f 76 69 64 65 73 20 64 61 74 61 20 69   provides data i
85c0: 6e 74 65 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73  ntegrity, to.ens
85d0: 75 72 65 20 74 68 65 20 64 61 74 61 20 63 61 6e  ure the data can
85e0: 27 74 20 62 65 20 76 69 65 77 65 64 20 6f 72 20  't be viewed or 
85f0: 61 6c 74 65 72 65 64 20 64 75 72 69 6e 67 20 74  altered during t
8600: 72 61 6e 73 70 6f 72 74 2e 20 53 65 65 20 74 68  ransport. See th
8610: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e.<b class="opti
8620: 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 61 6e 64  on">-key</b> and
8630: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
8640: 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20  n">-keyfile</b> 
8650: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20  options for how 
8660: 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 20 70  to specify the p
8670: 72 69 76 61 74 65 20 6b 65 79 2e 0a 41 6c 73 6f  rivate key..Also
8680: 20 73 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73   see the <b clas
8690: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73  s="option">-pass
86a0: 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20  word</b> option 
86b0: 66 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f 76 69  for how to provi
86c0: 64 65 20 74 68 65 20 70 61 73 73 77 6f 72 64 2e  de the password.
86d0: 3c 2f 70 3e 0a 3c 70 3e 49 6e 20 6f 72 64 65 72  </p>.<p>In order
86e0: 20 74 6f 20 70 72 6f 76 69 64 65 20 61 75 74 68   to provide auth
86f0: 65 6e 74 69 63 61 74 69 6f 6e 2c 20 69 2e 65 2e  entication, i.e.
8700: 20 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e   ensuring someon
8710: 65 20 69 73 20 77 68 6f 20 74 68 65 79 20 73 61  e is who they sa
8720: 79 20 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20  y they.are, the 
8730: 70 75 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75  public key and u
8740: 73 65 72 20 69 64 65 6e 74 69 66 69 63 61 74 69  ser identificati
8750: 6f 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65  on info is store
8760: 64 20 69 6e 20 61 20 58 2e 35 30 39 0a 63 65 72  d in a X.509.cer
8770: 74 69 66 69 63 61 74 65 20 61 6e 64 20 74 68 61  tificate and tha
8780: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  t certificate is
8790: 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 20 28   authenticated (
87a0: 69 2e 65 2e 20 73 69 67 6e 65 64 29 20 62 79 20  i.e. signed) by 
87b0: 61 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75  a Certificate.Au
87c0: 74 68 6f 72 69 74 79 20 28 43 41 29 2e 20 55 73  thority (CA). Us
87d0: 65 72 73 20 63 61 6e 20 74 68 65 6e 20 65 78 63  ers can then exc
87e0: 68 61 6e 67 65 20 74 68 65 73 65 20 63 65 72 74  hange these cert
87f0: 69 66 69 63 61 74 65 73 20 64 75 72 69 6e 67 20  ificates during 
8800: 74 68 65 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69  the TLS.initiali
8810: 7a 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 20 61  zation process a
8820: 6e 64 20 63 68 65 63 6b 20 74 68 65 6d 20 61 67  nd check them ag
8830: 61 69 6e 73 74 20 74 68 65 20 72 6f 6f 74 20 43  ainst the root C
8840: 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74  A certificates t
8850: 6f 20 65 6e 73 75 72 65 0a 74 68 65 79 20 61 72  o ensure.they ar
8860: 65 20 76 61 6c 69 64 2e 20 54 68 69 73 20 69 73  e valid. This is
8870: 20 68 61 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e   handled by Open
8880: 53 53 4c 20 76 69 61 20 74 68 65 20 3c 62 20 63  SSL via the <b c
8890: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72  lass="option">-r
88a0: 65 71 75 65 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c  equest</b> and.<
88b0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
88c0: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70  >-require</b> op
88d0: 74 69 6f 6e 73 2e 20 53 65 65 20 74 68 65 20 3c  tions. See the <
88e0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
88f0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20  >-cadir</b>, <b 
8900: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8910: 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c  cadir</b>, and.<
8920: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
8930: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70  >-castore</b> op
8940: 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f  tions for how to
8950: 20 73 70 65 63 69 66 79 20 77 68 65 72 65 20 74   specify where t
8960: 6f 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 65  o find the CA ce
8970: 72 74 69 66 69 63 61 74 65 73 2e 0a 4f 70 74 69  rtificates..Opti
8980: 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74  onally, in a fut
8990: 75 72 65 20 72 65 6c 65 61 73 65 2c 20 74 68 65  ure release, the
89a0: 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 68  y can also be ch
89b0: 65 63 6b 65 64 20 61 67 61 69 6e 73 74 20 74 68  ecked against th
89c0: 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 52 65  e Certificate.Re
89d0: 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20 28 43  vocation List (C
89e0: 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64 20 63  RL) of revoked c
89f0: 65 72 74 69 66 69 63 61 74 65 73 2e 20 43 65 72  ertificates. Cer
8a00: 74 69 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c  tificates can al
8a10: 73 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65  so be.self-signe
8a20: 64 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20  d, but they are 
8a30: 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74  by default not t
8a40: 72 75 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f  rusted unless yo
8a50: 75 20 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f  u add them to yo
8a60: 75 72 0a 63 65 72 74 69 66 69 63 61 74 65 20 73  ur.certificate s
8a70: 74 6f 72 65 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70  tore.</p>.<p>Typ
8a80: 69 63 61 6c 6c 79 20 77 68 65 6e 20 76 69 73 69  ically when visi
8a90: 74 69 6e 67 20 77 65 62 20 73 69 74 65 73 2c 20  ting web sites, 
8aa0: 6f 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e 74 20  only the client 
8ab0: 6e 65 65 64 73 20 74 6f 20 63 68 65 63 6b 20 74  needs to check t
8ac0: 68 65 20 73 65 72 76 65 72 27 73 0a 63 65 72 74  he server's.cert
8ad0: 69 66 69 63 61 74 65 20 74 6f 20 65 6e 73 75 72  ificate to ensur
8ae0: 65 20 69 74 20 69 73 20 76 61 6c 69 64 2e 20 54  e it is valid. T
8af0: 68 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e 27  he server doesn'
8b00: 74 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 20  t need to check 
8b10: 74 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 69  the client.certi
8b20: 66 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 6f  ficate unless yo
8b30: 75 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 6e  u need to authen
8b40: 74 69 63 61 74 65 20 77 69 74 68 20 74 68 65 6d  ticate with them
8b50: 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 2e 20   to login, etc. 
8b60: 53 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  See the.<b class
8b70: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c  ="option">-cert<
8b80: 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73  /b> and <b class
8b90: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66  ="option">-certf
8ba0: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20  ile</b> options 
8bb0: 69 66 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 70  if you need to p
8bc0: 72 6f 76 69 64 65 20 61 20 63 65 72 74 69 66 69  rovide a certifi
8bd0: 63 61 74 65 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e  cate.</p>.</div>
8be0: 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63  .<div id="subsec
8bf0: 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f  tion2" class="do
8c00: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f  ctools_subsectio
8c10: 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h3><a name="
8c20: 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d  subsection2">Sum
8c30: 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20  mary of command 
8c40: 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e  line options</a>
8c50: 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c  </h3>.<p>The fol
8c60: 6c 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61  lowing options a
8c70: 72 65 20 75 73 65 64 20 66 6f 72 20 70 65 65 72  re used for peer
8c80: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c   certificate val
8c90: 69 64 61 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c  idation:</p>.<dl
8ca0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
8cb0: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  _options">.<dt><
8cc0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
8cd0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63  >-cadir</b> <i c
8ce0: 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63  lass="arg">direc
8cf0: 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  tory</i></dt>.<d
8d00: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
8d10: 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65  he directory whe
8d20: 72 65 20 74 68 65 20 43 65 72 74 69 66 69 63 61  re the Certifica
8d30: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41  te Authority (CA
8d40: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61  ) certificates a
8d50: 72 65 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64  re.stored. The d
8d60: 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f  efault is platfo
8d70: 72 6d 20 73 70 65 63 69 66 69 63 2c 20 62 75 74  rm specific, but
8d80: 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f   is usually &quo
8d90: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65  t;<b class="file
8da0: 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73  ">/etc/ssl/certs
8db0: 3c 2f 62 3e 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69  </b>&quot; on.Li
8dc0: 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73  nux/Unix systems
8dd0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f  . The default lo
8de0: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76  cation can be ov
8df0: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 0a  erridden by the.
8e00: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
8e10: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52  le">SSL_CERT_DIR
8e20: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
8e30: 20 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f   variable.</p></
8e40: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
8e50: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c  ="option">-cafil
8e60: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
8e70: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69  arg">filename</i
8e80: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
8e90: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65  ecifies the file
8ea0: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66   with the Certif
8eb0: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
8ec0: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
8ed0: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63  s to use in.<b c
8ee0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d  lass="const">PEM
8ef0: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74  </b> file format
8f00: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
8f10: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
8f20: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c  "file">cert.pem<
8f30: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68  /b>&quot;, in th
8f40: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74  e OpenSSL.direct
8f50: 6f 72 79 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e  ory. On Linux/Un
8f60: 69 78 20 73 79 73 74 65 6d 73 2c 20 74 68 69 73  ix systems, this
8f70: 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f   is usually &quo
8f80: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65  t;<b class="file
8f90: 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 61 2d 62 75  ">/etc/ssl/ca-bu
8fa0: 6e 64 6c 65 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f  ndle.pem</b>&quo
8fb0: 74 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20  t;..The default 
8fc0: 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72  file can be over
8fd0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62  ridden by the <b
8fe0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
8ff0: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c  ">SSL_CERT_FILE<
9000: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a  /b> environment.
9010: 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64  variable.</p></d
9020: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
9030: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72  "option">-castor
9040: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
9050: 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74  arg">URI</i></dt
9060: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
9070: 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52  es the Uniform R
9080: 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69  esource Identifi
9090: 65 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65  er (URI) for the
90a0: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
90b0: 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72  hority.(CA) stor
90c0: 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20  e, which may be 
90d0: 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e  a single contain
90e0: 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20  er or a catalog 
90f0: 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53  of containers..S
9100: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65  tarting with Ope
9110: 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57  nSSL 3.2 on MS W
9120: 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 26  indows, set to &
9130: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63  quot;<b class="c
9140: 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73  onst">org.openss
9150: 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62  l.winstore://</b
9160: 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74  >&quot;.to use t
9170: 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57  he built-in MS W
9180: 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61  indows Certifica
9190: 74 65 20 53 74 6f 72 65 2e 20 53 74 61 72 74 69  te Store. Starti
91a0: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30  ng in TclTLS 2.0
91b0: 2c 20 74 68 69 73 0a 69 73 20 74 68 65 20 64 65  , this.is the de
91c0: 66 61 75 6c 74 20 69 66 20 3c 62 20 63 6c 61 73  fault if <b clas
91d0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69  s="option">-cadi
91e0: 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  r</b>, <b class=
91f0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
9200: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73  /b>, and <b clas
9210: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
9220: 6f 72 65 3c 2f 62 3e 20 61 72 65 0a 6e 6f 74 20  ore</b> are.not 
9230: 73 70 65 63 69 66 69 65 64 2e 20 54 68 69 73 20  specified. This 
9240: 73 74 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f  store only suppo
9250: 72 74 73 20 72 6f 6f 74 20 63 65 72 74 69 66 69  rts root certifi
9260: 63 61 74 65 20 73 74 6f 72 65 73 2e 3c 2f 70 3e  cate stores.</p>
9270: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
9280: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71  ss="option">-req
9290: 75 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  uest</b> <i clas
92a0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
92b0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71  </dt>.<dd><p>Req
92c0: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61  uest a certifica
92d0: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72  te from the peer
92e0: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20   during the SSL 
92f0: 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73 20  handshake. This 
9300: 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20  is needed.to do 
9310: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69  Certificate Vali
9320: 64 61 74 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67  dation. Starting
9330: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20   in TclTLS 1.8, 
9340: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 3c  the default is.<
9350: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9360: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69  true</b> for cli
9370: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e  ent connections.
9380: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c   Starting in Tcl
9390: 54 4c 53 20 32 2e 30 2c 20 69 66 20 73 65 74 20  TLS 2.0, if set 
93a0: 74 6f 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  to.<b class="con
93b0: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e  st">false</b> an
93c0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  d <b class="opti
93d0: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e  on">-require</b>
93e0: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
93f0: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74  nst">true</b>, t
9400: 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65  hen this will be
9410: 0a 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 3c  .overridden to <
9420: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9430: 74 72 75 65 3c 2f 62 3e 2e 20 49 6e 20 61 64 64  true</b>. In add
9440: 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 6e  ition, the clien
9450: 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 69  t can manually i
9460: 6e 73 70 65 63 74 20 61 6e 64 0a 61 63 63 65 70  nspect and.accep
9470: 74 20 6f 72 20 72 65 6a 65 63 74 20 65 61 63 68  t or reject each
9480: 20 63 65 72 74 69 66 69 63 61 74 65 20 75 73 69   certificate usi
9490: 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ng the <b class=
94a0: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61  "option">-valida
94b0: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70  tecommand</b> op
94c0: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  tion.</p></dd>.<
94d0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
94e0: 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62  ion">-require</b
94f0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
9500: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
9510: 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20  dd><p>Require a 
9520: 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74  valid certificat
9530: 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20  e from the peer 
9540: 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68  during the SSL h
9550: 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69  andshake. If thi
9560: 73 20 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65  s is.set to true
9570: 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d  , then <b class=
9580: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73  "option">-reques
9590: 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20  t</b> must also 
95a0: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61  be set to true a
95b0: 6e 64 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63  nd a either.<b c
95c0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
95d0: 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  adir</b>, <b cla
95e0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66  ss="option">-caf
95f0: 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  ile</b>, <b clas
9600: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
9610: 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c  ore</b>, or a pl
9620: 61 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d  atform default.m
9630: 75 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20  ust be provided 
9640: 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69  in order to vali
9650: 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68  date against. Th
9660: 65 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c  e default in Tcl
9670: 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c  TLS 1.8 and.earl
9680: 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20  ier versions is 
9690: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
96a0: 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65  >false</b> since
96b0: 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72   not all platfor
96c0: 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63  ms have certific
96d0: 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65  ates to.validate
96e0: 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f   against in a fo
96f0: 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69  rm compatible wi
9700: 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72  th OpenSSL. Star
9710: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32  ting in TclTLS 2
9720: 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20  .0,.the default 
9730: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
9740: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72  st">true</b> for
9750: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69   client connecti
9760: 6f 6e 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  ons.</p></dd>.</
9770: 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  dl>.</div>.<div 
9780: 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 22  id="subsection3"
9790: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
97a0: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33  _subsection"><h3
97b0: 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63  ><a name="subsec
97c0: 74 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20  tion3">When are 
97d0: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74  command line opt
97e0: 69 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e  ions needed?</a>
97f0: 3c 2f 68 33 3e 0a 3c 70 3e 49 6e 20 54 63 6c 54  </h3>.<p>In TclT
9800: 4c 53 20 31 2e 38 20 61 6e 64 20 65 61 72 6c 69  LS 1.8 and earli
9810: 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72  er versions, cer
9820: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74  tificate validat
9830: 69 6f 6e 20 69 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f  ion is.<em>NOT</
9840: 65 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79 20 64  em> enabled by d
9850: 65 66 61 75 6c 74 2e 20 54 68 69 73 20 6c 69 6d  efault. This lim
9860: 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74  itation is due t
9870: 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20  o the lack of a 
9880: 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61  common.cross pla
9890: 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f  tform database o
98a0: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  f Certificate Au
98b0: 74 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f  thority (CA) pro
98c0: 76 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74  vided certificat
98d0: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61  es to.validate a
98e0: 67 61 69 6e 73 74 2e 20 4d 61 6e 79 20 4c 69 6e  gainst. Many Lin
98f0: 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76  ux systems nativ
9900: 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e  ely support Open
9910: 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76  SSL and thus hav
9920: 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 63  e.these certific
9930: 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61  ates installed a
9940: 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53  s part of the OS
9950: 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20  , but MacOS and 
9960: 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f  MS Windows do no
9970: 74 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20 54 63  t..Staring in Tc
9980: 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65  lTLS 2.0, the de
9990: 66 61 75 6c 74 20 66 6f 72 20 63 6c 69 65 6e 74  fault for client
99a0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 68 61 73   connections has
99b0: 20 62 65 65 6e 20 63 68 61 6e 67 65 64 20 74 6f   been changed to
99c0: 0a 72 65 71 75 69 72 65 20 63 65 72 74 69 66 69  .require certifi
99d0: 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20  cate validation 
99e0: 62 79 20 64 65 66 61 75 6c 74 2e 20 49 6e 20 6f  by default. In o
99f0: 72 64 65 72 20 74 6f 20 75 73 65 20 74 68 65 20  rder to use the 
9a00: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9a10: 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 0a 6f  ">-require</b>.o
9a20: 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68  ption, one of th
9a30: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 75 73 74  e following must
9a40: 20 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75   be true:</p>.<u
9a50: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
9a60: 73 5f 69 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69  s_itemized">.<li
9a70: 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e 64  ><p>On Linux and
9a80: 20 55 6e 69 78 20 73 79 73 74 65 6d 73 20 77 69   Unix systems wi
9a90: 74 68 20 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61  th OpenSSL alrea
9aa0: 64 79 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20  dy installed or 
9ab0: 69 66 20 74 68 65 20 43 41 0a 63 65 72 74 69 66  if the CA.certif
9ac0: 69 63 61 74 65 73 20 61 72 65 20 61 76 61 69 6c  icates are avail
9ad0: 61 62 6c 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d  able in PEM form
9ae0: 61 74 2c 20 61 6e 64 20 69 66 20 74 68 65 79 20  at, and if they 
9af0: 61 72 65 20 73 74 6f 72 65 64 20 69 6e 20 74 68  are stored in th
9b00: 65 0a 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74  e.standard locat
9b10: 69 6f 6e 73 2c 20 6f 72 20 69 66 20 74 68 65 20  ions, or if the 
9b20: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
9b30: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52  le">SSL_CERT_DIR
9b40: 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73  </b> or <b class
9b50: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f  ="variable">SSL_
9b60: 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e  CERT_FILE</b>.en
9b70: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62  vironment variab
9b80: 6c 65 73 20 61 72 65 20 73 65 74 2c 20 74 68 65  les are set, the
9b90: 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  n <b class="opti
9ba0: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20  on">-cadir</b>, 
9bb0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9bc0: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e  ">-cadir</b>,.an
9bd0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  d <b class="opti
9be0: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e  on">-castore</b>
9bf0: 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c   aren't needed.<
9c00: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e  /p></li>.<li><p>
9c10: 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f  If OpenSSL is no
9c20: 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74  t installed in t
9c30: 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74  he default locat
9c40: 69 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69  ion, or when usi
9c50: 6e 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20  ng Mac OS.or MS 
9c60: 57 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e  Windows and Open
9c70: 53 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64  SSL is installed
9c80: 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  , the <b class="
9c90: 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45  variable">SSL_CE
9ca0: 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f  RT_DIR</b> and/o
9cb0: 72 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  r.<b class="vari
9cc0: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46  able">SSL_CERT_F
9cd0: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d  ILE</b> environm
9ce0: 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72  ent variables or
9cf0: 20 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65 20   the one of the 
9d00: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9d10: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62  ">-cadir</b>,.<b
9d20: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9d30: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c  -cadir</b>, or <
9d40: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9d50: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70  >-castore</b> op
9d60: 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64 65  tions must be de
9d70: 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a  fined.</p></li>.
9d80: 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e  <li><p>On MS Win
9d90: 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67 20 69  dows, starting i
9da0: 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c 20 69  n OpenSSL 3.2, i
9db0: 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c  t is now possibl
9dc0: 65 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 0a  e to access the.
9dd0: 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73  built-in Windows
9de0: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f   Certificate Sto
9df0: 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e  re from OpenSSL.
9e00: 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 74 69   This can be uti
9e10: 6c 69 7a 65 64 20 62 79 0a 73 65 74 74 69 6e 67  lized by.setting
9e20: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
9e30: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c  ption">-castore<
9e40: 2f 62 3e 20 6f 70 74 69 6f 6e 20 74 6f 20 26 71  /b> option to &q
9e50: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f  uot;<b class="co
9e60: 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c  nst">org.openssl
9e70: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e  .winstore://</b>
9e80: 26 71 75 6f 74 3b 2e 0a 49 6e 20 54 63 6c 54 4c  &quot;..In TclTL
9e90: 53 20 32 2e 30 2c 20 74 68 69 73 20 69 73 20 74  S 2.0, this is t
9ea0: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65  he default value
9eb0: 20 69 66 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70   if <b class="op
9ec0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
9ed0: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  ,.<b class="opti
9ee0: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20  on">-cadir</b>, 
9ef0: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and <b class="op
9f00: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f  tion">-castore</
9f10: 62 3e 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69  b> are not speci
9f20: 66 69 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c  fied.</p></li>.<
9f30: 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c  li><p>If OpenSSL
9f40: 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65   is not installe
9f50: 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 74  d or the CA cert
9f60: 69 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74  ificates are not
9f70: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45   available in PE
9f80: 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41  M.format, the CA
9f90: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75   certificates mu
9fa0: 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64  st be downloaded
9fb0: 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77   and installed w
9fc0: 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66  ith the user.sof
9fd0: 74 77 61 72 65 2e 20 54 68 65 20 43 55 52 4c 20  tware. The CURL 
9fe0: 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20  team makes them 
9ff0: 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20  available at.<a 
a000: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75  href="https://cu
a010: 72 6c 2e 73 65 2f 64 6f 63 73 2f 63 61 65 78 74  rl.se/docs/caext
a020: 72 61 63 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65  ract.html">CA ce
a030: 72 74 69 66 69 63 61 74 65 73 20 65 78 74 72 61  rtificates extra
a040: 63 74 65 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c  cted.from Mozill
a050: 61 3c 2f 61 3e 20 69 6e 20 74 68 65 20 26 71 75  a</a> in the &qu
a060: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
a070: 65 22 3e 63 61 63 65 72 74 2e 70 65 6d 3c 2f 62  e">cacert.pem</b
a080: 3e 26 71 75 6f 74 3b 20 66 69 6c 65 2e 20 59 6f  >&quot; file. Yo
a090: 75 20 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68  u must then eith
a0a0: 65 72 20 73 65 74 20 74 68 65 0a 3c 62 20 63 6c  er set the.<b cl
a0b0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53  ass="variable">S
a0c0: 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20  SL_CERT_DIR</b> 
a0d0: 61 6e 64 2f 6f 72 20 3c 62 20 63 6c 61 73 73 3d  and/or <b class=
a0e0: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
a0f0: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76  ERT_FILE</b> env
a100: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c  ironment variabl
a110: 65 73 20 6f 72 20 74 68 65 0a 3c 62 20 63 6c 61  es or the.<b cla
a120: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64  ss="option">-cad
a130: 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61  ir</b> or <b cla
a140: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66  ss="option">-caf
a150: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20  ile</b> options 
a160: 74 6f 20 74 68 65 20 43 41 20 63 65 72 74 20 66  to the CA cert f
a170: 69 6c 65 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f  ile's install.lo
a180: 63 61 74 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f  cation. It is yo
a190: 75 72 20 72 65 73 70 6f 6e 73 69 62 69 6c 69 74  ur responsibilit
a1a0: 79 20 74 6f 20 6b 65 65 70 20 74 68 69 73 20 66  y to keep this f
a1b0: 69 6c 65 20 75 70 20 74 6f 20 64 61 74 65 2e 3c  ile up to date.<
a1c0: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c  /p></li>.</ul>.<
a1d0: 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  /div>.</div>.<di
a1e0: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 35 22 20  v id="section5" 
a1f0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
a200: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
a210: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 35 22 3e  name="section5">
a220: 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73  Callback Options
a230: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20  </a></h2>.<p>As 
a240: 70 72 65 76 69 6f 75 73 6c 79 20 64 65 73 63 72  previously descr
a250: 69 62 65 64 2c 20 65 61 63 68 20 63 68 61 6e 6e  ibed, each chann
a260: 65 6c 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20  el can be given 
a270: 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61  their own callba
a280: 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e  cks.to handle in
a290: 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65  termediate proce
a2a0: 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65  ssing by the Ope
a2b0: 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73  nSSL library, us
a2c0: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  ing the.<b class
a2d0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61  ="option">-comma
a2e0: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  nd</b>, <b class
a2f0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77  ="option">-passw
a300: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20  ord</b>, and <b 
a310: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
a320: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
a330: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 0a 70 61 73  </b> options.pas
a340: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66  sed to either of
a350: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
a360: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
a370: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  or <b class="cmd
a380: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
a390: 3e 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f  >..Unlike previo
a3a0: 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 54  us versions of T
a3b0: 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74  clTLS, only if t
a3c0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65  he callback gene
a3d0: 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a  rates an error,.
a3e0: 77 69 6c 6c 20 74 68 65 20 3c 62 20 63 6c 61 73  will the <b clas
a3f0: 73 3d 22 73 79 73 63 6d 64 22 3e 62 67 65 72 72  s="syscmd">bgerr
a400: 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 62  or</b> command b
a410: 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74  e invoked with t
a420: 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61  he error informa
a430: 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69  tion.</p>.<div i
a440: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 34 22 20  d="subsection4" 
a450: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
a460: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e  subsection"><h3>
a470: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74  <a name="subsect
a480: 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66 6f 72  ion4">Values for
a490: 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63   Command Callbac
a4a0: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68  k</a></h3>.<p>Th
a4b0: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74  e callback for t
a4c0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
a4d0: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62  ion">-command</b
a4e0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f  > option is invo
a4f0: 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70  ked at several p
a500: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65  oints during the
a510: 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61  .OpenSSL handsha
a520: 6b 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f  ke and during ro
a530: 75 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73  utine operations
a540: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20  . See below for 
a550: 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67  the possible.arg
a560: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f  uments passed to
a570: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63   the callback sc
a580: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74  ript. Values ret
a590: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 63  urned from the c
a5a0: 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f  allback are.igno
a5b0: 72 65 64 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  red.</p>.<dl cla
a5c0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74  ss="doctools_opt
a5d0: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
a5e0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72  ass="option">err
a5f0: 6f 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  or</b> <i class=
a600: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
a610: 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e  message</i></dt>
a620: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72  .<dd><p>This for
a630: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
a640: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65   invoked wheneve
a650: 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72  r an error occur
a660: 73 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69  s during the ini
a670: 74 69 61 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c  tial.connection,
a680: 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49   handshake, or I
a690: 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54  /O operations. T
a6a0: 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  he <i class="arg
a6b0: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 20 61 72  ">message</i> ar
a6c0: 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72  gument can be.fr
a6d0: 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f  om the Tcl_Errno
a6e0: 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e  Msg, OpenSSL fun
a6f0: 63 74 69 6f 6e 20 3c 62 20 63 6c 61 73 73 3d 22  ction <b class="
a700: 66 75 6e 63 74 69 6f 6e 22 3e 45 52 52 5f 72 65  function">ERR_re
a710: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e  ason_error_strin
a720: 67 28 29 3c 2f 62 3e 2c 0a 6f 72 20 61 20 63 75  g()</b>,.or a cu
a730: 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e 20 54 68  stom message. Th
a740: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e  is callback is n
a750: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
a760: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
a770: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
a780: 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c  ">info</b> <i cl
a790: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
a7a0: 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20  lId major minor 
a7b0: 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f 69 3e  message type</i>
a7c0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69  </dt>.<dd><p>Thi
a7d0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
a7e0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79  ck is invoked by
a7f0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e   the OpenSSL fun
a800: 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22  ction.<b class="
a810: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65  function">SSL_se
a820: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28  t_info_callback(
a830: 29 3c 2f 62 3e 20 64 75 72 69 6e 67 20 74 68 65  )</b> during the
a840: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74   initial connect
a850: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b  ion and handshak
a860: 65 0a 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68  e.operations. Th
a870: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a  e arguments are:
a880: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
a890: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
a8a0: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ions">.<dt><i cl
a8b0: 61 73 73 3d 22 61 72 67 22 3e 6d 61 6a 6f 72 3c  ass="arg">major<
a8c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
a8d0: 4d 61 6a 6f 72 20 63 61 74 65 67 6f 72 79 20 66  Major category f
a8e0: 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20  or error. Valid 
a8f0: 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c  enums are: <b cl
a900: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 61 6e 64  ass="const">hand
a910: 73 68 61 6b 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c  shake</b>, <b cl
a920: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61 6c 65 72  ass="const">aler
a930: 74 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d  t</b>,.<b class=
a940: 22 63 6f 6e 73 74 22 3e 63 6f 6e 6e 65 63 74 3c  "const">connect<
a950: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
a960: 6f 6e 73 74 22 3e 61 63 63 65 70 74 3c 2f 62 3e  onst">accept</b>
a970: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
a980: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 69  i class="arg">mi
a990: 6e 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  nor</i></dt>.<dd
a9a0: 3e 3c 70 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f  ><p>Minor catego
a9b0: 72 79 20 66 6f 72 20 65 72 72 6f 72 2e 20 56 61  ry for error. Va
a9c0: 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c  lid enums are: <
a9d0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
a9e0: 73 74 61 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c  start</b>, <b cl
a9f0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65  ass="const">done
aa00: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
aa10: 63 6f 6e 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c  const">read</b>,
aa20: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
aa30: 22 3e 77 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20  ">write</b>, <b 
aa40: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f  class="const">lo
aa50: 6f 70 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  op</b>, <b class
aa60: 3d 22 63 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62  ="const">exit</b
aa70: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  >.</p></dd>.<dt>
aa80: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
aa90: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  essage</i></dt>.
aaa0: 3c 64 64 3e 3c 70 3e 44 65 73 63 72 69 70 74 69  <dd><p>Descripti
aab0: 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 69 6e  ve message strin
aac0: 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 67  g which may be g
aad0: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20  enerated either 
aae0: 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  by.<b class="fun
aaf0: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 74 61 74 65  ction">SSL_state
ab00: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f  _string_long()</
ab10: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22  b> or <b class="
ab20: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c  function">SSL_al
ab30: 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f  ert_desc_string_
ab40: 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0a 64 65 70 65  long()</b>,.depe
ab50: 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e  nding on the con
ab60: 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  text.</p></dd>.<
ab70: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
ab80: 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">type</i></dt>.
ab90: 3c 64 64 3e 3c 70 3e 46 6f 72 20 61 6c 65 72 74  <dd><p>For alert
aba0: 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20  s, the possible 
abb0: 76 61 6c 75 65 73 20 61 72 65 3a 20 3c 62 20 63  values are: <b c
abc0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 61 72  lass="const">war
abd0: 6e 69 6e 67 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61  ning</b>,.<b cla
abe0: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 74 61 6c  ss="const">fatal
abf0: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
ac00: 73 73 3d 22 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f  ss="const">unkno
ac10: 77 6e 3c 2f 62 3e 2e 20 46 6f 72 20 6f 74 68 65  wn</b>. For othe
ac20: 72 73 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  rs, <b class="co
ac30: 6e 73 74 22 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73  nst">info</b> is
ac40: 20 75 73 65 64 2e 0a 54 68 69 73 20 61 72 67 75   used..This argu
ac50: 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20  ment is new for 
ac60: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
ac70: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
ac80: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
ac90: 74 69 6f 6e 22 3e 6d 65 73 73 61 67 65 3c 2f 62  tion">message</b
aca0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
acb0: 3e 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63  >channelId direc
acc0: 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e  tion version con
acd0: 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67  tent_type messag
ace0: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
acf0: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  p>This form of c
ad00: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
ad10: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ed by the OpenSS
ad20: 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c  L function.<b cl
ad30: 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53  ass="function">S
ad40: 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62  SL_set_msg_callb
ad50: 61 63 6b 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76  ack()</b> whenev
ad60: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20  er a message is 
ad70: 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64  sent or received
ad80: 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74   during the.init
ad90: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20  ial connection, 
ada0: 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f  handshake, or I/
adb0: 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 49 74  O operations. It
adc0: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62   is only availab
add0: 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20  le when.OpenSSL 
ade0: 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 74 68  is complied with
adf0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
ae00: 6f 6e 73 74 22 3e 65 6e 61 62 6c 65 2d 73 73 6c  onst">enable-ssl
ae10: 2d 74 72 61 63 65 3c 2f 62 3e 20 6f 70 74 69 6f  -trace</b> optio
ae20: 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b  n. This callback
ae30: 20 69 73 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54   is.new for TclT
ae40: 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75  LS 1.8. The argu
ae50: 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c  ments are:</p>.<
ae60: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
ae70: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
ae80: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61  .<dt><i class="a
ae90: 72 67 22 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69  rg">direction</i
aea0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69  ></dt>.<dd><p>Di
aeb0: 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65  rection is eithe
aec0: 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  r <b class="cons
aed0: 74 22 3e 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c  t">Sent</b> or <
aee0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
aef0: 52 65 63 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70  Received</b>.</p
af00: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
af10: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f  ass="arg">versio
af20: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
af30: 70 3e 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65  p>Version is the
af40: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
af50: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  n.</p></dd>.<dt>
af60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
af70: 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c  ontent_type</i><
af80: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74  /dt>.<dd><p>Cont
af90: 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 20  ent type is the 
afa0: 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20  message content 
afb0: 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  type.</p></dd>.<
afc0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
afd0: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64  ">message</i></d
afe0: 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 65 73 73 61 67  t>.<dd><p>Messag
aff0: 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66  e is more info f
b000: 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73  rom the <b class
b010: 3d 22 63 6f 6e 73 74 22 3e 53 53 4c 5f 74 72 61  ="const">SSL_tra
b020: 63 65 3c 2f 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c  ce</b> API.</p><
b030: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
b040: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
b050: 74 69 6f 6e 22 3e 73 65 73 73 69 6f 6e 3c 2f 62  tion">session</b
b060: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
b070: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 73 73 69  >channelId sessi
b080: 6f 6e 5f 69 64 20 73 65 73 73 69 6f 6e 5f 74 69  on_id session_ti
b090: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 69  cket lifetime</i
b0a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
b0b0: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
b0c0: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62  ack is invoked b
b0d0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75  y the OpenSSL fu
b0e0: 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d  nction.<b class=
b0f0: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 43  "function">SSL_C
b100: 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f  TX_sess_set_new_
b110: 63 62 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65  cb()</b> wheneve
b120: 72 20 61 20 6e 65 77 20 73 65 73 73 69 6f 6e 20  r a new session 
b130: 69 64 20 69 73 20 73 65 6e 74 20 62 79 20 74 68  id is sent by th
b140: 65 0a 73 65 72 76 65 72 20 64 75 72 69 6e 67 20  e.server during 
b150: 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e  the initial conn
b160: 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73  ection and hands
b170: 68 61 6b 65 20 61 6e 64 20 61 6c 73 6f 20 64 75  hake and also du
b180: 72 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e  ring the session
b190: 0a 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73  .if the <b class
b1a0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f  ="option">-post_
b1b0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70  handshake</b> op
b1c0: 74 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 74  tion is set to t
b1d0: 72 75 65 2e 20 54 68 69 73 20 63 61 6c 6c 62 61  rue. This callba
b1e0: 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 0a 54 63  ck is new for.Tc
b1f0: 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72  lTLS 1.8. The ar
b200: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e  guments are:</p>
b210: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
b220: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73  ools_definitions
b230: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  ">.<dt><i class=
b240: 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64  "arg">session_id
b250: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
b260: 3e 53 65 73 73 69 6f 6e 20 49 64 20 69 73 20 74  >Session Id is t
b270: 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73 69  he current sessi
b280: 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 3c 2f 70  on identifier</p
b290: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
b2a0: 61 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69 6f  ass="arg">sessio
b2b0: 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74  n_ticket</i></dt
b2c0: 3e 0a 3c 64 64 3e 3c 70 3e 54 69 63 6b 65 74 20  >.<dd><p>Ticket 
b2d0: 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74  is the session t
b2e0: 69 63 6b 65 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f  icket info</p></
b2f0: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  dd>.<dt><i class
b300: 3d 22 61 72 67 22 3e 6c 69 66 65 74 69 6d 65 3c  ="arg">lifetime<
b310: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
b320: 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 20  Lifetime is the 
b330: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20  ticket lifetime 
b340: 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c  in seconds.</p><
b350: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
b360: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
b370: 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e  tion">verify</b>
b380: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
b390: 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20  channelId depth 
b3a0: 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f  cert status erro
b3b0: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
b3c0: 70 3e 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  p>This callback 
b3d0: 77 61 73 20 6d 6f 76 65 64 20 74 6f 20 3c 62 20  was moved to <b 
b3e0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
b3f0: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c  validatecommand<
b400: 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e  /b> in TclTLS 1.
b410: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  8.</p></dd>.</dl
b420: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
b430: 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22 20 63  ="subsection5" c
b440: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
b450: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c  ubsection"><h3><
b460: 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69  a name="subsecti
b470: 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20  on5">Values for 
b480: 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 63  Password Callbac
b490: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68  k</a></h3>.<p>Th
b4a0: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74  e callback for t
b4b0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
b4c0: 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f  ion">-password</
b4d0: 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76  b> option is inv
b4e0: 6f 6b 65 64 20 62 79 20 54 63 6c 54 4c 53 20 77  oked by TclTLS w
b4f0: 68 65 6e 65 76 65 72 20 4f 70 65 6e 53 53 4c 20  henever OpenSSL 
b500: 6e 65 65 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20  needs.to obtain 
b510: 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20  a password. See 
b520: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
b530: 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73  ssible arguments
b540: 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0a 63   passed to the.c
b550: 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20  allback script. 
b560: 54 68 65 20 75 73 65 72 20 70 72 6f 76 69 64 65  The user provide
b570: 64 20 70 61 73 73 77 6f 72 64 20 69 73 20 65 78  d password is ex
b580: 70 65 63 74 65 64 20 74 6f 20 62 65 20 72 65 74  pected to be ret
b590: 75 72 6e 65 64 20 62 79 20 74 68 65 0a 63 61 6c  urned by the.cal
b5a0: 6c 62 61 63 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63  lback.</p>.<dl c
b5b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f  lass="doctools_o
b5c0: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  ptions">.<dt><b 
b5d0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70  class="option">p
b5e0: 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63  assword</b> <i c
b5f0: 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61  lass="arg">rwfla
b600: 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  g size</i></dt>.
b610: 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20 77  <dd><p>Invoked w
b620: 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73  hen loading or s
b630: 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 79 70  toring an encryp
b640: 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 69 63  ted PEM certific
b650: 61 74 65 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  ate. The argumen
b660: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20  ts are:</p>.<dl 
b670: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
b680: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
b690: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
b6a0: 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e  >rwflag</i></dt>
b6b0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 72 65 61 64  .<dd><p>The read
b6c0: 2f 77 72 69 74 65 20 66 6c 61 67 20 69 73 20 30  /write flag is 0
b6d0: 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63   for reading/dec
b6e0: 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72  ryption or 1 for
b6f0: 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70 74   writing/encrypt
b700: 69 6f 6e 2e 0a 54 68 65 20 6c 61 74 74 65 72 20  ion..The latter 
b710: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 64  can be used to d
b720: 65 74 65 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f  etermine when to
b730: 20 70 72 6f 6d 70 74 20 74 68 65 20 75 73 65 72   prompt the user
b740: 20 74 6f 20 63 6f 6e 66 69 72 6d 2e 0a 54 68 69   to confirm..Thi
b750: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65  s argument is ne
b760: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
b770: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
b780: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 69  i class="arg">si
b790: 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ze</i></dt>.<dd>
b7a0: 3c 70 3e 54 68 65 20 73 69 7a 65 20 69 73 20 74  <p>The size is t
b7b0: 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74  he maximum lengt
b7c0: 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72  h of the passwor
b7d0: 64 20 69 6e 20 62 79 74 65 73 2e 0a 54 68 69 73  d in bytes..This
b7e0: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77   argument is new
b7f0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
b800: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c  </p></dd>.</dl><
b810: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76  /dd>.</dl>.</div
b820: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65  >.<div id="subse
b830: 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64  ction6" class="d
b840: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69  octools_subsecti
b850: 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d  on"><h3><a name=
b860: 22 73 75 62 73 65 63 74 69 6f 6e 36 22 3e 56 61  "subsection6">Va
b870: 6c 75 65 73 20 66 6f 72 20 56 61 6c 69 64 61 74  lues for Validat
b880: 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61  e Command Callba
b890: 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54  ck</a></h3>.<p>T
b8a0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20  he callback for 
b8b0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
b8c0: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63  tion">-validatec
b8d0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f  ommand</b> optio
b8e0: 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72  n is invoked dur
b8f0: 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b  ing the handshak
b900: 65 0a 70 72 6f 63 65 73 73 20 69 6e 20 6f 72 64  e.process in ord
b910: 65 72 20 66 6f 72 20 74 68 65 20 61 70 70 6c 69  er for the appli
b920: 63 61 74 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61  cation to valida
b930: 74 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20  te the provided 
b940: 76 61 6c 75 65 28 73 29 2e 20 53 65 65 0a 62 65  value(s). See.be
b950: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73  low for the poss
b960: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70  ible arguments p
b970: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c  assed to the cal
b980: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 49 66  lback script. If
b990: 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20   not.specified, 
b9a0: 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63  OpenSSL will acc
b9b0: 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65  ept all valid ce
b9c0: 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 65  rtificates and e
b9d0: 78 74 65 6e 73 69 6f 6e 73 2e 20 54 6f 20 72 65  xtensions. To re
b9e0: 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 61  ject.the value a
b9f0: 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f 6e  nd abort the con
ba00: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c  nection, the cal
ba10: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74  lback should ret
ba20: 75 72 6e 20 30 2e 20 54 6f 20 61 63 63 65 70 74  urn 0. To accept
ba30: 20 74 68 65 0a 76 61 6c 75 65 20 61 6e 64 20 63   the.value and c
ba40: 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e  ontinue the conn
ba50: 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c  ection, it shoul
ba60: 64 20 72 65 74 75 72 6e 20 31 2e 20 54 6f 20 72  d return 1. To r
ba70: 65 6a 65 63 74 20 74 68 65 20 76 61 6c 75 65 2c  eject the value,
ba80: 20 62 75 74 0a 63 6f 6e 74 69 6e 75 65 20 74 68   but.continue th
ba90: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74  e connection, it
baa0: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 32   should return 2
bab0: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  . This callback 
bac0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
bad0: 53 20 31 2e 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63  S 1.8.</p>.<dl c
bae0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f  lass="doctools_o
baf0: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  ptions">.<dt><b 
bb00: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61  class="option">a
bb10: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  lpn</b> <i class
bb20: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
bb30: 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c   protocol match<
bb40: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
bb50: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
bb60: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
bb70: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68  ck is invoked wh
bb80: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c  en the client AL
bb90: 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a  PN extension is.
bba0: 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c 69 20  received. If <i 
bbb0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 61 74 63  class="arg">matc
bbc0: 68 3c 2f 69 3e 20 69 73 20 74 72 75 65 2c 20 74  h</i> is true, t
bbd0: 68 65 6e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  hen <i class="ar
bbe0: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20  g">protocol</i> 
bbf0: 69 73 20 74 68 65 20 66 69 72 73 74 0a 3c 62 20  is the first.<b 
bc00: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
bc10: 61 6c 70 6e 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f  alpn</b> protoco
bc20: 6c 20 6f 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d  l option in comm
bc30: 6f 6e 20 74 6f 20 62 6f 74 68 20 74 68 65 20 63  on to both the c
bc40: 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72  lient and server
bc50: 2e 0a 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 69  ..If not, the fi
bc60: 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 69  rst client speci
bc70: 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73  fied protocol is
bc80: 20 75 73 65 64 2e 20 54 68 69 73 20 63 61 6c 6c   used. This call
bc90: 62 61 63 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61  back is called.a
bca0: 66 74 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 61  fter the Hello a
bcb0: 6e 64 20 53 4e 49 20 63 61 6c 6c 62 61 63 6b 73  nd SNI callbacks
bcc0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
bcd0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
bce0: 3e 68 65 6c 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c  >hello</b> <i cl
bcf0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
bd00: 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 20 73  lId servername s
bd10: 65 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64  ession_id</i></d
bd20: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65  t>.<dd><p>For se
bd30: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d  rvers, this form
bd40: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20   of callback is 
bd50: 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63  invoked during c
bd60: 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73  lient hello mess
bd70: 61 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20  age.processing. 
bd80: 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 73  The purpose is s
bd90: 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 6e  o the server can
bda0: 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 72   select the appr
bdb0: 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 63  opriate certific
bdc0: 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 74  ate.to present t
bdd0: 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e  o the client, an
bde0: 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20  d to make other 
bdf0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64  configuration ad
be00: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61  justments releva
be10: 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65  nt.to that serve
be20: 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63  r name and its c
be30: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74  onfiguration. It
be40: 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72   is called befor
be50: 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c  e the SNI and AL
be60: 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70  PN.callbacks.</p
be70: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
be80: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69  ass="option">sni
be90: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
bea0: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65  rg">channelId se
beb0: 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74  rvername</i></dt
bec0: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72  >.<dd><p>For ser
bed0: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20  vers, this form 
bee0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69  of callback is i
bef0: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20  nvoked when the 
bf00: 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69  Server Name Indi
bf10: 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74  cation.(SNI) ext
bf20: 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69 76  ension is receiv
bf30: 65 64 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73  ed. The <i class
bf40: 3d 22 61 72 67 22 3e 73 65 72 76 65 72 6e 61 6d  ="arg">servernam
bf50: 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 69  e</i> argument i
bf60: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f  s the client.pro
bf70: 76 69 64 65 64 20 73 65 72 76 65 72 20 6e 61 6d  vided server nam
bf80: 65 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74  e specified in t
bf90: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
bfa0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65  ion">-servername
bfb0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 65  </b> option. The
bfc0: 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 77  .purpose is so w
bfd0: 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70  hen a server sup
bfe0: 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e  ports multiple n
bff0: 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 74 20  ames, the right 
c000: 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 6e 20  certificate.can 
c010: 62 65 20 75 73 65 64 2e 20 49 74 20 69 73 20 63  be used. It is c
c020: 61 6c 6c 65 64 20 61 66 74 65 72 20 74 68 65 20  alled after the 
c030: 48 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62  Hello callback b
c040: 75 74 20 62 65 66 6f 72 65 20 74 68 65 20 41 4c  ut before the AL
c050: 50 4e 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e  PN.callback.</p>
c060: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
c070: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69  ss="option">veri
c080: 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  fy</b> <i class=
c090: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
c0a0: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75  depth cert statu
c0b0: 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e  s error</i></dt>
c0c0: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72  .<dd><p>This for
c0d0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
c0e0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e   invoked by Open
c0f0: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63  SSL when a new c
c100: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 72 65  ertificate is re
c110: 63 65 69 76 65 64 0a 66 72 6f 6d 20 74 68 65 20  ceived.from the 
c120: 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20  peer. It allows 
c130: 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68  the client to ch
c140: 65 63 6b 20 74 68 65 20 63 65 72 74 69 66 69 63  eck the certific
c150: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
c160: 0a 72 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f  .results and cho
c170: 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 63  ose whether to c
c180: 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 20  ontinue or not. 
c190: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72  It is called for
c1a0: 20 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74   each.certificat
c1b0: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69  e in the certifi
c1c0: 63 61 74 65 20 63 68 61 69 6e 2e 20 54 68 69 73  cate chain. This
c1d0: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f   callback was mo
c1e0: 76 65 64 20 66 72 6f 6d 0a 3c 62 20 63 6c 61 73  ved from.<b clas
c1f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d  s="option">-comm
c200: 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c  and</b> in TclTL
c210: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d  S 1.8. The argum
c220: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64  ents are:</p>.<d
c230: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
c240: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
c250: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
c260: 67 22 3e 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74  g">depth</i></dt
c270: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 65 70  >.<dd><p>The dep
c280: 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 67 65  th is the intege
c290: 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 20 63  r depth of the c
c2a0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68  ertificate in th
c2b0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68  e certificate ch
c2c0: 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 69 73 20  ain,.where 0 is 
c2d0: 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69  the peer certifi
c2e0: 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 72 20  cate and higher 
c2f0: 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 70 20  values going up 
c300: 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 61  to the Certifica
c310: 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41  te.Authority (CA
c320: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
c330: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
c340: 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ert</i></dt>.<dd
c350: 3e 3c 70 3e 54 68 65 20 63 65 72 74 20 61 72 67  ><p>The cert arg
c360: 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20  ument is a list 
c370: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69  of key-value pai
c380: 72 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68  rs similar to th
c390: 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a  ose returned by.
c3a0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
c3b0: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 2e 3c  ls::status</b>.<
c3c0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
c3d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 74  class="arg">stat
c3e0: 75 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  us</i></dt>.<dd>
c3f0: 3c 70 3e 54 68 65 20 73 74 61 74 75 73 20 61 72  <p>The status ar
c400: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 62 6f  gument is the bo
c410: 6f 6c 65 61 6e 20 76 61 6c 69 64 69 74 79 20 6f  olean validity o
c420: 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 65  f the current ce
c430: 72 74 69 66 69 63 61 74 65 20 77 68 65 72 65 20  rtificate where 
c440: 30 0a 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64  0.is invalid and
c450: 20 31 20 69 73 20 76 61 6c 69 64 2e 3c 2f 70 3e   1 is valid.</p>
c460: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
c470: 73 73 3d 22 61 72 67 22 3e 65 72 72 6f 72 3c 2f  ss="arg">error</
c480: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
c490: 68 65 20 65 72 72 6f 72 20 61 72 67 75 6d 65 6e  he error argumen
c4a0: 74 20 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d  t is the error m
c4b0: 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20  essage, if any, 
c4c0: 67 65 6e 65 72 61 74 65 64 20 62 79 0a 3c 62 20  generated by.<b 
c4d0: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22  class="function"
c4e0: 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f  >X509_STORE_CTX_
c4f0: 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 62 3e 2e  get_error()</b>.
c500: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c  </p></dd>.</dl><
c510: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65  /dd>.</dl>.<p>Re
c520: 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e  ference implemen
c530: 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65  tations of these
c540: 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70   callbacks are p
c550: 72 6f 76 69 64 65 64 20 69 6e 20 26 71 75 6f 74  rovided in &quot
c560: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22  ;<b class="file"
c570: 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f  >tls.tcl</b>&quo
c580: 74 3b 0a 61 73 20 3c 62 20 63 6c 61 73 73 3d 22  t;.as <b class="
c590: 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61  cmd">tls::callba
c5a0: 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ck</b>, <b class
c5b0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73  ="cmd">tls::pass
c5c0: 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62  word</b>, and <b
c5d0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
c5e0: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61  ::validate_comma
c5f0: 6e 64 3c 2f 62 3e 0a 72 65 73 70 65 63 74 69 76  nd</b>.respectiv
c600: 65 6c 79 2e 20 4e 6f 74 65 20 74 68 61 74 20 74  ely. Note that t
c610: 68 65 73 65 20 61 72 65 20 6f 6e 6c 79 20 3c 65  hese are only <e
c620: 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d  m>sample</em> im
c630: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 49  plementations. I
c640: 6e 20 61 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74  n a more.realist
c650: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f  ic deployment yo
c660: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20  u would specify 
c670: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63  your own callbac
c680: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63  k scripts on eac
c690: 68 20 54 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73  h TLS.channel us
c6a0: 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73  ing the <b class
c6b0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61  ="option">-comma
c6c0: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  nd</b>, <b class
c6d0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77  ="option">-passw
c6e0: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20  ord</b>, and.<b 
c6f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
c700: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
c710: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70  </b> options.</p
c720: 3e 0a 3c 70 3e 54 68 65 20 64 65 66 61 75 6c 74  >.<p>The default
c730: 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74   behavior when t
c740: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
c750: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62  ion">-command</b
c760: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  > and <b class="
c770: 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74  option">-validat
c780: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70  e_command</b>.op
c790: 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70  tions are not sp
c7a0: 65 63 69 66 69 65 64 2c 20 69 73 20 66 6f 72 20  ecified, is for 
c7b0: 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73  TclTLS to proces
c7c0: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64  s the associated
c7d0: 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c 62 61 63   library.callbac
c7e0: 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54  ks internally. T
c7f0: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76  he default behav
c800: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 62 20  ior when the <b 
c810: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
c820: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74  password</b> opt
c830: 69 6f 6e 0a 69 73 20 6e 6f 74 20 73 70 65 63 69  ion.is not speci
c840: 66 69 65 64 20 69 73 20 66 6f 72 20 54 63 6c 54  fied is for TclT
c850: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
c860: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
c870: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62  rary callbacks b
c880: 79 0a 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20  y.attempting to 
c890: 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63  call <b class="c
c8a0: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  md">tls::passwor
c8b0: 64 3c 2f 62 3e 2e 20 54 68 65 20 64 69 66 66 65  d</b>. The diffe
c8c0: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68  rence between th
c8d0: 65 73 65 20 74 77 6f 0a 62 65 68 61 76 69 6f 72  ese two.behavior
c8e0: 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e  s is a consequen
c8f0: 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e  ce of maintainin
c900: 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20  g compatibility 
c910: 77 69 74 68 20 65 61 72 6c 69 65 72 0a 69 6d 70  with earlier.imp
c920: 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70  lementations.</p
c930: 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65  >.<p><em>The use
c940: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63   of the referenc
c950: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 62 20 63  e callbacks <b c
c960: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
c970: 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62  callback</b>, <b
c980: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
c990: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a  ::password</b>,.
c9a0: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  and <b class="cm
c9b0: 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65  d">tls::validate
c9c0: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20  _command</b> is 
c9d0: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e  not recommended.
c9e0: 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d   They may be rem
c9f0: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65  oved from future
ca00: 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c   releases.</em><
ca10: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76  /p>.</div>.</div
ca20: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69  >.<div id="secti
ca30: 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on6" class="doct
ca40: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68  ools_section"><h
ca50: 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69  2><a name="secti
ca60: 6f 6e 36 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f  on6">Debug</a></
ca70: 68 32 3e 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74 20  h2>.<p>For most 
ca80: 64 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c  debugging needs,
ca90: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
caa0: 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b  ption">-callback
cab0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 63 61 6e 20  </b> option can 
cac0: 62 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69  be used to provi
cad0: 64 65 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e  de.sufficient in
cae0: 73 69 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d  sight and inform
caf0: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53  ation on the TLS
cb00: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70   handshake and p
cb10: 72 6f 67 72 65 73 73 2e 20 49 66 0a 66 75 72 74  rogress. If.furt
cb20: 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74  her troubleshoot
cb30: 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 6e  ing insight is n
cb40: 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 69  eeded, the compi
cb50: 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c  le time option.<
cb60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
cb70: 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 67 3c  >--enable-debug<
cb80: 2f 62 3e 20 63 61 6e 20 62 65 20 75 73 65 64 20  /b> can be used 
cb90: 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 20  to get detailed 
cba0: 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73  execution flow s
cbb0: 74 61 74 75 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c  tatus.</p>.<p>TL
cbc0: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61  S key logging ca
cbd0: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20  n be enabled by 
cbe0: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69  setting the envi
cbf0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65  ronment variable
cc00: 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  .<b class="varia
cc10: 62 6c 65 22 3e 53 53 4c 4b 45 59 4c 4f 47 46 49  ble">SSLKEYLOGFI
cc20: 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61  LE</b> to the na
cc30: 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74  me of the file t
cc40: 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77  o log to. Then w
cc50: 68 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a  henever TLS key.
cc60: 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65  material is gene
cc70: 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65  rated or receive
cc80: 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67  d it will be log
cc90: 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 2e  ged to the file.
cca0: 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 0a   This is useful.
ccb0: 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20  for logging key 
ccc0: 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b  data for network
ccd0: 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74   logging tools t
cce0: 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 70 74  o use to decrypt
ccf0: 20 74 68 65 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c   the data.</p>.<
cd00: 70 3e 54 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  p>The <b class="
cd10: 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64  variable">tls::d
cd20: 65 62 75 67 3c 2f 62 3e 20 76 61 72 69 61 62 6c  ebug</b> variabl
cd30: 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20  e provides some 
cd40: 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72  additional contr
cd50: 6f 6c 20 6f 76 65 72 20 74 68 65 0a 64 65 62 75  ol over the.debu
cd60: 67 20 6c 6f 67 67 69 6e 67 20 69 6e 20 74 68 65  g logging in the
cd70: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
cd80: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62  tls::callback</b
cd90: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  >, <b class="cmd
cda0: 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c  ">tls::password<
cdb0: 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73  /b>, and.<b clas
cdc0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c  s="cmd">tls::val
cdd0: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62  idate_command</b
cde0: 3e 20 64 65 66 61 75 6c 74 20 68 61 6e 64 6c 65  > default handle
cdf0: 72 73 20 69 6e 20 26 71 75 6f 74 3b 3c 62 20 63  rs in &quot;<b c
ce00: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c 73 2e  lass="file">tls.
ce10: 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54  tcl</b>&quot;..T
ce20: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65  he default value
ce30: 20 69 73 20 30 20 77 69 74 68 20 68 69 67 68 65   is 0 with highe
ce40: 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63 69  r values produci
ce50: 6e 67 20 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74  ng more diagnost
ce60: 69 63 20 6f 75 74 70 75 74 2c 0a 61 6e 64 20 77  ic output,.and w
ce70: 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74  ill also force t
ce80: 68 65 20 76 65 72 69 66 79 20 6d 65 74 68 6f 64  he verify method
ce90: 20 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d   in <b class="cm
cea0: 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b  d">tls::callback
ceb0: 3c 2f 62 3e 20 74 6f 20 61 63 63 65 70 74 20 74  </b> to accept t
cec0: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20  he.certificate, 
ced0: 65 76 65 6e 20 69 66 20 69 74 20 69 73 20 69 6e  even if it is in
cee0: 76 61 6c 69 64 20 77 68 65 6e 20 74 68 65 20 3c  valid when the <
cef0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
cf00: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e  >-validatecomman
cf10: 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 20 69 73 20  d</b>.option is 
cf20: 73 65 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d  set to <b class=
cf30: 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64  "cmd">tls::valid
cf40: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e  ate_command</b>.
cf50: 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20  </p>.<p><em>The 
cf60: 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61  use of the varia
cf70: 62 6c 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  ble <b class="va
cf80: 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62  riable">tls::deb
cf90: 75 67 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65  ug</b> is not re
cfa0: 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61  commended..It ma
cfb0: 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f  y be removed fro
cfc0: 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65  m future release
cfd0: 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69  s.</em></p>.</di
cfe0: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  v>.<div id="sect
cff0: 69 6f 6e 37 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion7" class="doc
d000: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
d010: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
d020: 69 6f 6e 37 22 3e 45 78 61 6d 70 6c 65 73 3c 2f  ion7">Examples</
d030: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 66  a></h2>.<p>The f
d040: 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 78 61  ollowing are exa
d050: 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 6f 20  mple scripts to 
d060: 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 70 61  download a webpa
d070: 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 69 6e  ge and file usin
d080: 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 6b 61  g the.http packa
d090: 67 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c  ge. See <span cl
d0a0: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61  ass="sectref"><a
d0b0: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34   href="#section4
d0c0: 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61  ">Certificate Va
d0d0: 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70  lidation</a></sp
d0e0: 61 6e 3e 20 66 6f 72 20 77 68 65 6e 20 74 68 65  an> for when the
d0f0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
d100: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c  n">-cadir</b>, <
d110: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
d120: 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 61 6e  >-cafile</b>, an
d130: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  d <b class="opti
d140: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e  on">-castore</b>
d150: 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 61 6c 73   options are als
d160: 6f 0a 6e 65 65 64 65 64 2e 20 53 65 65 20 74 68  o.needed. See th
d170: 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  e &quot;<b class
d180: 3d 22 66 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62  ="file">demos</b
d190: 3e 26 71 75 6f 74 3b 20 64 69 72 65 63 74 6f 72  >&quot; director
d1a0: 79 20 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70  y for more examp
d1b0: 6c 65 20 73 63 72 69 70 74 73 2e 3c 2f 70 3e 0a  le scripts.</p>.
d1c0: 3c 70 3e 45 78 61 6d 70 6c 65 20 23 31 3a 20 44  <p>Example #1: D
d1d0: 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 20 70 61  ownload a web pa
d1e0: 67 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73  ge</p>.<pre clas
d1f0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d  s="doctools_exam
d200: 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65  ple">.package re
d210: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61  quire http.packa
d220: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73  ge require tls.s
d230: 65 74 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74  et url &quot;htt
d240: 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f  ps://www.tcl.tk/
d250: 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67  &quot;.http::reg
d260: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20  ister https 443 
d270: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63  [list ::tls::soc
d280: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e  ket -autoservern
d290: 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31  ame 1 -require 1
d2a0: 5d 0a 23 20 47 65 74 20 55 52 4c 0a 73 65 74 20  ].# Get URL.set 
d2b0: 74 6f 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74  token [http::get
d2c0: 75 72 6c 20 24 75 72 6c 5d 0a 23 20 43 68 65 63  url $url].# Chec
d2d0: 6b 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b  k for error.if {
d2e0: 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74  [http::status $t
d2f0: 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b 6f  oken] ne &quot;o
d300: 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 20 20 20 70  k&quot;} {.    p
d310: 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71 75 6f  uts [format &quo
d320: 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f 74 3b  t;Error %s&quot;
d330: 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24   [http::status $
d340: 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 53 61 76 65  token]].}.# Save
d350: 20 77 65 62 20 70 61 67 65 20 74 6f 20 66 69 6c   web page to fil
d360: 65 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 65  e.set ch [open e
d370: 78 61 6d 70 6c 65 2e 68 74 6d 6c 20 77 62 5d 0a  xample.html wb].
d380: 70 75 74 73 20 24 63 68 20 5b 68 74 74 70 3a 3a  puts $ch [http::
d390: 64 61 74 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f  data $token].clo
d3a0: 73 65 20 24 63 68 0a 23 20 43 6c 65 61 6e 75 70  se $ch.# Cleanup
d3b0: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70  .::http::cleanup
d3c0: 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c   $token.</pre>.<
d3d0: 70 3e 45 78 61 6d 70 6c 65 20 23 32 3a 20 44 6f  p>Example #2: Do
d3e0: 77 6e 6c 6f 61 64 20 61 20 66 69 6c 65 3c 2f 70  wnload a file</p
d3f0: 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22 64 6f  >.<pre class="do
d400: 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e  ctools_example">
d410: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  .package require
d420: 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65   http.package re
d430: 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72  quire tls.set ur
d440: 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f  l &quot;https://
d450: 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72  wiki.tcl-lang.or
d460: 67 2f 73 69 74 65 6d 61 70 2e 78 6d 6c 26 71 75  g/sitemap.xml&qu
d470: 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73 74  ot;.http::regist
d480: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69  er https 443 [li
d490: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74  st ::tls::socket
d4a0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65   -autoservername
d4b0: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 23   1 -require 1].#
d4c0: 20 4f 70 65 6e 20 6f 75 74 70 75 74 20 66 69 6c   Open output fil
d4d0: 65 0a 73 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b  e.set filename [
d4e0: 66 69 6c 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a  file tail $url].
d4f0: 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 24 66 69  set ch [open $fi
d500: 6c 65 6e 61 6d 65 20 77 62 5d 0a 23 20 47 65 74  lename wb].# Get
d510: 20 66 69 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20   file.set token 
d520: 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 75 72 6c 20  [::http::geturl 
d530: 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20  $url -blocksize 
d540: 36 35 35 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24  65536 -channel $
d550: 63 68 5d 0a 23 20 43 68 65 63 6b 20 66 6f 72 20  ch].# Check for 
d560: 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a  error.if {[http:
d570: 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20  :status $token] 
d580: 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74  ne &quot;ok&quot
d590: 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66  ;} {.    puts [f
d5a0: 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72 72 6f  ormat &quot;Erro
d5b0: 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74 74 70  r %s&quot; [http
d5c0: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d  ::status $token]
d5d0: 5d 0a 7d 0a 23 20 43 6c 65 61 6e 75 70 0a 63 6c  ].}.# Cleanup.cl
d5e0: 6f 73 65 20 24 63 68 0a 3a 3a 68 74 74 70 3a 3a  ose $ch.::http::
d5f0: 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c  cleanup $token.<
d600: 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  /pre>.</div>.<di
d610: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 38 22 20  v id="section8" 
d620: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
d630: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
d640: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 38 22 3e  name="section8">
d650: 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 72  Special Consider
d660: 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a  ations</a></h2>.
d670: 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74  <p>The capabilit
d680: 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b  ies of this pack
d690: 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f  age can vary eno
d6a0: 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70  rmously based up
d6b0: 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69 6e 6b 65  on how the.linke
d6c0: 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69 62  d to OpenSSL lib
d6d0: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75  rary was configu
d6e0: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e  red and built. N
d6f0: 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20  ew versions may 
d700: 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65 72 20 70  obsolete.older p
d710: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73  rotocol versions
d720: 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20  , add or remove 
d730: 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20  ciphers, change 
d740: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20  default values, 
d750: 65 74 63 2e 0a 55 73 65 20 74 68 65 20 3c 62 20  etc..Use the <b 
d760: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
d770: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63  :protocols</b> c
d780: 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e  ommand to obtain
d790: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70   the supported.p
d7a0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73  rotocol versions
d7b0: 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  .</p>.</div>.<di
d7c0: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 39 22 20  v id="section9" 
d7d0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
d7e0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
d7f0: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 39 22 3e  name="section9">
d800: 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f  Error Messages</
d810: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 53 6f 6d 65 20  a></h2>.<p>Some 
d820: 4f 70 73 6e 53 53 6c 20 65 72 72 6f 72 20 6d 65  OpsnSSl error me
d830: 73 73 61 67 65 73 20 68 61 76 65 20 63 72 79 70  ssages have cryp
d840: 74 69 63 20 6d 65 61 6e 69 6e 67 73 2e 20 54 68  tic meanings. Th
d850: 69 73 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20  is is a list of 
d860: 6d 65 73 73 61 67 65 73 0a 61 6c 6f 6e 67 20 77  messages.along w
d870: 69 74 68 20 74 68 65 69 72 20 74 72 75 65 20 6d  ith their true m
d880: 65 61 6e 69 6e 67 2e 3c 2f 70 3e 0a 3c 64 6c 20  eaning.</p>.<dl 
d890: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
d8a0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
d8b0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
d8c0: 3e 70 61 63 6b 65 74 20 6c 65 6e 67 74 68 20 74  >packet length t
d8d0: 6f 6f 20 6c 6f 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  oo long</i></dt>
d8e0: 0a 3c 64 64 3e 3c 70 3e 43 6c 69 65 6e 74 20 68  .<dd><p>Client h
d8f0: 61 73 20 74 72 69 65 64 20 74 6f 20 63 6f 6e 6e  as tried to conn
d900: 65 63 74 20 74 6f 20 61 20 48 54 54 50 20 73 65  ect to a HTTP se
d910: 72 76 65 72 20 6f 6e 20 74 68 65 20 70 6c 61 69  rver on the plai
d920: 6e 2d 74 65 78 74 20 70 6f 72 74 20 69 6e 73 74  n-text port inst
d930: 65 61 64 20 6f 66 20 74 68 65 20 53 53 4c 2f 54  ead of the SSL/T
d940: 4c 53 20 70 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64  LS port.</p></dd
d950: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
d960: 61 72 67 22 3e 75 6e 65 78 70 65 63 74 65 64 20  arg">unexpected 
d970: 65 6f 66 20 77 68 69 6c 65 20 72 65 61 64 69 6e  eof while readin
d980: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
d990: 70 3e 50 65 65 72 20 68 61 73 20 63 6c 6f 73 65  p>Peer has close
d9a0: 64 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  d the connection
d9b0: 20 77 69 74 68 6f 75 74 20 73 65 6e 64 69 6e 67   without sending
d9c0: 20 74 68 65 20 26 71 75 6f 74 3b 63 6c 6f 73 65   the &quot;close
d9d0: 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b 20 73 68   notify&quot; sh
d9e0: 75 74 64 6f 77 6e 20 61 6c 65 72 74 2e 3c 2f 70  utdown alert.</p
d9f0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
da00: 61 73 73 3d 22 61 72 67 22 3e 77 72 6f 6e 67 20  ass="arg">wrong 
da10: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 3c 2f  version number</
da20: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43  i></dt>.<dd><p>C
da30: 6c 69 65 6e 74 20 68 61 73 20 74 72 69 65 64 20  lient has tried 
da40: 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 20 61 20  to connect to a 
da50: 6e 6f 6e 2d 48 54 54 50 20 73 65 72 76 65 72 20  non-HTTP server 
da60: 6f 6e 20 61 20 6e 6f 6e 2d 54 4c 53 20 28 69 2e  on a non-TLS (i.
da70: 65 2e 20 70 6c 61 69 6e 20 74 65 78 74 29 20 70  e. plain text) p
da80: 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  ort.</p></dd>.</
da90: 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  dl>.</div>.<div 
daa0: 69 64 3d 22 73 65 65 2d 61 6c 73 6f 22 20 63 6c  id="see-also" cl
dab0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
dac0: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
dad0: 6d 65 3d 22 73 65 65 2d 61 6c 73 6f 22 3e 53 65  me="see-also">Se
dae0: 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a  e Also</a></h2>.
daf0: 3c 70 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70  <p><a href="http
db00: 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e  s://www.openssl.
db10: 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61  org/">OpenSSL</a
db20: 3e 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 74 3c  >, http, socket<
db30: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  /p>.</div>.<div 
db40: 69 64 3d 22 6b 65 79 77 6f 72 64 73 22 20 63 6c  id="keywords" cl
db50: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
db60: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
db70: 6d 65 3d 22 6b 65 79 77 6f 72 64 73 22 3e 4b 65  me="keywords">Ke
db80: 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a  ywords</a></h2>.
db90: 3c 70 3e 49 2f 4f 2c 20 49 50 20 41 64 64 72 65  <p>I/O, IP Addre
dba0: 73 73 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c  ss, OpenSSL, SSL
dbb0: 2c 20 54 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54  , TCP, TLS, TclT
dbc0: 4c 53 2c 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73  LS, asynchronous
dbd0: 20 49 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74   I/O, bind, cert
dbe0: 69 66 69 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c  ificate, channel
dbf0: 2c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f  , connection, do
dc00: 6d 61 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c  main name, host,
dc10: 20 68 74 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c   https, network,
dc20: 20 6e 65 74 77 6f 72 6b 20 61 64 64 72 65 73 73   network address
dc30: 2c 20 73 6f 63 6b 65 74 2c 20 74 6c 73 3c 2f 70  , socket, tls</p
dc40: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
dc50: 3d 22 63 61 74 65 67 6f 72 79 22 20 63 6c 61 73  ="category" clas
dc60: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
dc70: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
dc80: 3d 22 63 61 74 65 67 6f 72 79 22 3e 43 61 74 65  ="category">Cate
dc90: 67 6f 72 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  gory</a></h2>.<p
dca0: 3e 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a  >tls</p>.</div>.
dcb0: 3c 64 69 76 20 69 64 3d 22 63 6f 70 79 72 69 67  <div id="copyrig
dcc0: 68 74 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  ht" class="docto
dcd0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
dce0: 3e 3c 61 20 6e 61 6d 65 3d 22 63 6f 70 79 72 69  ><a name="copyri
dcf0: 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f  ght">Copyright</
dd00: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 43 6f 70 79 72  a></h2>.<p>Copyr
dd10: 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 39 39  ight &copy; 1999
dd20: 20 4d 61 74 74 20 4e 65 77 6d 61 6e 3c 62 72 3e   Matt Newman<br>
dd30: 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79  .Copyright &copy
dd40: 3b 20 32 30 30 34 20 53 74 61 72 66 69 73 68 20  ; 2004 Starfish 
dd50: 53 79 73 74 65 6d 73 3c 62 72 3e 0a 43 6f 70 79  Systems<br>.Copy
dd60: 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 32  right &copy; 202
dd70: 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61 6e 3c  4 Brian O'Hagan<
dd80: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76  /p>.</div>.</div
dd90: 3e 3c 2f 62 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a  ></body></html>.