Hex Artifact Content

Artifact bfb653d3254edd7e4951ef5633e6ef33371c460c39b58472808bebede838b100:


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 31 2e 38 20 74 6c  e">tls(n) 1.8 tl
0880: 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c 53 20  s &quot;Tcl TLS 
0890: 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74 3b 3c  extension&quot;<
08a0: 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22 6e 61  /h1>.<div id="na
08b0: 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  me" class="docto
08c0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
08d0: 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65 22 3e  ><a name="name">
08e0: 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  Name</a></h2>.<p
08f0: 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67 20 74  >tls - binding t
0900: 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69  o the OpenSSL li
0910: 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72 79 70  brary for encryp
0920: 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64 20 49  ted socket and I
0930: 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75  /O channel commu
0940: 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a 3c 2f  nications</p>.</
0950: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 74 6f  div>.<div id="to
0960: 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  c" class="doctoo
0970: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
0980: 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e 54 61  <a name="toc">Ta
0990: 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 73 3c  ble Of Contents<
09a0: 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63 6c 61  /a></h2>.<ul cla
09b0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 6f 63  ss="doctools_toc
09c0: 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  ">.<li class="do
09d0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
09e0: 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22 3e 54  <a href="#toc">T
09f0: 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 73  able Of Contents
0a00: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c  </a></li>.<li cl
0a10: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
0a20: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0a30: 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70  #synopsis">Synop
0a40: 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  sis</a></li>.<li
0a50: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0a60: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0a70: 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e 44 65  f="#section1">De
0a80: 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c  scription</a></l
0a90: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
0aa0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
0ab0: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
0ac0: 6e 32 22 3e 43 6f 6d 6d 61 6e 64 73 3c 2f 61 3e  n2">Commands</a>
0ad0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0ae0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
0af0: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  n"><a href="#sec
0b00: 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61  tion3">Certifica
0b10: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
0b20: 3e 0a 3c 75 6c 3e 0a 3c 6c 69 20 63 6c 61 73 73  >.<ul>.<li class
0b30: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
0b40: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0b50: 23 73 75 62 73 65 63 74 69 6f 6e 31 22 3e 50 4b  #subsection1">PK
0b60: 49 20 61 6e 64 20 43 65 72 74 69 66 69 63 61 74  I and Certificat
0b70: 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  es</a></li>.<li 
0b80: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0b90: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  subsection"><a h
0ba0: 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e  ref="#subsection
0bb0: 32 22 3e 53 75 6d 6d 61 72 79 20 6f 66 20 63 6f  2">Summary of co
0bc0: 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f  mmand line optio
0bd0: 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ns</a></li>.<li 
0be0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0bf0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  subsection"><a h
0c00: 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e  ref="#subsection
0c10: 33 22 3e 57 68 65 6e 20 61 72 65 20 63 6f 6d 6d  3">When are comm
0c20: 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73  and line options
0c30: 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f 6c 69   needed?</a></li
0c40: 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c  >.</ul>.</li>.<l
0c50: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0c60: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0c70: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43  ef="#section4">C
0c80: 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c  allback Options<
0c90: 2f 61 3e 0a 3c 75 6c 3e 0a 3c 6c 69 20 63 6c 61  /a>.<ul>.<li cla
0ca0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62  ss="doctools_sub
0cb0: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0cc0: 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 34 22 3e  ="#subsection4">
0cd0: 56 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d 6d 61  Values for Comma
0ce0: 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c  nd Callback</a><
0cf0: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0d00: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74  doctools_subsect
0d10: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0d20: 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 61 6c 75  ubsection5">Valu
0d30: 65 73 20 66 6f 72 20 50 61 73 73 77 6f 72 64 20  es for Password 
0d40: 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69  Callback</a></li
0d50: 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63  >.<li class="doc
0d60: 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e  tools_subsection
0d70: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73  "><a href="#subs
0d80: 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65 73 20  ection6">Values 
0d90: 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43 6f 6d  for Validate Com
0da0: 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61  mand Callback</a
0db0: 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 6c  ></li>.</ul>.</l
0dc0: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
0dd0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
0de0: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
0df0: 6e 35 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f 6c  n5">Debug</a></l
0e00: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
0e10: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
0e20: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
0e30: 6e 36 22 3e 44 65 62 75 67 20 45 78 61 6d 70 6c  n6">Debug Exampl
0e40: 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  es</a></li>.<li 
0e50: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0e60: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0e70: 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e 48 54 54  ="#section7">HTT
0e80: 50 20 50 61 63 6b 61 67 65 20 45 78 61 6d 70 6c  P Package Exampl
0e90: 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  es</a></li>.<li 
0ea0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0eb0: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0ec0: 3d 22 23 73 65 63 74 69 6f 6e 38 22 3e 53 70 65  ="#section8">Spe
0ed0: 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 61 74 69  cial Considerati
0ee0: 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ons</a></li>.<li
0ef0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0f00: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65  _section"><a hre
0f10: 66 3d 22 23 73 65 65 2d 61 6c 73 6f 22 3e 53 65  f="#see-also">Se
0f20: 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a  e Also</a></li>.
0f30: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0f40: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0f50: 68 72 65 66 3d 22 23 6b 65 79 77 6f 72 64 73 22  href="#keywords"
0f60: 3e 4b 65 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c  >Keywords</a></l
0f70: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f  i>.<li class="do
0f80: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
0f90: 3c 61 20 68 72 65 66 3d 22 23 63 61 74 65 67 6f  <a href="#catego
0fa0: 72 79 22 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e  ry">Category</a>
0fb0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0fc0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
0fd0: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 63 6f 70  n"><a href="#cop
0fe0: 79 72 69 67 68 74 22 3e 43 6f 70 79 72 69 67 68  yright">Copyrigh
0ff0: 74 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e  t</a></li>.</ul>
1000: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d  .</div>.<div id=
1010: 22 73 79 6e 6f 70 73 69 73 22 20 63 6c 61 73 73  "synopsis" class
1020: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
1030: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d  on"><h2><a name=
1040: 22 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70  "synopsis">Synop
1050: 73 69 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69  sis</a></h2>.<di
1060: 76 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  v class="doctool
1070: 73 5f 73 79 6e 6f 70 73 69 73 22 3e 0a 3c 75 6c  s_synopsis">.<ul
1080: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
1090: 5f 72 65 71 75 69 72 65 6d 65 6e 74 73 22 3e 0a  _requirements">.
10a0: 3c 6c 69 3e 70 61 63 6b 61 67 65 20 72 65 71 75  <li>package requ
10b0: 69 72 65 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b  ire <b class="pk
10c0: 67 6e 61 6d 65 22 3e 54 63 6c 20 38 2e 35 2d 3c  gname">Tcl 8.5-<
10d0: 2f 62 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 70 61 63  /b></li>.<li>pac
10e0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 3c 62 20  kage require <b 
10f0: 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e  class="pkgname">
1100: 74 6c 73 20 31 2e 38 3c 2f 62 3e 3c 2f 6c 69 3e  tls 1.8</b></li>
1110: 0a 3c 2f 75 6c 3e 0a 3c 75 6c 20 63 6c 61 73 73  .</ul>.<ul class
1120: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61  ="doctools_synta
1130: 78 22 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d  x">.<li><a href=
1140: 22 23 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  "#1"><b class="c
1150: 6d 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62  md">tls::init</b
1160: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1170: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1180: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
1190: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
11a0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
11b0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
11c0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
11d0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
11e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
11f0: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
1200: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1210: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
1220: 3d 22 23 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="#2"><b class="
1230: 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  cmd">tls::socket
1240: 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73  </b> <span class
1250: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73  ="opt">?<i class
1260: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f  ="arg">-option</
1270: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1280: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1290: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c   class="arg">val
12a0: 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  ue</i>?</span> <
12b0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22  span class="opt"
12c0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  >?<i class="arg"
12d0: 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e  >-option value .
12e0: 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  ..</i>?</span> <
12f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f  i class="arg">ho
1300: 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d  st</i> <i class=
1310: 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f  "arg">port</i></
1320: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68  a></li>.<li><a h
1330: 72 65 66 3d 22 23 33 22 3e 3c 62 20 63 6c 61 73  ref="#3"><b clas
1340: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63  s="cmd">tls::soc
1350: 6b 65 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73  ket</b> <b class
1360: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65  ="option">-serve
1370: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
1380: 61 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e  arg">command</i>
1390: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
13a0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
13b0: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
13c0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
13d0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
13e0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
13f0: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1400: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1410: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1420: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
1430: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c  i>?</span> <i cl
1440: 61 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f  ass="arg">port</
1450: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e  i></a></li>.<li>
1460: 3c 61 20 68 72 65 66 3d 22 23 34 22 3e 3c 62 20  <a href="#4"><b 
1470: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
1480: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63  :import</b> <i c
1490: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
14a0: 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61  el</i> <span cla
14b0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
14c0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
14d0: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
14e0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
14f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
1500: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  alue</i>?</span>
1510: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
1520: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
1530: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65  g">-option value
1540: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e   ...</i>?</span>
1550: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61  </a></li>.<li><a
1560: 20 68 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c   href="#5"><b cl
1570: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75  ass="cmd">tls::u
1580: 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63  nimport</b> <i c
1590: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
15a0: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  el</i></a></li>.
15b0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 36 22  <li><a href="#6"
15c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
15d0: 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f  tls::handshake</
15e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
15f0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
1600: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1610: 65 66 3d 22 23 37 22 3e 3c 62 20 63 6c 61 73 73  ef="#7"><b class
1620: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74  ="cmd">tls::stat
1630: 75 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61  us</b> <span cla
1640: 73 73 3d 22 6f 70 74 22 3e 3f 3c 62 20 63 6c 61  ss="opt">?<b cla
1650: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63  ss="option">-loc
1660: 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  al</b>?</span> <
1670: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
1680: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c  annel</i></a></l
1690: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  i>.<li><a href="
16a0: 23 38 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #8"><b class="cm
16b0: 64 22 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  d">tls::connecti
16c0: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
16d0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
16e0: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
16f0: 61 20 68 72 65 66 3d 22 23 39 22 3e 3c 62 20 63  a href="#9"><b c
1700: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1710: 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61  ciphers</b> <spa
1720: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1730: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72  i class="arg">pr
1740: 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61  otocol</i>?</spa
1750: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1760: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1770: 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e  arg">verbose</i>
1780: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63  ?</span> <span c
1790: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63  lass="opt">?<i c
17a0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f  lass="arg">suppo
17b0: 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  rted</i>?</span>
17c0: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61  </a></li>.<li><a
17d0: 20 68 72 65 66 3d 22 23 31 30 22 3e 3c 62 20 63   href="#10"><b c
17e0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
17f0: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61  protocols</b></a
1800: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1810: 65 66 3d 22 23 31 31 22 3e 3c 62 20 63 6c 61 73  ef="#11"><b clas
1820: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72  s="cmd">tls::ver
1830: 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69  sion</b></a></li
1840: 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c  >.</ul>.</div>.<
1850: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
1860: 65 63 74 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22  ection1" class="
1870: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
1880: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h2><a name="s
1890: 65 63 74 69 6f 6e 31 22 3e 44 65 73 63 72 69 70  ection1">Descrip
18a0: 74 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  tion</a></h2>.<p
18b0: 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20  >This extension 
18c0: 70 72 6f 76 69 64 65 73 20 54 43 4c 20 73 63 72  provides TCL scr
18d0: 69 70 74 20 61 63 63 65 73 73 20 74 6f 20 73 65  ipt access to se
18e0: 63 75 72 65 20 73 6f 63 6b 65 74 20 63 6f 6d 6d  cure socket comm
18f0: 75 6e 69 63 61 74 69 6f 6e 73 0a 75 73 69 6e 67  unications.using
1900: 20 74 68 65 20 54 72 61 6e 73 70 6f 72 74 20 4c   the Transport L
1910: 61 79 65 72 20 53 65 63 75 72 69 74 79 20 28 54  ayer Security (T
1920: 4c 53 29 20 70 72 6f 74 6f 63 6f 6c 2e 20 49 74  LS) protocol. It
1930: 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65   provides a gene
1940: 72 69 63 0a 62 69 6e 64 69 6e 67 20 74 6f 20 3c  ric.binding to <
1950: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
1960: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
1970: 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75  ">OpenSSL</a>, u
1980: 74 69 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 62 20  tilizing the.<b 
1990: 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 54  class="syscmd">T
19a0: 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c  cl_StackChannel<
19b0: 2f 62 3e 20 41 50 49 20 69 6e 20 54 43 4c 20 38  /b> API in TCL 8
19c0: 2e 34 20 61 6e 64 20 68 69 67 68 65 72 2e 0a 54  .4 and higher..T
19d0: 68 65 73 65 20 73 6f 63 6b 65 74 73 20 62 65 68  hese sockets beh
19e0: 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 65 20  ave exactly the 
19f0: 73 61 6d 65 20 61 73 20 63 68 61 6e 6e 65 6c 73  same as channels
1a00: 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 20 74   created using t
1a10: 68 65 20 62 75 69 6c 74 2d 69 6e 0a 3c 62 20 63  he built-in.<b c
1a20: 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f  lass="syscmd">so
1a30: 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64  cket</b> command
1a40: 2c 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 64 64  , along with add
1a50: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20  itional options 
1a60: 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 0a  for controlling.
1a70: 74 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 73  the SSL/TLS sess
1a80: 69 6f 6e 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a  ion.</p>.</div>.
1a90: 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e  <div id="section
1aa0: 32 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  2" class="doctoo
1ab0: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
1ac0: 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e  <a name="section
1ad0: 32 22 3e 43 6f 6d 6d 61 6e 64 73 3c 2f 61 3e 3c  2">Commands</a><
1ae0: 2f 68 32 3e 0a 3c 70 3e 54 79 70 69 63 61 6c 6c  /h2>.<p>Typicall
1af0: 79 20 6f 6e 65 20 77 6f 75 6c 64 20 75 73 65 20  y one would use 
1b00: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  the <b class="cm
1b10: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
1b20: 62 3e 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 63 72  b> command to cr
1b30: 65 61 74 65 20 61 20 6e 65 77 20 65 6e 63 72 79  eate a new encry
1b40: 70 74 65 64 0a 54 43 50 20 73 6f 63 6b 65 74 2e  pted.TCP socket.
1b50: 20 49 74 20 69 73 20 63 6f 6d 70 61 74 69 62 6c   It is compatibl
1b60: 65 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 76  e with the nativ
1b70: 65 20 54 43 4c 20 3c 62 20 63 6c 61 73 73 3d 22  e TCL <b class="
1b80: 73 79 73 63 6d 64 22 3e 3a 3a 73 6f 63 6b 65 74  syscmd">::socket
1b90: 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 0a 41 6c  </b> command..Al
1ba0: 74 65 72 6e 61 74 69 76 65 6c 79 20 66 6f 72 20  ternatively for 
1bb0: 61 6e 20 65 78 69 73 74 69 6e 67 20 54 43 50 20  an existing TCP 
1bc0: 73 6f 63 6b 65 74 2c 20 74 68 65 20 3c 62 20 63  socket, the <b c
1bd0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1be0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 63 6f 6d 6d 61  import</b> comma
1bf0: 6e 64 20 63 61 6e 20 62 65 0a 75 73 65 64 20 74  nd can be.used t
1c00: 6f 20 73 74 61 72 74 20 54 4c 53 20 6f 6e 20 74  o start TLS on t
1c10: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f  he connection.</
1c20: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
1c30: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
1c40: 6e 73 22 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65  ns">.<dt><a name
1c50: 3d 22 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  ="1"><b class="c
1c60: 6d 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62  md">tls::init</b
1c70: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1c80: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1c90: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
1ca0: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
1cb0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
1cc0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
1cd0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1ce0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1cf0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
1d00: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
1d10: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1d20: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4f 70 74 69  /dt>.<dd><p>Opti
1d30: 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f  onal function to
1d40: 20 73 65 74 20 74 68 65 20 64 65 66 61 75 6c 74   set the default
1d50: 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79   options used by
1d60: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
1d70: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 2e  tls::socket</b>.
1d80: 20 49 66 20 79 6f 75 0a 63 61 6c 6c 20 3c 62 20   If you.call <b 
1d90: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
1da0: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 64 69 72 65  :import</b> dire
1db0: 63 74 6c 79 2c 20 74 68 69 73 20 63 6f 6d 6d 61  ctly, this comma
1dc0: 6e 64 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74  nd has no effect
1dd0: 2e 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 0a 73  . This command.s
1de0: 75 70 70 6f 72 74 73 20 61 6c 6c 20 6f 66 20 74  upports all of t
1df0: 68 65 20 73 61 6d 65 20 6f 70 74 69 6f 6e 73 20  he same options 
1e00: 61 73 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  as the <b class=
1e10: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
1e20: 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c 20 74  t</b> command, t
1e30: 68 6f 75 67 68 20 79 6f 75 0a 73 68 6f 75 6c 64  hough you.should
1e40: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69   limit your opti
1e50: 6f 6e 73 20 74 6f 20 6f 6e 6c 79 20 54 4c 53 20  ons to only TLS 
1e60: 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f 70  related ones.</p
1e70: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61  ></dd>.<dt><a na
1e80: 6d 65 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 3d  me="2"><b class=
1e90: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
1ea0: 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73  t</b> <span clas
1eb0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1ec0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
1ed0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
1ee0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1ef0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
1f00: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
1f10: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1f20: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1f30: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
1f40: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  ...</i>?</span> 
1f50: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68  <i class="arg">h
1f60: 6f 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73  ost</i> <i class
1f70: 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c  ="arg">port</i><
1f80: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
1f90: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72  This is a helper
1fa0: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75   function that u
1fb0: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65  tilizes the unde
1fc0: 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20  rlying commands 
1fd0: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
1fe0: 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e 64  ">socket</b>.and
1ff0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
2000: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20  tls::import</b> 
2010: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 6f  to create the co
2020: 6e 6e 65 63 74 69 6f 6e 2e 20 49 74 20 62 65 68  nnection. It beh
2030: 61 76 65 73 20 74 68 65 20 73 61 6d 65 20 61 73  aves the same as
2040: 20 74 68 65 0a 6e 61 74 69 76 65 20 54 43 4c 20   the.native TCL 
2050: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
2060: 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d  ">socket</b> com
2070: 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 73  mand, but also s
2080: 75 70 70 6f 72 74 73 20 74 68 65 20 3c 62 20 63  upports the <b c
2090: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 69  lass="cmd">tls:i
20a0: 6d 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e  mport</b>.comman
20b0: 64 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 20 6f  d options with o
20c0: 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70  ne additional op
20d0: 74 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 6e 73  tion. It returns
20e0: 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 61 6e   the channel han
20f0: 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 20 6e  dle id.for the n
2100: 65 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 0a 3c  ew socket.</p>.<
2110: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
2120: 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74  ls_options">.<dt
2130: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
2140: 6e 22 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61  n">-autoserverna
2150: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
2160: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f  "arg">bool</i></
2170: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 66 20 3c 62  dt>.<dd><p>If <b
2180: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
2190: 72 75 65 3c 2f 62 3e 2c 20 61 75 74 6f 6d 61 74  rue</b>, automat
21a0: 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20 3c  ically set the <
21b0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
21c0: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e  >-servername</b>
21d0: 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 74 68 65   argument to the
21e0: 0a 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 20 61  .<em>host</em> a
21f0: 72 67 75 6d 65 6e 74 2e 20 44 65 66 61 75 6c 74  rgument. Default
2200: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
2210: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c  nst">false</b>.<
2220: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
2230: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  dd>.<dt><a name=
2240: 22 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  "3"><b class="cm
2250: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
2260: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  b> <b class="opt
2270: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e  ion">-server</b>
2280: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
2290: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61  command</i> <spa
22a0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
22b0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
22c0: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  ption</i>?</span
22d0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
22e0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
22f0: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f  rg">value</i>?</
2300: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
2310: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
2320: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20  s="arg">-option 
2330: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f  value ...</i>?</
2340: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22  span> <i class="
2350: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
2360: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 61  ></dt>.<dd><p>Sa
2370: 6d 65 20 61 73 20 70 72 65 76 69 6f 75 73 2c 20  me as previous, 
2380: 62 75 74 20 69 6e 73 74 65 61 64 20 63 72 65 61  but instead crea
2390: 74 65 73 20 61 20 73 65 72 76 65 72 20 73 6f 63  tes a server soc
23a0: 6b 65 74 20 66 6f 72 20 63 6c 69 65 6e 74 73 20  ket for clients 
23b0: 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 0a 6a 75  to connect to.ju
23c0: 73 74 20 6c 69 6b 65 20 74 68 65 20 54 63 6c 20  st like the Tcl 
23d0: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
23e0: 22 3e 73 6f 63 6b 65 74 20 2d 73 65 72 76 65 72  ">socket -server
23f0: 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 20 49 74  </b> command. It
2400: 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 68 61   returns the cha
2410: 6e 6e 65 6c 0a 68 61 6e 64 6c 65 20 69 64 20 66  nnel.handle id f
2420: 6f 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b 65  or the new socke
2430: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  t.</p></dd>.<dt>
2440: 3c 61 20 6e 61 6d 65 3d 22 34 22 3e 3c 62 20 63  <a name="4"><b c
2450: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
2460: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c  import</b> <i cl
2470: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
2480: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73  l</i> <span clas
2490: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
24a0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c  s="arg">-option<
24b0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
24c0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
24d0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61  i class="arg">va
24e0: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20  lue</i>?</span> 
24f0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
2500: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
2510: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20  ">-option value 
2520: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ...</i>?</span><
2530: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
2540: 53 74 61 72 74 20 54 4c 53 20 65 6e 63 72 79 70  Start TLS encryp
2550: 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 6e  tion on TCL chan
2560: 6e 65 6c 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  nel <i class="ar
2570: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 76  g">channel</i> v
2580: 69 61 20 61 20 73 74 61 63 6b 65 64 20 63 68 61  ia a stacked cha
2590: 6e 6e 65 6c 2e 20 49 74 0a 6e 65 65 64 20 6e 6f  nnel. It.need no
25a0: 74 20 62 65 20 61 20 73 6f 63 6b 65 74 2c 20 62  t be a socket, b
25b0: 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20  ut must provide 
25c0: 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66  bi-directional f
25d0: 6c 6f 77 2e 20 41 6c 73 6f 20 73 65 74 73 20 73  low. Also sets s
25e0: 65 73 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65 72  ession.parameter
25f0: 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68  s for SSL handsh
2600: 61 6b 65 2e 20 56 61 6c 69 64 20 6f 70 74 69 6f  ake. Valid optio
2610: 6e 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20  ns are:</p>.<dl 
2620: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
2630: 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62  options">.<dt><b
2640: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
2650: 2d 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  -alpn</b> <i cla
2660: 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69  ss="arg">list</i
2670: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69  ></dt>.<dd><p>Li
2680: 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 20  st of protocols 
2690: 74 6f 20 6f 66 66 65 72 20 64 75 72 69 6e 67 20  to offer during 
26a0: 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65  Application-Laye
26b0: 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74  r Protocol Negot
26c0: 69 61 74 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20 46  iation.(ALPN). F
26d0: 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 62 20 63  or example: <b c
26e0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 32 3c  lass="const">h2<
26f0: 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73  /b> and <b class
2700: 3d 22 63 6f 6e 73 74 22 3e 68 74 74 70 2f 31 2e  ="const">http/1.
2710: 31 3c 2f 62 3e 2c 20 62 75 74 20 6e 6f 74 20 3c  1</b>, but not <
2720: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
2730: 68 33 3c 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c 61  h3</b> or.<b cla
2740: 73 73 3d 22 63 6f 6e 73 74 22 3e 71 75 69 63 3c  ss="const">quic<
2750: 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  /b>.</p></dd>.<d
2760: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
2770: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c  on">-cadir</b> <
2780: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 69  i class="arg">di
2790: 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e  rectory</i></dt>
27a0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
27b0: 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20  s the directory 
27c0: 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66  where the Certif
27d0: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
27e0: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
27f0: 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54 68  s are.stored. Th
2800: 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61  e default is pla
2810: 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61  tform specific a
2820: 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 74  nd can be set at
2830: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54   compile time. T
2840: 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61 74  he.default locat
2850: 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72  ion can be overr
2860: 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62 20  idden by the <b 
2870: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
2880: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62  >SSL_CERT_DIR</b
2890: 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61  > environment.va
28a0: 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70 61  riable. See <spa
28b0: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
28c0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
28d0: 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74  ion3">Certificat
28e0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
28f0: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
2900: 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64   details.</p></d
2910: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
2920: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
2930: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
2940: 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e  rg">filename</i>
2950: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
2960: 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 20  cifies the file 
2970: 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 69  with the Certifi
2980: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28  cate Authority (
2990: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73  CA) certificates
29a0: 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c   to use in.<b cl
29b0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c  ass="const">PEM<
29c0: 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e  /b> file format.
29d0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
29e0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
29f0: 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f  file">cert.pem</
2a00: 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65  b>&quot;, in the
2a10: 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f   OpenSSL.directo
2a20: 72 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ry. The default 
2a30: 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72  file can be over
2a40: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62  ridden by the <b
2a50: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
2a60: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c  ">SSL_CERT_FILE<
2a70: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a  /b> environment.
2a80: 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73  variable. See <s
2a90: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
2aa0: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
2ab0: 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63  ction3">Certific
2ac0: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f  ate Validation</
2ad0: 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f  a></span> for mo
2ae0: 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c  re details.</p><
2af0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
2b00: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
2b10: 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ore</b> <i class
2b20: 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f  ="arg">URI</i></
2b30: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
2b40: 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d  fies the Uniform
2b50: 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69   Resource Identi
2b60: 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20 74  fier (URI) for t
2b70: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
2b80: 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74  uthority.(CA) st
2b90: 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62  ore, which may b
2ba0: 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61  e a single conta
2bb0: 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f  iner or a catalo
2bc0: 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e  g of containers.
2bd0: 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f  .Starting with O
2be0: 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53  penSSL 3.2 on MS
2bf0: 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f   Windows, set to
2c00: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
2c10: 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e  "const">org.open
2c20: 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c  ssl.winstore://<
2c30: 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65  /b>&quot;.to use
2c40: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53   the built-in MS
2c50: 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69   Windows Certifi
2c60: 63 61 74 65 20 53 74 6f 72 65 2e 20 53 65 65 0a  cate Store. See.
2c70: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
2c80: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
2c90: 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66  section3">Certif
2ca0: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e  icate Validation
2cb0: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20  </a></span> for 
2cc0: 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70  more details.</p
2cd0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
2ce0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65  ass="option">-ce
2cf0: 72 74 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c  rtfile</b> <i cl
2d00: 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61  ass="arg">filena
2d10: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  me</i></dt>.<dd>
2d20: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
2d30: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c   name of the fil
2d40: 65 20 77 69 74 68 20 74 68 65 20 63 65 72 74 69  e with the certi
2d50: 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 69 6e  ficate to use in
2d60: 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61 73 20 74   PEM format.as t
2d70: 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74  he local (client
2d80: 20 6f 72 20 73 65 72 76 65 72 29 20 63 65 72 74   or server) cert
2d90: 69 66 69 63 61 74 65 2e 20 49 74 20 61 6c 73 6f  ificate. It also
2da0: 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 75   contains the pu
2db0: 62 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64  blic key.</p></d
2dc0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
2dd0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f  "option">-cert</
2de0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
2df0: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  ">string</i></dt
2e00: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
2e10: 65 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61  es the certifica
2e20: 74 65 20 74 6f 20 75 73 65 20 61 73 20 61 20 44  te to use as a D
2e30: 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e  ER encoded strin
2e40: 67 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f  g (X.509 DER).</
2e50: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
2e60: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
2e70: 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61  ipher</b> <i cla
2e80: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
2e90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
2ea0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69  Specifies the li
2eb0: 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f  st of ciphers to
2ec0: 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e 32   use for TLS 1.2
2ed0: 20 61 6e 64 20 65 61 72 6c 69 65 72 20 63 6f 6e   and earlier con
2ee0: 6e 65 63 74 69 6f 6e 73 2e 0a 53 74 72 69 6e 67  nections..String
2ef0: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 26 71 75 6f   is a colon &quo
2f00: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  t;<b class="cons
2f10: 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 73  t">:</b>&quot; s
2f20: 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66  eparated list of
2f30: 20 63 69 70 68 65 72 73 2e 0a 43 69 70 68 65 72   ciphers..Cipher
2f40: 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65  s can be combine
2f50: 64 20 75 73 69 6e 67 20 74 68 65 20 26 71 75 6f  d using the &quo
2f60: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  t;<b class="cons
2f70: 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 63  t">+</b>&quot; c
2f80: 68 61 72 61 63 74 65 72 2e 0a 50 72 65 66 69 78  haracter..Prefix
2f90: 65 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 74  es can be used t
2fa0: 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65  o permanently re
2fb0: 6d 6f 76 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c  move &quot;<b cl
2fc0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f 62  ass="const">!</b
2fd0: 3e 26 71 75 6f 74 3b 2c 20 64 65 6c 65 74 65 20  >&quot;, delete 
2fe0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
2ff0: 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f  const">-</b>&quo
3000: 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74  t;, or.move to t
3010: 68 65 20 65 6e 64 20 26 71 75 6f 74 3b 3c 62 20  he end &quot;<b 
3020: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c  class="const">+<
3030: 2f 62 3e 26 71 75 6f 74 3b 20 61 20 73 70 65 63  /b>&quot; a spec
3040: 69 66 69 65 64 20 63 69 70 68 65 72 2e 0a 4b 65  ified cipher..Ke
3050: 79 77 6f 72 64 73 20 3c 62 20 63 6c 61 73 73 3d  ywords <b class=
3060: 22 63 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47 54  "const">@STRENGT
3070: 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61  H</b> (sort by a
3080: 6c 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e  lgorithm key len
3090: 67 74 68 29 2c 0a 3c 62 20 63 6c 61 73 73 3d 22  gth),.<b class="
30a0: 63 6f 6e 73 74 22 3e 40 53 45 43 4c 45 56 45 4c  const">@SECLEVEL
30b0: 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20  =</b><em>n</em> 
30c0: 28 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65  (set security le
30d0: 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 3c  vel to n), and.<
30e0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
30f0: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65  DEFAULT</b> (use
3100: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20   default cipher 
3110: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f  list, at start o
3120: 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 65  nly) can also be
3130: 20 73 70 65 63 69 66 69 65 64 2e 0a 53 65 65 20   specified..See 
3140: 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74  the <a href="htt
3150: 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73  ps://docs.openss
3160: 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e  l.org/master/man
3170: 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72  1/openssl-cipher
3180: 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e  s/#options">Open
3190: 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74  SSL</a>.document
31a0: 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75  ation for the fu
31b0: 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64  ll list of valid
31c0: 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64   values.</p></dd
31d0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
31e0: 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72 73  option">-ciphers
31f0: 75 69 74 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61  uites</b> <i cla
3200: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
3210: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
3220: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69  Specifies the li
3230: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69  st of cipher sui
3240: 74 65 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54  tes to use for T
3250: 4c 53 20 31 2e 33 20 61 73 20 61 20 63 6f 6c 6f  LS 1.3 as a colo
3260: 6e 0a 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  n.&quot;<b class
3270: 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71  ="const">:</b>&q
3280: 75 6f 74 3b 20 73 65 70 61 72 61 74 65 64 20 6c  uot; separated l
3290: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75  ist of cipher su
32a0: 69 74 65 20 6e 61 6d 65 73 2e 20 53 65 65 20 74  ite names. See t
32b0: 68 65 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70  he.<a href="http
32c0: 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c  s://docs.openssl
32d0: 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31  .org/master/man1
32e0: 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73  /openssl-ciphers
32f0: 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53  /#options">OpenS
3300: 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61  SL</a>.documenta
3310: 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c  tion for the ful
3320: 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20  l list of valid 
3330: 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  values.</p></dd>
3340: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
3350: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
3360: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
3370: 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c  g">callback</i><
3380: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
3390: 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61  ifies the callba
33a0: 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65  ck command to be
33b0: 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65   invoked at seve
33c0: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e  ral points durin
33d0: 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20  g the.handshake 
33e0: 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20  to pass errors, 
33f0: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74  tracing informat
3400: 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f  ion, and protoco
3410: 6c 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65 20  l messages..See 
3420: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
3430: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
3440: 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61  section4">Callba
3450: 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f  ck Options</a></
3460: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69  span> for more i
3470: 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  nfo.</p></dd>.<d
3480: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3490: 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f 62  on">-dhparams</b
34a0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
34b0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >filename</i></d
34c0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
34d0: 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d 48  ies the Diffie-H
34e0: 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 61  ellman (DH) para
34f0: 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70 3e  meters file.</p>
3500: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3510: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79  ss="option">-key
3520: 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  file</b> <i clas
3530: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65  s="arg">filename
3540: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3550: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 70  >Specifies the p
3560: 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 2e  rivate key file.
3570: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
3580: 74 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65 0a  to use the file.
3590: 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65  specified by the
35a0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
35b0: 2d 63 65 72 74 66 69 6c 65 3c 2f 69 3e 20 6f 70  -certfile</i> op
35c0: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  tion.</p></dd>.<
35d0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
35e0: 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 3c 69  ion">-key</b> <i
35f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
3600: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
3610: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
3620: 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 6f  e private key to
3630: 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65 6e   use as a DER en
3640: 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 50 4b  coded string (PK
3650: 43 53 23 31 20 44 45 52 29 2e 3c 2f 70 3e 3c 2f  CS#1 DER).</p></
3660: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
3670: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6d 6f 64 65 6c  ="option">-model
3680: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
3690: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  rg">channel</i><
36a0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63  /dt>.<dd><p>Forc
36b0: 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74  e this channel t
36c0: 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d 65  o share the same
36d0: 20 3c 69 20 63 6c 61 73 73 3d 22 74 65 72 6d 22   <i class="term"
36e0: 3e 53 53 4c 5f 43 54 58 3c 2f 69 3e 20 73 74 72  >SSL_CTX</i> str
36f0: 75 63 74 75 72 65 20 61 73 20 74 68 65 0a 73 70  ucture as the.sp
3700: 65 63 69 66 69 65 64 20 3c 69 20 63 6c 61 73 73  ecified <i class
3710: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f  ="arg">channel</
3720: 69 3e 2c 20 61 6e 64 20 74 68 65 72 65 66 6f 72  i>, and therefor
3730: 65 20 73 68 61 72 65 20 63 6f 6e 66 69 67 2c 20  e share config, 
3740: 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 63 2e 3c  callbacks, etc.<
3750: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
3760: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
3770: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20  password</b> <i 
3780: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c  class="arg">call
3790: 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  back</i></dt>.<d
37a0: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
37b0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d  he callback comm
37c0: 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68  and to invoke wh
37d0: 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73  en OpenSSL needs
37e0: 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a 70 61 73   to obtain a.pas
37f0: 73 77 6f 72 64 2e 20 54 68 69 73 20 69 73 20 74  sword. This is t
3800: 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 6f  ypically used to
3810: 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76   unlock the priv
3820: 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72  ate key of a cer
3830: 74 69 66 69 63 61 74 65 2e 0a 54 68 65 20 63 61  tificate..The ca
3840: 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65  llback should re
3850: 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 20  turn a password 
3860: 73 74 72 69 6e 67 2e 20 53 65 65 20 3c 73 70 61  string. See <spa
3870: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
3880: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
3890: 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b 20 4f  ion4">Callback O
38a0: 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e  ptions</a></span
38b0: 3e 0a 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e  >.for more info.
38c0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
38d0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
38e0: 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c  -post_handshake<
38f0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
3900: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
3910: 0a 3c 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20 70 6f  .<dd><p>Allow po
3920: 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73 65 73  st-handshake ses
3930: 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70 64 61  sion ticket upda
3940: 74 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  tes.</p></dd>.<d
3950: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3960: 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e  on">-request</b>
3970: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3980: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
3990: 64 3e 3c 70 3e 52 65 71 75 65 73 74 20 61 20 63  d><p>Request a c
39a0: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20  ertificate from 
39b0: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20  the peer during 
39c0: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b  the SSL handshak
39d0: 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 65  e. This is neede
39e0: 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63  d.to do Certific
39f0: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e 20  ate Validation. 
3a00: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54  Starting in TclT
3a10: 4c 53 20 31 2e 38 2c 20 74 68 65 20 64 65 66 61  LS 1.8, the defa
3a20: 75 6c 74 20 69 73 0a 3c 62 20 63 6c 61 73 73 3d  ult is.<b class=
3a30: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e  "const">true</b>
3a40: 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73  ..See <span clas
3a50: 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68  s="sectref"><a h
3a60: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 3e  ref="#section3">
3a70: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69  Certificate Vali
3a80: 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e  dation</a></span
3a90: 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69  > for more detai
3aa0: 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ls.</p></dd>.<dt
3ab0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3ac0: 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20  n">-require</b> 
3ad0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
3ae0: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
3af0: 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 76 61  ><p>Require a va
3b00: 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20  lid certificate 
3b10: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75  from the peer du
3b20: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e  ring the SSL han
3b30: 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20  dshake. If this 
3b40: 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20  is.set to true, 
3b50: 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f  then <b class="o
3b60: 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c  ption">-request<
3b70: 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62 65  /b> must also be
3b80: 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64   set to true and
3b90: 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 6c 61   a either.<b cla
3ba0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64  ss="option">-cad
3bb0: 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ir</b>, <b class
3bc0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c  ="option">-cafil
3bd0: 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  e</b>, <b class=
3be0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72  "option">-castor
3bf0: 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61 74  e</b>, or a plat
3c00: 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73  form default.mus
3c10: 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e  t be provided in
3c20: 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61   order to valida
3c30: 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65 20  te against. The 
3c40: 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c  default in TclTL
3c50: 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65  S 1.8 and.earlie
3c60: 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 3c 62  r versions is <b
3c70: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66   class="const">f
3c80: 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e  alse</b> since n
3c90: 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73  ot all platforms
3ca0: 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61 74   have certificat
3cb0: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61  es to.validate a
3cc0: 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d  gainst in a form
3cd0: 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68   compatible with
3ce0: 20 4f 70 65 6e 53 53 4c 2e 0a 53 65 65 20 3c 73   OpenSSL..See <s
3cf0: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72  pan class="sectr
3d00: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  ef"><a href="#se
3d10: 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63  ction3">Certific
3d20: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f  ate Validation</
3d30: 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f  a></span> for mo
3d40: 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c  re details.</p><
3d50: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
3d60: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75  s="option">-secu
3d70: 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c  rity_level</b> <
3d80: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 6e  i class="arg">in
3d90: 74 65 67 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  teger</i></dt>.<
3da0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
3db0: 74 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76  the security lev
3dc0: 65 6c 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 30  el (value from 0
3dd0: 20 74 6f 20 35 29 2e 20 54 68 65 20 73 65 63 75   to 5). The secu
3de0: 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63  rity level affec
3df0: 74 73 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 63  ts.the allowed c
3e00: 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 72  ipher suite encr
3e10: 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d  yption algorithm
3e20: 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 43  s, supported ECC
3e30: 20 63 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 74   curves,.support
3e40: 65 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67  ed signature alg
3e50: 6f 72 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61  orithms, DH para
3e60: 6d 65 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72  meter sizes, cer
3e70: 74 69 66 69 63 61 74 65 20 6b 65 79 20 73 69 7a  tificate key siz
3e80: 65 73 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 65  es.and signature
3e90: 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65   algorithms. The
3ea0: 20 64 65 66 61 75 6c 74 20 69 73 20 31 20 70 72   default is 1 pr
3eb0: 69 6f 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20 33  ior to OpenSSL 3
3ec0: 2e 32 20 61 6e 64 20 32 0a 74 68 65 72 65 61 66  .2 and 2.thereaf
3ed0: 74 65 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64  ter. Level 3 and
3ee0: 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20   higher disable 
3ef0: 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73  support for sess
3f00: 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a  ion tickets and.
3f10: 6f 6e 6c 79 20 61 63 63 65 70 74 20 63 69 70 68  only accept ciph
3f20: 65 72 20 73 75 69 74 65 73 20 74 68 61 74 20 70  er suites that p
3f30: 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20 73  rovide forward s
3f40: 65 63 72 65 63 79 2e 3c 2f 70 3e 3c 2f 64 64 3e  ecrecy.</p></dd>
3f50: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
3f60: 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f  ption">-server</
3f70: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
3f80: 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">bool</i></dt>.
3f90: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
3fa0: 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74 20   whether to act 
3fb0: 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64 20  as a server and 
3fc0: 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73  respond with a s
3fd0: 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65 20  erver handshake 
3fe0: 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f  when a.client co
3ff0: 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69  nnects and provi
4000: 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e  des a client han
4010: 64 73 68 61 6b 65 2e 20 54 68 65 20 64 65 66 61  dshake. The defa
4020: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
4030: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62  "const">false</b
4040: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  >.</p></dd>.<dt>
4050: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
4060: 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62  ">-servername</b
4070: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4080: 3e 68 6f 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >hostname</i></d
4090: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
40a0: 79 20 74 68 65 20 70 65 65 72 27 73 20 68 6f 73  y the peer's hos
40b0: 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20 75  tname. This is u
40c0: 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20 54  sed to set the T
40d0: 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 0a 49  LS Server Name.I
40e0: 6e 64 69 63 61 74 69 6f 6e 20 28 53 4e 49 29 20  ndication (SNI) 
40f0: 65 78 74 65 6e 73 69 6f 6e 2e 20 53 65 74 20 74  extension. Set t
4100: 68 69 73 20 74 6f 20 74 68 65 20 65 78 70 65 63  his to the expec
4110: 74 65 64 20 73 65 72 76 65 72 6e 61 6d 65 20 69  ted servername i
4120: 6e 20 74 68 65 0a 73 65 72 76 65 72 27 73 20 63  n the.server's c
4130: 65 72 74 69 66 69 63 61 74 65 20 6f 72 20 6f 6e  ertificate or on
4140: 65 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74  e of the Subject
4150: 20 41 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65 73   Alternate Names
4160: 20 28 53 41 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e   (SAN).</p></dd>
4170: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4180: 70 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f 6e 5f  ption">-session_
4190: 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  id</b> <i class=
41a0: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72  "arg">binary_str
41b0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
41c0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
41d0: 65 20 73 65 73 73 69 6f 6e 20 69 64 20 74 6f 20  e session id to 
41e0: 72 65 73 75 6d 65 20 61 20 73 65 73 73 69 6f 6e  resume a session
41f0: 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 65 64 20  . Not supported 
4200: 79 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  yet.</p></dd>.<d
4210: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
4220: 6f 6e 22 3e 2d 73 73 6c 32 3c 2f 62 3e 20 3c 69  on">-ssl2</b> <i
4230: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
4240: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
4250: 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20  p>Enable use of 
4260: 53 53 4c 20 76 32 2e 20 54 68 65 20 64 65 66 61  SSL v2. The defa
4270: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
4280: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62  "const">false</b
4290: 3e 2e 20 4e 6f 74 65 3a 20 52 65 63 65 6e 74 20  >. Note: Recent 
42a0: 76 65 72 73 69 6f 6e 73 20 6f 66 0a 4f 70 65 6e  versions of.Open
42b0: 53 53 4c 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75  SSL no longer su
42c0: 70 70 6f 72 74 20 53 53 4c 76 32 2c 20 73 6f 20  pport SSLv2, so 
42d0: 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76  this may not hav
42e0: 65 20 61 6e 79 20 65 66 66 65 63 74 2e 20 53 65  e any effect. Se
42f0: 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22  e the.<b class="
4300: 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63  cmd">tls::protoc
4310: 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20  ols</b> command 
4320: 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72  for supported pr
4330: 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  otocols.</p></dd
4340: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
4350: 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c 2f 62  option">-ssl3</b
4360: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4370: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
4380: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65  dd><p>Enable use
4390: 20 6f 66 20 53 53 4c 20 76 33 2e 20 54 68 65 20   of SSL v3. The 
43a0: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c  default is <b cl
43b0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73  ass="const">fals
43c0: 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a 20 52 65 63  e</b>. Note: Rec
43d0: 65 6e 74 20 76 65 72 73 69 6f 6e 73 0a 6f 66 20  ent versions.of 
43e0: 4f 70 65 6e 53 53 4c 20 6d 61 79 20 68 61 76 65  OpenSSL may have
43f0: 20 74 68 69 73 20 64 69 73 61 62 6c 65 64 20 61   this disabled a
4400: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2c 20  t compile time, 
4410: 73 6f 20 74 68 69 73 20 6d 61 79 20 6e 6f 74 20  so this may not 
4420: 68 61 76 65 20 61 6e 79 0a 65 66 66 65 63 74 2e  have any.effect.
4430: 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73   See the <b clas
4440: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f  s="cmd">tls::pro
4450: 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61  tocols</b> comma
4460: 6e 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64  nd for supported
4470: 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c   protocols.</p><
4480: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
4490: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31  s="option">-tls1
44a0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
44b0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
44c0: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20  >.<dd><p>Enable 
44d0: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 20 54  use of TLS v1. T
44e0: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
44f0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
4500: 72 75 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a 20 54  rue</b>. Note: T
4510: 4c 53 20 31 2e 30 20 6e 65 65 64 73 0a 53 48 41  LS 1.0 needs.SHA
4520: 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68  1 to operate, wh
4530: 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69  ich is only avai
4540: 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69 74  lable in securit
4550: 79 20 6c 65 76 65 6c 20 30 20 66 6f 72 20 4f 70  y level 0 for Op
4560: 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 0a 53 65 65  en SSL 3.0+..See
4570: 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61   the <i class="a
4580: 72 67 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65  rg">-security_le
4590: 76 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 3c  vel</i> option.<
45a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
45b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
45c0: 74 6c 73 31 2e 31 3c 2f 62 3e 20 3c 69 20 63 6c  tls1.1</b> <i cl
45d0: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f  ass="arg">bool</
45e0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45  i></dt>.<dd><p>E
45f0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53  nable use of TLS
4600: 20 76 31 2e 31 2e 20 54 68 65 20 64 65 66 61 75   v1.1. The defau
4610: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  lt is <b class="
4620: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e  const">true</b>.
4630: 20 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 31 20 6e   Note: TLS 1.1 n
4640: 65 65 64 73 0a 53 48 41 31 20 74 6f 20 6f 70 65  eeds.SHA1 to ope
4650: 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f  rate, which is o
4660: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e  nly available in
4670: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20   security level 
4680: 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33  0 for Open SSL 3
4690: 2e 30 2b 2e 0a 53 65 65 20 74 68 65 20 3c 69 20  .0+..See the <i 
46a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 73 65 63  class="arg">-sec
46b0: 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 69 3e 20  urity_level</i> 
46c0: 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  option.</p></dd>
46d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
46e0: 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32 3c 2f  ption">-tls1.2</
46f0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4700: 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">bool</i></dt>.
4710: 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73  <dd><p>Enable us
4720: 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 2e 20 54  e of TLS v1.2. T
4730: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
4740: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74   class="const">t
4750: 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64  rue</b>.</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 74 6c 73 31 2e 33 3c  option">-tls1.3<
4780: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
4790: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
47a0: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75  .<dd><p>Enable u
47b0: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 2e 20  se of TLS v1.3. 
47c0: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  The default is <
47d0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
47e0: 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64  true</b>.</p></d
47f0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
4800: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61  "option">-valida
4810: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69  tecommand</b> <i
4820: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c   class="arg">cal
4830: 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  lback</i></dt>.<
4840: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
4850: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d  the callback com
4860: 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74  mand to invoke t
4870: 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 70  o validate the p
4880: 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65 73  eer certificates
4890: 0a 61 6e 64 20 6f 74 68 65 72 20 63 6f 6e 66 69  .and other confi
48a0: 67 20 69 6e 66 6f 20 64 75 72 69 6e 67 20 74 68  g info during th
48b0: 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74  e protocol negot
48c0: 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20 54 68  iation phase. Th
48d0: 69 73 20 63 61 6e 20 62 65 20 75 73 65 64 0a 62  is can be used.b
48e0: 79 20 54 43 4c 20 73 63 72 69 70 74 73 20 74 6f  y TCL scripts to
48f0: 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f   perform their o
4900: 77 6e 20 43 65 72 74 69 66 69 63 61 74 65 20 56  wn Certificate V
4910: 61 6c 69 64 61 74 69 6f 6e 20 74 6f 20 73 75 70  alidation to sup
4920: 70 6c 65 6d 65 6e 74 20 74 68 65 0a 64 65 66 61  plement the.defa
4930: 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e 20 70  ult validation p
4940: 72 6f 76 69 64 65 64 20 62 79 20 4f 70 65 6e 53  rovided by OpenS
4950: 53 4c 2e 20 54 68 65 20 73 63 72 69 70 74 20 6d  SL. The script m
4960: 75 73 74 20 72 65 74 75 72 6e 20 61 20 62 6f 6f  ust return a boo
4970: 6c 65 61 6e 20 74 72 75 65 0a 74 6f 20 63 6f 6e  lean true.to con
4980: 74 69 6e 75 65 20 74 68 65 20 6e 65 67 6f 74 69  tinue the negoti
4990: 61 74 69 6f 6e 2e 20 53 65 65 20 3c 73 70 61 6e  ation. See <span
49a0: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22   class="sectref"
49b0: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69  ><a href="#secti
49c0: 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70  on4">Callback Op
49d0: 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e  tions</a></span>
49e0: 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c   for more info.<
49f0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
4a00: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  dd>.<dt><a name=
4a10: 22 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  "5"><b class="cm
4a20: 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74  d">tls::unimport
4a30: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
4a40: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  rg">channel</i><
4a50: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
4a60: 43 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 3c 62  Compliment to <b
4a70: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
4a80: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 20 55 73  ::import</b>. Us
4a90: 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 74 68 65  ed to remove the
4aa0: 20 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 6b   top level stack
4ab0: 65 64 20 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d 20  ed channel.from 
4ac0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
4ad0: 68 61 6e 6e 65 6c 3c 2f 69 3e 2e 20 54 68 69 73  hannel</i>. This
4ae0: 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20 65 6e   unstacks the en
4af0: 63 72 79 70 74 69 6f 6e 20 6f 66 20 61 20 72 65  cryption of a re
4b00: 67 75 6c 61 72 20 54 43 4c 20 63 68 61 6e 6e 65  gular TCL channe
4b10: 6c 2e 20 41 6e 0a 65 72 72 6f 72 20 69 73 20 74  l. An.error is t
4b20: 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20  hrown if TLS is 
4b30: 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 63  not the top stac
4b40: 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65  ked channel type
4b50: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4b60: 61 20 6e 61 6d 65 3d 22 36 22 3e 3c 62 20 63 6c  a name="6"><b cl
4b70: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68  ass="cmd">tls::h
4b80: 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20  andshake</b> <i 
4b90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
4ba0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  nel</i></a></dt>
4bb0: 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 73 20 74  .<dd><p>Forces t
4bc0: 68 65 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 69  he TLS negotiati
4bd0: 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20  on handshake to 
4be0: 74 61 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 64  take place immed
4bf0: 69 61 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 75  iately, and retu
4c00: 72 6e 73 20 30 0a 69 66 20 68 61 6e 64 73 68 61  rns 0.if handsha
4c10: 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70  ke is still in p
4c20: 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f  rogress (non-blo
4c30: 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 20  cking), or 1 if 
4c40: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61  the handshake wa
4c50: 73 0a 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66  s.successful. If
4c60: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66   the handshake f
4c70: 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 20  ailed, an error 
4c80: 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64  will be returned
4c90: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4ca0: 61 20 6e 61 6d 65 3d 22 37 22 3e 3c 62 20 63 6c  a name="7"><b cl
4cb0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73  ass="cmd">tls::s
4cc0: 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70 61 6e 20  tatus</b> <span 
4cd0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 62 20  class="opt">?<b 
4ce0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4cf0: 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e  local</b>?</span
4d00: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4d10: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
4d20: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74  </dt>.<dd><p>Ret
4d30: 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74  urns the current
4d40: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
4d50: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72  L channel. The r
4d60: 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20  esult is a list 
4d70: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 0a 70 61 69  of key-value.pai
4d80: 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 68  rs describing th
4d90: 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69 63 61  e SSL, certifica
4da0: 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66 69 63  te, and certific
4db0: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
4dc0: 20 73 74 61 74 75 73 2e 20 49 66 0a 74 68 65 20   status. If.the 
4dd0: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 61  SSL handshake ha
4de0: 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65  s not yet comple
4df0: 74 65 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c 69  ted, an empty li
4e00: 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 2e 20  st is returned. 
4e10: 49 66 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  If the.<b class=
4e20: 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c  "option">-local<
4e30: 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73 70  /b> option is sp
4e40: 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74 68  ecified, then th
4e50: 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 63  e local certific
4e60: 61 74 65 20 69 73 20 75 73 65 64 2e 20 52 65 74  ate is used. Ret
4e70: 75 72 6e 65 64 0a 76 61 6c 75 65 73 20 69 6e 63  urned.values inc
4e80: 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c  lude:</p>.<p>SSL
4e90: 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20   Status</p>.<dl 
4ea0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
4eb0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
4ec0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
4ed0: 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c  able">alpn</b> <
4ee0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72  i class="arg">pr
4ef0: 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  otocol</i></dt>.
4f00: 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f  <dd><p>The proto
4f10: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74  col selected aft
4f20: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c  er Application-L
4f30: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65  ayer Protocol Ne
4f40: 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29  gotiation (ALPN)
4f50: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4f60: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
4f70: 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69  e">cipher</b> <i
4f80: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 69 70   class="arg">cip
4f90: 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  her</i></dt>.<dd
4fa0: 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20  ><p>The current 
4fb0: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f  cipher in use fo
4fc0: 72 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f  r the session.</
4fd0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
4fe0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
4ff0: 70 65 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20  peername</b> <i 
5000: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65  class="arg">name
5010: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5020: 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 20 66 72  >The peername fr
5030: 6f 6d 20 74 68 65 20 63 65 72 74 69 66 69 63 61  om the certifica
5040: 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  te.</p></dd>.<dt
5050: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5060: 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62  ble">protocol</b
5070: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5080: 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74  >version</i></dt
5090: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f  >.<dd><p>The pro
50a0: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73  tocol version us
50b0: 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65  ed for the conne
50c0: 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c  ction: SSL2, SSL
50d0: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c  3, TLS1, TLS1.1,
50e0: 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c   TLS1.2, TLS1.3,
50f0: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e   or unknown.</p>
5100: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5110: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 62  ss="variable">sb
5120: 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  its</b> <i class
5130: 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74  ="arg">n</i></dt
5140: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75 6d  >.<dd><p>The num
5150: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64  ber of bits used
5160: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e   for the session
5170: 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   key.</p></dd>.<
5180: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5190: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65  iable">signature
51a0: 48 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 62  HashAlgorithm</b
51b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
51c0: 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f  >algorithm</i></
51d0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73  dt>.<dd><p>The s
51e0: 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 61 6c  ignature hash al
51f0: 67 6f 72 69 74 68 6d 2e 3c 2f 70 3e 3c 2f 64 64  gorithm.</p></dd
5200: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5210: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
5220: 75 72 65 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63  ureType</b> <i c
5230: 6c 61 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c  lass="arg">type<
5240: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5250: 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74 79  The signature ty
5260: 70 65 20 76 61 6c 75 65 2e 3c 2f 70 3e 3c 2f 64  pe value.</p></d
5270: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5280: 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66  "variable">verif
5290: 79 44 65 70 74 68 3c 2f 62 3e 20 3c 69 20 63 6c  yDepth</b> <i cl
52a0: 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c  ass="arg">n</i><
52b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69  /dt>.<dd><p>Maxi
52c0: 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68  mum depth for th
52d0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68  e certificate ch
52e0: 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ain verification
52f0: 2e 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31 2c  . Default is -1,
5300: 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 3c 2f   to check all.</
5310: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5320: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5330: 76 65 72 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 3c  verifyMode</b> <
5340: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69  i class="arg">li
5350: 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  st</i></dt>.<dd>
5360: 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69  <p>List of certi
5370: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74  ficate verificat
5380: 69 6f 6e 20 6d 6f 64 65 73 2e 3c 2f 70 3e 3c 2f  ion modes.</p></
5390: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
53a0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69  ="variable">veri
53b0: 66 79 52 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20  fyResult</b> <i 
53c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 65 73 75  class="arg">resu
53d0: 6c 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  lt</i></dt>.<dd>
53e0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 76  <p>Certificate v
53f0: 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75  erification resu
5400: 6c 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  lt.</p></dd>.<dt
5410: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5420: 62 6c 65 22 3e 63 61 5f 6e 61 6d 65 73 3c 2f 62  ble">ca_names</b
5430: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5440: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >list</i></dt>.<
5450: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 74 68  dd><p>List of th
5460: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  e Certificate Au
5470: 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74  thorities used t
5480: 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72  o create the cer
5490: 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64  tificate.</p></d
54a0: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 65 72 74  d>.</dl>.<p>Cert
54b0: 69 66 69 63 61 74 65 20 53 74 61 74 75 73 3c 2f  ificate Status</
54c0: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
54d0: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
54e0: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
54f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 6c  s="variable">all
5500: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5510: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
5520: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 75 6d 70 20  dt>.<dd><p>Dump 
5530: 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61  of all certifica
5540: 74 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64  te info.</p></dd
5550: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5560: 76 61 72 69 61 62 6c 65 22 3e 76 65 72 73 69 6f  variable">versio
5570: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
5580: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3c 2f  arg">value</i></
5590: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63  dt>.<dd><p>The c
55a0: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 73 69  ertificate versi
55b0: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  on.</p></dd>.<dt
55c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
55d0: 62 6c 65 22 3e 73 65 72 69 61 6c 4e 75 6d 62 65  ble">serialNumbe
55e0: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  r</b> <i class="
55f0: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
5600: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
5610: 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66  serial number of
5620: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
5630: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67   as a hex string
5640: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5650: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5660: 65 22 3e 73 69 67 6e 61 74 75 72 65 3c 2f 62 3e  e">signature</b>
5670: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5680: 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64  algorithm</i></d
5690: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72  t>.<dd><p>Cipher
56a0: 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20   algorithm used 
56b0: 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20  for certificate 
56c0: 73 69 67 6e 61 74 75 72 65 2e 3c 2f 70 3e 3c 2f  signature.</p></
56d0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
56e0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75  ="variable">issu
56f0: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  er</b> <i class=
5700: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
5710: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
5720: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e   distinguished n
5730: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20  ame (DN) of the 
5740: 63 65 72 74 69 66 69 63 61 74 65 20 69 73 73 75  certificate issu
5750: 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  er.</p></dd>.<dt
5760: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5770: 62 6c 65 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f  ble">notBefore</
5780: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5790: 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">date</i></dt>.
57a0: 3c 64 64 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e  <dd><p>The begin
57b0: 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65  ning date of the
57c0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c   certificate val
57d0: 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  idity.</p></dd>.
57e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
57f0: 72 69 61 62 6c 65 22 3e 6e 6f 74 41 66 74 65 72  riable">notAfter
5800: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5810: 72 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74  rg">date</i></dt
5820: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65 78 70  >.<dd><p>The exp
5830: 69 72 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 20  iration date of 
5840: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
5850: 76 61 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64  validity.</p></d
5860: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5870: 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65  "variable">subje
5880: 63 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ct</b> <i class=
5890: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
58a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
58b0: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e   distinguished n
58c0: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20  ame (DN) of the 
58d0: 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a  certificate subj
58e0: 65 63 74 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c  ect. Fields incl
58f0: 75 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65  ude: Common.Name
5900: 20 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74   (CN), Organizat
5910: 69 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74  ion (O), Localit
5920: 79 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53  y or City (L), S
5930: 74 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65  tate or Province
5940: 20 28 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72   (S), and.Countr
5950: 79 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c  y Name (C).</p><
5960: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5970: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73  s="variable">iss
5980: 75 65 72 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20  uerUniqueID</b> 
5990: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
59a0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
59b0: 64 64 3e 3c 70 3e 54 68 65 20 69 73 73 75 65 72  dd><p>The issuer
59c0: 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 70 3e 3c   unique id.</p><
59d0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
59e0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62  s="variable">sub
59f0: 6a 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 62 3e  jectUniqueID</b>
5a00: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5a10: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
5a20: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65  <dd><p>The subje
5a30: 63 74 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 70  ct unique id.</p
5a40: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5a50: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e  ass="variable">n
5a60: 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62  um_extensions</b
5a70: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5a80: 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  >n</i></dt>.<dd>
5a90: 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 72  <p>Number of cer
5aa0: 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 69  tificate extensi
5ab0: 6f 6e 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ons.</p></dd>.<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 65 78 74 65 6e 73 69 6f 6e 73  able">extensions
5ae0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5af0: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74  rg">list</i></dt
5b00: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66  >.<dd><p>List of
5b10: 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74   certificate ext
5b20: 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 70  ension names.</p
5b30: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5b40: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61  ass="variable">a
5b50: 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65 6e 74  uthorityKeyIdent
5b60: 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61  ifier</b> <i cla
5b70: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
5b80: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5b90: 41 75 74 68 6f 72 69 74 79 20 4b 65 79 20 49 64  Authority Key Id
5ba0: 65 6e 74 69 66 69 65 72 20 28 41 4b 49 29 20 6f  entifier (AKI) o
5bb0: 66 20 74 68 65 20 49 73 73 75 69 6e 67 20 43 41  f the Issuing CA
5bc0: 20 63 65 72 74 69 66 69 63 61 74 65 20 74 68 61   certificate tha
5bd0: 74 20 73 69 67 6e 65 64 20 74 68 65 0a 53 53 4c  t signed the.SSL
5be0: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20   certificate as 
5bf0: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 68  a hex string. Th
5c00: 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73  is value matches
5c10: 20 74 68 65 20 53 4b 49 20 76 61 6c 75 65 20 6f   the SKI value o
5c20: 66 20 74 68 65 0a 49 6e 74 65 72 6d 65 64 69 61  f the.Intermedia
5c30: 74 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74  te CA certificat
5c40: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  e.</p></dd>.<dt>
5c50: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5c60: 6c 65 22 3e 73 75 62 6a 65 63 74 4b 65 79 49 64  le">subjectKeyId
5c70: 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20  entifier</b> <i 
5c80: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
5c90: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
5ca0: 3c 70 3e 53 75 62 6a 65 63 74 20 4b 65 79 20 49  <p>Subject Key I
5cb0: 64 65 6e 74 69 66 69 65 72 20 28 53 4b 49 29 20  dentifier (SKI) 
5cc0: 68 61 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c  hash of the publ
5cd0: 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68  ic key inside th
5ce0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  e certificate as
5cf0: 20 61 0a 68 65 78 20 73 74 72 69 6e 67 2e 20 55   a.hex string. U
5d00: 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20  sed to identify 
5d10: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61  certificates tha
5d20: 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74  t contain a part
5d30: 69 63 75 6c 61 72 20 70 75 62 6c 69 63 20 6b 65  icular public ke
5d40: 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  y.</p></dd>.<dt>
5d50: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5d60: 6c 65 22 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61  le">subjectAltNa
5d70: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  me</b> <i class=
5d80: 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f  "arg">list</i></
5d90: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20  dt>.<dd><p>List 
5da0: 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 20 53 75  of all of the Su
5db0: 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 69 76  bject Alternativ
5dc0: 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 20 69 6e  e Names (SAN) in
5dd0: 63 6c 75 64 69 6e 67 20 64 6f 6d 61 69 6e 20 6e  cluding domain n
5de0: 61 6d 65 73 2c 20 73 75 62 0a 64 6f 6d 61 69 6e  ames, sub.domain
5df0: 73 2c 20 61 6e 64 20 49 50 20 61 64 64 72 65 73  s, and IP addres
5e00: 73 65 73 20 74 68 61 74 20 61 72 65 20 73 65 63  ses that are sec
5e10: 75 72 65 64 20 62 79 20 74 68 65 20 63 65 72 74  ured by the cert
5e20: 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64  ificate.</p></dd
5e30: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5e40: 76 61 72 69 61 62 6c 65 22 3e 6f 63 73 70 3c 2f  variable">ocsp</
5e50: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5e60: 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">list</i></dt>.
5e70: 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61  <dd><p>List of a
5e80: 6c 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66  ll Online Certif
5e90: 69 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f  icate Status Pro
5ea0: 74 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c  tocol (OCSP) URL
5eb0: 73 20 74 68 61 74 20 63 61 6e 20 62 65 20 75 73  s that can be us
5ec0: 65 64 20 74 6f 0a 63 68 65 63 6b 20 74 68 65 20  ed to.check the 
5ed0: 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 69 73  validity of this
5ee0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70   certificate.</p
5ef0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5f00: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63  ass="variable">c
5f10: 65 72 74 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c  ertificate</b> <
5f20: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 65  i class="arg">ce
5f30: 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  rt</i></dt>.<dd>
5f40: 3c 70 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64  <p>The PEM encod
5f50: 65 64 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  ed certificate.<
5f60: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
5f70: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5f80: 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69  >signatureAlgori
5f90: 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  thm</b> <i class
5fa0: 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d  ="arg">algorithm
5fb0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5fc0: 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68  >Cipher algorith
5fd0: 6d 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63  m used for the c
5fe0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
5ff0: 74 75 72 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ture.</p></dd>.<
6000: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6010: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65  iable">signature
6020: 56 61 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  Value</b> <i cla
6030: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
6040: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6050: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
6060: 61 74 75 72 65 20 61 73 20 61 20 68 65 78 20 73  ature as a hex s
6070: 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  tring.</p></dd>.
6080: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6090: 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72  riable">signatur
60a0: 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63  eDigest</b> <i c
60b0: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69  lass="arg">versi
60c0: 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  on</i></dt>.<dd>
60d0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  <p>Certificate s
60e0: 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20 61 73  igning digest as
60f0: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f   a hex string.</
6100: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6110: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6120: 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74  publicKeyAlgorit
6130: 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  hm</b> <i class=
6140: 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c  "arg">algorithm<
6150: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6160: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
6170: 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79  ature public key
6180: 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 70 3e 3c   algorithm.</p><
6190: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
61a0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 75 62  s="variable">pub
61b0: 6c 69 63 4b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c  licKey</b> <i cl
61c0: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
61d0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
61e0: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67  >Certificate sig
61f0: 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65  nature public ke
6200: 79 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e  y as a hex strin
6210: 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  g.</p></dd>.<dt>
6220: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6230: 6c 65 22 3e 62 69 74 73 3c 2f 62 3e 20 3c 69 20  le">bits</b> <i 
6240: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69  class="arg">n</i
6250: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4e 75  ></dt>.<dd><p>Nu
6260: 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65  mber of bits use
6270: 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74  d for certificat
6280: 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 79 2e  e signature key.
6290: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
62a0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
62b0: 22 3e 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 62  ">self_signed</b
62c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
62d0: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74  >boolean</i></dt
62e0: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72  >.<dd><p>Whether
62f0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
6300: 20 73 69 67 6e 61 74 75 72 65 20 69 73 20 73 65   signature is se
6310: 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 70 3e 3c 2f  lf signed.</p></
6320: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6330: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 68 61 31  ="variable">sha1
6340: 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61  _hash</b> <i cla
6350: 73 73 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f 69  ss="arg">hash</i
6360: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
6370: 65 20 53 48 41 31 20 68 61 73 68 20 6f 66 20 74  e SHA1 hash of t
6380: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61  he certificate a
6390: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c  s a hex string.<
63a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
63b0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
63c0: 3e 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e  >sha256_hash</b>
63d0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
63e0: 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  hash</i></dt>.<d
63f0: 64 3e 3c 70 3e 54 68 65 20 53 48 41 32 35 36 20  d><p>The SHA256 
6400: 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74  hash of the cert
6410: 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78  ificate as a hex
6420: 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64   string.</p></dd
6430: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
6440: 3e 3c 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 20  ><a name="8"><b 
6450: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
6460: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20  :connection</b> 
6470: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
6480: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f  hannel</i></a></
6490: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72  dt>.<dd><p>Retur
64a0: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63  ns the current c
64b0: 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73  onnection status
64c0: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e   of an SSL chann
64d0: 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69  el. The result i
64e0: 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d  s a list.of key-
64f0: 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63  value pairs desc
6500: 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65  ribing the conne
6510: 63 74 69 6f 6e 2e 20 52 65 74 75 72 6e 65 64 20  ction. Returned 
6520: 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c  values include:<
6530: 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75  /p>.<p>SSL Statu
6540: 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  s</p>.<dl class=
6550: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69  "doctools_defini
6560: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
6570: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6580: 73 74 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  state</b> <i cla
6590: 73 73 3d 22 61 72 67 22 3e 73 74 61 74 65 3c 2f  ss="arg">state</
65a0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
65b0: 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e  tate of the conn
65c0: 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ection.</p></dd>
65d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
65e0: 61 72 69 61 62 6c 65 22 3e 73 65 72 76 65 72 6e  ariable">servern
65f0: 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ame</b> <i class
6600: 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c  ="arg">name</i><
6610: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
6620: 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e  name of the conn
6630: 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 72 2e  ected to server.
6640: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6650: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6660: 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c  ">protocol</b> <
6670: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
6680: 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rsion</i></dt>.<
6690: 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63  dd><p>The protoc
66a0: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20  ol version used 
66b0: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  for the connecti
66c0: 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20  on: SSL2, SSL3, 
66d0: 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c  TLS1, TLS1.1, TL
66e0: 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72  S1.2, TLS1.3, or
66f0: 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f 64   unknown.</p></d
6700: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6710: 22 76 61 72 69 61 62 6c 65 22 3e 72 65 6e 65 67  "variable">reneg
6720: 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64  otiation_allowed
6730: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6740: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
6750: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74  /dt>.<dd><p>Whet
6760: 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e  her protocol ren
6770: 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75  egotiation is su
6780: 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c  pported or not.<
6790: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
67a0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
67b0: 3e 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c  >security_level<
67c0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
67d0: 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e 3c 2f 64 74  g">level</i></dt
67e0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 63  >.<dd><p>The sec
67f0: 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64  urity level used
6800: 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f   for selection o
6810: 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73  f ciphers, key s
6820: 69 7a 65 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64  ize, etc.</p></d
6830: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6840: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69  "variable">sessi
6850: 6f 6e 5f 72 65 75 73 65 64 3c 2f 62 3e 20 3c 69  on_reused</b> <i
6860: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
6870: 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  lean</i></dt>.<d
6880: 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65  d><p>Whether the
6890: 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65   session has bee
68a0: 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e  n reused or not.
68b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
68c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
68d0: 22 3e 69 73 5f 73 65 72 76 65 72 3c 2f 62 3e 20  ">is_server</b> 
68e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
68f0: 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  oolean</i></dt>.
6900: 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74  <dd><p>Whether t
6910: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73  he connection is
6920: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61   configured as a
6930: 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63   server (1) or c
6940: 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 70 3e 3c 2f  lient (0).</p></
6950: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6960: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 6f 6d 70  ="variable">comp
6970: 72 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63  ression</b> <i c
6980: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c  lass="arg">mode<
6990: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
69a0: 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68  Compression meth
69b0: 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  od.</p></dd>.<dt
69c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
69d0: 62 6c 65 22 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f  ble">expansion</
69e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
69f0: 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">mode</i></dt>.
6a00: 3c 64 64 3e 3c 70 3e 45 78 70 61 6e 73 69 6f 6e  <dd><p>Expansion
6a10: 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64   method.</p></dd
6a20: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6a30: 76 61 72 69 61 62 6c 65 22 3e 63 61 4c 69 73 74  variable">caList
6a40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6a50: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74  rg">list</i></dt
6a60: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66  >.<dd><p>List of
6a70: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
6a80: 68 6f 72 69 74 69 65 73 20 28 43 41 29 20 66 6f  horities (CA) fo
6a90: 72 20 58 2e 35 30 39 20 63 65 72 74 69 66 69 63  r X.509 certific
6aa0: 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  ate.</p></dd>.</
6ab0: 64 6c 3e 0a 3c 70 3e 43 69 70 68 65 72 20 49 6e  dl>.<p>Cipher In
6ac0: 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  fo</p>.<dl class
6ad0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e  ="doctools_defin
6ae0: 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  itions">.<dt><b 
6af0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6b00: 3e 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63  >cipher</b> <i c
6b10: 6c 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65  lass="arg">ciphe
6b20: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
6b30: 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69  p>The current ci
6b40: 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20  pher in use for 
6b50: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c  the connection.<
6b60: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6b70: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6b80: 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f  >standard_name</
6b90: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6ba0: 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">name</i></dt>.
6bb0: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 6e 64  <dd><p>The stand
6bc0: 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20  ard RFC name of 
6bd0: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
6be0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6bf0: 61 72 69 61 62 6c 65 22 3e 61 6c 67 6f 72 69 74  ariable">algorit
6c00: 68 6d 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63  hm_bits</b> <i c
6c10: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e  lass="arg">n</i>
6c20: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
6c30: 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65   number of proce
6c40: 73 73 65 64 20 62 69 74 73 20 75 73 65 64 20 66  ssed bits used f
6c50: 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f  or cipher.</p></
6c60: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6c70: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 63 72  ="variable">secr
6c80: 65 74 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63  et_bits</b> <i c
6c90: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e  lass="arg">n</i>
6ca0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
6cb0: 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65   number of secre
6cc0: 74 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  t bits used for 
6cd0: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
6ce0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6cf0: 61 72 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 65 72  ariable">min_ver
6d00: 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  sion</b> <i clas
6d10: 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c  s="arg">version<
6d20: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6d30: 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74  The minimum prot
6d40: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72  ocol version for
6d50: 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64   cipher.</p></dd
6d60: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6d70: 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72  variable">cipher
6d80: 5f 69 73 5f 61 65 61 64 3c 2f 62 3e 20 3c 69 20  _is_aead</b> <i 
6d90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
6da0: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ean</i></dt>.<dd
6db0: 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20  ><p>Whether the 
6dc0: 63 69 70 68 65 72 20 69 73 20 41 75 74 68 65 6e  cipher is Authen
6dd0: 74 69 63 61 74 65 64 20 45 6e 63 72 79 70 74 69  ticated Encrypti
6de0: 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 69 61 74  on with Associat
6df0: 65 64 20 44 61 74 61 20 28 41 45 41 44 29 2e 3c  ed Data (AEAD).<
6e00: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6e10: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6e20: 3e 63 69 70 68 65 72 5f 69 64 3c 2f 62 3e 20 3c  >cipher_id</b> <
6e30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 64  i class="arg">id
6e40: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6e50: 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 69 70  >The OpenSSL cip
6e60: 68 65 72 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e  her id.</p></dd>
6e70: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6e80: 61 72 69 61 62 6c 65 22 3e 64 65 73 63 72 69 70  ariable">descrip
6e90: 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tion</b> <i clas
6ea0: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
6eb0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41  i></dt>.<dd><p>A
6ec0: 20 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f   text descriptio
6ed0: 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e  n of the cipher.
6ee0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6ef0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6f00: 22 3e 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65  ">handshake_dige
6f10: 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  st</b> <i class=
6f20: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69  "arg">boolean</i
6f30: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69  ></dt>.<dd><p>Di
6f40: 67 65 73 74 20 75 73 65 64 20 64 75 72 69 6e 67  gest used during
6f50: 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 70 3e 3c   handshake.</p><
6f60: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 53 65  /dd>.</dl>.<p>Se
6f70: 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 70 3e 0a 3c  ssion Info</p>.<
6f80: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
6f90: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
6fa0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6fb0: 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62  ariable">alpn</b
6fc0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6fd0: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64  >protocol</i></d
6fe0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72  t>.<dd><p>The pr
6ff0: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20  otocol selected 
7000: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f  after Applicatio
7010: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
7020: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c   Negotiation (AL
7030: 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  PN).</p></dd>.<d
7040: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7050: 61 62 6c 65 22 3e 72 65 73 75 6d 61 62 6c 65 3c  able">resumable<
7060: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7070: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f  g">boolean</i></
7080: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68  dt>.<dd><p>Wheth
7090: 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63  er the session c
70a0: 61 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72  an be resumed or
70b0: 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   not.</p></dd>.<
70c0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
70d0: 69 61 62 6c 65 22 3e 73 74 61 72 74 5f 74 69 6d  iable">start_tim
70e0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
70f0: 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e  arg">seconds</i>
7100: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 6d  </dt>.<dd><p>Tim
7110: 65 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20  e since session 
7120: 73 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e  started in secon
7130: 64 73 20 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c  ds since epoch.<
7140: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7150: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7160: 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69 20  >timeout</b> <i 
7170: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f  class="arg">seco
7180: 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  nds</i></dt>.<dd
7190: 3e 3c 70 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e  ><p>Max duration
71a0: 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73   of session in s
71b0: 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69  econds before ti
71c0: 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  me-out.</p></dd>
71d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
71e0: 61 72 69 61 62 6c 65 22 3e 6c 69 66 65 74 69 6d  ariable">lifetim
71f0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
7200: 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e  arg">seconds</i>
7210: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73  </dt>.<dd><p>Ses
7220: 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65  sion ticket life
7230: 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63  time hint in sec
7240: 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  onds.</p></dd>.<
7250: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7260: 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 69  iable">session_i
7270: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
7280: 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69  arg">binary_stri
7290: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
72a0: 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f  <p>Unique sessio
72b0: 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20  n id for use in 
72c0: 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73  resuming the ses
72d0: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  sion.</p></dd>.<
72e0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
72f0: 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 74  iable">session_t
7300: 69 63 6b 65 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  icket</b> <i cla
7310: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f  ss="arg">binary_
7320: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
7330: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65  <dd><p>Unique se
7340: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72  ssion ticket for
7350: 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67   use in resuming
7360: 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70   the session.</p
7370: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
7380: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74  ass="variable">t
7390: 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f  icket_app_data</
73a0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
73b0: 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  ">binary_string<
73c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
73d0: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74  Unique session t
73e0: 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f  icket applicatio
73f0: 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c 2f 64 64 3e  n data.</p></dd>
7400: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
7410: 61 72 69 61 62 6c 65 22 3e 6d 61 73 74 65 72 5f  ariable">master_
7420: 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  key</b> <i class
7430: 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74  ="arg">binary_st
7440: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
7450: 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73  d><p>Unique sess
7460: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c  ion master key.<
7470: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
7480: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
7490: 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d  >session_cache_m
74a0: 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ode</b> <i class
74b0: 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c  ="arg">mode</i><
74c0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 72 76  /dt>.<dd><p>Serv
74d0: 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63  er cache mode (c
74e0: 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f  lient, server, o
74f0: 72 20 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64 64  r both).</p></dd
7500: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
7510: 3e 3c 61 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20  ><a name="9"><b 
7520: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
7530: 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70  :ciphers</b> <sp
7540: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
7550: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70  <i class="arg">p
7560: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70  rotocol</i>?</sp
7570: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  an> <span class=
7580: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
7590: 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69  "arg">verbose</i
75a0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
75b0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
75c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70  class="arg">supp
75d0: 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  orted</i>?</span
75e0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  ></a></dt>.<dd><
75f0: 70 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 61 72  p>Without any ar
7600: 67 73 2c 20 72 65 74 75 72 6e 73 20 61 20 6c 69  gs, returns a li
7610: 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d 6d 65 74  st of all symmet
7620: 72 69 63 20 63 69 70 68 65 72 73 20 66 6f 72 20  ric ciphers for 
7630: 75 73 65 20 77 69 74 68 20 74 68 65 0a 3c 69 20  use with the.<i 
7640: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 63 69 70  class="arg">-cip
7650: 68 65 72 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 20  her</i> option. 
7660: 57 69 74 68 20 3c 69 20 63 6c 61 73 73 3d 22 61  With <i class="a
7670: 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e  rg">protocol</i>
7680: 2c 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65  , only the ciphe
7690: 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72  rs supported for
76a0: 20 74 68 61 74 0a 70 72 6f 74 6f 63 6f 6c 20 61   that.protocol a
76b0: 72 65 20 72 65 74 75 72 6e 65 64 2e 20 53 65 65  re returned. See
76c0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
76d0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  md">tls::protoco
76e0: 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66  ls</b> command f
76f0: 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 64  or the supported
7700: 0a 70 72 6f 74 6f 63 6f 6c 73 2e 20 49 66 20 3c  .protocols. If <
7710: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
7720: 72 62 6f 73 65 3c 2f 69 3e 20 69 73 20 73 70 65  rbose</i> is spe
7730: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 20 74  cified as true t
7740: 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68  hen a verbose, h
7750: 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 0a 6c 69  uman readable.li
7760: 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 20 77  st is returned w
7770: 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 69  ith additional i
7780: 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68  nformation on th
7790: 65 20 63 69 70 68 65 72 2e 20 49 66 20 3c 69 20  e cipher. If <i 
77a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70  class="arg">supp
77b0: 6f 72 74 65 64 3c 2f 69 3e 0a 69 73 20 73 70 65  orted</i>.is spe
77c0: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 20  cified as true, 
77d0: 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69  then only the ci
77e0: 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20  phers supported 
77f0: 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c  for protocol wil
7800: 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 70 3e  l be listed.</p>
7810: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d  </dd>.<dt><a nam
7820: 65 3d 22 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d  e="10"><b class=
7830: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f  "cmd">tls::proto
7840: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74  cols</b></a></dt
7850: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73  >.<dd><p>Returns
7860: 20 61 20 6c 69 73 74 20 6f 66 20 74 68 65 20 73   a list of the s
7870: 75 70 70 6f 72 74 65 64 20 53 53 4c 2f 54 4c 53  upported SSL/TLS
7880: 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69   protocols. Vali
7890: 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 3c 62  d values are:.<b
78a0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73   class="const">s
78b0: 73 6c 32 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  sl2</b>, <b clas
78c0: 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c 33 3c 2f  s="const">ssl3</
78d0: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>, <b class="co
78e0: 6e 73 74 22 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c  nst">tls1</b>, <
78f0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
7900: 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62 20 63  tls1.1</b>, <b c
7910: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73  lass="const">tls
7920: 31 2e 32 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20  1.2</b>, and.<b 
7930: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c  class="const">tl
7940: 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20  s1.3</b>. Exact 
7950: 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20  list depends on 
7960: 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20  OpenSSL version 
7970: 61 6e 64 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65  and compile time
7980: 20 66 6c 61 67 73 2e 3c 2f 70 3e 3c 2f 64 64 3e   flags.</p></dd>
7990: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 31  .<dt><a name="11
79a0: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
79b0: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62  >tls::version</b
79c0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  ></a></dt>.<dd><
79d0: 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4f 70  p>Returns the Op
79e0: 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 73 74  enSSL version st
79f0: 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ring.</p></dd>.<
7a00: 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76  /dl>.</div>.<div
7a10: 20 69 64 3d 22 73 65 63 74 69 6f 6e 33 22 20 63   id="section3" c
7a20: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
7a30: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e  ection"><h2><a n
7a40: 61 6d 65 3d 22 73 65 63 74 69 6f 6e 33 22 3e 43  ame="section3">C
7a50: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
7a60: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c  ation</a></h2>.<
7a70: 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69  div id="subsecti
7a80: 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on1" class="doct
7a90: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
7aa0: 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75  ><h3><a name="su
7ab0: 62 73 65 63 74 69 6f 6e 31 22 3e 50 4b 49 20 61  bsection1">PKI a
7ac0: 6e 64 20 43 65 72 74 69 66 69 63 61 74 65 73 3c  nd Certificates<
7ad0: 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 55 73 69 6e  /a></h3>.<p>Usin
7ae0: 67 20 74 68 65 20 50 75 62 6c 69 63 20 4b 65 79  g the Public Key
7af0: 20 49 6e 66 72 61 73 74 72 75 63 74 75 72 65 20   Infrastructure 
7b00: 28 50 4b 49 29 2c 20 65 61 63 68 20 75 73 65 72  (PKI), each user
7b10: 20 63 72 65 61 74 65 73 20 61 20 70 72 69 76 61   creates a priva
7b20: 74 65 20 6b 65 79 20 74 68 61 74 0a 6f 6e 6c 79  te key that.only
7b30: 20 74 68 65 79 20 6b 6e 6f 77 20 61 62 6f 75 74   they know about
7b40: 20 61 6e 64 20 61 20 70 75 62 6c 69 63 20 6b 65   and a public ke
7b50: 79 20 74 68 65 79 20 63 61 6e 20 65 78 63 68 61  y they can excha
7b60: 6e 67 65 20 77 69 74 68 20 6f 74 68 65 72 73 20  nge with others 
7b70: 66 6f 72 20 75 73 65 20 69 6e 0a 65 6e 63 72 79  for use in.encry
7b80: 70 74 69 6e 67 20 61 6e 64 20 64 65 63 72 79 70  pting and decryp
7b90: 74 69 6e 67 20 64 61 74 61 2e 20 54 68 65 20 70  ting data. The p
7ba0: 72 6f 63 65 73 73 20 69 73 20 74 68 65 20 73 65  rocess is the se
7bb0: 6e 64 65 72 20 65 6e 63 72 79 70 74 73 20 74 68  nder encrypts th
7bc0: 65 69 72 20 64 61 74 61 0a 75 73 69 6e 67 20 74  eir data.using t
7bd0: 68 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 79  heir private key
7be0: 20 61 6e 64 20 74 68 65 20 72 65 63 65 69 76 65   and the receive
7bf0: 72 27 73 20 70 75 62 6c 69 63 20 6b 65 79 2e 20  r's public key. 
7c00: 54 68 65 20 64 61 74 61 20 69 73 20 74 68 65 6e  The data is then
7c10: 20 73 65 6e 74 0a 74 6f 20 74 68 65 20 72 65 63   sent.to the rec
7c20: 65 69 76 65 72 2e 20 49 6e 20 61 20 73 69 6d 69  eiver. In a simi
7c30: 6c 61 72 20 6d 61 6e 6e 65 72 2c 20 74 68 65 20  lar manner, the 
7c40: 72 65 63 65 69 76 65 72 20 75 73 65 73 20 74 68  receiver uses th
7c50: 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 79 20  eir private key 
7c60: 61 6e 64 0a 74 68 65 20 73 65 6e 64 65 72 27 73  and.the sender's
7c70: 20 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 20 64   public key to d
7c80: 65 63 72 79 70 74 20 74 68 65 20 64 61 74 61 2e  ecrypt the data.
7c90: 20 54 68 69 73 20 70 72 6f 76 69 64 65 73 20 64   This provides d
7ca0: 61 74 61 20 69 6e 74 65 67 72 69 74 79 2c 20 74  ata integrity, t
7cb0: 6f 0a 65 6e 73 75 72 65 20 74 68 65 20 64 61 74  o.ensure the dat
7cc0: 61 20 63 61 6e 27 74 20 62 65 20 76 69 65 77 65  a can't be viewe
7cd0: 64 20 6f 72 20 61 6c 74 65 72 65 64 20 64 75 72  d or altered dur
7ce0: 69 6e 67 20 74 72 61 6e 73 70 6f 72 74 2e 20 53  ing transport. S
7cf0: 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  ee the.<b class=
7d00: 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62  "option">-key</b
7d10: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  > and <b class="
7d20: 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 66 69 6c 65  option">-keyfile
7d30: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 66 6f 72  </b> options for
7d40: 20 68 6f 77 20 74 6f 20 73 70 65 63 69 66 79 20   how to specify 
7d50: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 2e  the private key.
7d60: 0a 41 6c 73 6f 20 73 65 65 20 74 68 65 20 3c 62  .Also see the <b
7d70: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
7d80: 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70  -password</b> op
7d90: 74 69 6f 6e 20 66 6f 72 20 68 6f 77 20 74 6f 20  tion for how to 
7da0: 70 72 6f 76 69 64 65 20 74 68 65 20 70 61 73 73  provide the pass
7db0: 77 6f 72 64 2e 3c 2f 70 3e 0a 3c 70 3e 49 6e 20  word.</p>.<p>In 
7dc0: 6f 72 64 65 72 20 74 6f 20 70 72 6f 76 69 64 65  order to provide
7dd0: 20 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 2c   authentication,
7de0: 20 69 2e 65 2e 20 65 6e 73 75 72 69 6e 67 20 73   i.e. ensuring s
7df0: 6f 6d 65 6f 6e 65 20 69 73 20 77 68 6f 20 74 68  omeone is who th
7e00: 65 79 20 73 61 79 20 74 68 65 79 0a 61 72 65 2c  ey say they.are,
7e10: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20   the public key 
7e20: 61 6e 64 20 75 73 65 72 20 69 64 65 6e 74 69 66  and user identif
7e30: 69 63 61 74 69 6f 6e 20 69 6e 66 6f 20 69 73 20  ication info is 
7e40: 73 74 6f 72 65 64 20 69 6e 20 61 20 58 2e 35 30  stored in a X.50
7e50: 39 0a 63 65 72 74 69 66 69 63 61 74 65 20 61 6e  9.certificate an
7e60: 64 20 74 68 61 74 20 63 65 72 74 69 66 69 63 61  d that certifica
7e70: 74 65 20 69 73 20 61 75 74 68 65 6e 74 69 63 61  te is authentica
7e80: 74 65 64 20 28 69 2e 65 2e 20 73 69 67 6e 65 64  ted (i.e. signed
7e90: 29 20 62 79 20 61 20 43 65 72 74 69 66 69 63 61  ) by a Certifica
7ea0: 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41  te.Authority (CA
7eb0: 29 2e 20 55 73 65 72 73 20 63 61 6e 20 74 68 65  ). Users can the
7ec0: 6e 20 65 78 63 68 61 6e 67 65 20 74 68 65 73 65  n exchange these
7ed0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 64 75   certificates du
7ee0: 72 69 6e 67 20 74 68 65 20 54 4c 53 0a 69 6e 69  ring the TLS.ini
7ef0: 74 69 61 6c 69 7a 61 74 69 6f 6e 20 70 72 6f 63  tialization proc
7f00: 65 73 73 20 61 6e 64 20 63 68 65 63 6b 20 74 68  ess and check th
7f10: 65 6d 20 61 67 61 69 6e 73 74 20 74 68 65 20 72  em against the r
7f20: 6f 6f 74 20 43 41 20 63 65 72 74 69 66 69 63 61  oot CA certifica
7f30: 74 65 73 20 74 6f 20 65 6e 73 75 72 65 0a 74 68  tes to ensure.th
7f40: 65 79 20 61 72 65 20 76 61 6c 69 64 2e 20 54 68  ey are valid. Th
7f50: 69 73 20 69 73 20 68 61 6e 64 6c 65 64 20 62 79  is is handled by
7f60: 20 4f 70 65 6e 53 53 4c 20 76 69 61 20 74 68 65   OpenSSL via the
7f70: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
7f80: 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20  n">-request</b> 
7f90: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and.<b class="op
7fa0: 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f  tion">-require</
7fb0: 62 3e 20 6f 70 74 69 6f 6e 73 2e 20 53 65 65 20  b> options. See 
7fc0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
7fd0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
7fe0: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  , <b class="opti
7ff0: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20  on">-cadir</b>, 
8000: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and.<b class="op
8010: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f  tion">-castore</
8020: 62 3e 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68  b> options for h
8030: 6f 77 20 74 70 20 73 70 65 63 69 66 79 20 77 68  ow tp specify wh
8040: 65 72 65 20 74 6f 20 66 69 6e 64 20 74 68 65 20  ere to find the 
8050: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 2e  CA certificates.
8060: 0a 4f 70 74 69 6f 6e 61 6c 6c 79 2c 20 69 6e 20  .Optionally, in 
8070: 61 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65  a future release
8080: 2c 20 74 68 65 79 20 63 61 6e 20 61 6c 73 6f 20  , they can also 
8090: 62 65 20 63 68 65 63 6b 65 64 20 61 67 61 69 6e  be checked again
80a0: 73 74 20 74 68 65 20 43 65 72 74 69 66 69 63 61  st the Certifica
80b0: 74 65 0a 52 65 76 6f 63 61 74 69 6f 6e 20 4c 69  te.Revocation Li
80c0: 73 74 20 28 43 52 4c 29 20 6f 66 20 72 65 76 6f  st (CRL) of revo
80d0: 6b 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73  ked certificates
80e0: 2e 20 43 65 72 74 69 66 69 63 61 74 65 73 20 63  . Certificates c
80f0: 61 6e 20 61 6c 73 6f 20 62 65 0a 73 65 6c 66 2d  an also be.self-
8100: 73 69 67 6e 65 64 2c 20 62 75 74 20 74 68 65 79  signed, but they
8110: 20 61 72 65 20 62 79 20 64 65 66 61 75 6c 74 20   are by default 
8120: 6e 6f 74 20 74 72 75 73 74 65 64 20 75 6e 6c 65  not trusted unle
8130: 73 73 20 79 6f 75 20 61 64 64 20 74 68 65 6d 20  ss you add them 
8140: 74 6f 20 79 6f 75 72 0a 63 65 72 74 69 66 69 63  to your.certific
8150: 61 74 65 20 73 74 6f 72 65 2e 3c 2f 70 3e 0a 3c  ate store.</p>.<
8160: 70 3e 54 79 70 69 63 61 6c 6c 79 20 77 68 65 6e  p>Typically when
8170: 20 76 69 73 69 74 69 6e 67 20 77 65 62 20 73 69   visiting web si
8180: 74 65 73 2c 20 6f 6e 6c 79 20 74 68 65 20 63 6c  tes, only the cl
8190: 69 65 6e 74 20 6e 65 65 64 73 20 74 6f 20 63 68  ient needs to ch
81a0: 65 63 6b 20 74 68 65 20 73 65 72 76 65 72 27 73  eck the server's
81b0: 0a 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20  .certificate to 
81c0: 65 6e 73 75 72 65 20 69 74 20 69 73 20 76 61 6c  ensure it is val
81d0: 69 64 2e 20 54 68 65 20 73 65 72 76 65 72 20 64  id. The server d
81e0: 6f 65 73 6e 27 74 20 6e 65 65 64 20 74 6f 20 63  oesn't need to c
81f0: 68 65 63 6b 20 74 68 65 20 63 6c 69 65 6e 74 0a  heck the client.
8200: 63 65 72 74 69 66 69 63 61 74 65 20 75 6e 6c 65  certificate unle
8210: 73 73 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 61  ss you need to a
8220: 75 74 68 65 6e 74 69 63 61 74 65 20 77 69 74 68  uthenticate with
8230: 20 74 68 65 6d 20 74 6f 20 6c 6f 67 69 6e 2c 20   them to login, 
8240: 65 74 63 2e 20 53 65 65 20 74 68 65 0a 3c 62 20  etc. See the.<b 
8250: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8260: 63 65 72 74 3c 2f 62 3e 20 61 6e 64 20 3c 62 20  cert</b> and <b 
8270: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8280: 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 6f 70 74  certfile</b> opt
8290: 69 6f 6e 73 20 69 66 20 79 6f 75 20 6e 65 65 64  ions if you need
82a0: 20 74 6f 20 70 72 6f 76 69 64 65 20 61 20 63 65   to provide a ce
82b0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 0a 3c  rtificate.</p>.<
82c0: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
82d0: 75 62 73 65 63 74 69 6f 6e 32 22 20 63 6c 61 73  ubsection2" clas
82e0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
82f0: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
8300: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 32  ame="subsection2
8310: 22 3e 53 75 6d 6d 61 72 79 20 6f 66 20 63 6f 6d  ">Summary of com
8320: 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e  mand line option
8330: 73 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68  s</a></h3>.<p>Th
8340: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 69  e following opti
8350: 6f 6e 73 20 61 72 65 20 75 73 65 64 20 66 6f 72  ons are used for
8360: 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74   peer certificat
8370: 65 20 76 61 6c 69 64 61 74 69 6f 6e 3a 3c 2f 70  e validation:</p
8380: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
8390: 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a  tools_options">.
83a0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
83b0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
83c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
83d0: 64 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64  directory</i></d
83e0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
83f0: 69 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72  ies the director
8400: 79 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74  y where the Cert
8410: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74  ificate Authorit
8420: 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61  y (CA) certifica
8430: 74 65 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20  tes are.stored. 
8440: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70  The default is p
8450: 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63  latform specific
8460: 2c 20 62 75 74 20 69 73 20 75 73 75 61 6c 6c 79  , but is usually
8470: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
8480: 22 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f  "file">/etc/ssl/
8490: 63 65 72 74 73 3c 2f 62 3e 26 71 75 6f 74 3b 20  certs</b>&quot; 
84a0: 6f 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79  on.Linux/Unix sy
84b0: 73 74 65 6d 73 2e 20 54 68 65 20 64 65 66 61 75  stems. The defau
84c0: 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20  lt location can 
84d0: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79  be overridden by
84e0: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76   the.<b class="v
84f0: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52  ariable">SSL_CER
8500: 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f  T_DIR</b> enviro
8510: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c  nment variable.<
8520: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
8530: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8540: 63 61 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c  cafile</b> <i cl
8550: 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61  ass="arg">filena
8560: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  me</i></dt>.<dd>
8570: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
8580: 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20 43   file with the C
8590: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f  ertificate Autho
85a0: 72 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66  rity (CA) certif
85b0: 69 63 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e  icates to use in
85c0: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
85d0: 22 3e 50 45 4d 3c 2f 62 3e 20 66 69 6c 65 20 66  ">PEM</b> file f
85e0: 6f 72 6d 61 74 2e 20 54 68 65 20 64 65 66 61 75  ormat. The defau
85f0: 6c 74 20 69 73 20 26 71 75 6f 74 3b 3c 62 20 63  lt is &quot;<b c
8600: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63 65 72 74  lass="file">cert
8610: 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20  .pem</b>&quot;, 
8620: 69 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64  in the OpenSSL.d
8630: 69 72 65 63 74 6f 72 79 2e 20 4f 6e 20 4c 69 6e  irectory. On Lin
8640: 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 2c  ux/Unix systems,
8650: 20 74 68 69 73 20 69 73 20 75 73 75 61 6c 6c 79   this is usually
8660: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
8670: 22 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f  "file">/etc/ssl/
8680: 63 61 2d 62 75 6e 64 6c 65 2e 70 65 6d 3c 2f 62  ca-bundle.pem</b
8690: 3e 26 71 75 6f 74 3b 2e 0a 54 68 65 20 64 65 66  >&quot;..The def
86a0: 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65  ault file can be
86b0: 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74   overridden by t
86c0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  he <b class="var
86d0: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
86e0: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  FILE</b> environ
86f0: 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 2e 3c 2f  ment.variable.</
8700: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
8710: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
8720: 61 73 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c  astore</b> <i cl
8730: 61 73 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69  ass="arg">URI</i
8740: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
8750: 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 66  ecifies the Unif
8760: 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65  orm Resource Ide
8770: 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 6f  ntifier (URI) fo
8780: 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  r the Certificat
8790: 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29  e Authority.(CA)
87a0: 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61   store, which ma
87b0: 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f  y be a single co
87c0: 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74  ntainer or a cat
87d0: 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65  alog of containe
87e0: 72 73 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74  rs..Starting wit
87f0: 68 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e  h OpenSSL 3.2 on
8800: 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74   MS Windows, set
8810: 20 74 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61   to &quot;<b cla
8820: 73 73 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f  ss="const">org.o
8830: 70 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a  penssl.winstore:
8840: 2f 2f 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20  //</b>&quot;.to 
8850: 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e  use the built-in
8860: 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74   MS Windows Cert
8870: 69 66 69 63 61 74 65 20 53 74 6f 72 65 2e 0a 54  ificate Store..T
8880: 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20 73  his store only s
8890: 75 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 65 72  upports root cer
88a0: 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 73 2e  tificate stores.
88b0: 20 53 65 65 0a 3c 73 70 61 6e 20 63 6c 61 73 73   See.<span class
88c0: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72  ="sectref"><a hr
88d0: 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 3e 43  ef="#section3">C
88e0: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64  ertificate Valid
88f0: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e  ation</a></span>
8900: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c   for more detail
8910: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
8920: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
8930: 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c  ">-request</b> <
8940: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
8950: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
8960: 3c 70 3e 52 65 71 75 65 73 74 20 61 20 63 65 72  <p>Request a cer
8970: 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68  tificate from th
8980: 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68  e peer during th
8990: 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e  e SSL handshake.
89a0: 20 54 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a   This is needed.
89b0: 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63 61 74  to do Certificat
89c0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e 20 53 74  e Validation. St
89d0: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53  arting in TclTLS
89e0: 20 31 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c   1.8, the defaul
89f0: 74 20 69 73 0a 3c 62 20 63 6c 61 73 73 3d 22 63  t is.<b class="c
8a00: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20  onst">true</b>. 
8a10: 49 6e 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 65  In addition, the
8a20: 20 63 6c 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75   client can manu
8a30: 61 6c 6c 79 20 69 6e 73 70 65 63 74 20 61 6e 64  ally inspect and
8a40: 20 61 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63   accept or rejec
8a50: 74 0a 65 61 63 68 20 63 65 72 74 69 66 69 63 61  t.each certifica
8a60: 74 65 20 75 73 69 6e 67 20 74 68 65 20 3c 69 20  te using the <i 
8a70: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 76 61 6c  class="arg">-val
8a80: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 69 3e  idatecommand</i>
8a90: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64   option.</p></dd
8aa0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
8ab0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65  option">-require
8ac0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
8ad0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
8ae0: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65  >.<dd><p>Require
8af0: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69   a valid certifi
8b00: 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65  cate from the pe
8b10: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53  er during the SS
8b20: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20  L handshake. If 
8b30: 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74  this is.set to t
8b40: 72 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61  rue, then <b cla
8b50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71  ss="option">-req
8b60: 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c  uest</b> must al
8b70: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75  so be set to tru
8b80: 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 3c  e and a either.<
8b90: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
8ba0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20  >-cadir</b>, <b 
8bb0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8bc0: 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63  cafile</b>, <b c
8bd0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
8be0: 61 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61  astore</b>, or a
8bf0: 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c   platform defaul
8c00: 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64  t.must be provid
8c10: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76  ed in order to v
8c20: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e  alidate against.
8c30: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e 20   The default in 
8c40: 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65  TclTLS 1.8 and.e
8c50: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20  arlier versions 
8c60: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
8c70: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69  st">false</b> si
8c80: 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74  nce not all plat
8c90: 66 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69  forms have certi
8ca0: 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64  ficates to.valid
8cb0: 61 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61  ate against in a
8cc0: 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65   form compatible
8cd0: 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 3c 2f   with OpenSSL.</
8ce0: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f  p></dd>.</dl>.</
8cf0: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75  div>.<div id="su
8d00: 62 73 65 63 74 69 6f 6e 33 22 20 63 6c 61 73 73  bsection3" class
8d10: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
8d20: 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61  ction"><h3><a na
8d30: 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 22  me="subsection3"
8d40: 3e 57 68 65 6e 20 61 72 65 20 63 6f 6d 6d 61 6e  >When are comman
8d50: 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 20 6e  d line options n
8d60: 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f 68 33 3e 0a  eeded?</a></h3>.
8d70: 3c 70 3e 49 6e 20 54 63 6c 54 4c 53 20 31 2e 38  <p>In TclTLS 1.8
8d80: 20 61 6e 64 20 65 61 72 6c 69 65 72 20 76 65 72   and earlier ver
8d90: 73 69 6f 6e 73 2c 20 63 65 72 74 69 66 69 63 61  sions, certifica
8da0: 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 69 73  te validation is
8db0: 0a 3c 65 6d 3e 4e 4f 54 3c 2f 65 6d 3e 20 65 6e  .<em>NOT</em> en
8dc0: 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74  abled by default
8dd0: 2e 20 54 68 69 73 20 6c 69 6d 69 74 61 74 69 6f  . This limitatio
8de0: 6e 20 69 73 20 64 75 65 20 74 6f 20 74 68 65 20  n is due to the 
8df0: 6c 61 63 6b 20 6f 66 20 61 20 63 6f 6d 6d 6f 6e  lack of a common
8e00: 0a 63 72 6f 73 73 20 70 6c 61 74 66 6f 72 6d 20  .cross platform 
8e10: 64 61 74 61 62 61 73 65 20 6f 66 20 43 65 72 74  database of Cert
8e20: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74  ificate Authorit
8e30: 79 20 28 43 41 29 20 70 72 6f 76 69 64 65 64 20  y (CA) provided 
8e40: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 0a  certificates to.
8e50: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74  validate against
8e60: 2e 20 4d 61 6e 79 20 4c 69 6e 75 78 20 73 79 73  . Many Linux sys
8e70: 74 65 6d 73 20 6e 61 74 69 76 65 6c 79 20 73 75  tems natively su
8e80: 70 70 6f 72 74 20 4f 70 65 6e 53 53 4c 20 61 6e  pport OpenSSL an
8e90: 64 20 74 68 75 73 20 68 61 76 65 0a 74 68 65 73  d thus have.thes
8ea0: 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 69  e certificates i
8eb0: 6e 73 74 61 6c 6c 65 64 20 61 73 20 70 61 72 74  nstalled as part
8ec0: 20 6f 66 20 74 68 65 20 4f 53 2c 20 62 75 74 20   of the OS, but 
8ed0: 4d 61 63 4f 53 20 61 6e 64 20 4d 53 20 57 69 6e  MacOS and MS Win
8ee0: 64 6f 77 73 20 64 6f 20 6e 6f 74 2e 0a 49 6e 20  dows do not..In 
8ef0: 6f 72 64 65 72 20 74 6f 20 75 73 65 20 74 68 65  order to use the
8f00: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
8f10: 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20  n">-require</b> 
8f20: 6f 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74  option, one of t
8f30: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 0a 6d 75 73  he following.mus
8f40: 74 20 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c  t be true:</p>.<
8f50: 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  ul class="doctoo
8f60: 6c 73 5f 69 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c  ls_itemized">.<l
8f70: 69 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e  i><p>On Linux an
8f80: 64 20 55 6e 69 78 20 73 79 73 74 65 6d 73 20 77  d Unix systems w
8f90: 69 74 68 20 4f 70 65 6e 53 53 4c 20 61 6c 72 65  ith OpenSSL alre
8fa0: 61 64 79 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72  ady installed or
8fb0: 20 69 66 20 74 68 65 20 43 41 0a 63 65 72 74 69   if the CA.certi
8fc0: 66 69 63 61 74 65 73 20 61 72 65 20 61 76 61 69  ficates are avai
8fd0: 6c 61 62 6c 65 20 69 6e 20 50 45 4d 20 66 6f 72  lable in PEM for
8fe0: 6d 61 74 2c 20 61 6e 64 20 69 66 20 74 68 65 79  mat, and if they
8ff0: 20 61 72 65 20 73 74 6f 72 65 64 20 69 6e 20 74   are stored in t
9000: 68 65 0a 73 74 61 6e 64 61 72 64 20 6c 6f 63 61  he.standard loca
9010: 74 69 6f 6e 73 2c 20 6f 72 20 69 66 20 74 68 65  tions, or if the
9020: 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61   <b class="varia
9030: 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49  ble">SSL_CERT_DI
9040: 52 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73  R</b> or <b clas
9050: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c  s="variable">SSL
9060: 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65  _CERT_FILE</b>.e
9070: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61  nvironment varia
9080: 62 6c 65 73 20 61 72 65 20 73 65 74 2c 20 74 68  bles are set, th
9090: 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  en <b class="opt
90a0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c  ion">-cadir</b>,
90b0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
90c0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 61  n">-cadir</b>,.a
90d0: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  nd <b class="opt
90e0: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
90f0: 3e 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 2e  > aren't needed.
9100: 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70  </p></li>.<li><p
9110: 3e 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e  >If OpenSSL is n
9120: 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20  ot installed in 
9130: 74 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61  the default loca
9140: 74 69 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73  tion, or when us
9150: 69 6e 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53  ing Mac OS.or MS
9160: 20 57 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65   Windows and Ope
9170: 6e 53 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65  nSSL is installe
9180: 64 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  d, the <b class=
9190: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
91a0: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f  ERT_DIR</b> and/
91b0: 6f 72 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  or.<b class="var
91c0: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f  iable">SSL_CERT_
91d0: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e  FILE</b> environ
91e0: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f  ment variables o
91f0: 72 20 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65  r the one of the
9200: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9210: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c  n">-cadir</b>,.<
9220: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9230: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 6f 72 20  >-cadir</b>, or 
9240: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9250: 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f  ">-castore</b> o
9260: 70 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64  ptions must be d
9270: 65 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e  efined.</p></li>
9280: 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69  .<li><p>On MS Wi
9290: 6e 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67 20  ndows, starting 
92a0: 69 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c 20  in OpenSSL 3.2, 
92b0: 69 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69 62  it is now possib
92c0: 6c 65 20 74 6f 20 61 63 63 65 73 73 20 74 68 65  le to access the
92d0: 0a 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f 77  .built-in Window
92e0: 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74  s Certificate St
92f0: 6f 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53 4c  ore from OpenSSL
9300: 2e 20 54 68 69 73 20 63 61 6e 20 75 74 69 6c 69  . This can utili
9310: 7a 65 64 20 62 79 0a 73 65 74 74 69 6e 67 20 74  zed by.setting t
9320: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
9330: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
9340: 3e 20 6f 70 74 69 6f 6e 20 74 6f 20 26 71 75 6f  > option to &quo
9350: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  t;<b class="cons
9360: 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77  t">org.openssl.w
9370: 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71  instore://</b>&q
9380: 75 6f 74 3b 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c  uot;.</p></li>.<
9390: 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c  li><p>If OpenSSL
93a0: 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65   is not installe
93b0: 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 74  d or the CA cert
93c0: 69 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74  ificates are not
93d0: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45   available in PE
93e0: 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41  M.format, the CA
93f0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75   certificates mu
9400: 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64  st be downloaded
9410: 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77   and installed w
9420: 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66  ith the user.sof
9430: 74 77 61 72 65 2e 20 54 68 65 20 43 55 52 4c 20  tware. The CURL 
9440: 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20  team makes them 
9450: 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20  available at.<a 
9460: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75  href="https://cu
9470: 72 6c 2e 73 65 2f 64 6f 63 73 2f 63 61 65 78 74  rl.se/docs/caext
9480: 72 61 63 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65  ract.html">CA ce
9490: 72 74 69 66 69 63 61 74 65 73 20 65 78 74 72 61  rtificates extra
94a0: 63 74 65 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c  cted.from Mozill
94b0: 61 3c 2f 61 3e 20 69 6e 20 74 68 65 20 26 71 75  a</a> in the &qu
94c0: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
94d0: 65 22 3e 63 61 63 65 72 74 2e 70 65 6d 3c 2f 62  e">cacert.pem</b
94e0: 3e 26 71 75 6f 74 3b 20 66 69 6c 65 2e 20 59 6f  >&quot; file. Yo
94f0: 75 20 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68  u must then eith
9500: 65 72 20 73 65 74 20 74 68 65 0a 3c 62 20 63 6c  er set the.<b cl
9510: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53  ass="variable">S
9520: 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20  SL_CERT_DIR</b> 
9530: 61 6e 64 2f 6f 72 20 3c 62 20 63 6c 61 73 73 3d  and/or <b class=
9540: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
9550: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76  ERT_FILE</b> env
9560: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c  ironment variabl
9570: 65 73 20 6f 72 20 74 68 65 0a 3c 62 20 63 6c 61  es or the.<b cla
9580: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64  ss="option">-cad
9590: 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61  ir</b> or <b cla
95a0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66  ss="option">-caf
95b0: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20  ile</b> options 
95c0: 74 6f 20 74 68 65 20 43 41 20 63 65 72 74 20 66  to the CA cert f
95d0: 69 6c 65 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f  ile's install.lo
95e0: 63 61 74 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f  cation. It is yo
95f0: 75 72 20 72 65 73 70 6f 6e 73 69 62 69 6c 69 74  ur responsibilit
9600: 79 20 74 6f 20 6b 65 65 70 20 74 68 69 73 20 66  y to keep this f
9610: 69 6c 65 20 75 70 20 74 6f 20 64 61 74 65 2e 3c  ile up to date.<
9620: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c  /p></li>.</ul>.<
9630: 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  /div>.</div>.<di
9640: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 34 22 20  v id="section4" 
9650: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
9660: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
9670: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 34 22 3e  name="section4">
9680: 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73  Callback Options
9690: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20  </a></h2>.<p>As 
96a0: 70 72 65 76 69 6f 75 73 6c 79 20 64 65 73 63 72  previously descr
96b0: 69 62 65 64 2c 20 65 61 63 68 20 63 68 61 6e 6e  ibed, each chann
96c0: 65 6c 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20  el can be given 
96d0: 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61  their own callba
96e0: 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e  cks.to handle in
96f0: 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65  termediate proce
9700: 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65  ssing by the Ope
9710: 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73  nSSL library, us
9720: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  ing the.<b class
9730: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61  ="option">-comma
9740: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  nd</b>, <b class
9750: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77  ="option">-passw
9760: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20  ord</b>, and <b 
9770: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
9780: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
9790: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 0a 70 61 73  </b> options.pas
97a0: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66  sed to either of
97b0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
97c0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
97d0: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  or <b class="cmd
97e0: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  ">tls::import</b
97f0: 3e 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f  >..Unlike previo
9800: 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 54  us versions of T
9810: 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74  clTLS, only if t
9820: 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65  he callback gene
9830: 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a  rates an error,.
9840: 77 69 6c 6c 20 74 68 65 20 3c 62 20 63 6c 61 73  will the <b clas
9850: 73 3d 22 73 79 73 63 6d 64 22 3e 62 67 65 72 72  s="syscmd">bgerr
9860: 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 62  or</b> command b
9870: 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74  e invoked with t
9880: 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61  he error informa
9890: 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69  tion.</p>.<div i
98a0: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 34 22 20  d="subsection4" 
98b0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
98c0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e  subsection"><h3>
98d0: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74  <a name="subsect
98e0: 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66 6f 72  ion4">Values for
98f0: 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63   Command Callbac
9900: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68  k</a></h3>.<p>Th
9910: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74  e callback for t
9920: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
9930: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62  ion">-command</b
9940: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f  > option is invo
9950: 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70  ked at several p
9960: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65  oints during the
9970: 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61  .OpenSSL handsha
9980: 6b 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f  ke and during ro
9990: 75 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73  utine operations
99a0: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20  . See below for 
99b0: 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67  the possible.arg
99c0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f  uments passed to
99d0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63   the callback sc
99e0: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74  ript. Values ret
99f0: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 63  urned from the c
9a00: 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f  allback are.igno
9a10: 72 65 64 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  red.</p>.<dl cla
9a20: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74  ss="doctools_opt
9a30: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
9a40: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72  ass="option">err
9a50: 6f 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  or</b> <i class=
9a60: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
9a70: 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e  message</i></dt>
9a80: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72  .<dd><p>This for
9a90: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
9aa0: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65   invoked wheneve
9ab0: 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72  r an error occur
9ac0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69  s during the ini
9ad0: 74 69 61 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c  tial.connection,
9ae0: 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49   handshake, or I
9af0: 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54  /O operations. T
9b00: 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  he <i class="arg
9b10: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 20 61 72  ">message</i> ar
9b20: 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72  gument can be.fr
9b30: 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f  om the Tcl_Errno
9b40: 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e  Msg, OpenSSL fun
9b50: 63 74 69 6f 6e 20 3c 62 20 63 6c 61 73 73 3d 22  ction <b class="
9b60: 66 75 6e 63 74 69 6f 6e 22 3e 45 52 52 5f 72 65  function">ERR_re
9b70: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e  ason_error_strin
9b80: 67 28 29 3c 2f 62 3e 2c 0a 6f 72 20 61 20 63 75  g()</b>,.or a cu
9b90: 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e 20 54 68  stom message. Th
9ba0: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e  is callback is n
9bb0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
9bc0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  8.</p></dd>.<dt>
9bd0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9be0: 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c  ">info</b> <i cl
9bf0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
9c00: 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20  lId major minor 
9c10: 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f 69 3e  message type</i>
9c20: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69  </dt>.<dd><p>Thi
9c30: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
9c40: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79  ck is invoked by
9c50: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e   the OpenSSL fun
9c60: 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22  ction.<b class="
9c70: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65  function">SSL_se
9c80: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28  t_info_callback(
9c90: 29 3c 2f 62 3e 20 64 75 72 69 6e 67 20 74 68 65  )</b> during the
9ca0: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74   initial connect
9cb0: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b  ion and handshak
9cc0: 65 0a 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68  e.operations. Th
9cd0: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a  e arguments are:
9ce0: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
9cf0: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
9d00: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ions">.<dt><i cl
9d10: 61 73 73 3d 22 61 72 67 22 3e 6d 61 6a 6f 72 3c  ass="arg">major<
9d20: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
9d30: 4d 61 6a 6f 72 20 63 61 74 65 67 6f 72 79 20 66  Major category f
9d40: 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20  or error. Valid 
9d50: 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c  enums are: <b cl
9d60: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 61 6e 64  ass="const">hand
9d70: 73 68 61 6b 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c  shake</b>, <b cl
9d80: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61 6c 65 72  ass="const">aler
9d90: 74 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d  t</b>,.<b class=
9da0: 22 63 6f 6e 73 74 22 3e 63 6f 6e 6e 65 63 74 3c  "const">connect<
9db0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
9dc0: 6f 6e 73 74 22 3e 61 63 63 65 70 74 3c 2f 62 3e  onst">accept</b>
9dd0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
9de0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 69  i class="arg">mi
9df0: 6e 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  nor</i></dt>.<dd
9e00: 3e 3c 70 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f  ><p>Minor catego
9e10: 72 79 20 66 6f 72 20 65 72 72 6f 72 2e 20 56 61  ry for error. Va
9e20: 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c  lid enums are: <
9e30: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9e40: 73 74 61 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c  start</b>, <b cl
9e50: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65  ass="const">done
9e60: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
9e70: 63 6f 6e 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c  const">read</b>,
9e80: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
9e90: 22 3e 77 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20  ">write</b>, <b 
9ea0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f  class="const">lo
9eb0: 6f 70 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  op</b>, <b class
9ec0: 3d 22 63 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62  ="const">exit</b
9ed0: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  >.</p></dd>.<dt>
9ee0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
9ef0: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  essage</i></dt>.
9f00: 3c 64 64 3e 3c 70 3e 44 65 73 63 72 69 70 74 69  <dd><p>Descripti
9f10: 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 69 6e  ve message strin
9f20: 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 67  g which may be g
9f30: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20  enerated either 
9f40: 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  by.<b class="fun
9f50: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 74 61 74 65  ction">SSL_state
9f60: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f  _string_long()</
9f70: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22  b> or <b class="
9f80: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c  function">SSL_al
9f90: 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f  ert_desc_string_
9fa0: 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0a 64 65 70 65  long()</b>,.depe
9fb0: 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e  nding on the con
9fc0: 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  text.</p></dd>.<
9fd0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
9fe0: 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">type</i></dt>.
9ff0: 3c 64 64 3e 3c 70 3e 46 6f 72 20 61 6c 65 72 74  <dd><p>For alert
a000: 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20  s, the possible 
a010: 76 61 6c 75 65 73 20 61 72 65 3a 20 3c 62 20 63  values are: <b c
a020: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 61 72  lass="const">war
a030: 6e 69 6e 67 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61  ning</b>,.<b cla
a040: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 74 61 6c  ss="const">fatal
a050: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
a060: 73 73 3d 22 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f  ss="const">unkno
a070: 77 6e 3c 2f 62 3e 2e 20 46 6f 72 20 6f 74 68 65  wn</b>. For othe
a080: 72 73 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  rs, <b class="co
a090: 6e 73 74 22 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73  nst">info</b> is
a0a0: 20 75 73 65 64 2e 0a 54 68 69 73 20 61 72 67 75   used..This argu
a0b0: 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20  ment is new for 
a0c0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c  TclTLS 1.8.</p><
a0d0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
a0e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
a0f0: 74 69 6f 6e 22 3e 6d 65 73 73 61 67 65 3c 2f 62  tion">message</b
a100: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
a110: 3e 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63  >channelId direc
a120: 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e  tion version con
a130: 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67  tent_type messag
a140: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
a150: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63  p>This form of c
a160: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b  allback is invok
a170: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ed by the OpenSS
a180: 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c  L function.<b cl
a190: 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53  ass="function">S
a1a0: 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62  SL_set_msg_callb
a1b0: 61 63 6b 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76  ack()</b> whenev
a1c0: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20  er a message is 
a1d0: 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64  sent or received
a1e0: 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74   during the.init
a1f0: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20  ial connection, 
a200: 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f  handshake, or I/
a210: 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 49 74  O operations. It
a220: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62   is only availab
a230: 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20  le when.OpenSSL 
a240: 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 74 68  is complied with
a250: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
a260: 6f 6e 73 74 22 3e 65 6e 61 62 6c 65 2d 73 73 6c  onst">enable-ssl
a270: 2d 74 72 61 63 65 3c 2f 62 3e 20 6f 70 74 69 6f  -trace</b> optio
a280: 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b  n. This callback
a290: 20 69 73 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54   is.new for TclT
a2a0: 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75  LS 1.8. The argu
a2b0: 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c  ments are:</p>.<
a2c0: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
a2d0: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
a2e0: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61  .<dt><i class="a
a2f0: 72 67 22 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69  rg">direction</i
a300: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69  ></dt>.<dd><p>Di
a310: 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65  rection is eithe
a320: 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  r <b class="cons
a330: 74 22 3e 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c  t">Sent</b> or <
a340: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
a350: 52 65 63 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70  Received</b>.</p
a360: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
a370: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f  ass="arg">versio
a380: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
a390: 70 3e 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65  p>Version is the
a3a0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
a3b0: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  n.</p></dd>.<dt>
a3c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
a3d0: 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c  ontent_type</i><
a3e0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74  /dt>.<dd><p>Cont
a3f0: 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 20  ent type is the 
a400: 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20  message content 
a410: 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  type.</p></dd>.<
a420: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
a430: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64  ">message</i></d
a440: 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 65 73 73 61 67  t>.<dd><p>Messag
a450: 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66  e is more info f
a460: 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73  rom the <b class
a470: 3d 22 63 6f 6e 73 74 22 3e 53 53 4c 5f 74 72 61  ="const">SSL_tra
a480: 63 65 3c 2f 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c  ce</b> API.</p><
a490: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
a4a0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
a4b0: 74 69 6f 6e 22 3e 73 65 73 73 69 6f 6e 3c 2f 62  tion">session</b
a4c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
a4d0: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 73 73 69  >channelId sessi
a4e0: 6f 6e 5f 69 64 20 73 65 73 73 69 6f 6e 5f 74 69  on_id session_ti
a4f0: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 69  cket lifetime</i
a500: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
a510: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
a520: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62  ack is invoked b
a530: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75  y the OpenSSL fu
a540: 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d  nction.<b class=
a550: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 43  "function">SSL_C
a560: 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f  TX_sess_set_new_
a570: 63 62 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65  cb()</b> wheneve
a580: 72 20 61 20 6e 65 77 20 73 65 73 73 69 6f 6e 20  r a new session 
a590: 69 64 20 69 73 20 73 65 6e 74 20 62 79 20 74 68  id is sent by th
a5a0: 65 0a 73 65 72 76 65 72 20 64 75 72 69 6e 67 20  e.server during 
a5b0: 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e  the initial conn
a5c0: 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73  ection and hands
a5d0: 68 61 6b 65 20 61 6e 64 20 61 6c 73 6f 20 64 75  hake and also du
a5e0: 72 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e  ring the session
a5f0: 0a 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73  .if the <b class
a600: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f  ="option">-post_
a610: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70  handshake</b> op
a620: 74 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 74  tion is set to t
a630: 72 75 65 2e 20 54 68 69 73 20 63 61 6c 6c 62 61  rue. This callba
a640: 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 0a 54 63  ck is new for.Tc
a650: 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72  lTLS 1.8. The ar
a660: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e  guments are:</p>
a670: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
a680: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73  ools_definitions
a690: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  ">.<dt><i class=
a6a0: 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64  "arg">session_id
a6b0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
a6c0: 3e 53 65 73 73 69 6f 6e 20 49 64 20 69 73 20 74  >Session Id is t
a6d0: 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73 69  he current sessi
a6e0: 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 3c 2f 70  on identifier</p
a6f0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
a700: 61 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69 6f  ass="arg">sessio
a710: 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74  n_ticket</i></dt
a720: 3e 0a 3c 64 64 3e 3c 70 3e 54 69 63 6b 65 74 20  >.<dd><p>Ticket 
a730: 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74  is the session t
a740: 69 63 6b 65 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f  icket info</p></
a750: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  dd>.<dt><i class
a760: 3d 22 61 72 67 22 3e 6c 69 66 65 74 69 6d 65 3c  ="arg">lifetime<
a770: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
a780: 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 20  Lifetime is the 
a790: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20  ticket lifetime 
a7a0: 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c  in seconds.</p><
a7b0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a  /dd>.</dl></dd>.
a7c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
a7d0: 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e  tion">verify</b>
a7e0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
a7f0: 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20  channelId depth 
a800: 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f  cert status erro
a810: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
a820: 70 3e 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  p>This callback 
a830: 77 61 73 20 6d 6f 76 65 64 20 74 6f 20 3c 62 20  was moved to <b 
a840: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
a850: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c  validatecommand<
a860: 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e  /b> in TclTLS 1.
a870: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  8.</p></dd>.</dl
a880: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
a890: 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22 20 63  ="subsection5" c
a8a0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
a8b0: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c  ubsection"><h3><
a8c0: 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69  a name="subsecti
a8d0: 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20  on5">Values for 
a8e0: 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 63  Password Callbac
a8f0: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68  k</a></h3>.<p>Th
a900: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74  e callback for t
a910: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
a920: 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f  ion">-password</
a930: 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76  b> option is inv
a940: 6f 6b 65 64 20 62 79 20 54 63 6c 54 4c 53 20 77  oked by TclTLS w
a950: 68 65 6e 65 76 65 72 20 4f 70 65 6e 53 53 4c 20  henever OpenSSL 
a960: 6e 65 65 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20  needs.to obtain 
a970: 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20  a password. See 
a980: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
a990: 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73  ssible arguments
a9a0: 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0a 63   passed to the.c
a9b0: 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20  allback script. 
a9c0: 54 68 65 20 75 73 65 72 20 70 72 6f 76 69 64 65  The user provide
a9d0: 64 20 70 61 73 73 77 6f 72 64 20 69 73 20 65 78  d password is ex
a9e0: 70 65 63 74 65 64 20 74 6f 20 62 65 20 72 65 74  pected to be ret
a9f0: 75 72 6e 65 64 20 62 79 20 74 68 65 0a 63 61 6c  urned by the.cal
aa00: 6c 62 61 63 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63  lback.</p>.<dl c
aa10: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f  lass="doctools_o
aa20: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  ptions">.<dt><b 
aa30: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70  class="option">p
aa40: 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63  assword</b> <i c
aa50: 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61  lass="arg">rwfla
aa60: 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  g size</i></dt>.
aa70: 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20 77  <dd><p>Invoked w
aa80: 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73  hen loading or s
aa90: 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 79 70  toring an encryp
aaa0: 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 69 63  ted PEM certific
aab0: 61 74 65 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  ate. The argumen
aac0: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20  ts are:</p>.<dl 
aad0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
aae0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
aaf0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
ab00: 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e  >rwflag</i></dt>
ab10: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 72 65 61 64  .<dd><p>The read
ab20: 2f 77 72 69 74 65 20 66 6c 61 67 20 69 73 20 30  /write flag is 0
ab30: 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63   for reading/dec
ab40: 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72  ryption or 1 for
ab50: 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70 74   writing/encrypt
ab60: 69 6f 6e 2e 0a 54 68 65 20 6c 61 74 74 65 72 20  ion..The latter 
ab70: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 64  can be used to d
ab80: 65 74 65 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f  etermine when to
ab90: 20 70 72 6f 6d 70 74 20 74 68 65 20 75 73 65 72   prompt the user
aba0: 20 74 6f 20 63 6f 6e 66 69 72 6d 2e 0a 54 68 69   to confirm..Thi
abb0: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65  s argument is ne
abc0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38  w for TclTLS 1.8
abd0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
abe0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 69  i class="arg">si
abf0: 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ze</i></dt>.<dd>
ac00: 3c 70 3e 54 68 65 20 73 69 7a 65 20 69 73 20 74  <p>The size is t
ac10: 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74  he maximum lengt
ac20: 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72  h of the passwor
ac30: 64 20 69 6e 20 62 79 74 65 73 2e 0a 54 68 69 73  d in bytes..This
ac40: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77   argument is new
ac50: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e   for TclTLS 1.8.
ac60: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c  </p></dd>.</dl><
ac70: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76  /dd>.</dl>.</div
ac80: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65  >.<div id="subse
ac90: 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64  ction6" class="d
aca0: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69  octools_subsecti
acb0: 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d  on"><h3><a name=
acc0: 22 73 75 62 73 65 63 74 69 6f 6e 36 22 3e 56 61  "subsection6">Va
acd0: 6c 75 65 73 20 66 6f 72 20 56 61 6c 69 64 61 74  lues for Validat
ace0: 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61  e Command Callba
acf0: 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54  ck</a></h3>.<p>T
ad00: 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20  he callback for 
ad10: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
ad20: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63  tion">-validatec
ad30: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f  ommand</b> optio
ad40: 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72  n is invoked dur
ad50: 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b  ing the handshak
ad60: 65 0a 70 72 6f 63 65 73 73 20 69 6e 20 6f 72 64  e.process in ord
ad70: 65 72 20 66 6f 72 20 74 68 65 20 61 70 70 6c 69  er for the appli
ad80: 63 61 74 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61  cation to valida
ad90: 74 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20  te the provided 
ada0: 76 61 6c 75 65 28 73 29 2e 20 53 65 65 0a 62 65  value(s). See.be
adb0: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73  low for the poss
adc0: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70  ible arguments p
add0: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c  assed to the cal
ade0: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 49 66  lback script. If
adf0: 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20   not.specified, 
ae00: 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63  OpenSSL will acc
ae10: 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65  ept all valid ce
ae20: 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 65  rtificates and e
ae30: 78 74 65 6e 73 69 6f 6e 73 2e 20 54 6f 20 72 65  xtensions. To re
ae40: 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 61  ject.the value a
ae50: 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f 6e  nd abort the con
ae60: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c  nection, the cal
ae70: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74  lback should ret
ae80: 75 72 6e 20 30 2e 20 54 6f 20 61 63 63 65 70 74  urn 0. To accept
ae90: 20 74 68 65 0a 76 61 6c 75 65 20 61 6e 64 20 63   the.value and c
aea0: 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e  ontinue the conn
aeb0: 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c  ection, it shoul
aec0: 64 20 72 65 74 75 72 6e 20 31 2e 20 54 6f 20 72  d return 1. To r
aed0: 65 6a 65 63 74 20 74 68 65 20 76 61 6c 75 65 2c  eject the value,
aee0: 20 62 75 74 0a 63 6f 6e 74 69 6e 75 65 20 74 68   but.continue th
aef0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74  e connection, it
af00: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 32   should return 2
af10: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  . This callback 
af20: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c  is new for TclTL
af30: 53 20 31 2e 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63  S 1.8.</p>.<dl c
af40: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f  lass="doctools_o
af50: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20  ptions">.<dt><b 
af60: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61  class="option">a
af70: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  lpn</b> <i class
af80: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
af90: 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c   protocol match<
afa0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
afb0: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
afc0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
afd0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68  ck is invoked wh
afe0: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c  en the client AL
aff0: 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a  PN extension is.
b000: 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c 69 20  received. If <i 
b010: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 61 74 63  class="arg">matc
b020: 68 3c 2f 69 3e 20 69 73 20 74 72 75 65 2c 20 74  h</i> is true, t
b030: 68 65 6e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  hen <i class="ar
b040: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20  g">protocol</i> 
b050: 69 73 20 74 68 65 20 66 69 72 73 74 0a 3c 62 20  is the first.<b 
b060: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
b070: 61 6c 70 6e 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f  alpn</b> protoco
b080: 6c 20 6f 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d  l option in comm
b090: 6f 6e 20 74 6f 20 62 6f 74 68 20 74 68 65 20 63  on to both the c
b0a0: 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72  lient and server
b0b0: 2e 0a 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 69  ..If not, the fi
b0c0: 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 69  rst client speci
b0d0: 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73  fied protocol is
b0e0: 20 75 73 65 64 2e 20 54 68 69 73 20 63 61 6c 6c   used. This call
b0f0: 62 61 63 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61  back is called.a
b100: 66 74 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 61  fter the Hello a
b110: 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b  nd ALPN callback
b120: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
b130: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b140: 22 3e 68 65 6c 6c 6f 3c 2f 62 3e 20 3c 69 20 63  ">hello</b> <i c
b150: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
b160: 65 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 3c  elId servername<
b170: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
b180: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
b190: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
b1a0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75  ck is invoked du
b1b0: 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c  ring client hell
b1c0: 6f 20 6d 65 73 73 61 67 65 0a 70 72 6f 63 65 73  o message.proces
b1d0: 73 69 6e 67 2e 20 54 68 65 20 70 75 72 70 6f 73  sing. The purpos
b1e0: 65 20 69 73 20 73 6f 20 74 68 65 20 73 65 72 76  e is so the serv
b1f0: 65 72 20 63 61 6e 20 73 65 6c 65 63 74 20 74 68  er can select th
b200: 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 63 65  e appropriate ce
b210: 72 74 69 66 69 63 61 74 65 0a 74 6f 20 70 72 65  rtificate.to pre
b220: 73 65 6e 74 20 74 6f 20 74 68 65 20 63 6c 69 65  sent to the clie
b230: 6e 74 2c 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20  nt, and to make 
b240: 6f 74 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74  other configurat
b250: 69 6f 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20  ion adjustments 
b260: 72 65 6c 65 76 61 6e 74 0a 74 6f 20 74 68 61 74  relevant.to that
b270: 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64   server name and
b280: 20 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69   its configurati
b290: 6f 6e 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64  on. It is called
b2a0: 20 62 65 66 6f 72 65 20 74 68 65 20 53 4e 49 20   before the SNI 
b2b0: 61 6e 64 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63  and ALPN.callbac
b2c0: 6b 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ks.</p></dd>.<dt
b2d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
b2e0: 6e 22 3e 73 6e 69 3c 2f 62 3e 20 3c 69 20 63 6c  n">sni</b> <i cl
b2f0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
b300: 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f  lId servername</
b310: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46  i></dt>.<dd><p>F
b320: 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73  or servers, this
b330: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
b340: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65  k is invoked whe
b350: 6e 20 74 68 65 20 53 65 72 76 65 72 20 4e 61 6d  n the Server Nam
b360: 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e  e Indication.(SN
b370: 49 29 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20  I) extension is 
b380: 72 65 63 65 69 76 65 64 2e 20 54 68 65 20 3c 69  received. The <i
b390: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 72   class="arg">ser
b3a0: 76 65 72 6e 61 6d 65 3c 2f 69 3e 20 61 72 67 75  vername</i> argu
b3b0: 6d 65 6e 74 20 69 73 20 74 68 65 20 63 6c 69 65  ment is the clie
b3c0: 6e 74 0a 70 72 6f 76 69 64 65 64 20 73 65 72 76  nt.provided serv
b3d0: 65 72 20 6e 61 6d 65 20 73 70 65 63 69 66 69 65  er name specifie
b3e0: 64 20 69 6e 20 74 68 65 20 3c 62 20 63 6c 61 73  d in the <b clas
b3f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76  s="option">-serv
b400: 65 72 6e 61 6d 65 26 6c 74 3b 2f 62 26 67 74 3b  ername&lt;/b&gt;
b410: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 65  </b> option. The
b420: 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 77  .purpose is so w
b430: 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70  hen a server sup
b440: 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e  ports multiple n
b450: 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 74 20  ames, the right 
b460: 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 6e 20  certificate.can 
b470: 62 65 20 75 73 65 64 2e 20 49 74 20 69 73 20 63  be used. It is c
b480: 61 6c 6c 65 64 20 61 66 74 65 72 20 74 68 65 20  alled after the 
b490: 68 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62  hello callback b
b4a0: 75 74 20 62 65 66 6f 72 65 20 74 68 65 20 41 4c  ut before the AL
b4b0: 50 4e 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e  PN.callback.</p>
b4c0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
b4d0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69  ss="option">veri
b4e0: 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  fy</b> <i class=
b4f0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20  "arg">channelId 
b500: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75  depth cert statu
b510: 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e  s error</i></dt>
b520: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72  .<dd><p>This for
b530: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
b540: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e   invoked by Open
b550: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63  SSL when a new c
b560: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 72 65  ertificate is re
b570: 63 65 69 76 65 64 0a 66 72 6f 6d 20 74 68 65 20  ceived.from the 
b580: 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20  peer. It allows 
b590: 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68  the client to ch
b5a0: 65 63 6b 20 74 68 65 20 63 65 72 74 69 66 69 63  eck the certific
b5b0: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
b5c0: 0a 72 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f  .results and cho
b5d0: 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 63  ose whether to c
b5e0: 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 20  ontinue or not. 
b5f0: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72  It is called for
b600: 20 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74   each.certificat
b610: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69  e in the certifi
b620: 63 61 74 65 20 63 68 61 69 6e 2e 20 54 68 69 73  cate chain. This
b630: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f   callback was mo
b640: 76 65 64 20 66 72 6f 6d 0a 3c 62 20 63 6c 61 73  ved from.<b clas
b650: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d  s="option">-comm
b660: 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c  and</b> in TclTL
b670: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d  S 1.8. The argum
b680: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64  ents are:</p>.<d
b690: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
b6a0: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
b6b0: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
b6c0: 67 22 3e 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74  g">depth</i></dt
b6d0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 65 70  >.<dd><p>The dep
b6e0: 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 67 65  th is the intege
b6f0: 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 20 63  r depth of the c
b700: 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68  ertificate in th
b710: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68  e certificate ch
b720: 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 69 73 20  ain,.where 0 is 
b730: 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69  the peer certifi
b740: 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 72 20  cate and higher 
b750: 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 70 20  values going up 
b760: 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 61  to the Certifica
b770: 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41  te.Authority (CA
b780: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
b790: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
b7a0: 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ert</i></dt>.<dd
b7b0: 3e 3c 70 3e 54 68 65 20 63 65 72 74 20 61 72 67  ><p>The cert arg
b7c0: 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20  ument is a list 
b7d0: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69  of key-value pai
b7e0: 72 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68  rs similar to th
b7f0: 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a  ose returned by.
b800: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
b810: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 2e 3c  ls::status</b>.<
b820: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
b830: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 74  class="arg">stat
b840: 75 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  us</i></dt>.<dd>
b850: 3c 70 3e 54 68 65 20 73 74 61 74 75 73 20 61 72  <p>The status ar
b860: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 62 6f  gument is the bo
b870: 6f 6c 65 61 6e 20 76 61 6c 69 64 69 74 79 20 6f  olean validity o
b880: 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 65  f the current ce
b890: 72 74 69 66 69 63 61 74 65 20 77 68 65 72 65 20  rtificate where 
b8a0: 30 0a 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64  0.is invalid and
b8b0: 20 31 20 69 73 20 76 61 6c 69 64 2e 3c 2f 70 3e   1 is valid.</p>
b8c0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
b8d0: 73 73 3d 22 61 72 67 22 3e 65 72 72 6f 72 3c 2f  ss="arg">error</
b8e0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
b8f0: 68 65 20 65 72 72 6f 72 20 61 72 67 75 6d 65 6e  he error argumen
b900: 74 20 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d  t is the error m
b910: 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20  essage, if any, 
b920: 67 65 6e 65 72 61 74 65 64 20 62 79 0a 3c 62 20  generated by.<b 
b930: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22  class="function"
b940: 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f  >X509_STORE_CTX_
b950: 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 62 3e 2e  get_error()</b>.
b960: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c  </p></dd>.</dl><
b970: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65  /dd>.</dl>.<p>Re
b980: 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e  ference implemen
b990: 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65  tations of these
b9a0: 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70   callbacks are p
b9b0: 72 6f 76 69 64 65 64 20 69 6e 20 26 71 75 6f 74  rovided in &quot
b9c0: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22  ;<b class="file"
b9d0: 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f  >tls.tcl</b>&quo
b9e0: 74 3b 0a 61 73 20 3c 62 20 63 6c 61 73 73 3d 22  t;.as <b class="
b9f0: 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61  cmd">tls::callba
ba00: 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ck</b>, <b class
ba10: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73  ="cmd">tls::pass
ba20: 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62  word</b>, and <b
ba30: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
ba40: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61  ::validate_comma
ba50: 6e 64 3c 2f 62 3e 0a 72 65 73 70 65 63 74 69 76  nd</b>.respectiv
ba60: 65 6c 79 2e 20 4e 6f 74 65 20 74 68 61 74 20 74  ely. Note that t
ba70: 68 65 73 65 20 61 72 65 20 6f 6e 6c 79 20 3c 65  hese are only <e
ba80: 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d  m>sample</em> im
ba90: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 49  plementations. I
baa0: 6e 20 61 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74  n a more.realist
bab0: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f  ic deployment yo
bac0: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20  u would specify 
bad0: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63  your own callbac
bae0: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63  k scripts on eac
baf0: 68 20 54 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73  h TLS.channel us
bb00: 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73  ing the <b class
bb10: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61  ="option">-comma
bb20: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  nd</b>, <b class
bb30: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77  ="option">-passw
bb40: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20  ord</b>, and.<b 
bb50: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
bb60: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
bb70: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70  </b> options.</p
bb80: 3e 0a 3c 70 3e 54 68 65 20 64 65 66 61 75 6c 74  >.<p>The default
bb90: 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74   behavior when t
bba0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he <b class="opt
bbb0: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62  ion">-command</b
bbc0: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  > and <b class="
bbd0: 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74  option">-validat
bbe0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70  e_command</b>.op
bbf0: 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70  tions are not sp
bc00: 65 63 69 66 69 65 64 2c 20 69 73 20 66 6f 72 20  ecified, is for 
bc10: 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73  TclTLS to proces
bc20: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64  s the associated
bc30: 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c 62 61 63   library.callbac
bc40: 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54  ks internally. T
bc50: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76  he default behav
bc60: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 62 20  ior when the <b 
bc70: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
bc80: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74  password</b> opt
bc90: 69 6f 6e 0a 69 73 20 6e 6f 74 20 73 70 65 63 69  ion.is not speci
bca0: 66 69 65 64 20 69 73 20 66 6f 72 20 54 63 6c 54  fied is for TclT
bcb0: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
bcc0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
bcd0: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62  rary callbacks b
bce0: 79 0a 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20  y.attempting to 
bcf0: 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63  call <b class="c
bd00: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  md">tls::passwor
bd10: 64 3c 2f 62 3e 2e 20 54 68 65 20 64 69 66 66 65  d</b>. The diffe
bd20: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68  rence between th
bd30: 65 73 65 20 74 77 6f 0a 62 65 68 61 76 69 6f 72  ese two.behavior
bd40: 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e  s is a consequen
bd50: 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e  ce of maintainin
bd60: 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20  g compatibility 
bd70: 77 69 74 68 20 65 61 72 6c 69 65 72 0a 69 6d 70  with earlier.imp
bd80: 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70  lementations.</p
bd90: 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65  >.<p><em>The use
bda0: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63   of the referenc
bdb0: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 62 20 63  e callbacks <b c
bdc0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
bdd0: 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62  callback</b>, <b
bde0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
bdf0: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a  ::password</b>,.
be00: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  and <b class="cm
be10: 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65  d">tls::validate
be20: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20  _command</b> is 
be30: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e  not recommended.
be40: 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d   They may be rem
be50: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65  oved from future
be60: 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c   releases.</em><
be70: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76  /p>.</div>.</div
be80: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69  >.<div id="secti
be90: 6f 6e 35 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on5" class="doct
bea0: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68  ools_section"><h
beb0: 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69  2><a name="secti
bec0: 6f 6e 35 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f  on5">Debug</a></
bed0: 68 32 3e 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74 20  h2>.<p>For most 
bee0: 64 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c  debugging needs,
bef0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
bf00: 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b  ption">-callback
bf10: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 63 61 6e 20  </b> option can 
bf20: 62 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69  be used to provi
bf30: 64 65 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e  de.sufficient in
bf40: 73 69 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d  sight and inform
bf50: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53  ation on the TLS
bf60: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70   handshake and p
bf70: 72 6f 67 72 65 73 73 2e 20 49 66 0a 66 75 72 74  rogress. If.furt
bf80: 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74  her troubleshoot
bf90: 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 6e  ing insight is n
bfa0: 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 69  eeded, the compi
bfb0: 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c  le time option.<
bfc0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
bfd0: 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 67 3c  >--enable-debug<
bfe0: 2f 62 3e 20 63 61 6e 20 62 65 20 75 73 65 64 20  /b> can be used 
bff0: 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 20  to get detailed 
c000: 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73  execution flow s
c010: 74 61 74 75 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c  tatus.</p>.<p>TL
c020: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61  S key logging ca
c030: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20  n be enabled by 
c040: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69  setting the envi
c050: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65  ronment variable
c060: 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  .<b class="varia
c070: 62 6c 65 22 3e 53 53 4c 4b 45 59 4c 4f 47 46 49  ble">SSLKEYLOGFI
c080: 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61  LE</b> to the na
c090: 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74  me of the file t
c0a0: 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77  o log to. Then w
c0b0: 68 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a  henever TLS key.
c0c0: 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65  material is gene
c0d0: 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65  rated or receive
c0e0: 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67  d it will be log
c0f0: 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 2e  ged to the file.
c100: 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 0a   This is useful.
c110: 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20  for logging key 
c120: 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b  data for network
c130: 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74   logging tools t
c140: 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 70 74  o use to decrypt
c150: 20 74 68 65 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c   the data.</p>.<
c160: 70 3e 54 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  p>The <b class="
c170: 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64  variable">tls::d
c180: 65 62 75 67 3c 2f 62 3e 20 76 61 72 69 61 62 6c  ebug</b> variabl
c190: 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20  e provides some 
c1a0: 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72  additional contr
c1b0: 6f 6c 20 6f 76 65 72 20 74 68 65 73 65 0a 72 65  ol over these.re
c1c0: 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b  ference callback
c1d0: 73 2e 20 49 74 73 20 76 61 6c 75 65 20 69 73 20  s. Its value is 
c1e0: 7a 65 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e  zero by default.
c1f0: 20 48 69 67 68 65 72 20 76 61 6c 75 65 73 20 70   Higher values p
c200: 72 6f 64 75 63 65 20 6d 6f 72 65 0a 64 69 61 67  roduce more.diag
c210: 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61  nostic output, a
c220: 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72  nd will also for
c230: 63 65 20 74 68 65 20 76 65 72 69 66 79 20 6d 65  ce the verify me
c240: 74 68 6f 64 20 69 6e 20 3c 62 20 63 6c 61 73 73  thod in <b class
c250: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c  ="cmd">tls::call
c260: 62 61 63 6b 3c 2f 62 3e 0a 74 6f 20 61 63 63 65  back</b>.to acce
c270: 70 74 20 74 68 65 20 63 65 72 74 69 66 69 63 61  pt the certifica
c280: 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74  te, even when it
c290: 20 69 73 20 69 6e 76 61 6c 69 64 20 69 66 20 74   is invalid if t
c2a0: 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  he.<b class="opt
c2b0: 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f  ion">-validateco
c2c0: 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e  mmand</b> option
c2d0: 20 69 73 20 73 65 74 20 74 6f 20 3c 62 20 63 6c   is set to <b cl
c2e0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76  ass="cmd">tls::v
c2f0: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c  alidate_command<
c300: 2f 62 3e 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e  /b>.</p>.<p><em>
c310: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 76  The use of the v
c320: 61 72 69 61 62 6c 65 20 3c 62 20 63 6c 61 73 73  ariable <b class
c330: 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a  ="variable">tls:
c340: 3a 64 65 62 75 67 3c 2f 62 3e 20 69 73 20 6e 6f  :debug</b> is no
c350: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49  t recommended..I
c360: 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64  t may be removed
c370: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c   from future rel
c380: 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a  eases.</em></p>.
c390: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
c3a0: 73 65 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d  section6" class=
c3b0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
c3c0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
c3d0: 73 65 63 74 69 6f 6e 36 22 3e 44 65 62 75 67 20  section6">Debug 
c3e0: 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 68 32  Examples</a></h2
c3f0: 3e 0a 3c 70 3e 54 68 65 73 65 20 65 78 61 6d 70  >.<p>These examp
c400: 6c 65 73 20 75 73 65 20 74 68 65 20 64 65 66 61  les use the defa
c410: 75 6c 74 20 55 6e 69 78 20 70 6c 61 74 66 6f 72  ult Unix platfor
c420: 6d 20 53 53 4c 20 63 65 72 74 69 66 69 63 61 74  m SSL certificat
c430: 65 73 2e 20 46 6f 72 20 73 74 61 6e 64 61 72 64  es. For standard
c440: 0a 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20  .installations, 
c450: 2d 63 61 64 69 72 20 61 6e 64 20 2d 63 61 66 69  -cadir and -cafi
c460: 6c 65 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65  le should not be
c470: 20 6e 65 65 64 65 64 2e 20 49 66 20 79 6f 75 72   needed. If your
c480: 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 72   certificates.ar
c490: 65 20 69 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72  e in non-standar
c4a0: 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 73 70 65  d locations, spe
c4b0: 63 69 66 79 20 2d 63 61 64 69 72 20 6f 72 20 2d  cify -cadir or -
c4c0: 63 61 66 69 6c 65 20 61 73 20 6e 65 65 64 65 64  cafile as needed
c4d0: 2e 20 53 65 65 20 74 68 65 0a 64 65 6d 6f 73 20  . See the.demos 
c4e0: 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 6d 6f  directory for mo
c4f0: 72 65 20 65 6c 61 62 6f 72 61 74 65 20 65 78 61  re elaborate exa
c500: 6d 70 6c 65 73 2e 3c 2f 70 3e 0a 3c 70 3e 45 78  mples.</p>.<p>Ex
c510: 61 6d 70 6c 65 20 23 31 3a 20 55 73 65 20 48 54  ample #1: Use HT
c520: 54 50 20 70 61 63 6b 61 67 65 3c 2f 70 3e 0a 3c  TP package</p>.<
c530: 70 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  pre class="docto
c540: 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61  ols_example">.pa
c550: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74  ckage require ht
c560: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69  tp.package requi
c570: 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26  re tls.set url &
c580: 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 77 77  quot;https://www
c590: 2e 74 63 6c 2e 74 6b 2f 26 71 75 6f 74 3b 0a 68  .tcl.tk/&quot;.h
c5a0: 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74  ttp::register ht
c5b0: 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a  tps 443 [list ::
c5c0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74  tls::socket -aut
c5d0: 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72  oservername 1 -r
c5e0: 65 71 75 69 72 65 20 31 20 20 2d 63 6f 6d 6d 61  equire 1  -comma
c5f0: 6e 64 20 3a 3a 74 6c 73 3a 3a 63 61 6c 6c 62 61  nd ::tls::callba
c600: 63 6b 20 2d 70 61 73 73 77 6f 72 64 20 3a 3a 74  ck -password ::t
c610: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 20 20 2d 76  ls::password  -v
c620: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 20 3a  alidatecommand :
c630: 3a 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63  :tls::validate_c
c640: 6f 6d 6d 61 6e 64 5d 0a 23 20 43 68 65 63 6b 20  ommand].# Check 
c650: 66 6f 72 20 65 72 72 6f 72 0a 73 65 74 20 74 6f  for error.set to
c660: 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72  ken [http::getur
c670: 6c 20 24 75 72 6c 5d 0a 69 66 20 7b 5b 68 74 74  l $url].if {[htt
c680: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e  p::status $token
c690: 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75  ] ne &quot;ok&qu
c6a0: 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20  ot;} {.    puts 
c6b0: 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72  [format &quot;Er
c6c0: 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74  ror %s&quot; [ht
c6d0: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65  tp::status $toke
c6e0: 6e 5d 5d 0a 7d 0a 23 20 47 65 74 20 77 65 62 20  n]].}.# Get web 
c6f0: 70 61 67 65 0a 73 65 74 20 64 61 74 61 20 5b 68  page.set data [h
c700: 74 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65 6e  ttp::data $token
c710: 5d 0a 70 75 74 73 20 5b 73 74 72 69 6e 67 20 6c  ].puts [string l
c720: 65 6e 67 74 68 20 24 64 61 74 61 5d 0a 23 20 43  ength $data].# C
c730: 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63  leanup.::http::c
c740: 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f  leanup $token.</
c750: 70 72 65 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20  pre>.<p>Example 
c760: 23 32 3a 20 55 73 65 20 72 61 77 20 73 6f 63 6b  #2: Use raw sock
c770: 65 74 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73  et</p>.<pre clas
c780: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d  s="doctools_exam
c790: 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65  ple">.package re
c7a0: 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72  quire tls.set ur
c7b0: 6c 20 26 71 75 6f 74 3b 77 77 77 2e 74 63 6c 2d  l &quot;www.tcl-
c7c0: 6c 61 6e 67 2e 6f 72 67 26 71 75 6f 74 3b 0a 73  lang.org&quot;.s
c7d0: 65 74 20 70 6f 72 74 20 34 34 33 0a 73 65 74 20  et port 443.set 
c7e0: 63 68 20 5b 74 6c 73 3a 3a 73 6f 63 6b 65 74 20  ch [tls::socket 
c7f0: 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20  -autoservername 
c800: 31 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 24 75  1 -servername $u
c810: 72 6c 20 2d 72 65 71 75 69 72 65 20 31 20 20 2d  rl -require 1  -
c820: 61 6c 70 6e 20 7b 68 74 74 70 2f 31 2e 31 7d 20  alpn {http/1.1} 
c830: 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a  -command ::tls::
c840: 63 61 6c 6c 62 61 63 6b 20 2d 70 61 73 73 77 6f  callback -passwo
c850: 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73 73 77 6f  rd ::tls::passwo
c860: 72 64 20 20 2d 76 61 6c 69 64 61 74 65 63 6f 6d  rd  -validatecom
c870: 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61 6c 69  mand ::tls::vali
c880: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 20 24 75 72  date_command $ur
c890: 6c 20 24 70 6f 72 74 5d 0a 63 68 61 6e 20 63 6f  l $port].chan co
c8a0: 6e 66 69 67 75 72 65 20 24 63 68 20 2d 62 75 66  nfigure $ch -buf
c8b0: 66 65 72 73 69 7a 65 20 36 35 35 33 36 0a 74 6c  fersize 65536.tl
c8c0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 20 24 63 68  s::handshake $ch
c8d0: 0a 70 75 74 73 20 24 63 68 20 26 71 75 6f 74 3b  .puts $ch &quot;
c8e0: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 26 71  GET / HTTP/1.1&q
c8f0: 75 6f 74 3b 0a 66 6c 75 73 68 20 24 63 68 0a 61  uot;.flush $ch.a
c900: 66 74 65 72 20 35 30 30 0a 73 65 74 20 64 61 74  fter 500.set dat
c910: 61 20 5b 72 65 61 64 20 24 63 68 5d 0a 61 72 72  a [read $ch].arr
c920: 61 79 20 73 65 74 20 73 74 61 74 75 73 20 5b 74  ay set status [t
c930: 6c 73 3a 3a 73 74 61 74 75 73 20 24 63 68 5d 0a  ls::status $ch].
c940: 61 72 72 61 79 20 73 65 74 20 63 6f 6e 6e 20 5b  array set conn [
c950: 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 20  tls::connection 
c960: 24 63 68 5d 0a 61 72 72 61 79 20 73 65 74 20 63  $ch].array set c
c970: 68 61 6e 20 5b 63 68 61 6e 20 63 6f 6e 66 69 67  han [chan config
c980: 75 72 65 20 24 63 68 5d 0a 63 6c 6f 73 65 20 24  ure $ch].close $
c990: 63 68 0a 70 61 72 72 61 79 20 73 74 61 74 75 73  ch.parray status
c9a0: 0a 70 61 72 72 61 79 20 63 6f 6e 6e 0a 70 61 72  .parray conn.par
c9b0: 72 61 79 20 63 68 61 6e 0a 3c 2f 70 72 65 3e 0a  ray chan.</pre>.
c9c0: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
c9d0: 73 65 63 74 69 6f 6e 37 22 20 63 6c 61 73 73 3d  section7" class=
c9e0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
c9f0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
ca00: 73 65 63 74 69 6f 6e 37 22 3e 48 54 54 50 20 50  section7">HTTP P
ca10: 61 63 6b 61 67 65 20 45 78 61 6d 70 6c 65 73 3c  ackage Examples<
ca20: 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 73  /a></h2>.<p>Thes
ca30: 65 20 65 78 61 6d 70 6c 65 73 20 75 73 65 20 74  e examples use t
ca40: 68 65 20 64 65 66 61 75 6c 74 20 55 6e 69 78 20  he default Unix 
ca50: 70 6c 61 74 66 6f 72 6d 20 53 53 4c 20 63 65 72  platform SSL cer
ca60: 74 69 66 69 63 61 74 65 73 2e 20 46 6f 72 20 73  tificates. For s
ca70: 74 61 6e 64 61 72 64 0a 69 6e 73 74 61 6c 6c 61  tandard.installa
ca80: 74 69 6f 6e 73 2c 20 2d 63 61 64 69 72 20 61 6e  tions, -cadir an
ca90: 64 20 2d 63 61 66 69 6c 65 20 73 68 6f 75 6c 64  d -cafile should
caa0: 20 6e 6f 74 20 62 65 20 6e 65 65 64 65 64 2e 20   not be needed. 
cab0: 49 66 20 79 6f 75 72 20 63 65 72 74 69 66 69 63  If your certific
cac0: 61 74 65 73 0a 61 72 65 20 69 6e 20 6e 6f 6e 2d  ates.are in non-
cad0: 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f  standard locatio
cae0: 6e 73 2c 20 73 65 74 20 2d 63 61 64 69 72 20 6f  ns, set -cadir o
caf0: 72 20 75 73 65 20 2d 63 61 66 69 6c 65 20 61 73  r use -cafile as
cb00: 20 6e 65 65 64 65 64 2e 3c 2f 70 3e 0a 3c 70 3e   needed.</p>.<p>
cb10: 45 78 61 6d 70 6c 65 20 23 33 3a 20 47 65 74 20  Example #3: Get 
cb20: 77 65 62 20 70 61 67 65 3c 2f 70 3e 0a 3c 70 72  web page</p>.<pr
cb30: 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  e class="doctool
cb40: 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63 6b  s_example">.pack
cb50: 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74 70  age require http
cb60: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65  .package require
cb70: 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 71 75   tls.set url &qu
cb80: 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74  ot;https://www.t
cb90: 63 6c 2e 74 6b 2f 26 71 75 6f 74 3b 0a 68 74 74  cl.tk/&quot;.htt
cba0: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70  p::register http
cbb0: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c  s 443 [list ::tl
cbc0: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73  s::socket -autos
cbd0: 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71  ervername 1 -req
cbe0: 75 69 72 65 20 31 5d 0a 23 20 43 68 65 63 6b 20  uire 1].# Check 
cbf0: 66 6f 72 20 65 72 72 6f 72 0a 73 65 74 20 74 6f  for error.set to
cc00: 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 75 72  ken [http::getur
cc10: 6c 20 24 75 72 6c 5d 0a 69 66 20 7b 5b 68 74 74  l $url].if {[htt
cc20: 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e  p::status $token
cc30: 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75  ] ne &quot;ok&qu
cc40: 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20  ot;} {.    puts 
cc50: 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72  [format &quot;Er
cc60: 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74  ror %s&quot; [ht
cc70: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65  tp::status $toke
cc80: 6e 5d 5d 0a 7d 0a 23 20 47 65 74 20 77 65 62 20  n]].}.# Get web 
cc90: 70 61 67 65 0a 73 65 74 20 64 61 74 61 20 5b 68  page.set data [h
cca0: 74 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65 6e  ttp::data $token
ccb0: 5d 0a 70 75 74 73 20 24 64 61 74 61 0a 23 20 43  ].puts $data.# C
ccc0: 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63  leanup.::http::c
ccd0: 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f  leanup $token.</
cce0: 70 72 65 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20  pre>.<p>Example 
ccf0: 23 34 3a 20 44 6f 77 6e 6c 6f 61 64 20 66 69 6c  #4: Download fil
cd00: 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73  e</p>.<pre class
cd10: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70  ="doctools_examp
cd20: 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 71  le">.package req
cd30: 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67  uire http.packag
cd40: 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 65  e require tls.se
cd50: 74 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 70  t url &quot;http
cd60: 73 3a 2f 2f 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e  s://wiki.tcl-lan
cd70: 67 2e 6f 72 67 2f 73 69 74 65 6d 61 70 2e 78 6d  g.org/sitemap.xm
cd80: 6c 26 71 75 6f 74 3b 0a 73 65 74 20 66 69 6c 65  l&quot;.set file
cd90: 6e 61 6d 65 20 5b 66 69 6c 65 20 74 61 69 6c 20  name [file tail 
cda0: 24 75 72 6c 5d 0a 68 74 74 70 3a 3a 72 65 67 69  $url].http::regi
cdb0: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b  ster https 443 [
cdc0: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b  list ::tls::sock
cdd0: 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61  et -autoserverna
cde0: 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d  me 1 -require 1]
cdf0: 0a 23 20 47 65 74 20 66 69 6c 65 0a 73 65 74 20  .# Get file.set 
ce00: 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61  ch [open $filena
ce10: 6d 65 20 77 62 5d 0a 73 65 74 20 74 6f 6b 65 6e  me wb].set token
ce20: 20 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 75 72 6c   [::http::geturl
ce30: 20 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65   $url -blocksize
ce40: 20 36 35 35 33 36 20 2d 63 68 61 6e 6e 65 6c 20   65536 -channel 
ce50: 24 63 68 5d 0a 23 20 43 6c 65 61 6e 75 70 0a 63  $ch].# Cleanup.c
ce60: 6c 6f 73 65 20 24 63 68 0a 3a 3a 68 74 74 70 3a  lose $ch.::http:
ce70: 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a  :cleanup $token.
ce80: 3c 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e 0a 3c 64  </pre>.</div>.<d
ce90: 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 38 22  iv id="section8"
cea0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
ceb0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61  _section"><h2><a
cec0: 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 38 22   name="section8"
ced0: 3e 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65  >Special Conside
cee0: 72 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e  rations</a></h2>
cef0: 0a 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69  .<p>The capabili
cf00: 74 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63  ties of this pac
cf10: 6b 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e  kage can vary en
cf20: 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75  ormously based u
cf30: 70 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69 6e 6b  pon how the.link
cf40: 65 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69  ed to OpenSSL li
cf50: 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67  brary was config
cf60: 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20  ured and built. 
cf70: 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79  New versions may
cf80: 20 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65 72 20   obsolete.older 
cf90: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e  protocol version
cfa0: 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65  s, add or remove
cfb0: 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65   ciphers, change
cfc0: 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c   default values,
cfd0: 20 65 74 63 2e 0a 55 73 65 20 74 68 65 20 3c 62   etc..Use the <b
cfe0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
cff0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20  ::protocols</b> 
d000: 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 6f 62 74 61  commands to obta
d010: 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 64  in the supported
d020: 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f  .protocol versio
d030: 6e 73 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  ns.</p>.</div>.<
d040: 64 69 76 20 69 64 3d 22 73 65 65 2d 61 6c 73 6f  div id="see-also
d050: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
d060: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
d070: 61 20 6e 61 6d 65 3d 22 73 65 65 2d 61 6c 73 6f  a name="see-also
d080: 22 3e 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f  ">See Also</a></
d090: 68 32 3e 0a 3c 70 3e 3c 61 20 68 72 65 66 3d 22  h2>.<p><a href="
d0a0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e  https://www.open
d0b0: 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53  ssl.org/">OpenSS
d0c0: 4c 3c 2f 61 3e 2c 20 68 74 74 70 2c 20 73 6f 63  L</a>, http, soc
d0d0: 6b 65 74 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  ket</p>.</div>.<
d0e0: 64 69 76 20 69 64 3d 22 6b 65 79 77 6f 72 64 73  div id="keywords
d0f0: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
d100: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
d110: 61 20 6e 61 6d 65 3d 22 6b 65 79 77 6f 72 64 73  a name="keywords
d120: 22 3e 4b 65 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f  ">Keywords</a></
d130: 68 32 3e 0a 3c 70 3e 49 2f 4f 2c 20 49 50 20 41  h2>.<p>I/O, IP A
d140: 64 64 72 65 73 73 2c 20 4f 70 65 6e 53 53 4c 2c  ddress, OpenSSL,
d150: 20 53 53 4c 2c 20 54 43 50 2c 20 54 4c 53 2c 20   SSL, TCP, TLS, 
d160: 54 63 6c 54 4c 53 2c 20 61 73 79 6e 63 68 72 6f  TclTLS, asynchro
d170: 6e 6f 75 73 20 49 2f 4f 2c 20 62 69 6e 64 2c 20  nous I/O, bind, 
d180: 63 65 72 74 69 66 69 63 61 74 65 2c 20 63 68 61  certificate, cha
d190: 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 63 74 69 6f 6e  nnel, connection
d1a0: 2c 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 2c 20 68  , domain name, h
d1b0: 6f 73 74 2c 20 68 74 74 70 73 2c 20 6e 65 74 77  ost, https, netw
d1c0: 6f 72 6b 2c 20 6e 65 74 77 6f 72 6b 20 61 64 64  ork, network add
d1d0: 72 65 73 73 2c 20 73 6f 63 6b 65 74 2c 20 74 6c  ress, socket, tl
d1e0: 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  s</p>.</div>.<di
d1f0: 76 20 69 64 3d 22 63 61 74 65 67 6f 72 79 22 20  v id="category" 
d200: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
d210: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
d220: 6e 61 6d 65 3d 22 63 61 74 65 67 6f 72 79 22 3e  name="category">
d230: 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 68 32  Category</a></h2
d240: 3e 0a 3c 70 3e 74 6c 73 3c 2f 70 3e 0a 3c 2f 64  >.<p>tls</p>.</d
d250: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63 6f 70  iv>.<div id="cop
d260: 79 72 69 67 68 74 22 20 63 6c 61 73 73 3d 22 64  yright" class="d
d270: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
d280: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 6f  ><h2><a name="co
d290: 70 79 72 69 67 68 74 22 3e 43 6f 70 79 72 69 67  pyright">Copyrig
d2a0: 68 74 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 43  ht</a></h2>.<p>C
d2b0: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20  opyright &copy; 
d2c0: 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e  1999 Matt Newman
d2d0: 3c 62 72 3e 0a 43 6f 70 79 72 69 67 68 74 20 26  <br>.Copyright &
d2e0: 63 6f 70 79 3b 20 32 30 30 34 20 53 74 61 72 66  copy; 2004 Starf
d2f0: 69 73 68 20 53 79 73 74 65 6d 73 3c 62 72 3e 0a  ish Systems<br>.
d300: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
d310: 20 32 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61   2024 Brian O'Ha
d320: 67 61 6e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  gan</p>.</div>.<
d330: 2f 64 69 76 3e 3c 2f 62 6f 64 79 3e 3c 2f 68 74  /div></body></ht
d340: 6d 6c 3e 0a                                      ml>.