Hex Artifact Content

Artifact 037437202bd9d036e7079026bcc2be81cac0df4f68829c2b76114a6af17d26b6:


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 53 75  #subsection1">Su
0b60: 6d 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64  mmary of command
0b70: 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61   line options</a
0b80: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73  ></li>.<li class
0b90: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
0ba0: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0bb0: 23 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 57 68  #subsection2">Wh
0bc0: 65 6e 20 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c  en are command l
0bd0: 69 6e 65 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64  ine options need
0be0: 65 64 3f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75  ed?</a></li>.</u
0bf0: 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61  l>.</li>.<li cla
0c00: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
0c10: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
0c20: 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61  section4">Callba
0c30: 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 0a 3c  ck Options</a>.<
0c40: 75 6c 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  ul>.<li class="d
0c50: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69  octools_subsecti
0c60: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75  on"><a href="#su
0c70: 62 73 65 63 74 69 6f 6e 33 22 3e 56 61 6c 75 65  bsection3">Value
0c80: 73 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61  s for Command Ca
0c90: 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a  llback</a></li>.
0ca0: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0cb0: 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e  ols_subsection">
0cc0: 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63  <a href="#subsec
0cd0: 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66 6f  tion4">Values fo
0ce0: 72 20 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62  r Password Callb
0cf0: 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ack</a></li>.<li
0d00: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
0d10: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20  _subsection"><a 
0d20: 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f  href="#subsectio
0d30: 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 56  n5">Values for V
0d40: 61 6c 69 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20  alidate Command 
0d50: 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69  Callback</a></li
0d60: 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c  >.</ul>.</li>.<l
0d70: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0d80: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0d90: 65 66 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e 44  ef="#section5">D
0da0: 65 62 75 67 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ebug</a></li>.<l
0db0: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0dc0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0dd0: 65 66 3d 22 23 73 65 63 74 69 6f 6e 36 22 3e 44  ef="#section6">D
0de0: 65 62 75 67 20 45 78 61 6d 70 6c 65 73 3c 2f 61  ebug Examples</a
0df0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73  ></li>.<li class
0e00: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
0e10: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  on"><a href="#se
0e20: 63 74 69 6f 6e 37 22 3e 48 54 54 50 20 50 61 63  ction7">HTTP Pac
0e30: 6b 61 67 65 20 45 78 61 6d 70 6c 65 73 3c 2f 61  kage Examples</a
0e40: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73  ></li>.<li class
0e50: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69  ="doctools_secti
0e60: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65  on"><a href="#se
0e70: 63 74 69 6f 6e 38 22 3e 53 70 65 63 69 61 6c 20  ction8">Special 
0e80: 43 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c 2f  Considerations</
0e90: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73  a></li>.<li clas
0ea0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
0eb0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0ec0: 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73  ee-also">See Als
0ed0: 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63  o</a></li>.<li c
0ee0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0ef0: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d  ection"><a href=
0f00: 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77  "#keywords">Keyw
0f10: 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ords</a></li>.<l
0f20: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0f30: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  s_section"><a hr
0f40: 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22 3e 43  ef="#category">C
0f50: 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c 69 3e  ategory</a></li>
0f60: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<li class="doct
0f70: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61  ools_section"><a
0f80: 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69 67 68   href="#copyrigh
0f90: 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e  t">Copyright</a>
0fa0: 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69  </li>.</ul>.</di
0fb0: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79 6e 6f  v>.<div id="syno
0fc0: 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64 6f 63  psis" class="doc
0fd0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
0fe0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 6e 6f  h2><a name="syno
0ff0: 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f  psis">Synopsis</
1000: 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 6c 61  a></h2>.<div cla
1010: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e  ss="doctools_syn
1020: 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c 61 73  opsis">.<ul clas
1030: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75  s="doctools_requ
1040: 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 3e 70  irements">.<li>p
1050: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 3c  ackage require <
1060: 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d 65  b class="pkgname
1070: 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e 3c 2f  ">Tcl 8.5-</b></
1080: 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20  li>.<li>package 
1090: 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73  require <b class
10a0: 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 20 31  ="pkgname">tls 1
10b0: 2e 38 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c  .8</b></li>.</ul
10c0: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<ul class="doc
10d0: 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 22 3e 0a 3c  tools_syntax">.<
10e0: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 22 3e  li><a href="#1">
10f0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1100: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70  ls::init</b> <sp
1110: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
1120: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
1130: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
1140: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1150: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1160: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
1170: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1180: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1190: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
11a0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
11b0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  /span></a></li>.
11c0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 32 22  <li><a href="#2"
11d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
11e0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
11f0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1200: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1210: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
1220: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1230: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1240: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
1250: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
1260: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1270: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1280: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
1290: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
12a0: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69  ss="arg">host</i
12b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
12c0: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c  >port</i></a></l
12d0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  i>.<li><a href="
12e0: 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #3"><b class="cm
12f0: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
1300: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  b> <b class="opt
1310: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e  ion">-server</b>
1320: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
1330: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61  command</i> <spa
1340: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1350: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
1360: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  ption</i>?</span
1370: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1380: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1390: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f  rg">value</i>?</
13a0: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
13b0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
13c0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20  s="arg">-option 
13d0: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f  value ...</i>?</
13e0: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22  span> <i class="
13f0: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
1400: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1410: 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c 61 73 73  ef="#4"><b class
1420: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f  ="cmd">tls::impo
1430: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
1440: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
1450: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1460: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1470: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
1480: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
1490: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
14a0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
14b0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
14c0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
14d0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
14e0: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
14f0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1500: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
1510: 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="#5"><b class="
1520: 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f  cmd">tls::unimpo
1530: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
1540: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
1550: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
1560: 61 20 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63  a href="#6"><b c
1570: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1580: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69  handshake</b> <i
1590: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
15a0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69  nnel</i></a></li
15b0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
15c0: 37 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  7"><b class="cmd
15d0: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62  ">tls::status</b
15e0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
15f0: 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f  pt">?<b class="o
1600: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62  ption">-local</b
1610: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1620: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
1630: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  </i></a></li>.<l
1640: 69 3e 3c 61 20 68 72 65 66 3d 22 23 38 22 3e 3c  i><a href="#8"><
1650: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1660: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62  s::connection</b
1670: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1680: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
1690: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
16a0: 66 3d 22 23 39 22 3e 3c 62 20 63 6c 61 73 73 3d  f="#9"><b class=
16b0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65  "cmd">tls::ciphe
16c0: 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61  rs</b> <span cla
16d0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
16e0: 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f  ss="arg">protoco
16f0: 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  l</i>?</span> <s
1700: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1710: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1720: 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70  verbose</i>?</sp
1730: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  an> <span class=
1740: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
1750: 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c  "arg">supported<
1760: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1770: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
1780: 3d 22 23 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d  ="#10"><b class=
1790: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f  "cmd">tls::proto
17a0: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69  cols</b></a></li
17b0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
17c0: 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  11"><b class="cm
17d0: 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c  d">tls::version<
17e0: 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75  /b></a></li>.</u
17f0: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e  l>.</div>.</div>
1800: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f  .<div id="sectio
1810: 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n1" class="docto
1820: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
1830: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f  ><a name="sectio
1840: 6e 31 22 3e 44 65 73 63 72 69 70 74 69 6f 6e 3c  n1">Description<
1850: 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 69 73  /a></h2>.<p>This
1860: 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69   extension provi
1870: 64 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61  des TCL script a
1880: 63 63 65 73 73 20 74 6f 20 73 65 63 75 72 65 20  ccess to secure 
1890: 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61  socket communica
18a0: 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20  tions.using the 
18b0: 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20  Transport Layer 
18c0: 53 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70  Security (TLS) p
18d0: 72 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76  rotocol. It prov
18e0: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 0a 62  ides a generic.b
18f0: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65  inding to <a hre
1900: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f  f="https://www.o
1910: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65  penssl.org/">Ope
1920: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a  nSSL</a>, utiliz
1930: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  ing the.<b class
1940: 3d 22 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74  ="syscmd">Tcl_St
1950: 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41  ackChannel</b> A
1960: 50 49 20 69 6e 20 54 43 4c 20 38 2e 34 20 61 6e  PI in TCL 8.4 an
1970: 64 20 68 69 67 68 65 72 2e 0a 54 68 65 73 65 20  d higher..These 
1980: 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65  sockets behave e
1990: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20  xactly the same 
19a0: 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61  as channels crea
19b0: 74 65 64 20 75 73 69 6e 67 20 74 68 65 20 62 75  ted using the bu
19c0: 69 6c 74 2d 69 6e 0a 3c 62 20 63 6c 61 73 73 3d  ilt-in.<b class=
19d0: 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 3c  "syscmd">socket<
19e0: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c 20 61 6c 6f  /b> command, alo
19f0: 6e 67 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e  ng with addition
1a00: 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63  al options for c
1a10: 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 68 65 20 53  ontrolling.the S
1a20: 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c  SL/TLS session.<
1a30: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  /p>.</div>.<div 
1a40: 69 64 3d 22 73 65 63 74 69 6f 6e 32 22 20 63 6c  id="section2" cl
1a50: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
1a60: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
1a70: 6d 65 3d 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f  me="section2">Co
1a80: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a  mmands</a></h2>.
1a90: 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65  <p>Typically one
1aa0: 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c   would use the <
1ab0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1ac0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f  s::socket</b> co
1ad0: 6d 6d 61 6e 64 20 74 6f 20 63 72 65 61 74 65 20  mmand to create 
1ae0: 61 20 6e 65 77 20 65 6e 63 72 79 70 74 65 64 0a  a new encrypted.
1af0: 54 43 50 20 73 6f 63 6b 65 74 2e 20 49 74 20 69  TCP socket. It i
1b00: 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74  s compatible wit
1b10: 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 43 4c  h the native TCL
1b20: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d   <b class="syscm
1b30: 64 22 3e 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  d">::socket</b> 
1b40: 63 6f 6d 6d 61 6e 64 2e 0a 41 6c 74 65 72 6e 61  command..Alterna
1b50: 74 69 76 65 6c 79 20 66 6f 72 20 61 6e 20 65 78  tively for an ex
1b60: 69 73 74 69 6e 67 20 54 43 50 20 73 6f 63 6b 65  isting TCP socke
1b70: 74 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  t, the <b class=
1b80: 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72  "cmd">tls::impor
1b90: 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 63 61  t</b> command ca
1ba0: 6e 20 62 65 0a 75 73 65 64 20 74 6f 20 73 74 61  n be.used to sta
1bb0: 72 74 20 54 4c 53 20 6f 6e 20 74 68 65 20 63 6f  rt TLS on the co
1bc0: 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64  nnection.</p>.<d
1bd0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
1be0: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
1bf0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 22 3e  <dt><a name="1">
1c00: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1c10: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70  ls::init</b> <sp
1c20: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
1c30: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
1c40: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
1c50: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1c60: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1c70: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
1c80: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1c90: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1ca0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
1cb0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
1cc0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  /span></a></dt>.
1cd0: 3c 64 64 3e 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20  <dd><p>Optional 
1ce0: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20  function to set 
1cf0: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69  the default opti
1d00: 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 62 20 63  ons used by <b c
1d10: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1d20: 73 6f 63 6b 65 74 3c 2f 62 3e 2e 20 49 66 20 79  socket</b>. If y
1d30: 6f 75 0a 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73  ou.call <b class
1d40: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f  ="cmd">tls::impo
1d50: 72 74 3c 2f 62 3e 20 64 69 72 65 63 74 6c 79 2c  rt</b> directly,
1d60: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61   this command ha
1d70: 73 20 6e 6f 20 65 66 66 65 63 74 2e 20 54 68 69  s no effect. Thi
1d80: 73 20 63 6f 6d 6d 61 6e 64 0a 73 75 70 70 6f 72  s command.suppor
1d90: 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61  ts all of the sa
1da0: 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68  me options as th
1db0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
1dc0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
1dd0: 20 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68   command, though
1de0: 20 79 6f 75 0a 73 68 6f 75 6c 64 20 6c 69 6d 69   you.should limi
1df0: 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74  t your options t
1e00: 6f 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74  o only TLS relat
1e10: 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c 2f 64 64  ed ones.</p></dd
1e20: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 32  >.<dt><a name="2
1e30: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
1e40: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
1e50: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
1e60: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
1e70: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
1e80: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1e90: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1ea0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
1eb0: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1ec0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1ed0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1ee0: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
1ef0: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c  i>?</span> <i cl
1f00: 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f  ass="arg">host</
1f10: 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  i> <i class="arg
1f20: 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f  ">port</i></a></
1f30: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  dt>.<dd><p>This 
1f40: 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63  is a helper func
1f50: 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a  tion that utiliz
1f60: 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e  es the underlyin
1f70: 67 20 63 6f 6d 6d 61 6e 64 73 20 3c 62 20 63 6c  g commands <b cl
1f80: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63  ass="syscmd">soc
1f90: 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c 62 20 63  ket</b>.and <b c
1fa0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1fb0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f 20 63 72  import</b> to cr
1fc0: 65 61 74 65 20 74 68 65 20 63 6f 6e 6e 65 63 74  eate the connect
1fd0: 69 6f 6e 2e 20 49 74 20 62 65 68 61 76 65 73 20  ion. It behaves 
1fe0: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a  the same as the.
1ff0: 6e 61 74 69 76 65 20 54 43 4c 20 3c 62 20 63 6c  native TCL <b cl
2000: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63  ass="syscmd">soc
2010: 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c  ket</b> command,
2020: 20 62 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72   but also suppor
2030: 74 73 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ts the <b class=
2040: 22 63 6d 64 22 3e 74 6c 73 3a 69 6d 70 6f 72 74  "cmd">tls:import
2050: 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64 20 6f 70 74  </b>.command opt
2060: 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64  ions with one ad
2070: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 2e  ditional option.
2080: 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65 20   It returns the 
2090: 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69  channel handle i
20a0: 64 0a 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f  d.for the new so
20b0: 63 6b 65 74 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  cket.</p>.<dl cl
20c0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70  ass="doctools_op
20d0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
20e0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61  lass="option">-a
20f0: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62  utoservername</b
2100: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2110: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
2120: 64 64 3e 3c 70 3e 49 66 20 3c 62 20 63 6c 61 73  dd><p>If <b clas
2130: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f  s="const">true</
2140: 62 3e 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c  b>, automaticall
2150: 79 20 73 65 74 20 74 68 65 20 3c 62 20 63 6c 61  y set the <b cla
2160: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72  ss="option">-ser
2170: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 61 72 67 75  vername</b> argu
2180: 6d 65 6e 74 20 74 6f 20 74 68 65 0a 3c 65 6d 3e  ment to the.<em>
2190: 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  host</em> argume
21a0: 6e 74 2e 20 44 65 66 61 75 6c 74 20 69 73 20 3c  nt. Default is <
21b0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
21c0: 66 61 6c 73 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f  false</b>.</p></
21d0: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c  dd>.</dl></dd>.<
21e0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 33 22 3e 3c  dt><a name="3"><
21f0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
2200: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 62  s::socket</b> <b
2210: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
2220: 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20 63  -server</b> <i c
2230: 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6d 6d 61  lass="arg">comma
2240: 6e 64 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61  nd</i> <span cla
2250: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
2260: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
2270: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
2280: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
2290: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
22a0: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  alue</i>?</span>
22b0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
22c0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
22d0: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65  g">-option value
22e0: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e   ...</i>?</span>
22f0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
2300: 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  port</i></a></dt
2310: 3e 0a 3c 64 64 3e 3c 70 3e 53 61 6d 65 20 61 73  >.<dd><p>Same as
2320: 20 70 72 65 76 69 6f 75 73 2c 20 62 75 74 20 69   previous, but i
2330: 6e 73 74 65 61 64 20 63 72 65 61 74 65 73 20 61  nstead creates a
2340: 20 73 65 72 76 65 72 20 73 6f 63 6b 65 74 20 66   server socket f
2350: 6f 72 20 63 6c 69 65 6e 74 73 20 74 6f 20 63 6f  or clients to co
2360: 6e 6e 65 63 74 20 74 6f 0a 6a 75 73 74 20 6c 69  nnect to.just li
2370: 6b 65 20 74 68 65 20 54 63 6c 20 3c 62 20 63 6c  ke the Tcl <b cl
2380: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63  ass="syscmd">soc
2390: 6b 65 74 20 2d 73 65 72 76 65 72 3c 2f 62 3e 20  ket -server</b> 
23a0: 63 6f 6d 6d 61 6e 64 2e 20 49 74 20 72 65 74 75  command. It retu
23b0: 72 6e 73 20 74 68 65 20 63 68 61 6e 6e 65 6c 0a  rns the channel.
23c0: 68 61 6e 64 6c 65 20 69 64 20 66 6f 72 20 74 68  handle id for th
23d0: 65 20 6e 65 77 20 73 6f 63 6b 65 74 2e 3c 2f 70  e new socket.</p
23e0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61  ></dd>.<dt><a na
23f0: 6d 65 3d 22 34 22 3e 3c 62 20 63 6c 61 73 73 3d  me="4"><b class=
2400: 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72  "cmd">tls::impor
2410: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
2420: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  arg">channel</i>
2430: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
2440: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
2450: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
2460: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
2470: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
2480: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
2490: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
24a0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
24b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
24c0: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
24d0: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f  i>?</span></a></
24e0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74 61 72 74  dt>.<dd><p>Start
24f0: 20 54 4c 53 20 65 6e 63 72 79 70 74 69 6f 6e 20   TLS encryption 
2500: 6f 6e 20 54 43 4c 20 63 68 61 6e 6e 65 6c 20 3c  on TCL channel <
2510: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
2520: 61 6e 6e 65 6c 3c 2f 69 3e 20 76 69 61 20 61 20  annel</i> via a 
2530: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 2e  stacked channel.
2540: 20 49 74 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20   It.need not be 
2550: 61 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75  a socket, but mu
2560: 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69  st provide bi-di
2570: 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20  rectional flow. 
2580: 41 6c 73 6f 20 73 65 74 73 20 73 65 73 73 69 6f  Also sets sessio
2590: 6e 0a 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72  n.parameters for
25a0: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20   SSL handshake. 
25b0: 56 61 6c 69 64 20 6f 70 74 69 6f 6e 73 20 61 72  Valid options ar
25c0: 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73  e:</p>.<dl class
25d0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f  ="doctools_optio
25e0: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
25f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e  s="option">-alpn
2600: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
2610: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74  rg">list</i></dt
2620: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66  >.<dd><p>List of
2630: 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66   protocols to of
2640: 66 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69  fer during Appli
2650: 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f  cation-Layer Pro
2660: 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f  tocol Negotiatio
2670: 6e 0a 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78  n.(ALPN). For ex
2680: 61 6d 70 6c 65 3a 20 3c 62 20 63 6c 61 73 73 3d  ample: <b class=
2690: 22 63 6f 6e 73 74 22 3e 68 32 3c 2f 62 3e 20 61  "const">h2</b> a
26a0: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  nd <b class="con
26b0: 73 74 22 3e 68 74 74 70 2f 31 2e 31 3c 2f 62 3e  st">http/1.1</b>
26c0: 2c 20 62 75 74 20 6e 6f 74 20 3c 62 20 63 6c 61  , but not <b cla
26d0: 73 73 3d 22 63 6f 6e 73 74 22 3e 68 33 3c 2f 62  ss="const">h3</b
26e0: 3e 20 6f 72 0a 3c 62 20 63 6c 61 73 73 3d 22 63  > or.<b class="c
26f0: 6f 6e 73 74 22 3e 71 75 69 63 3c 2f 62 3e 2e 3c  onst">quic</b>.<
2700: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
2710: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
2720: 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61  cadir</b> <i cla
2730: 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f  ss="arg">directo
2740: 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ry</i></dt>.<dd>
2750: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
2760: 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65   directory where
2770: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65   the Certificate
2780: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20   Authority (CA) 
2790: 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65  certificates are
27a0: 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66  .stored. The def
27b0: 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d  ault is platform
27c0: 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61   specific and ca
27d0: 6e 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70  n be set at comp
27e0: 69 6c 65 20 74 69 6d 65 2e 20 54 68 65 0a 64 65  ile time. The.de
27f0: 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63  fault location c
2800: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e  an be overridden
2810: 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73   by the <b class
2820: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f  ="variable">SSL_
2830: 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76  CERT_DIR</b> env
2840: 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c  ironment.variabl
2850: 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  e. See <span cla
2860: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
2870: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22  href="#section3"
2880: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  >Certificate Val
2890: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61  idation</a></spa
28a0: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61  n> for more deta
28b0: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ils.</p></dd>.<d
28c0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
28d0: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20  on">-cafile</b> 
28e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66  <i class="arg">f
28f0: 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e  ilename</i></dt>
2900: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
2910: 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20  s the file with 
2920: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
2930: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63  Authority (CA) c
2940: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 75  ertificates to u
2950: 73 65 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20  se..The default 
2960: 69 73 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  is &quot;<b clas
2970: 73 3d 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65  s="file">cert.pe
2980: 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20  m</b>&quot;, in 
2990: 74 68 65 20 4f 70 65 6e 53 53 4c 20 64 69 72 65  the OpenSSL dire
29a0: 63 74 6f 72 79 2e 20 54 68 65 20 64 65 66 61 75  ctory. The defau
29b0: 6c 74 20 66 69 6c 65 20 63 61 6e 0a 62 65 20 6f  lt file can.be o
29c0: 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65  verridden by the
29d0: 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61   <b class="varia
29e0: 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49  ble">SSL_CERT_FI
29f0: 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65  LE</b> environme
2a00: 6e 74 20 76 61 72 69 61 62 6c 65 2e 20 53 65 65  nt variable. See
2a10: 0a 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65  .<span class="se
2a20: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22  ctref"><a href="
2a30: 23 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69  #section3">Certi
2a40: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f  ficate Validatio
2a50: 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  n</a></span> for
2a60: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f   more details.</
2a70: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
2a80: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
2a90: 61 73 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c  astore</b> <i cl
2aa0: 61 73 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69  ass="arg">URI</i
2ab0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
2ac0: 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 66  ecifies the Unif
2ad0: 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65  orm Resource Ide
2ae0: 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 6f  ntifier (URI) fo
2af0: 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  r the Certificat
2b00: 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29  e Authority.(CA)
2b10: 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61   store, which ma
2b20: 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f  y be a single co
2b30: 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74  ntainer or a cat
2b40: 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65  alog of containe
2b50: 72 73 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74  rs..Starting wit
2b60: 68 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e  h OpenSSL 3.2 on
2b70: 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f   Windows, set to
2b80: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
2b90: 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e  "const">org.open
2ba0: 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c  ssl.winstore://<
2bb0: 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65  /b>&quot;.to use
2bc0: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 57 69   the built-in Wi
2bd0: 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74  ndows Certificat
2be0: 65 20 53 74 6f 72 65 2e 20 54 68 69 73 20 73 74  e Store. This st
2bf0: 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74  ore only support
2c00: 73 20 72 6f 6f 74 0a 63 65 72 74 69 66 69 63 61  s root.certifica
2c10: 74 65 20 73 74 6f 72 65 73 2e 20 53 65 65 20 3c  te stores. See <
2c20: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
2c30: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
2c40: 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69  ection3">Certifi
2c50: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
2c60: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
2c70: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e  ore details.</p>
2c80: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
2c90: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72  ss="option">-cer
2ca0: 74 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  tfile</b> <i cla
2cb0: 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d  ss="arg">filenam
2cc0: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
2cd0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
2ce0: 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65  name of the file
2cf0: 20 77 69 74 68 20 74 68 65 20 63 65 72 74 69 66   with the certif
2d00: 69 63 61 74 65 20 69 6e 20 50 45 4d 20 66 6f 72  icate in PEM for
2d10: 6d 61 74 20 74 6f 20 75 73 65 0a 61 73 20 74 68  mat to use.as th
2d20: 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74 20  e local (client 
2d30: 6f 72 20 73 65 72 76 65 72 29 20 63 65 72 74 69  or server) certi
2d40: 66 69 63 61 74 65 2e 20 49 74 20 61 6c 73 6f 20  ficate. It also 
2d50: 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 75 62  contains the pub
2d60: 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64  lic key.</p></dd
2d70: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
2d80: 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62  option">-cert</b
2d90: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2da0: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  >string</i></dt>
2db0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
2dc0: 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  s the certificat
2dd0: 65 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45  e to use as a DE
2de0: 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67  R encoded string
2df0: 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 70   (X.509 DER).</p
2e00: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
2e10: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69  ass="option">-ci
2e20: 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  pher</b> <i clas
2e30: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
2e40: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
2e50: 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 73  pecifies the lis
2e60: 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20  t of ciphers to 
2e70: 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e 32 20  use for TLS 1.2 
2e80: 61 6e 64 20 65 61 72 6c 69 65 72 20 63 6f 6e 6e  and earlier conn
2e90: 65 63 74 69 6f 6e 73 2e 0a 53 74 72 69 6e 67 20  ections..String 
2ea0: 69 73 20 61 20 63 6f 6c 6f 6e 20 26 71 75 6f 74  is a colon &quot
2eb0: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
2ec0: 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 73 65  ">:</b>&quot; se
2ed0: 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20  parated list of 
2ee0: 63 69 70 68 65 72 73 2e 0a 43 69 70 68 65 72 73  ciphers..Ciphers
2ef0: 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64   can be combined
2f00: 20 75 73 69 6e 67 20 74 68 65 20 26 71 75 6f 74   using the &quot
2f10: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
2f20: 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 63 68  ">+</b>&quot; ch
2f30: 61 72 61 63 74 65 72 2e 0a 50 72 65 66 69 78 65  aracter..Prefixe
2f40: 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f  s can be used to
2f50: 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d   permanently rem
2f60: 6f 76 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61  ove &quot;<b cla
2f70: 73 73 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f 62 3e  ss="const">!</b>
2f80: 26 71 75 6f 74 3b 2c 20 64 65 6c 65 74 65 20 26  &quot;, delete &
2f90: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63  quot;<b class="c
2fa0: 6f 6e 73 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f 74  onst">-</b>&quot
2fb0: 3b 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68  ;, or.move to th
2fc0: 65 20 65 6e 64 20 26 71 75 6f 74 3b 3c 62 20 63  e end &quot;<b c
2fd0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c 2f  lass="const">+</
2fe0: 62 3e 26 71 75 6f 74 3b 20 61 20 73 70 65 63 69  b>&quot; a speci
2ff0: 66 69 65 64 20 63 69 70 68 65 72 2e 0a 4b 65 79  fied cipher..Key
3000: 77 6f 72 64 73 20 3c 62 20 63 6c 61 73 73 3d 22  words <b class="
3010: 63 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47 54 48  const">@STRENGTH
3020: 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c  </b> (sort by al
3030: 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67  gorithm key leng
3040: 74 68 29 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63  th),.<b class="c
3050: 6f 6e 73 74 22 3e 40 53 45 43 4c 45 56 45 4c 3d  onst">@SECLEVEL=
3060: 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20 28  </b><em>n</em> (
3070: 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76  set security lev
3080: 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 3c 62  el to n), and.<b
3090: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 44   class="const">D
30a0: 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20  EFAULT</b> (use 
30b0: 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c  default cipher l
30c0: 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e  ist, at start on
30d0: 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 65 20  ly) can also be 
30e0: 73 70 65 63 69 66 69 65 64 2e 0a 53 65 65 20 74  specified..See t
30f0: 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70  he <a href="http
3100: 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c  s://docs.openssl
3110: 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31  .org/master/man1
3120: 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73  /openssl-ciphers
3130: 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53  /#options">OpenS
3140: 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61  SL</a>.documenta
3150: 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c  tion for the ful
3160: 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20  l list of valid 
3170: 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  values.</p></dd>
3180: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
3190: 70 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72 73 75  ption">-ciphersu
31a0: 69 74 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ites</b> <i clas
31b0: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
31c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  i></dt>.<dd><p>S
31d0: 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 73  pecifies the lis
31e0: 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74  t of cipher suit
31f0: 65 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c  es to use for TL
3200: 53 20 31 2e 33 20 61 73 20 61 20 63 6f 6c 6f 6e  S 1.3 as a colon
3210: 0a 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d  .&quot;<b class=
3220: 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75  "const">:</b>&qu
3230: 6f 74 3b 20 73 65 70 61 72 61 74 65 64 20 6c 69  ot; separated li
3240: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69  st of cipher sui
3250: 74 65 20 6e 61 6d 65 73 2e 20 53 65 65 20 74 68  te names. See th
3260: 65 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73  e.<a href="https
3270: 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e  ://docs.openssl.
3280: 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f  org/master/man1/
3290: 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f  openssl-ciphers/
32a0: 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53  #options">OpenSS
32b0: 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74  L</a>.documentat
32c0: 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c  ion for the full
32d0: 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76   list of valid v
32e0: 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  alues.</p></dd>.
32f0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
3300: 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  tion">-command</
3310: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
3320: 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f  ">callback</i></
3330: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
3340: 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63  fies the callbac
3350: 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 65 20  k command to be 
3360: 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72  invoked at sever
3370: 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67  al points during
3380: 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 20 74   the.handshake t
3390: 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 74  o pass errors, t
33a0: 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69  racing informati
33b0: 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f 6c  on, and protocol
33c0: 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65 20 3c   messages..See <
33d0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
33e0: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
33f0: 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63  ection4">Callbac
3400: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73  k Options</a></s
3410: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e  pan> for more in
3420: 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  fo.</p></dd>.<dt
3430: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
3440: 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f 62 3e  n">-dhparams</b>
3450: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3460: 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74  filename</i></dt
3470: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
3480: 65 73 20 74 68 65 20 44 69 66 66 69 65 2d 48 65  es the Diffie-He
3490: 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 61 6d  llman (DH) param
34a0: 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70 3e 3c  eters file.</p><
34b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
34c0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 66  s="option">-keyf
34d0: 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ile</b> <i class
34e0: 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c  ="arg">filename<
34f0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
3500: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 70 72  Specifies the pr
3510: 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20  ivate key file. 
3520: 54 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75  The default valu
3530: 65 20 69 73 20 74 6f 20 75 73 65 20 74 68 65 20  e is to use the 
3540: 66 69 6c 65 0a 73 70 65 63 69 66 69 65 64 20 62  file.specified b
3550: 79 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22  y the <i class="
3560: 61 72 67 22 3e 2d 63 65 72 74 66 69 6c 65 3c 2f  arg">-certfile</
3570: 69 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f  i> option.</p></
3580: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
3590: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f  ="option">-key</
35a0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
35b0: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  ">string</i></dt
35c0: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
35d0: 65 73 20 74 68 65 20 70 72 69 76 61 74 65 20 6b  es the private k
35e0: 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 44  ey to use as a D
35f0: 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e  ER encoded strin
3600: 67 20 28 50 4b 43 53 23 31 20 44 45 52 29 2e 3c  g (PKCS#1 DER).<
3610: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
3620: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
3630: 6d 6f 64 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61  model</b> <i cla
3640: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
3650: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3660: 3e 46 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e  >Force this chan
3670: 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65  nel to share the
3680: 20 73 61 6d 65 20 3c 69 20 63 6c 61 73 73 3d 22   same <i class="
3690: 74 65 72 6d 22 3e 53 53 4c 5f 43 54 58 3c 2f 69  term">SSL_CTX</i
36a0: 3e 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74  > structure as t
36b0: 68 65 0a 73 70 65 63 69 66 69 65 64 20 3c 69 20  he.specified <i 
36c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
36d0: 6e 65 6c 3c 2f 69 3e 2c 20 61 6e 64 20 74 68 65  nel</i>, and the
36e0: 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 6f 6e  refore share con
36f0: 66 69 67 2c 20 63 61 6c 6c 62 61 63 6b 73 2c 20  fig, callbacks, 
3700: 65 74 63 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  etc.</p></dd>.<d
3710: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3720: 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62  on">-password</b
3730: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
3740: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64  >callback</i></d
3750: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
3760: 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b  ies the callback
3770: 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f   command to invo
3780: 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20  ke when OpenSSL 
3790: 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 69 6e 20  needs to obtain 
37a0: 61 0a 70 61 73 73 77 6f 72 64 2e 20 54 68 69 73  a.password. This
37b0: 20 69 73 20 74 79 70 69 63 61 6c 6c 79 20 75 73   is typically us
37c0: 65 64 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65  ed to unlock the
37d0: 20 70 72 69 76 61 74 65 20 6b 65 79 20 6f 66 20   private key of 
37e0: 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54  a certificate..T
37f0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75  he callback shou
3800: 6c 64 20 72 65 74 75 72 6e 20 61 20 70 61 73 73  ld return a pass
3810: 77 6f 72 64 20 73 74 72 69 6e 67 2e 20 53 65 65  word string. See
3820: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65   <span class="se
3830: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22  ctref"><a href="
3840: 23 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62  #section4">Callb
3850: 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c  ack Options</a><
3860: 2f 73 70 61 6e 3e 0a 66 6f 72 20 6d 6f 72 65 20  /span>.for more 
3870: 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  info.</p></dd>.<
3880: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
3890: 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e 64 73  ion">-post_hands
38a0: 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  hake</b> <i clas
38b0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
38c0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c  </dt>.<dd><p>All
38d0: 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b  ow post-handshak
38e0: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  e session ticket
38f0: 20 75 70 64 61 74 65 73 2e 3c 2f 70 3e 3c 2f 64   updates.</p></d
3900: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3910: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73  "option">-reques
3920: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
3930: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
3940: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73  t>.<dd><p>Reques
3950: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
3960: 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67  from peer during
3970: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61   the SSL handsha
3980: 6b 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64  ke. This is need
3990: 65 64 20 74 6f 20 64 6f 0a 43 65 72 74 69 66 69  ed to do.Certifi
39a0: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e  cate Validation.
39b0: 20 44 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63   Default is <b c
39c0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
39d0: 65 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e  e</b>..See <span
39e0: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22   class="sectref"
39f0: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69  ><a href="#secti
3a00: 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65  on3">Certificate
3a10: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c   Validation</a><
3a20: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20  /span> for more 
3a30: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64  details.</p></dd
3a40: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
3a50: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65  option">-require
3a60: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
3a70: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
3a80: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65  >.<dd><p>Require
3a90: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69   a valid certifi
3aa0: 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64  cate from peer d
3ab0: 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61  uring the SSL ha
3ac0: 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73  ndshake. If this
3ad0: 20 69 73 20 73 65 74 20 74 6f 0a 74 72 75 65 2c   is set to.true,
3ae0: 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22   then <b class="
3af0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74  option">-request
3b00: 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62  </b> must also b
3b10: 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e  e set to true an
3b20: 64 20 61 20 65 69 74 68 65 72 20 3c 62 20 63 6c  d a either <b cl
3b30: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
3b40: 64 69 72 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73  dir</b>,.<b clas
3b50: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69  s="option">-cafi
3b60: 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  le</b>, <b class
3b70: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f  ="option">-casto
3b80: 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61  re</b>, or a pla
3b90: 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 20 6d 75  tform default mu
3ba0: 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69  st be provided i
3bb0: 6e 20 6f 72 64 65 72 20 74 6f 0a 76 61 6c 69 64  n order to.valid
3bc0: 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65  ate against. The
3bd0: 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63   default is <b c
3be0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c  lass="const">fal
3bf0: 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74  se</b> since not
3c00: 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68   all platforms h
3c10: 61 76 65 0a 63 65 72 74 69 66 69 63 61 74 65 73  ave.certificates
3c20: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61   to validate aga
3c30: 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63  inst in a form c
3c40: 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f  ompatible with O
3c50: 70 65 6e 53 53 4c 2e 0a 53 65 65 20 3c 73 70 61  penSSL..See <spa
3c60: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
3c70: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
3c80: 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74  ion3">Certificat
3c90: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
3ca0: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
3cb0: 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64   details.</p></d
3cc0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3cd0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69  "option">-securi
3ce0: 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20  ty_level</b> <i 
3cf0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 6e 74 65  class="arg">inte
3d00: 67 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ger</i></dt>.<dd
3d10: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
3d20: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c  e security level
3d30: 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74   (value from 0 t
3d40: 6f 20 35 29 2e 20 54 68 65 20 73 65 63 75 72 69  o 5). The securi
3d50: 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73  ty level affects
3d60: 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70  .the allowed cip
3d70: 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 79 70  her suite encryp
3d80: 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c  tion algorithms,
3d90: 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 20 63   supported ECC c
3da0: 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64  urves,.supported
3db0: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
3dc0: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65  ithms, DH parame
3dd0: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69  ter sizes, certi
3de0: 66 69 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73  ficate key sizes
3df0: 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61  .and signature a
3e00: 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64  lgorithms. The d
3e10: 65 66 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f  efault is 1 prio
3e20: 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32  r to OpenSSL 3.2
3e30: 20 61 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65   and 2.thereafte
3e40: 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68  r. Level 3 and h
3e50: 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75  igher disable su
3e60: 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f  pport for sessio
3e70: 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e  n tickets and.on
3e80: 6c 79 20 61 63 63 65 70 74 20 63 69 70 68 65 72  ly accept cipher
3e90: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f   suites that pro
3ea0: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63  vide forward sec
3eb0: 72 65 63 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  recy.</p></dd>.<
3ec0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
3ed0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e  ion">-server</b>
3ee0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3ef0: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
3f00: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 77  d><p>Specifies w
3f10: 68 65 74 68 65 72 20 74 6f 20 61 63 74 20 61 73  hether to act as
3f20: 20 61 20 73 65 72 76 65 72 20 61 6e 64 20 72 65   a server and re
3f30: 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73 65 72  spond with a ser
3f40: 76 65 72 20 68 61 6e 64 73 68 61 6b 65 20 77 68  ver handshake wh
3f50: 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e  en a.client conn
3f60: 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69 64 65  ects and provide
3f70: 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 73  s a client hands
3f80: 68 61 6b 65 2e 20 54 68 65 20 64 65 66 61 75 6c  hake. The defaul
3f90: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
3fa0: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e  onst">false</b>.
3fb0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
3fc0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
3fd0: 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20  -servername</b> 
3fe0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68  <i class="arg">h
3ff0: 6f 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e  ostname</i></dt>
4000: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 79 20  .<dd><p>Specify 
4010: 74 68 65 20 70 65 65 72 27 73 20 68 6f 73 74 6e  the peer's hostn
4020: 61 6d 65 2e 20 54 68 69 73 20 69 73 20 75 73 65  ame. This is use
4030: 64 20 74 6f 20 73 65 74 20 74 68 65 20 54 4c 53  d to set the TLS
4040: 20 53 65 72 76 65 72 20 4e 61 6d 65 0a 49 6e 64   Server Name.Ind
4050: 69 63 61 74 69 6f 6e 20 28 53 4e 49 29 20 65 78  ication (SNI) ex
4060: 74 65 6e 73 69 6f 6e 2e 20 53 65 74 20 74 68 69  tension. Set thi
4070: 73 20 74 6f 20 74 68 65 20 65 78 70 65 63 74 65  s to the expecte
4080: 64 20 73 65 72 76 65 72 6e 61 6d 65 20 69 6e 20  d servername in 
4090: 74 68 65 0a 73 65 72 76 65 72 27 73 20 63 65 72  the.server's cer
40a0: 74 69 66 69 63 61 74 65 20 6f 72 20 6f 6e 65 20  tificate or one 
40b0: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41  of the Subject A
40c0: 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65 73 20 28  lternate Names (
40d0: 53 41 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  SAN).</p></dd>.<
40e0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
40f0: 69 6f 6e 22 3e 2d 73 65 73 73 69 6f 6e 5f 69 64  ion">-session_id
4100: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
4110: 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e  rg">binary_strin
4120: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
4130: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
4140: 73 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 72 65  session id to re
4150: 73 75 6d 65 20 61 20 73 65 73 73 69 6f 6e 2e 20  sume a session. 
4160: 4e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 79 65  Not supported ye
4170: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  t.</p></dd>.<dt>
4180: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
4190: 22 3e 2d 73 73 6c 32 3c 2f 62 3e 20 3c 69 20 63  ">-ssl2</b> <i c
41a0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
41b0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
41c0: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53  Enable use of SS
41d0: 4c 20 76 32 2e 20 54 68 65 20 64 65 66 61 75 6c  L v2. The defaul
41e0: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
41f0: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e  onst">false</b>.
4200: 20 4e 6f 74 65 3a 20 52 65 63 65 6e 74 20 76 65   Note: Recent ve
4210: 72 73 69 6f 6e 73 20 6f 66 0a 4f 70 65 6e 53 53  rsions of.OpenSS
4220: 4c 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70  L no longer supp
4230: 6f 72 74 20 53 53 4c 76 32 2c 20 73 6f 20 74 68  ort SSLv2, so th
4240: 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20  is may not have 
4250: 61 6e 79 20 65 66 66 65 63 74 2e 20 53 65 65 20  any effect. See 
4260: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6d  the.<b class="cm
4270: 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  d">tls::protocol
4280: 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f  s</b> command fo
4290: 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74  r supported prot
42a0: 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ocols.</p></dd>.
42b0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
42c0: 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c 2f 62 3e 20  tion">-ssl3</b> 
42d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
42e0: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
42f0: 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  ><p>Enable use o
4300: 66 20 53 53 4c 20 76 33 2e 20 54 68 65 20 64 65  f SSL v3. The de
4310: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73  fault is <b clas
4320: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c  s="const">false<
4330: 2f 62 3e 2e 20 4e 6f 74 65 3a 20 52 65 63 65 6e  /b>. Note: Recen
4340: 74 20 76 65 72 73 69 6f 6e 73 0a 6f 66 20 4f 70  t versions.of Op
4350: 65 6e 53 53 4c 20 6d 61 79 20 68 61 76 65 20 74  enSSL may have t
4360: 68 69 73 20 64 69 73 61 62 6c 65 64 20 61 74 20  his disabled at 
4370: 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2c 20 73 6f  compile time, so
4380: 20 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61   this may not ha
4390: 76 65 20 61 6e 79 0a 65 66 66 65 63 74 2e 20 53  ve any.effect. S
43a0: 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ee the <b class=
43b0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f  "cmd">tls::proto
43c0: 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64  cols</b> command
43d0: 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70   for supported p
43e0: 72 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64  rotocols.</p></d
43f0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
4400: 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 3c 2f  "option">-tls1</
4410: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
4420: 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">bool</i></dt>.
4430: 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73  <dd><p>Enable us
4440: 65 20 6f 66 20 54 4c 53 20 76 31 2e 20 54 68 65  e of TLS v1. The
4450: 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63   default is <b c
4460: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
4470: 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a 20 54 4c 53  e</b>. Note: TLS
4480: 20 31 2e 30 20 6e 65 65 64 73 0a 53 48 41 31 20   1.0 needs.SHA1 
4490: 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63  to operate, whic
44a0: 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61  h is only availa
44b0: 62 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79 20  ble in security 
44c0: 6c 65 76 65 6c 20 30 20 66 6f 72 20 4f 70 65 6e  level 0 for Open
44d0: 20 53 53 4c 20 33 2e 30 2b 2e 0a 53 65 65 20 74   SSL 3.0+..See t
44e0: 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  he <i class="arg
44f0: 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65  ">-security_leve
4500: 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70  l</i> option.</p
4510: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
4520: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c  ass="option">-tl
4530: 73 31 2e 31 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  s1.1</b> <i clas
4540: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
4550: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61  </dt>.<dd><p>Ena
4560: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76  ble use of TLS v
4570: 31 2e 31 2e 20 54 68 65 20 64 65 66 61 75 6c 74  1.1. The default
4580: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
4590: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 4e  nst">true</b>. N
45a0: 6f 74 65 3a 20 54 4c 53 20 31 2e 31 20 6e 65 65  ote: TLS 1.1 nee
45b0: 64 73 0a 53 48 41 31 20 74 6f 20 6f 70 65 72 61  ds.SHA1 to opera
45c0: 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c  te, which is onl
45d0: 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73  y available in s
45e0: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 30 20  ecurity level 0 
45f0: 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30  for Open SSL 3.0
4600: 2b 2e 0a 53 65 65 20 74 68 65 20 3c 69 20 63 6c  +..See the <i cl
4610: 61 73 73 3d 22 61 72 67 22 3e 2d 73 65 63 75 72  ass="arg">-secur
4620: 69 74 79 5f 6c 65 76 65 6c 3c 2f 69 3e 20 6f 70  ity_level</i> op
4630: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  tion.</p></dd>.<
4640: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
4650: 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32 3c 2f 62 3e  ion">-tls1.2</b>
4660: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
4670: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
4680: 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20  d><p>Enable use 
4690: 6f 66 20 54 4c 53 20 76 31 2e 32 2e 20 54 68 65  of TLS v1.2. The
46a0: 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63   default is <b c
46b0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
46c0: 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  e</b>.</p></dd>.
46d0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
46e0: 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 33 3c 2f 62  tion">-tls1.3</b
46f0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4700: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
4710: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65  dd><p>Enable use
4720: 20 6f 66 20 54 4c 53 20 76 31 2e 33 2e 20 54 68   of TLS v1.3. Th
4730: 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20  e default is <b 
4740: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72  class="const">tr
4750: 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ue</b>.</p></dd>
4760: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
4770: 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65  ption">-validate
4780: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63  command</b> <i c
4790: 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62  lass="arg">callb
47a0: 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ack</i></dt>.<dd
47b0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
47c0: 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61  e callback comma
47d0: 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20  nd to invoke to 
47e0: 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 65 65  validate the pee
47f0: 72 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 61  r certificates.a
4800: 6e 64 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 20  nd other config 
4810: 69 6e 66 6f 20 64 75 72 69 6e 67 20 74 68 65 20  info during the 
4820: 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61  protocol negotia
4830: 74 69 6f 6e 20 70 68 61 73 65 2e 20 54 68 69 73  tion phase. This
4840: 20 63 61 6e 20 62 65 20 75 73 65 64 0a 62 79 20   can be used.by 
4850: 54 43 4c 20 73 63 72 69 70 74 73 20 74 6f 20 70  TCL scripts to p
4860: 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 6e  erform their own
4870: 20 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c   Certificate Val
4880: 69 64 61 74 69 6f 6e 20 74 6f 20 73 75 70 70 6c  idation to suppl
4890: 65 6d 65 6e 74 20 74 68 65 0a 64 65 66 61 75 6c  ement the.defaul
48a0: 74 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f  t validation pro
48b0: 76 69 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c  vided by OpenSSL
48c0: 2e 20 54 68 65 20 73 63 72 69 70 74 20 6d 75 73  . The script mus
48d0: 74 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65  t return a boole
48e0: 61 6e 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69  an true.to conti
48f0: 6e 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74  nue the negotiat
4900: 69 6f 6e 2e 20 53 65 65 20 3c 73 70 61 6e 20 63  ion. See <span c
4910: 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c  lass="sectref"><
4920: 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e  a href="#section
4930: 34 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69  4">Callback Opti
4940: 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66  ons</a></span> f
4950: 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70  or more info.</p
4960: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64  ></dd>.</dl></dd
4970: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 35  >.<dt><a name="5
4980: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
4990: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f  >tls::unimport</
49a0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
49b0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61  ">channel</i></a
49c0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f  ></dt>.<dd><p>Co
49d0: 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 3c 62 20 63  mpliment to <b c
49e0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
49f0: 69 6d 70 6f 72 74 3c 2f 62 3e 2e 20 55 73 65 64  import</b>. Used
4a00: 20 74 6f 20 72 65 6d 6f 76 65 20 74 68 65 20 74   to remove the t
4a10: 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 6b 65 64  op level stacked
4a20: 20 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d 20 3c 69   channel.from <i
4a30: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
4a40: 6e 6e 65 6c 3c 2f 69 3e 2e 20 54 68 69 73 20 75  nnel</i>. This u
4a50: 6e 73 74 61 63 6b 73 20 74 68 65 20 65 6e 63 72  nstacks the encr
4a60: 79 70 74 69 6f 6e 20 6f 66 20 61 20 72 65 67 75  yption of a regu
4a70: 6c 61 72 20 54 43 4c 20 63 68 61 6e 6e 65 6c 2e  lar TCL channel.
4a80: 20 41 6e 0a 65 72 72 6f 72 20 69 73 20 74 68 72   An.error is thr
4a90: 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f  own if TLS is no
4aa0: 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65  t the top stacke
4ab0: 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c  d channel type.<
4ac0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20  /p></dd>.<dt><a 
4ad0: 6e 61 6d 65 3d 22 36 22 3e 3c 62 20 63 6c 61 73  name="6"><b clas
4ae0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61 6e  s="cmd">tls::han
4af0: 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c  dshake</b> <i cl
4b00: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
4b10: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  l</i></a></dt>.<
4b20: 64 64 3e 3c 70 3e 46 6f 72 63 65 73 20 74 68 65  dd><p>Forces the
4b30: 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 69 6f 6e   TLS negotiation
4b40: 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61   handshake to ta
4b50: 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 64 69 61  ke place immedia
4b60: 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 75 72 6e  tely, and return
4b70: 73 20 30 0a 69 66 20 68 61 6e 64 73 68 61 6b 65  s 0.if handshake
4b80: 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f   is still in pro
4b90: 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b  gress (non-block
4ba0: 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 20 74 68  ing), or 1 if th
4bb0: 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 0a  e handshake was.
4bc0: 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20 74  successful. If t
4bd0: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69  he handshake fai
4be0: 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 20 77 69  led, an error wi
4bf0: 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c  ll be returned.<
4c00: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20  /p></dd>.<dt><a 
4c10: 6e 61 6d 65 3d 22 37 22 3e 3c 62 20 63 6c 61 73  name="7"><b clas
4c20: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61  s="cmd">tls::sta
4c30: 74 75 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c  tus</b> <span cl
4c40: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 62 20 63 6c  ass="opt">?<b cl
4c50: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f  ass="option">-lo
4c60: 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e 3e 20  cal</b>?</span> 
4c70: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63  <i class="arg">c
4c80: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f  hannel</i></a></
4c90: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72  dt>.<dd><p>Retur
4ca0: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73  ns the current s
4cb0: 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53 4c 20  tatus of an SSL 
4cc0: 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73  channel. The res
4cd0: 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66  ult is a list of
4ce0: 20 6b 65 79 2d 76 61 6c 75 65 0a 70 61 69 72 73   key-value.pairs
4cf0: 20 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 20   describing the 
4d00: 53 53 4c 2c 20 63 65 72 74 69 66 69 63 61 74 65  SSL, certificate
4d10: 2c 20 61 6e 64 20 63 65 72 74 69 66 69 63 61 74  , and certificat
4d20: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 73  e verification s
4d30: 74 61 74 75 73 2e 20 49 66 0a 74 68 65 20 53 53  tatus. If.the SS
4d40: 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20  L handshake has 
4d50: 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65  not yet complete
4d60: 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74  d, an empty list
4d70: 20 69 73 20 72 65 74 75 72 6e 65 64 2e 20 49 66   is returned. If
4d80: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f   the.<b class="o
4d90: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62  ption">-local</b
4da0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73 70 65 63  > option is spec
4db0: 69 66 69 65 64 2c 20 74 68 65 6e 20 74 68 65 20  ified, then the 
4dc0: 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 63 61 74  local certificat
4dd0: 65 20 69 73 20 75 73 65 64 2e 20 52 65 74 75 72  e is used. Retur
4de0: 6e 65 64 0a 76 61 6c 75 65 73 20 69 6e 63 6c 75  ned.values inclu
4df0: 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53  de:</p>.<p>SSL S
4e00: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  tatus</p>.<dl cl
4e10: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
4e20: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
4e30: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
4e40: 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20  le">alpn</b> <i 
4e50: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74  class="arg">prot
4e60: 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ocol</i></dt>.<d
4e70: 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f  d><p>The protoco
4e80: 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72  l selected after
4e90: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79   Application-Lay
4ea0: 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f  er Protocol Nego
4eb0: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c  tiation (ALPN).<
4ec0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4ed0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
4ee0: 3e 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63  >cipher</b> <i c
4ef0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65  lass="arg">ciphe
4f00: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
4f10: 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69  p>The current ci
4f20: 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20  pher in use for 
4f30: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e  the session.</p>
4f40: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
4f50: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 65  ss="variable">pe
4f60: 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c  ername</b> <i cl
4f70: 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f  ass="arg">name</
4f80: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
4f90: 68 65 20 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d  he peername from
4fa0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
4fb0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4fc0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
4fd0: 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20  e">protocol</b> 
4fe0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
4ff0: 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  ersion</i></dt>.
5000: 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f  <dd><p>The proto
5010: 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64  col version used
5020: 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74   for the connect
5030: 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c  ion: SSL2, SSL3,
5040: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54   TLS1, TLS1.1, T
5050: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f  LS1.2, TLS1.3, o
5060: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f  r unknown.</p></
5070: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5080: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 62 69 74  ="variable">sbit
5090: 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  s</b> <i class="
50a0: 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  arg">n</i></dt>.
50b0: 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65  <dd><p>The numbe
50c0: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66  r of bits used f
50d0: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b  or the session k
50e0: 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ey.</p></dd>.<dt
50f0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5100: 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 48 61  ble">signatureHa
5110: 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20  shAlgorithm</b> 
5120: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61  <i class="arg">a
5130: 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74  lgorithm</i></dt
5140: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67  >.<dd><p>The sig
5150: 6e 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f  nature hash algo
5160: 72 69 74 68 6d 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  rithm.</p></dd>.
5170: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5180: 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72  riable">signatur
5190: 65 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  eType</b> <i cla
51a0: 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f 69  ss="arg">type</i
51b0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
51c0: 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65  e signature type
51d0: 20 76 61 6c 75 65 2e 3c 2f 70 3e 3c 2f 64 64 3e   value.</p></dd>
51e0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
51f0: 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79 44  ariable">verifyD
5200: 65 70 74 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  epth</b> <i clas
5210: 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64  s="arg">n</i></d
5220: 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d 75  t>.<dd><p>Maximu
5230: 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 20  m depth for the 
5240: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69  certificate chai
5250: 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 20  n verification. 
5260: 44 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 74  Default is -1, t
5270: 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 3c 2f 70 3e  o check all.</p>
5280: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5290: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65  ss="variable">ve
52a0: 72 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 3c 69 20  rifyMode</b> <i 
52b0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74  class="arg">list
52c0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
52d0: 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69  >List of certifi
52e0: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f  cate verificatio
52f0: 6e 20 6d 6f 64 65 73 2e 3c 2f 70 3e 3c 2f 64 64  n modes.</p></dd
5300: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5310: 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79  variable">verify
5320: 52 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20 63 6c  Result</b> <i cl
5330: 61 73 73 3d 22 61 72 67 22 3e 72 65 73 75 6c 74  ass="arg">result
5340: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5350: 3e 43 65 72 74 69 66 69 63 61 74 65 20 76 65 72  >Certificate ver
5360: 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74  ification result
5370: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5380: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5390: 65 22 3e 63 61 5f 6e 61 6d 65 73 3c 2f 62 3e 20  e">ca_names</b> 
53a0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c  <i class="arg">l
53b0: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ist</i></dt>.<dd
53c0: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 74 68 65 20  ><p>List of the 
53d0: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68  Certificate Auth
53e0: 6f 72 69 74 69 65 73 20 75 73 65 64 20 74 6f 20  orities used to 
53f0: 63 72 65 61 74 65 20 74 68 65 20 63 65 72 74 69  create the certi
5400: 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e  ficate.</p></dd>
5410: 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 65 72 74 69 66  .</dl>.<p>Certif
5420: 69 63 61 74 65 20 53 74 61 74 75 73 3c 2f 70 3e  icate Status</p>
5430: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
5440: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73  ools_definitions
5450: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  ">.<dt><b class=
5460: 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 6c 3c 2f  "variable">all</
5470: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5480: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  ">string</i></dt
5490: 3e 0a 3c 64 64 3e 3c 70 3e 44 75 6d 70 20 6f 66  >.<dd><p>Dump of
54a0: 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65   all certificate
54b0: 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a   info.</p></dd>.
54c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
54d0: 72 69 61 62 6c 65 22 3e 76 65 72 73 69 6f 6e 3c  riable">version<
54e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
54f0: 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3c 2f 64 74  g">value</i></dt
5500: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72  >.<dd><p>The cer
5510: 74 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e  tificate version
5520: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5530: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5540: 65 22 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c  e">serialNumber<
5550: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5560: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
5570: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65  t>.<dd><p>The se
5580: 72 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74  rial number of t
5590: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61  he certificate a
55a0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c  s a hex string.<
55b0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
55c0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
55d0: 3e 73 69 67 6e 61 74 75 72 65 3c 2f 62 3e 20 3c  >signature</b> <
55e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c  i class="arg">al
55f0: 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e  gorithm</i></dt>
5600: 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 20 61  .<dd><p>Cipher a
5610: 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f  lgorithm used fo
5620: 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69  r certificate si
5630: 67 6e 61 74 75 72 65 2e 3c 2f 70 3e 3c 2f 64 64  gnature.</p></dd
5640: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5650: 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72  variable">issuer
5660: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5670: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
5680: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64  dt>.<dd><p>The d
5690: 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d  istinguished nam
56a0: 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65  e (DN) of the ce
56b0: 72 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72  rtificate issuer
56c0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
56d0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
56e0: 65 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62 3e  e">notBefore</b>
56f0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5700: 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  date</i></dt>.<d
5710: 64 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e 6e 69  d><p>The beginni
5720: 6e 67 20 64 61 74 65 20 6f 66 20 74 68 65 20 63  ng date of the c
5730: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64  ertificate valid
5740: 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ity.</p></dd>.<d
5750: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5760: 61 62 6c 65 22 3e 6e 6f 74 41 66 74 65 72 3c 2f  able">notAfter</
5770: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5780: 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">date</i></dt>.
5790: 3c 64 64 3e 3c 70 3e 54 68 65 20 65 78 70 69 72  <dd><p>The expir
57a0: 61 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68  ation date of th
57b0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61  e certificate va
57c0: 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e  lidity.</p></dd>
57d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
57e0: 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74  ariable">subject
57f0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5800: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  rg">string</i></
5810: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64  dt>.<dd><p>The d
5820: 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d  istinguished nam
5830: 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65  e (DN) of the ce
5840: 72 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 63  rtificate subjec
5850: 74 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64  t. Fields includ
5860: 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28  e: Common.Name (
5870: 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f  CN), Organizatio
5880: 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20  n (O), Locality 
5890: 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61  or City (L), Sta
58a0: 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28  te or Province (
58b0: 53 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20  S), and.Country 
58c0: 4e 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c 2f 64  Name (C).</p></d
58d0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
58e0: 22 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65  "variable">issue
58f0: 72 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69  rUniqueID</b> <i
5900: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
5910: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
5920: 3e 3c 70 3e 54 68 65 20 69 73 73 75 65 72 20 75  ><p>The issuer u
5930: 6e 69 71 75 65 20 69 64 2e 3c 2f 70 3e 3c 2f 64  nique id.</p></d
5940: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5950: 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65  "variable">subje
5960: 63 74 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c  ctUniqueID</b> <
5970: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74  i class="arg">st
5980: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
5990: 64 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65 63 74  d><p>The subject
59a0: 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 70 3e 3c   unique id.</p><
59b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
59c0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 75 6d  s="variable">num
59d0: 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20  _extensions</b> 
59e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
59f0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5a00: 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69  >Number of certi
5a10: 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e  ficate extension
5a20: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
5a30: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5a40: 6c 65 22 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f  le">extensions</
5a50: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5a60: 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">list</i></dt>.
5a70: 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63  <dd><p>List of c
5a80: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e  ertificate exten
5a90: 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 70 3e 3c  sion names.</p><
5aa0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5ab0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 75 74  s="variable">aut
5ac0: 68 6f 72 69 74 79 4b 65 79 49 64 65 6e 74 69 66  horityKeyIdentif
5ad0: 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ier</b> <i class
5ae0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
5af0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 75  ></dt>.<dd><p>Au
5b00: 74 68 6f 72 69 74 79 20 4b 65 79 20 49 64 65 6e  thority Key Iden
5b10: 74 69 66 69 65 72 20 28 41 4b 49 29 20 6f 66 20  tifier (AKI) of 
5b20: 74 68 65 20 49 73 73 75 69 6e 67 20 43 41 20 63  the Issuing CA c
5b30: 65 72 74 69 66 69 63 61 74 65 20 74 68 61 74 20  ertificate that 
5b40: 73 69 67 6e 65 64 20 74 68 65 0a 53 53 4c 20 63  signed the.SSL c
5b50: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20  ertificate as a 
5b60: 68 65 78 20 73 74 72 69 6e 67 2e 20 54 68 69 73  hex string. This
5b70: 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20 74   value matches t
5b80: 68 65 20 53 4b 49 20 76 61 6c 75 65 20 6f 66 20  he SKI value of 
5b90: 74 68 65 0a 49 6e 74 65 72 6d 65 64 69 61 74 65  the.Intermediate
5ba0: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 2e   CA certificate.
5bb0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5bc0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5bd0: 22 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e  ">subjectKeyIden
5be0: 74 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  tifier</b> <i cl
5bf0: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
5c00: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5c10: 3e 53 75 62 6a 65 63 74 20 4b 65 79 20 49 64 65  >Subject Key Ide
5c20: 6e 74 69 66 69 65 72 20 28 53 4b 49 29 20 68 61  ntifier (SKI) ha
5c30: 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63  sh of the public
5c40: 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20   key inside the 
5c50: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61  certificate as a
5c60: 0a 68 65 78 20 73 74 72 69 6e 67 2e 20 55 73 65  .hex string. Use
5c70: 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 63 65  d to identify ce
5c80: 72 74 69 66 69 63 61 74 65 73 20 74 68 61 74 20  rtificates that 
5c90: 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 69 63  contain a partic
5ca0: 75 6c 61 72 20 70 75 62 6c 69 63 20 6b 65 79 2e  ular public key.
5cb0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5cc0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5cd0: 22 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65  ">subjectAltName
5ce0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5cf0: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74  rg">list</i></dt
5d00: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66  >.<dd><p>List of
5d10: 20 61 6c 6c 20 6f 66 20 74 68 65 20 53 75 62 6a   all of the Subj
5d20: 65 63 74 20 41 6c 74 65 72 6e 61 74 69 76 65 20  ect Alternative 
5d30: 4e 61 6d 65 73 20 28 53 41 4e 29 20 69 6e 63 6c  Names (SAN) incl
5d40: 75 64 69 6e 67 20 64 6f 6d 61 69 6e 20 6e 61 6d  uding domain nam
5d50: 65 73 2c 20 73 75 62 0a 64 6f 6d 61 69 6e 73 2c  es, sub.domains,
5d60: 20 61 6e 64 20 49 50 20 61 64 64 72 65 73 73 65   and IP addresse
5d70: 73 20 74 68 61 74 20 61 72 65 20 73 65 63 75 72  s that are secur
5d80: 65 64 20 62 79 20 74 68 65 20 63 65 72 74 69 66  ed by the certif
5d90: 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  icate.</p></dd>.
5da0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5db0: 72 69 61 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e  riable">ocsp</b>
5dc0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5dd0: 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  list</i></dt>.<d
5de0: 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c  d><p>List of all
5df0: 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63   Online Certific
5e00: 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f  ate Status Proto
5e10: 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 20  col (OCSP) URLs 
5e20: 74 68 61 74 20 63 61 6e 20 62 65 20 75 73 65 64  that can be used
5e30: 20 74 6f 0a 63 68 65 63 6b 20 74 68 65 20 76 61   to.check the va
5e40: 6c 69 64 69 74 79 20 6f 66 20 74 68 69 73 20 63  lidity of this c
5e50: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c  ertificate.</p><
5e60: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5e70: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 65 72  s="variable">cer
5e80: 74 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c 69 20  tificate</b> <i 
5e90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74  class="arg">cert
5ea0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5eb0: 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64  >The PEM encoded
5ec0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70   certificate.</p
5ed0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
5ee0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
5ef0: 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68  ignatureAlgorith
5f00: 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  m</b> <i class="
5f10: 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f  arg">algorithm</
5f20: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43  i></dt>.<dd><p>C
5f30: 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20  ipher algorithm 
5f40: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72  used for the cer
5f50: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
5f60: 72 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  re.</p></dd>.<dt
5f70: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
5f80: 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 56 61  ble">signatureVa
5f90: 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  lue</b> <i class
5fa0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
5fb0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65  ></dt>.<dd><p>Ce
5fc0: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
5fd0: 75 72 65 20 61 73 20 61 20 68 65 78 20 73 74 72  ure as a hex str
5fe0: 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ing.</p></dd>.<d
5ff0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6000: 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 44  able">signatureD
6010: 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  igest</b> <i cla
6020: 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e  ss="arg">version
6030: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6040: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67  >Certificate sig
6050: 6e 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61  ning digest as a
6060: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 70 3e   hex string.</p>
6070: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6080: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 75  ss="variable">pu
6090: 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d  blicKeyAlgorithm
60a0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
60b0: 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69  rg">algorithm</i
60c0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65  ></dt>.<dd><p>Ce
60d0: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
60e0: 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61  ure public key a
60f0: 6c 67 6f 72 69 74 68 6d 2e 3c 2f 70 3e 3c 2f 64  lgorithm.</p></d
6100: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
6110: 22 76 61 72 69 61 62 6c 65 22 3e 70 75 62 6c 69  "variable">publi
6120: 63 4b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  cKey</b> <i clas
6130: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f  s="arg">string</
6140: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43  i></dt>.<dd><p>C
6150: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
6160: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20  ture public key 
6170: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e  as a hex string.
6180: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6190: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
61a0: 22 3e 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c  ">bits</b> <i cl
61b0: 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c  ass="arg">n</i><
61c0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4e 75 6d 62  /dt>.<dd><p>Numb
61d0: 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20  er of bits used 
61e0: 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20  for certificate 
61f0: 73 69 67 6e 61 74 75 72 65 20 6b 65 79 2e 3c 2f  signature key.</
6200: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6210: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6220: 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 62 3e 20  self_signed</b> 
6230: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
6240: 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  oolean</i></dt>.
6250: 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74  <dd><p>Whether t
6260: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73  he certificate s
6270: 69 67 6e 61 74 75 72 65 20 69 73 20 73 65 6c 66  ignature is self
6280: 20 73 69 67 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64   signed.</p></dd
6290: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
62a0: 76 61 72 69 61 62 6c 65 22 3e 73 68 61 31 5f 68  variable">sha1_h
62b0: 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ash</b> <i class
62c0: 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c  ="arg">hash</i><
62d0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
62e0: 53 48 41 31 20 68 61 73 68 20 6f 66 20 74 68 65  SHA1 hash of the
62f0: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20   certificate as 
6300: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 70  a hex string.</p
6310: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6320: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6330: 68 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20 3c  ha256_hash</b> <
6340: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61  i class="arg">ha
6350: 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  sh</i></dt>.<dd>
6360: 3c 70 3e 54 68 65 20 53 48 41 32 35 36 20 68 61  <p>The SHA256 ha
6370: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
6380: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
6390: 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  tring.</p></dd>.
63a0: 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  </dl></dd>.<dt><
63b0: 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 20 63 6c  a name="8"><b cl
63c0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63  ass="cmd">tls::c
63d0: 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69  onnection</b> <i
63e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
63f0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  nnel</i></a></dt
6400: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73  >.<dd><p>Returns
6410: 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e   the current con
6420: 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f  nection status o
6430: 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c  f an SSL channel
6440: 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20  . The result is 
6450: 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d 76 61  a list.of key-va
6460: 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69  lue pairs descri
6470: 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74  bing the connect
6480: 69 6f 6e 2e 20 52 65 74 75 72 6e 65 64 20 76 61  ion. Returned va
6490: 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70  lues include:</p
64a0: 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c  >.<p>SSL Status<
64b0: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64  /p>.<dl class="d
64c0: 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69  octools_definiti
64d0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
64e0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 74  ss="variable">st
64f0: 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ate</b> <i class
6500: 3d 22 61 72 67 22 3e 73 74 61 74 65 3c 2f 69 3e  ="arg">state</i>
6510: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74 61  </dt>.<dd><p>Sta
6520: 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63  te of the connec
6530: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  tion.</p></dd>.<
6540: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6550: 69 61 62 6c 65 22 3e 73 65 72 76 65 72 6e 61 6d  iable">servernam
6560: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
6570: 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  arg">name</i></d
6580: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 61  t>.<dd><p>The na
6590: 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63  me of the connec
65a0: 74 65 64 20 74 6f 20 73 65 72 76 65 72 2e 3c 2f  ted to server.</
65b0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
65c0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
65d0: 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20  protocol</b> <i 
65e0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73  class="arg">vers
65f0: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ion</i></dt>.<dd
6600: 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c  ><p>The protocol
6610: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f   version used fo
6620: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
6630: 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c  : SSL2, SSL3, TL
6640: 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31  S1, TLS1.1, TLS1
6650: 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75  .2, TLS1.3, or u
6660: 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  nknown.</p></dd>
6670: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6680: 61 72 69 61 62 6c 65 22 3e 72 65 6e 65 67 6f 74  ariable">renegot
6690: 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64 3c 2f  iation_allowed</
66a0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
66b0: 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64  ">boolean</i></d
66c0: 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65  t>.<dd><p>Whethe
66d0: 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67  r protocol reneg
66e0: 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70  otiation is supp
66f0: 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70  orted or not.</p
6700: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6710: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6720: 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62  ecurity_level</b
6730: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6740: 3e 6c 65 76 65 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  >level</i></dt>.
6750: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 63 75 72  <dd><p>The secur
6760: 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66  ity level used f
6770: 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20  or selection of 
6780: 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a  ciphers, key siz
6790: 65 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64 64 3e  e, etc.</p></dd>
67a0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
67b0: 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e  ariable">session
67c0: 5f 72 65 75 73 65 64 3c 2f 62 3e 20 3c 69 20 63  _reused</b> <i c
67d0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65  lass="arg">boole
67e0: 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  an</i></dt>.<dd>
67f0: 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 73  <p>Whether the s
6800: 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e 20  ession has been 
6810: 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f  reused or not.</
6820: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6830: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6840: 69 73 5f 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69  is_server</b> <i
6850: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
6860: 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  lean</i></dt>.<d
6870: 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65  d><p>Whether the
6880: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63   connection is c
6890: 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61 20 73  onfigured as a s
68a0: 65 72 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69  erver (1) or cli
68b0: 65 6e 74 20 28 30 29 2e 3c 2f 70 3e 3c 2f 64 64  ent (0).</p></dd
68c0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
68d0: 76 61 72 69 61 62 6c 65 22 3e 63 6f 6d 70 72 65  variable">compre
68e0: 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  ssion</b> <i cla
68f0: 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69  ss="arg">mode</i
6900: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f  ></dt>.<dd><p>Co
6910: 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64  mpression method
6920: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
6930: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
6940: 65 22 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 62 3e  e">expansion</b>
6950: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6960: 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  mode</i></dt>.<d
6970: 64 3e 3c 70 3e 45 78 70 61 6e 73 69 6f 6e 20 6d  d><p>Expansion m
6980: 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ethod.</p></dd>.
6990: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
69a0: 72 69 61 62 6c 65 22 3e 63 61 4c 69 73 74 3c 2f  riable">caList</
69b0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
69c0: 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">list</i></dt>.
69d0: 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 43  <dd><p>List of C
69e0: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f  ertificate Autho
69f0: 72 69 74 69 65 73 20 28 43 41 29 20 66 6f 72 20  rities (CA) for 
6a00: 58 2e 35 30 39 20 63 65 72 74 69 66 69 63 61 74  X.509 certificat
6a10: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  e.</p></dd>.</dl
6a20: 3e 0a 3c 70 3e 43 69 70 68 65 72 20 49 6e 66 6f  >.<p>Cipher Info
6a30: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
6a40: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
6a50: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
6a60: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63  ass="variable">c
6a70: 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61  ipher</b> <i cla
6a80: 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65 72 3c  ss="arg">cipher<
6a90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6aa0: 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68  The current ciph
6ab0: 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68  er in use for th
6ac0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70  e connection.</p
6ad0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6ae0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6af0: 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 62 3e  tandard_name</b>
6b00: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6b10: 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  name</i></dt>.<d
6b20: 64 3e 3c 70 3e 54 68 65 20 73 74 61 6e 64 61 72  d><p>The standar
6b30: 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69  d RFC name of ci
6b40: 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  pher.</p></dd>.<
6b50: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6b60: 69 61 62 6c 65 22 3e 61 6c 67 6f 72 69 74 68 6d  iable">algorithm
6b70: 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61  _bits</b> <i cla
6b80: 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f  ss="arg">n</i></
6b90: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e  dt>.<dd><p>The n
6ba0: 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73  umber of process
6bb0: 65 64 20 62 69 74 73 20 75 73 65 64 20 66 6f 72  ed bits used for
6bc0: 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64   cipher.</p></dd
6bd0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
6be0: 76 61 72 69 61 62 6c 65 22 3e 73 65 63 72 65 74  variable">secret
6bf0: 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61  _bits</b> <i cla
6c00: 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f  ss="arg">n</i></
6c10: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e  dt>.<dd><p>The n
6c20: 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20  umber of secret 
6c30: 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69  bits used for ci
6c40: 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  pher.</p></dd>.<
6c50: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6c60: 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 65 72 73 69  iable">min_versi
6c70: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
6c80: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69  "arg">version</i
6c90: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
6ca0: 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63  e minimum protoc
6cb0: 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63  ol version for c
6cc0: 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ipher.</p></dd>.
6cd0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6ce0: 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 5f 69  riable">cipher_i
6cf0: 73 5f 61 65 61 64 3c 2f 62 3e 20 3c 69 20 63 6c  s_aead</b> <i cl
6d00: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61  ass="arg">boolea
6d10: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
6d20: 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 69  p>Whether the ci
6d30: 70 68 65 72 20 69 73 20 41 75 74 68 65 6e 74 69  pher is Authenti
6d40: 63 61 74 65 64 20 45 6e 63 72 79 70 74 69 6f 6e  cated Encryption
6d50: 20 77 69 74 68 20 41 73 73 6f 63 69 61 74 65 64   with Associated
6d60: 20 44 61 74 61 20 28 41 45 41 44 29 2e 3c 2f 70   Data (AEAD).</p
6d70: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6d80: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63  ass="variable">c
6d90: 69 70 68 65 72 5f 69 64 3c 2f 62 3e 20 3c 69 20  ipher_id</b> <i 
6da0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 64 3c 2f  class="arg">id</
6db0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
6dc0: 68 65 20 4f 70 65 6e 53 53 4c 20 63 69 70 68 65  he OpenSSL ciphe
6dd0: 72 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  r id.</p></dd>.<
6de0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6df0: 69 61 62 6c 65 22 3e 64 65 73 63 72 69 70 74 69  iable">descripti
6e00: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
6e10: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
6e20: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 20 74  </dt>.<dd><p>A t
6e30: 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20  ext description 
6e40: 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f  of the cipher.</
6e50: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6e60: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6e70: 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 74  handshake_digest
6e80: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6e90: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
6ea0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 67 65  /dt>.<dd><p>Dige
6eb0: 73 74 20 75 73 65 64 20 64 75 72 69 6e 67 20 68  st used during h
6ec0: 61 6e 64 73 68 61 6b 65 2e 3c 2f 70 3e 3c 2f 64  andshake.</p></d
6ed0: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 53 65 73 73  d>.</dl>.<p>Sess
6ee0: 69 6f 6e 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c  ion Info</p>.<dl
6ef0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
6f00: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c  _definitions">.<
6f10: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6f20: 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20  iable">alpn</b> 
6f30: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70  <i class="arg">p
6f40: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  rotocol</i></dt>
6f50: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74  .<dd><p>The prot
6f60: 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66  ocol selected af
6f70: 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d  ter Application-
6f80: 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e  Layer Protocol N
6f90: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e  egotiation (ALPN
6fa0: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
6fb0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6fc0: 6c 65 22 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 62  le">resumable</b
6fd0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6fe0: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74  >boolean</i></dt
6ff0: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72  >.<dd><p>Whether
7000: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61 6e   the session can
7010: 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e   be resumed or n
7020: 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ot.</p></dd>.<dt
7030: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
7040: 62 6c 65 22 3e 73 74 61 72 74 5f 74 69 6d 65 3c  ble">start_time<
7050: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7060: 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f  g">seconds</i></
7070: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 6d 65 20  dt>.<dd><p>Time 
7080: 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74  since session st
7090: 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73  arted in seconds
70a0: 20 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 70   since epoch.</p
70b0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
70c0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74  ass="variable">t
70d0: 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69 20 63 6c  imeout</b> <i cl
70e0: 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64  ass="arg">second
70f0: 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  s</i></dt>.<dd><
7100: 70 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f  p>Max duration o
7110: 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63  f session in sec
7120: 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65  onds before time
7130: 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  -out.</p></dd>.<
7140: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7150: 69 61 62 6c 65 22 3e 6c 69 66 65 74 69 6d 65 3c  iable">lifetime<
7160: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7170: 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f  g">seconds</i></
7180: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73 73 69  dt>.<dd><p>Sessi
7190: 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69  on ticket lifeti
71a0: 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e  me hint in secon
71b0: 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ds.</p></dd>.<dt
71c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
71d0: 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c  ble">session_id<
71e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
71f0: 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67  g">binary_string
7200: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7210: 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20  >Unique session 
7220: 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65  id for use in re
7230: 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69  suming the sessi
7240: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  on.</p></dd>.<dt
7250: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
7260: 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 74 69 63  ble">session_tic
7270: 6b 65 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ket</b> <i class
7280: 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74  ="arg">binary_st
7290: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
72a0: 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73  d><p>Unique sess
72b0: 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75  ion ticket for u
72c0: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74  se in resuming t
72d0: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c  he session.</p><
72e0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
72f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 69 63  s="variable">tic
7300: 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 62 3e  ket_app_data</b>
7310: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
7320: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69  binary_string</i
7330: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e  ></dt>.<dd><p>Un
7340: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63  ique session tic
7350: 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e 20  ket application 
7360: 64 61 74 61 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  data.</p></dd>.<
7370: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
7380: 69 61 62 6c 65 22 3e 6d 61 73 74 65 72 5f 6b 65  iable">master_ke
7390: 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  y</b> <i class="
73a0: 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69  arg">binary_stri
73b0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
73c0: 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f  <p>Unique sessio
73d0: 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c 2f 70  n master key.</p
73e0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
73f0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
7400: 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64  ession_cache_mod
7410: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
7420: 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64  arg">mode</i></d
7430: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 72 76 65 72  t>.<dd><p>Server
7440: 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69   cache mode (cli
7450: 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20  ent, server, or 
7460: 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  both).</p></dd>.
7470: 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  </dl></dd>.<dt><
7480: 61 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 63 6c  a name="9"><b cl
7490: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63  ass="cmd">tls::c
74a0: 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e  iphers</b> <span
74b0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
74c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f   class="arg">pro
74d0: 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  tocol</i>?</span
74e0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
74f0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
7500: 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f  rg">verbose</i>?
7510: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
7520: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
7530: 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72  ass="arg">suppor
7540: 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c  ted</i>?</span><
7550: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
7560: 57 69 74 68 6f 75 74 20 61 6e 79 20 61 72 67 73  Without any args
7570: 2c 20 72 65 74 75 72 6e 73 20 61 20 6c 69 73 74  , returns a list
7580: 20 6f 66 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69   of all symmetri
7590: 63 20 63 69 70 68 65 72 73 20 66 6f 72 20 75 73  c ciphers for us
75a0: 65 20 77 69 74 68 20 74 68 65 0a 3c 69 20 63 6c  e with the.<i cl
75b0: 61 73 73 3d 22 61 72 67 22 3e 2d 63 69 70 68 65  ass="arg">-ciphe
75c0: 72 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 20 57 69  r</i> option. Wi
75d0: 74 68 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  th <i class="arg
75e0: 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c 20  ">protocol</i>, 
75f0: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73  only the ciphers
7600: 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74   supported for t
7610: 68 61 74 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65  hat.protocol are
7620: 20 72 65 74 75 72 6e 65 64 2e 20 53 65 65 20 74   returned. See t
7630: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  he <b class="cmd
7640: 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73  ">tls::protocols
7650: 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72  </b> command for
7660: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70   the supported.p
7670: 72 6f 74 6f 63 6f 6c 73 2e 20 49 66 20 3c 69 20  rotocols. If <i 
7680: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62  class="arg">verb
7690: 6f 73 65 3c 2f 69 3e 20 69 73 20 73 70 65 63 69  ose</i> is speci
76a0: 66 69 65 64 20 61 73 20 74 72 75 65 20 74 68 65  fied as true the
76b0: 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68 75 6d  n a verbose, hum
76c0: 61 6e 20 72 65 61 64 61 62 6c 65 0a 6c 69 73 74  an readable.list
76d0: 20 69 73 20 72 65 74 75 72 6e 65 64 20 77 69 74   is returned wit
76e0: 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66  h additional inf
76f0: 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20  ormation on the 
7700: 63 69 70 68 65 72 2e 20 49 66 20 3c 69 20 63 6c  cipher. If <i cl
7710: 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72  ass="arg">suppor
7720: 74 65 64 3c 2f 69 3e 0a 69 73 20 73 70 65 63 69  ted</i>.is speci
7730: 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 68  fied as true, th
7740: 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68  en only the ciph
7750: 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f  ers supported fo
7760: 72 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20  r protocol will 
7770: 62 65 20 6c 69 73 74 65 64 2e 3c 2f 70 3e 3c 2f  be listed.</p></
7780: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  dd>.<dt><a name=
7790: 22 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  "10"><b class="c
77a0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  md">tls::protoco
77b0: 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  ls</b></a></dt>.
77c0: 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 61  <dd><p>Returns a
77d0: 20 6c 69 73 74 20 6f 66 20 74 68 65 20 73 75 70   list of the sup
77e0: 70 6f 72 74 65 64 20 53 53 4c 2f 54 4c 53 20 70  ported SSL/TLS p
77f0: 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20  rotocols. Valid 
7800: 76 61 6c 75 65 73 20 61 72 65 3a 0a 3c 62 20 63  values are:.<b c
7810: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c  lass="const">ssl
7820: 32 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d  2</b>, <b class=
7830: 22 63 6f 6e 73 74 22 3e 73 73 6c 33 3c 2f 62 3e  "const">ssl3</b>
7840: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
7850: 74 22 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 20  t">tls1</b>, <b 
7860: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c  class="const">tl
7870: 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  s1.1</b>, <b cla
7880: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e  ss="const">tls1.
7890: 32 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c  2</b>, and.<b cl
78a0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31  ass="const">tls1
78b0: 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69  .3</b>. Exact li
78c0: 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70  st depends on Op
78d0: 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e  enSSL version an
78e0: 64 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66  d compile time f
78f0: 6c 61 67 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  lags.</p></dd>.<
7900: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 31 22 3e  dt><a name="11">
7910: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
7920: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c  ls::version</b><
7930: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
7940: 52 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e  Returns the Open
7950: 53 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69  SSL version stri
7960: 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  ng.</p></dd>.</d
7970: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  l>.</div>.<div i
7980: 64 3d 22 73 65 63 74 69 6f 6e 33 22 20 63 6c 61  d="section3" cla
7990: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
79a0: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
79b0: 65 3d 22 73 65 63 74 69 6f 6e 33 22 3e 43 65 72  e="section3">Cer
79c0: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
79d0: 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69  ion</a></h2>.<di
79e0: 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e  v id="subsection
79f0: 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  1" class="doctoo
7a00: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
7a10: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73  h3><a name="subs
7a20: 65 63 74 69 6f 6e 31 22 3e 53 75 6d 6d 61 72 79  ection1">Summary
7a30: 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65   of command line
7a40: 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 33   options</a></h3
7a50: 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69  >.<p>The followi
7a60: 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 75  ng options are u
7a70: 73 65 64 20 66 6f 72 20 70 65 65 72 20 43 65 72  sed for peer Cer
7a80: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
7a90: 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  ion:</p>.<dl cla
7aa0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74  ss="doctools_opt
7ab0: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
7ac0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
7ad0: 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  dir</b> <i class
7ae0: 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72 79  ="arg">directory
7af0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7b00: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64  >Specifies the d
7b10: 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74  irectory where t
7b20: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
7b30: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65  uthority (CA) ce
7b40: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a 73  rtificates are.s
7b50: 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 61 75  tored. The defau
7b60: 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 73  lt is platform s
7b70: 70 65 63 69 66 69 63 2c 20 62 75 74 20 69 73 20  pecific, but is 
7b80: 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62  usually &quot;<b
7b90: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65   class="file">/e
7ba0: 74 63 2f 73 73 6c 2f 63 65 72 74 73 3c 2f 62 3e  tc/ssl/certs</b>
7bb0: 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 6e 75 78 2f  &quot; on.Linux/
7bc0: 55 6e 69 78 20 73 79 73 74 65 6d 73 2e 20 54 68  Unix systems. Th
7bd0: 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69  e default locati
7be0: 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69  on can be overri
7bf0: 64 64 65 6e 20 62 79 20 74 68 65 0a 3c 62 20 63  dden by the.<b c
7c00: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
7c10: 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e  SSL_CERT_DIR</b>
7c20: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72   environment var
7c30: 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  iable.</p></dd>.
7c40: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
7c50: 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62  tion">-cafile</b
7c60: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7c70: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >filename</i></d
7c80: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
7c90: 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 69 74  ies the file wit
7ca0: 68 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  h the Certificat
7cb0: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e Authority (CA)
7cc0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f   certificates to
7cd0: 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73   use in.<b class
7ce0: 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e  ="const">PEM</b>
7cf0: 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68   file format. Th
7d00: 65 20 64 65 66 61 75 6c 74 20 69 73 20 26 71 75  e default is &qu
7d10: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
7d20: 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26  e">cert.pem</b>&
7d30: 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70  quot;, in the Op
7d40: 65 6e 53 53 4c 20 64 69 72 65 63 74 6f 72 79 2e  enSSL directory.
7d50: 20 4f 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 73   On.Linux/Unix s
7d60: 79 73 74 65 6d 73 2c 20 74 68 69 73 20 69 73 20  ystems, this is 
7d70: 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62  usually &quot;<b
7d80: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65   class="file">/e
7d90: 74 63 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 6c 65  tc/ssl/ca-bundle
7da0: 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2e 20  .pem</b>&quot;. 
7db0: 54 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65  The default file
7dc0: 0a 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64  .can be overridd
7dd0: 65 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61  en by the <b cla
7de0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
7df0: 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20  L_CERT_FILE</b> 
7e00: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  environment vari
7e10: 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  able.</p></dd>.<
7e20: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
7e30: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
7e40: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
7e50: 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  >URI</i></dt>.<d
7e60: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
7e70: 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75  he Uniform Resou
7e80: 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28  rce Identifier (
7e90: 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72  URI) for the Cer
7ea0: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
7eb0: 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77  ty.(CA) store, w
7ec0: 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69  hich may be a si
7ed0: 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f  ngle container o
7ee0: 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63  r a catalog of c
7ef0: 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 74  ontainers..Start
7f00: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ing with OpenSSL
7f10: 20 33 2e 32 20 6f 6e 20 57 69 6e 64 6f 77 73 2c   3.2 on Windows,
7f20: 20 73 65 74 20 74 6f 20 26 71 75 6f 74 3b 3c 62   set to &quot;<b
7f30: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6f   class="const">o
7f40: 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e 73 74  rg.openssl.winst
7f50: 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f 74 3b  ore://</b>&quot;
7f60: 0a 74 6f 20 75 73 65 20 74 68 65 20 62 75 69 6c  .to use the buil
7f70: 74 2d 69 6e 20 57 69 6e 64 6f 77 73 20 43 65 72  t-in Windows Cer
7f80: 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 2e 20  tificate Store. 
7f90: 54 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 20  This store only 
7fa0: 73 75 70 70 6f 72 74 73 20 72 6f 6f 74 0a 63 65  supports root.ce
7fb0: 72 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 73  rtificate stores
7fc0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
7fd0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
7fe0: 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c 69  >-request</b> <i
7ff0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
8000: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
8010: 70 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 74  p>Request a cert
8020: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65  ificate from pee
8030: 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c  r during the SSL
8040: 20 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73   handshake. This
8050: 20 69 73 20 6e 65 65 64 65 64 20 74 6f 20 64 6f   is needed to do
8060: 0a 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  .Certificate Val
8070: 69 64 61 74 69 6f 6e 2e 20 44 65 66 61 75 6c 74  idation. Default
8080: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f   is <b class="co
8090: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 49  nst">true</b>. I
80a0: 6e 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 0a  n addition, the.
80b0: 63 6c 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61  client can manua
80c0: 6c 6c 79 20 69 6e 73 70 65 63 74 20 61 6e 64 20  lly inspect and 
80d0: 61 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74  accept or reject
80e0: 20 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74   each certificat
80f0: 65 20 75 73 69 6e 67 20 74 68 65 0a 3c 69 20 63  e using the.<i c
8100: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 76 61 6c 69  lass="arg">-vali
8110: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20  datecommand</i> 
8120: 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e  option.</p></dd>
8130: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
8140: 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c  ption">-require<
8150: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
8160: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
8170: 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 20  .<dd><p>Require 
8180: 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63  a valid certific
8190: 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75  ate from peer du
81a0: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e  ring the SSL han
81b0: 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20  dshake. If this 
81c0: 69 73 20 73 65 74 0a 74 6f 20 3c 62 20 63 6c 61  is set.to <b cla
81d0: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c  ss="const">true<
81e0: 2f 62 3e 2c 20 74 68 65 6e 20 3c 69 20 63 6c 61  /b>, then <i cla
81f0: 73 73 3d 22 61 72 67 22 3e 2d 72 65 71 75 65 73  ss="arg">-reques
8200: 74 3c 2f 69 3e 20 6d 75 73 74 20 61 6c 73 6f 20  t</i> must also 
8210: 62 65 20 73 65 74 20 74 6f 20 3c 62 20 63 6c 61  be set to <b cla
8220: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c  ss="const">true<
8230: 2f 62 3e 20 61 6e 64 20 65 69 74 68 65 72 0a 3c  /b> and either.<
8240: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 63  i class="arg">-c
8250: 61 64 69 72 3c 2f 69 3e 2c 20 3c 69 20 63 6c 61  adir</i>, <i cla
8260: 73 73 3d 22 61 72 67 22 3e 2d 63 61 66 69 6c 65  ss="arg">-cafile
8270: 3c 2f 69 3e 2c 20 3c 69 20 63 6c 61 73 73 3d 22  </i>, <i class="
8280: 61 72 67 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 69  arg">-castore</i
8290: 3e 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d  >, or a platform
82a0: 20 64 65 66 61 75 6c 74 20 6d 75 73 74 20 62 65   default must be
82b0: 0a 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64  .provided in ord
82c0: 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61  er to validate a
82d0: 67 61 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61  gainst. The defa
82e0: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d  ult is <b class=
82f0: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62  "const">false</b
8300: 3e 20 73 69 6e 63 65 20 6e 6f 74 0a 61 6c 6c 20  > since not.all 
8310: 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 20 63  platforms have c
8320: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 76  ertificates to v
8330: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 20  alidate against 
8340: 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 61 74  in a form compat
8350: 69 62 6c 65 20 77 69 74 68 0a 4f 70 65 6e 53 53  ible with.OpenSS
8360: 4c 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  L. See <span cla
8370: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
8380: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22  href="#section3"
8390: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  >Certificate Val
83a0: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61  idation</a></spa
83b0: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61  n> for more deta
83c0: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f  ils.</p></dd>.</
83d0: 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  dl>.</div>.<div 
83e0: 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 32 22  id="subsection2"
83f0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
8400: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33  _subsection"><h3
8410: 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63  ><a name="subsec
8420: 74 69 6f 6e 32 22 3e 57 68 65 6e 20 61 72 65 20  tion2">When are 
8430: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74  command line opt
8440: 69 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e  ions needed?</a>
8450: 3c 2f 68 33 3e 0a 3c 70 3e 42 79 20 64 65 66 61  </h3>.<p>By defa
8460: 75 6c 74 2c 20 61 20 63 6c 69 65 6e 74 20 54 4c  ult, a client TL
8470: 53 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 64 6f 65  S connection doe
8480: 73 20 3c 65 6d 3e 4e 4f 54 3c 2f 65 6d 3e 20 76  s <em>NOT</em> v
8490: 61 6c 69 64 61 74 65 20 74 68 65 20 73 65 72 76  alidate the serv
84a0: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 0a 63  er certificate.c
84b0: 68 61 69 6e 2e 20 54 68 69 73 20 6c 69 6d 69 74  hain. This limit
84c0: 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20  ation is due to 
84d0: 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f  the lack of a co
84e0: 6d 6d 6f 6e 20 63 72 6f 73 73 20 70 6c 61 74 66  mmon cross platf
84f0: 6f 72 6d 0a 64 61 74 61 62 61 73 65 20 6f 66 20  orm.database of 
8500: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68  Certificate Auth
8510: 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f 76 69  ority (CA) provi
8520: 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 73  ded certificates
8530: 20 74 6f 20 76 61 6c 69 64 61 74 65 0a 61 67 61   to validate.aga
8540: 69 6e 73 74 2e 20 4d 61 6e 79 20 4c 69 6e 75 78  inst. Many Linux
8550: 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 65 6c   systems nativel
8560: 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e 53 53  y support OpenSS
8570: 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 65 20  L and thus have 
8580: 74 68 65 73 65 0a 63 65 72 74 69 66 69 63 61 74  these.certificat
8590: 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 73 20  es installed as 
85a0: 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 2c 20  part of the OS, 
85b0: 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 57 69  but MacOS and Wi
85c0: 6e 64 6f 77 73 20 64 6f 20 6e 6f 74 2e 20 49 6e  ndows do not. In
85d0: 0a 6f 72 64 65 72 20 74 6f 20 75 73 65 20 74 68  .order to use th
85e0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e <b class="opti
85f0: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e  on">-require</b>
8600: 20 6f 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20   option, one of 
8610: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 75  the following mu
8620: 73 74 20 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a  st be true:</p>.
8630: 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <ul class="docto
8640: 6f 6c 73 5f 69 74 65 6d 69 7a 65 64 22 3e 0a 3c  ols_itemized">.<
8650: 6c 69 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78 20 61  li><p>On Linux a
8660: 6e 64 20 55 6e 69 78 20 73 79 73 74 65 6d 73 20  nd Unix systems 
8670: 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 61 6c 72  with OpenSSL alr
8680: 65 61 64 79 20 69 6e 73 74 61 6c 6c 65 64 2c 20  eady installed, 
8690: 69 66 20 74 68 65 20 43 41 0a 63 65 72 74 69 66  if the CA.certif
86a0: 69 63 61 74 65 73 20 61 72 65 20 73 74 6f 72 65  icates are store
86b0: 64 20 69 6e 20 74 68 65 20 73 74 61 6e 64 61 72  d in the standar
86c0: 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20  d locations, or 
86d0: 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  if the <b class=
86e0: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
86f0: 45 52 54 5f 44 49 52 3c 2f 62 3e 0a 6f 72 20 3c  ERT_DIR</b>.or <
8700: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
8710: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45  e">SSL_CERT_FILE
8720: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
8730: 20 76 61 72 69 61 62 6c 65 73 20 61 72 65 20 73   variables are s
8740: 65 74 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 73  et, then <b clas
8750: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69  s="option">-cadi
8760: 72 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d  r</b>,.<b class=
8770: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
8780: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73  /b>, and <b clas
8790: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
87a0: 6f 72 65 3c 2f 62 3e 20 61 72 65 6e 27 74 20 6e  ore</b> aren't n
87b0: 65 65 64 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a  eeded.</p></li>.
87c0: 3c 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53  <li><p>If OpenSS
87d0: 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c  L is not install
87e0: 65 64 20 69 6e 20 74 68 65 20 64 65 66 61 75 6c  ed in the defaul
87f0: 74 20 6c 6f 63 61 74 69 6f 6e 2c 20 6f 72 20 77  t location, or w
8800: 68 65 6e 20 75 73 69 6e 67 20 4d 61 63 20 4f 53  hen using Mac OS
8810: 0a 6f 72 20 57 69 6e 64 6f 77 73 20 61 6e 64 20  .or Windows and 
8820: 4f 70 65 6e 53 53 4c 20 69 73 20 69 6e 73 74 61  OpenSSL is insta
8830: 6c 6c 65 64 2c 20 74 68 65 20 3c 62 20 63 6c 61  lled, the <b cla
8840: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
8850: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61  L_CERT_DIR</b> a
8860: 6e 64 2f 6f 72 20 0a 3c 62 20 63 6c 61 73 73 3d  nd/or .<b class=
8870: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43  "variable">SSL_C
8880: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76  ERT_FILE</b> env
8890: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c  ironment variabl
88a0: 65 73 20 6f 72 20 74 68 65 20 6f 6e 65 20 6f 66  es or the one of
88b0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
88c0: 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62  ption">-cadir</b
88d0: 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  >,.<b class="opt
88e0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c  ion">-cadir</b>,
88f0: 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70   or <b class="op
8900: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f  tion">-castore</
8910: 62 3e 20 6f 70 74 69 6f 6e 73 20 6d 75 73 74 20  b> options must 
8920: 62 65 20 64 65 66 69 6e 65 64 2e 3c 2f 70 3e 3c  be defined.</p><
8930: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 57  /li>.<li><p>On W
8940: 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67  indows, starting
8950: 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c   in OpenSSL 3.2,
8960: 20 69 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69   it is now possi
8970: 62 6c 65 20 74 6f 20 61 63 63 65 73 73 20 74 68  ble to access th
8980: 65 0a 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f  e.built-in Windo
8990: 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53  ws Certificate S
89a0: 74 6f 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53  tore from OpenSS
89b0: 4c 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 61  L. This can be a
89c0: 63 68 69 65 76 65 64 20 62 79 0a 73 65 74 74 69  chieved by.setti
89d0: 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ng the <b class=
89e0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72  "option">-castor
89f0: 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 74 6f 20  e</b> option to 
8a00: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
8a10: 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73  const">org.opens
8a20: 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f  sl.winstore://</
8a30: 62 3e 26 71 75 6f 74 3b 2e 3c 2f 70 3e 3c 2f 6c  b>&quot;.</p></l
8a40: 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20 4f 70 65  i>.<li><p>If Ope
8a50: 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74  nSSL is not inst
8a60: 61 6c 6c 65 64 2c 20 74 68 65 20 43 41 20 63 65  alled, the CA ce
8a70: 72 74 69 66 69 63 61 74 65 73 20 6d 75 73 74 20  rtificates must 
8a80: 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 61 6e  be downloaded an
8a90: 64 0a 69 6e 73 74 61 6c 6c 65 64 20 77 69 74 68  d.installed with
8aa0: 20 74 68 65 20 75 73 65 72 20 73 6f 66 74 77 61   the user softwa
8ab0: 72 65 2e 20 54 68 65 20 43 55 52 4c 20 74 65 61  re. The CURL tea
8ac0: 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20 61 76 61  m makes them ava
8ad0: 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20 68 72 65  ilable at.<a hre
8ae0: 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75 72 6c 2e  f="https://curl.
8af0: 73 65 2f 64 6f 63 73 2f 63 61 65 78 74 72 61 63  se/docs/caextrac
8b00: 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65 72 74 69  t.html">CA certi
8b10: 66 69 63 61 74 65 73 20 65 78 74 72 61 63 74 65  ficates extracte
8b20: 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f  d.from Mozilla</
8b30: 61 3e 20 69 6e 20 74 68 65 20 26 71 75 6f 74 3b  a> in the &quot;
8b40: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e  <b class="file">
8b50: 63 61 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71  cacert.pem</b>&q
8b60: 75 6f 74 3b 20 66 69 6c 65 2e 20 59 6f 75 20 6d  uot; file. You m
8b70: 75 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 20  ust then either 
8b80: 73 65 74 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  set the.<b class
8b90: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f  ="variable">SSL_
8ba0: 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64  CERT_DIR</b> and
8bb0: 2f 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  /or <b class="va
8bc0: 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54  riable">SSL_CERT
8bd0: 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f  _FILE</b> enviro
8be0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20  nment variables 
8bf0: 6f 72 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d  or the.<b class=
8c00: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c  "option">-cadir<
8c10: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  /b> or <b class=
8c20: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65  "option">-cafile
8c30: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 74 6f 20  </b> options to 
8c40: 74 68 65 20 43 41 20 63 65 72 74 20 66 69 6c 65  the CA cert file
8c50: 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74  's install.locat
8c60: 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f 75 72 20  ion. It is your 
8c70: 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 74  responsibility t
8c80: 6f 20 6b 65 65 70 20 74 68 69 73 20 66 69 6c 65  o keep this file
8c90: 20 75 70 20 74 6f 20 64 61 74 65 2e 3c 2f 70 3e   up to date.</p>
8ca0: 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69  </li>.</ul>.</di
8cb0: 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  v>.</div>.<div i
8cc0: 64 3d 22 73 65 63 74 69 6f 6e 34 22 20 63 6c 61  d="section4" cla
8cd0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
8ce0: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
8cf0: 65 3d 22 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c  e="section4">Cal
8d00: 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61  lback Options</a
8d10: 3e 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20 70 72 65  ></h2>.<p>As pre
8d20: 76 69 6f 75 73 6c 79 20 64 65 73 63 72 69 62 65  viously describe
8d30: 64 2c 20 65 61 63 68 20 63 68 61 6e 6e 65 6c 20  d, each channel 
8d40: 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65  can be given the
8d50: 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73  ir own callbacks
8d60: 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72  .to handle inter
8d70: 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69  mediate processi
8d80: 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ng by the OpenSS
8d90: 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67  L library, using
8da0: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f   the.<b class="o
8db0: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
8dc0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
8dd0: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64  ption">-password
8de0: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61  </b>, and <b cla
8df0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
8e00: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62  idate_command</b
8e10: 3e 20 6f 70 74 69 6f 6e 73 0a 70 61 73 73 65 64  > options.passed
8e20: 20 74 6f 20 65 69 74 68 65 72 20 6f 66 20 3c 62   to either of <b
8e30: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
8e40: 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 6f 72 20  ::socket</b> or 
8e50: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
8e60: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 0a  ls::import</b>..
8e70: 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f 75 73 20  Unlike previous 
8e80: 76 65 72 73 69 6f 6e 73 20 6f 66 20 54 63 6c 54  versions of TclT
8e90: 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74 68 65 20  LS, only if the 
8ea0: 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74  callback generat
8eb0: 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c  es an error,.wil
8ec0: 6c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  l the <b class="
8ed0: 73 79 73 63 6d 64 22 3e 62 67 65 72 72 6f 72 3c  syscmd">bgerror<
8ee0: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 62 65 20 69  /b> command be i
8ef0: 6e 76 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20  nvoked with the 
8f00: 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f  error informatio
8f10: 6e 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69 64 3d 22  n.</p>.<div id="
8f20: 73 75 62 73 65 63 74 69 6f 6e 33 22 20 63 6c 61  subsection3" cla
8f30: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62  ss="doctools_sub
8f40: 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20  section"><h3><a 
8f50: 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e  name="subsection
8f60: 33 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 43 6f  3">Values for Co
8f70: 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  mmand Callback</
8f80: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63  a></h3>.<p>The c
8f90: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20  allback for the 
8fa0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
8fb0: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f  ">-command</b> o
8fc0: 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64  ption is invoked
8fd0: 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e   at several poin
8fe0: 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a 4f 70  ts during the.Op
8ff0: 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20  enSSL handshake 
9000: 61 6e 64 20 64 75 72 69 6e 67 20 72 6f 75 74 69  and during routi
9010: 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 53  ne operations. S
9020: 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65  ee below for the
9030: 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 75 6d 65   possible.argume
9040: 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68  nts passed to th
9050: 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70  e callback scrip
9060: 74 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e  t. Values return
9070: 65 64 20 66 72 6f 6d 20 74 68 65 20 63 61 6c 6c  ed from the call
9080: 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f 72 65 64  back are.ignored
9090: 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  .</p>.<dl class=
90a0: 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e  "doctools_option
90b0: 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  s">.<dt><b class
90c0: 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72 6f 72 3c  ="option">error<
90d0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
90e0: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 65 73  g">channelId mes
90f0: 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  sage</i></dt>.<d
9100: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f  d><p>This form o
9110: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
9120: 76 6f 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61  voked whenever a
9130: 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64  n error occurs d
9140: 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61  uring the initia
9150: 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61  l.connection, ha
9160: 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20  ndshake, or I/O 
9170: 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20  operations. The 
9180: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
9190: 65 73 73 61 67 65 3c 2f 69 3e 20 61 72 67 75 6d  essage</i> argum
91a0: 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20  ent can be.from 
91b0: 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67  the Tcl_ErrnoMsg
91c0: 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  , OpenSSL functi
91d0: 6f 6e 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  on <b class="fun
91e0: 63 74 69 6f 6e 22 3e 45 52 52 5f 72 65 61 73 6f  ction">ERR_reaso
91f0: 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29  n_error_string()
9200: 3c 2f 62 3e 2c 0a 6f 72 20 61 20 63 75 73 74 6f  </b>,.or a custo
9210: 6d 20 6d 65 73 73 61 67 65 2e 20 54 68 69 73 20  m message. This 
9220: 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20  callback is new 
9230: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c  for TclTLS 1.8.<
9240: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
9250: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 69  class="option">i
9260: 6e 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  nfo</b> <i class
9270: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
9280: 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73   major minor mes
9290: 73 61 67 65 20 74 79 70 65 3c 2f 69 3e 3c 2f 64  sage type</i></d
92a0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66  t>.<dd><p>This f
92b0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
92c0: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
92d0: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
92e0: 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  on.<b class="fun
92f0: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 69  ction">SSL_set_i
9300: 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f  nfo_callback()</
9310: 62 3e 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e  b> during the in
9320: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e  itial connection
9330: 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f   and handshake.o
9340: 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 61  perations. The a
9350: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70  rguments are:</p
9360: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
9370: 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e  tools_definition
9380: 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  s">.<dt><i class
9390: 3d 22 61 72 67 22 3e 6d 61 6a 6f 72 3c 2f 69 3e  ="arg">major</i>
93a0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 6a  </dt>.<dd><p>Maj
93b0: 6f 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20  or category for 
93c0: 65 72 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75  error. Valid enu
93d0: 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73  ms are: <b class
93e0: 3d 22 63 6f 6e 73 74 22 3e 68 61 6e 64 73 68 61  ="const">handsha
93f0: 6b 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ke</b>, <b class
9400: 3d 22 63 6f 6e 73 74 22 3e 61 6c 65 72 74 3c 2f  ="const">alert</
9410: 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>,.<b class="co
9420: 6e 73 74 22 3e 63 6f 6e 6e 65 63 74 3c 2f 62 3e  nst">connect</b>
9430: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
9440: 74 22 3e 61 63 63 65 70 74 3c 2f 62 3e 2e 3c 2f  t">accept</b>.</
9450: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
9460: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 69 6e 6f 72  lass="arg">minor
9470: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
9480: 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f 72 79 20  >Minor category 
9490: 66 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64  for error. Valid
94a0: 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63   enums are: <b c
94b0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 74 61  lass="const">sta
94c0: 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  rt</b>, <b class
94d0: 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 3c 2f 62  ="const">done</b
94e0: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >, <b class="con
94f0: 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c 0a 3c 62  st">read</b>,.<b
9500: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77   class="const">w
9510: 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  rite</b>, <b cla
9520: 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f 6f 70 3c  ss="const">loop<
9530: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
9540: 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62 3e 2e 3c  onst">exit</b>.<
9550: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
9560: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73  class="arg">mess
9570: 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  age</i></dt>.<dd
9580: 3e 3c 70 3e 44 65 73 63 72 69 70 74 69 76 65 20  ><p>Descriptive 
9590: 6d 65 73 73 61 67 65 20 73 74 72 69 6e 67 20 77  message string w
95a0: 68 69 63 68 20 6d 61 79 20 62 65 20 67 65 6e 65  hich may be gene
95b0: 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 0a  rated either by.
95c0: 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69  <b class="functi
95d0: 6f 6e 22 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74  on">SSL_state_st
95e0: 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 20  ring_long()</b> 
95f0: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e  or <b class="fun
9600: 63 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c 65 72 74  ction">SSL_alert
9610: 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e  _desc_string_lon
9620: 67 28 29 3c 2f 62 3e 2c 0a 64 65 70 65 6e 64 69  g()</b>,.dependi
9630: 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78  ng on the contex
9640: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  t.</p></dd>.<dt>
9650: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 74  <i class="arg">t
9660: 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ype</i></dt>.<dd
9670: 3e 3c 70 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20  ><p>For alerts, 
9680: 74 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c  the possible val
9690: 75 65 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73  ues are: <b clas
96a0: 73 3d 22 63 6f 6e 73 74 22 3e 77 61 72 6e 69 6e  s="const">warnin
96b0: 67 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d  g</b>,.<b class=
96c0: 22 63 6f 6e 73 74 22 3e 66 61 74 61 6c 3c 2f 62  "const">fatal</b
96d0: 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d  >, and <b class=
96e0: 22 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f 77 6e 3c  "const">unknown<
96f0: 2f 62 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c  /b>. For others,
9700: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
9710: 22 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73 20 75 73  ">info</b> is us
9720: 65 64 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e  ed..This argumen
9730: 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  t is new for Tcl
9740: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
9750: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
9760: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
9770: 6e 22 3e 6d 65 73 73 61 67 65 3c 2f 62 3e 20 3c  n">message</b> <
9780: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
9790: 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 74 69 6f  annelId directio
97a0: 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e  n version conten
97b0: 74 5f 74 79 70 65 20 6d 65 73 73 61 67 65 3c 2f  t_type message</
97c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
97d0: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c  his form of call
97e0: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20  back is invoked 
97f0: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66  by the OpenSSL f
9800: 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73  unction.<b class
9810: 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f  ="function">SSL_
9820: 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b  set_msg_callback
9830: 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20  ()</b> whenever 
9840: 61 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e  a message is sen
9850: 74 20 6f 72 20 72 65 63 65 69 76 65 64 20 64 75  t or received du
9860: 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 69 61 6c  ring the.initial
9870: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e   connection, han
9880: 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f  dshake, or I/O o
9890: 70 65 72 61 74 69 6f 6e 73 2e 20 49 74 20 69 73  perations. It is
98a0: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20   only available 
98b0: 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 69 73 20  when.OpenSSL is 
98c0: 63 6f 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68  complied with th
98d0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  e <b class="cons
98e0: 74 22 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72  t">enable-ssl-tr
98f0: 61 63 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20  ace</b> option. 
9900: 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73  This callback is
9910: 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20  .new for TclTLS 
9920: 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  1.8. The argumen
9930: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20  ts are:</p>.<dl 
9940: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
9950: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
9960: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
9970: 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69 3e 3c 2f  >direction</i></
9980: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 72 65 63  dt>.<dd><p>Direc
9990: 74 69 6f 6e 20 69 73 20 65 69 74 68 65 72 20 3c  tion is either <
99a0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
99b0: 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63  Sent</b> or <b c
99c0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 52 65 63  lass="const">Rec
99d0: 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f  eived</b>.</p></
99e0: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  dd>.<dt><i class
99f0: 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f  ="arg">version</
9a00: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 56  i></dt>.<dd><p>V
9a10: 65 72 73 69 6f 6e 20 69 73 20 74 68 65 20 70 72  ersion is the pr
9a20: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2e 3c  otocol version.<
9a30: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
9a40: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 6f 6e 74  class="arg">cont
9a50: 65 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c 2f 64 74  ent_type</i></dt
9a60: 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74 65 6e 74  >.<dd><p>Content
9a70: 20 74 79 70 65 20 69 73 20 74 68 65 20 6d 65 73   type is the mes
9a80: 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70  sage content typ
9a90: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  e.</p></dd>.<dt>
9aa0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
9ab0: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  essage</i></dt>.
9ac0: 3c 64 64 3e 3c 70 3e 4d 65 73 73 61 67 65 20 69  <dd><p>Message i
9ad0: 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 6f 6d  s more info from
9ae0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
9af0: 6f 6e 73 74 22 3e 53 53 4c 5f 74 72 61 63 65 3c  onst">SSL_trace<
9b00: 2f 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c 2f 64 64  /b> API.</p></dd
9b10: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
9b20: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
9b30: 6e 22 3e 73 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c  n">session</b> <
9b40: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
9b50: 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f  annelId session_
9b60: 69 64 20 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65  id session_ticke
9b70: 74 20 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f  t lifetime</i></
9b80: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  dt>.<dd><p>This 
9b90: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
9ba0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74   is invoked by t
9bb0: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
9bc0: 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75  ion.<b class="fu
9bd0: 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 43 54 58 5f  nction">SSL_CTX_
9be0: 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28  sess_set_new_cb(
9bf0: 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61  )</b> whenever a
9c00: 20 6e 65 77 20 73 65 73 73 69 6f 6e 20 69 64 20   new session id 
9c10: 69 73 20 73 65 6e 74 20 62 79 20 74 68 65 0a 73  is sent by the.s
9c20: 65 72 76 65 72 20 64 75 72 69 6e 67 20 74 68 65  erver during the
9c30: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74   initial connect
9c40: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b  ion and handshak
9c50: 65 20 61 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e  e and also durin
9c60: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 0a 69 66  g the session.if
9c70: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
9c80: 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e  ption">-post_han
9c90: 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f  dshake</b> optio
9ca0: 6e 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65  n is set to true
9cb0: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20  . This callback 
9cc0: 69 73 20 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c  is new for.TclTL
9cd0: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d  S 1.8. The argum
9ce0: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64  ents are:</p>.<d
9cf0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
9d00: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
9d10: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
9d20: 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 69  g">session_id</i
9d30: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65  ></dt>.<dd><p>Se
9d40: 73 73 69 6f 6e 20 49 64 20 69 73 20 74 68 65 20  ssion Id is the 
9d50: 63 75 72 72 65 6e 74 20 73 65 73 73 69 6f 6e 20  current session 
9d60: 69 64 65 6e 74 69 66 69 65 72 3c 2f 70 3e 3c 2f  identifier</p></
9d70: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  dd>.<dt><i class
9d80: 3d 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 74  ="arg">session_t
9d90: 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  icket</i></dt>.<
9da0: 64 64 3e 3c 70 3e 54 69 63 6b 65 74 20 69 73 20  dd><p>Ticket is 
9db0: 74 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b  the session tick
9dc0: 65 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f 64 64 3e  et info</p></dd>
9dd0: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61  .<dt><i class="a
9de0: 72 67 22 3e 6c 69 66 65 74 69 6d 65 3c 2f 69 3e  rg">lifetime</i>
9df0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 66  </dt>.<dd><p>Lif
9e00: 65 74 69 6d 65 20 69 73 20 74 68 65 20 74 69 63  etime is the tic
9e10: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20  ket lifetime in 
9e20: 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64  seconds.</p></dd
9e30: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74  >.</dl></dd>.<dt
9e40: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
9e50: 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69  n">verify</b> <i
9e60: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
9e70: 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72  nnelId depth cer
9e80: 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f  t status error</
9e90: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
9ea0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73  his callback was
9eb0: 20 6d 6f 76 65 64 20 74 6f 20 3c 62 20 63 6c 61   moved to <b cla
9ec0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
9ed0: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  idatecommand</b>
9ee0: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c   in TclTLS 1.8.<
9ef0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c  /p></dd>.</dl>.<
9f00: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
9f10: 75 62 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73  ubsection4" clas
9f20: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
9f30: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
9f40: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 34  ame="subsection4
9f50: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 50 61 73  ">Values for Pas
9f60: 73 77 6f 72 64 20 43 61 6c 6c 62 61 63 6b 3c 2f  sword Callback</
9f70: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63  a></h3>.<p>The c
9f80: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20  allback for the 
9f90: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9fa0: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20  ">-password</b> 
9fb0: 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65  option is invoke
9fc0: 64 20 62 79 20 54 63 6c 54 4c 53 20 77 68 65 6e  d by TclTLS when
9fd0: 65 76 65 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65  ever OpenSSL nee
9fe0: 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20 61 20 70  ds.to obtain a p
9ff0: 61 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c  assword. See bel
a000: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69  ow for the possi
a010: 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61  ble arguments pa
a020: 73 73 65 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c  ssed to the.call
a030: 62 61 63 6b 20 73 63 72 69 70 74 2e 20 54 68 65  back script. The
a040: 20 75 73 65 72 20 70 72 6f 76 69 64 65 64 20 70   user provided p
a050: 61 73 73 77 6f 72 64 20 69 73 20 65 78 70 65 63  assword is expec
a060: 74 65 64 20 74 6f 20 62 65 20 72 65 74 75 72 6e  ted to be return
a070: 65 64 20 62 79 20 74 68 65 0a 63 61 6c 6c 62 61  ed by the.callba
a080: 63 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  ck.</p>.<dl clas
a090: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69  s="doctools_opti
a0a0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
a0b0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70 61 73 73  ss="option">pass
a0c0: 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  word</b> <i clas
a0d0: 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 67 20 73  s="arg">rwflag s
a0e0: 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ize</i></dt>.<dd
a0f0: 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20 77 68 65 6e  ><p>Invoked when
a100: 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72   loading or stor
a110: 69 6e 67 20 61 6e 20 65 6e 63 72 79 70 74 65 64  ing an encrypted
a120: 20 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65   PEM certificate
a130: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20  . The arguments 
a140: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  are:</p>.<dl cla
a150: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
a160: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  initions">.<dt><
a170: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 77  i class="arg">rw
a180: 66 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  flag</i></dt>.<d
a190: 64 3e 3c 70 3e 54 68 65 20 72 65 61 64 2f 77 72  d><p>The read/wr
a1a0: 69 74 65 20 66 6c 61 67 20 69 73 20 30 20 66 6f  ite flag is 0 fo
a1b0: 72 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70  r reading/decryp
a1c0: 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 20 77 72  tion or 1 for wr
a1d0: 69 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e  iting/encryption
a1e0: 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 63 61 6e  ..The latter can
a1f0: 20 62 65 20 75 73 65 64 20 74 6f 20 64 65 74 65   be used to dete
a200: 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f 20 70 72  rmine when to pr
a210: 6f 6d 70 74 20 74 68 65 20 75 73 65 72 20 74 6f  ompt the user to
a220: 20 63 6f 6e 66 69 72 6d 2e 0a 54 68 69 73 20 61   confirm..This a
a230: 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66  rgument is new f
a240: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
a250: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63  p></dd>.<dt><i c
a260: 6c 61 73 73 3d 22 61 72 67 22 3e 73 69 7a 65 3c  lass="arg">size<
a270: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
a280: 54 68 65 20 73 69 7a 65 20 69 73 20 74 68 65 20  The size is the 
a290: 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 68 20 6f  maximum length o
a2a0: 66 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 69  f the password i
a2b0: 6e 20 62 79 74 65 73 2e 0a 54 68 69 73 20 61 72  n bytes..This ar
a2c0: 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f  gument is new fo
a2d0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
a2e0: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64  ></dd>.</dl></dd
a2f0: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c  >.</dl>.</div>.<
a300: 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74 69  div id="subsecti
a310: 6f 6e 35 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  on5" class="doct
a320: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22  ools_subsection"
a330: 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75  ><h3><a name="su
a340: 62 73 65 63 74 69 6f 6e 35 22 3e 56 61 6c 75 65  bsection5">Value
a350: 73 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43  s for Validate C
a360: 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c  ommand Callback<
a370: 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20  /a></h3>.<p>The 
a380: 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 68 65  callback for the
a390: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
a3a0: 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d  n">-validatecomm
a3b0: 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69  and</b> option i
a3c0: 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67  s invoked during
a3d0: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 0a 70   the handshake.p
a3e0: 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 65 72 20  rocess in order 
a3f0: 66 6f 72 20 74 68 65 20 61 70 70 6c 69 63 61 74  for the applicat
a400: 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 74 65 20  ion to validate 
a410: 74 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c  the provided val
a420: 75 65 28 73 29 2e 20 53 65 65 0a 62 65 6c 6f 77  ue(s). See.below
a430: 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c   for the possibl
a440: 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73  e arguments pass
a450: 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61  ed to the callba
a460: 63 6b 20 73 63 72 69 70 74 2e 20 49 66 20 6e 6f  ck script. If no
a470: 74 0a 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65  t.specified, Ope
a480: 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 65 70 74  nSSL will accept
a490: 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 72 74 69   all valid certi
a4a0: 66 69 63 61 74 65 73 20 61 6e 64 20 65 78 74 65  ficates and exte
a4b0: 6e 73 69 6f 6e 73 2e 20 54 6f 20 72 65 6a 65 63  nsions. To rejec
a4c0: 74 0a 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20  t.the value and 
a4d0: 61 62 6f 72 74 20 74 68 65 20 63 6f 6e 6e 65 63  abort the connec
a4e0: 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61  tion, the callba
a4f0: 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e  ck should return
a500: 20 30 2e 20 54 6f 20 61 63 63 65 70 74 20 74 68   0. To accept th
a510: 65 0a 76 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74  e.value and cont
a520: 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74  inue the connect
a530: 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72  ion, it should r
a540: 65 74 75 72 6e 20 31 2e 20 54 6f 20 72 65 6a 65  eturn 1. To reje
a550: 63 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75  ct the value, bu
a560: 74 0a 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63  t.continue the c
a570: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68  onnection, it sh
a580: 6f 75 6c 64 20 72 65 74 75 72 6e 20 32 2e 20 54  ould return 2. T
a590: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20  his callback is 
a5a0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
a5b0: 2e 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  .8.</p>.<dl clas
a5c0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69  s="doctools_opti
a5d0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
a5e0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 6c 70 6e  ss="option">alpn
a5f0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
a600: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72  rg">channelId pr
a610: 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c 2f 69 3e  otocol match</i>
a620: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72  </dt>.<dd><p>For
a630: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66   servers, this f
a640: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
a650: 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20  is invoked when 
a660: 74 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 20  the client ALPN 
a670: 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a 72 65 63  extension is.rec
a680: 65 69 76 65 64 2e 20 49 66 20 3c 69 20 63 6c 61  eived. If <i cla
a690: 73 73 3d 22 61 72 67 22 3e 6d 61 74 63 68 3c 2f  ss="arg">match</
a6a0: 69 3e 20 69 73 20 74 72 75 65 2c 20 74 68 65 6e  i> is true, then
a6b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
a6c0: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20 69 73 20  protocol</i> is 
a6d0: 74 68 65 20 66 69 72 73 74 0a 3c 62 20 63 6c 61  the first.<b cla
a6e0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70  ss="option">-alp
a6f0: 6e 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f 6c 20 6f  n</b> protocol o
a700: 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20  ption in common 
a710: 74 6f 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65  to both the clie
a720: 6e 74 20 61 6e 64 20 73 65 72 76 65 72 2e 0a 49  nt and server..I
a730: 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74  f not, the first
a740: 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65   client specifie
a750: 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73  d protocol is us
a760: 65 64 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63  ed. This callbac
a770: 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 66 74 65  k is called.afte
a780: 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20  r the Hello and 
a790: 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 3c  ALPN callbacks.<
a7a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
a7b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 68  class="option">h
a7c0: 65 6c 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ello</b> <i clas
a7d0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49  s="arg">channelI
a7e0: 64 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e  d servername</i>
a7f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72  </dt>.<dd><p>For
a800: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66   servers, this f
a810: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
a820: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e  is invoked durin
a830: 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d  g client hello m
a840: 65 73 73 61 67 65 0a 70 72 6f 63 65 73 73 69 6e  essage.processin
a850: 67 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20 69  g. The purpose i
a860: 73 20 73 6f 20 74 68 65 20 73 65 72 76 65 72 20  s so the server 
a870: 63 61 6e 20 73 65 6c 65 63 74 20 74 68 65 20 61  can select the a
a880: 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 74 69  ppropriate certi
a890: 66 69 63 61 74 65 0a 74 6f 20 70 72 65 73 65 6e  ficate.to presen
a8a0: 74 20 74 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c  t to the client,
a8b0: 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68   and to make oth
a8c0: 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  er configuration
a8d0: 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c   adjustments rel
a8e0: 65 76 61 6e 74 0a 74 6f 20 74 68 61 74 20 73 65  evant.to that se
a8f0: 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74  rver name and it
a900: 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e  s configuration.
a910: 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 62 65   It is called be
a920: 66 6f 72 65 20 74 68 65 20 53 4e 49 20 61 6e 64  fore the SNI and
a930: 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 2e   ALPN.callbacks.
a940: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
a950: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
a960: 73 6e 69 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  sni</b> <i class
a970: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
a980: 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c   servername</i><
a990: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20  /dt>.<dd><p>For 
a9a0: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
a9b0: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
a9c0: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74  s invoked when t
a9d0: 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 20 49  he Server Name I
a9e0: 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20  ndication.(SNI) 
a9f0: 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63  extension is rec
aa00: 65 69 76 65 64 2e 20 54 68 65 20 3c 69 20 63 6c  eived. The <i cl
aa10: 61 73 73 3d 22 61 72 67 22 3e 73 65 72 76 65 72  ass="arg">server
aa20: 6e 61 6d 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e  name</i> argumen
aa30: 74 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a  t is the client.
aa40: 70 72 6f 76 69 64 65 64 20 73 65 72 76 65 72 20  provided server 
aa50: 6e 61 6d 65 20 73 70 65 63 69 66 69 65 64 20 69  name specified i
aa60: 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  n the <b class="
aa70: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e  option">-servern
aa80: 61 6d 65 26 6c 74 3b 2f 62 26 67 74 3b 3c 2f 62  ame&lt;/b&gt;</b
aa90: 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 65 0a 70 75  > option. The.pu
aaa0: 72 70 6f 73 65 20 69 73 20 73 6f 20 77 68 65 6e  rpose is so when
aab0: 20 61 20 73 65 72 76 65 72 20 73 75 70 70 6f 72   a server suppor
aac0: 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65  ts multiple name
aad0: 73 2c 20 74 68 65 20 72 69 67 68 74 20 63 65 72  s, the right cer
aae0: 74 69 66 69 63 61 74 65 0a 63 61 6e 20 62 65 20  tificate.can be 
aaf0: 75 73 65 64 2e 20 49 74 20 69 73 20 63 61 6c 6c  used. It is call
ab00: 65 64 20 61 66 74 65 72 20 74 68 65 20 68 65 6c  ed after the hel
ab10: 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20  lo callback but 
ab20: 62 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a  before the ALPN.
ab30: 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e 3c 2f 64  callback.</p></d
ab40: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
ab50: 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c  "option">verify<
ab60: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
ab70: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65 70  g">channelId dep
ab80: 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65  th cert status e
ab90: 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  rror</i></dt>.<d
aba0: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f  d><p>This form o
abb0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
abc0: 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c  voked by OpenSSL
abd0: 20 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74   when a new cert
abe0: 69 66 69 63 61 74 65 20 69 73 20 72 65 63 65 69  ificate is recei
abf0: 76 65 64 0a 66 72 6f 6d 20 74 68 65 20 70 65 65  ved.from the pee
ac00: 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65  r. It allows the
ac10: 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b   client to check
ac20: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
ac30: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 0a 72 65   verification.re
ac40: 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65  sults and choose
ac50: 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74   whether to cont
ac60: 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 49 74 20  inue or not. It 
ac70: 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61  is called for ea
ac80: 63 68 0a 63 65 72 74 69 66 69 63 61 74 65 20 69  ch.certificate i
ac90: 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  n the certificat
aca0: 65 20 63 68 61 69 6e 2e 20 54 68 69 73 20 63 61  e chain. This ca
acb0: 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64  llback was moved
acc0: 20 66 72 6f 6d 0a 3c 62 20 63 6c 61 73 73 3d 22   from.<b class="
acd0: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64  option">-command
ace0: 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31  </b> in TclTLS 1
acf0: 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74  .8. The argument
ad00: 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63  s are:</p>.<dl c
ad10: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64  lass="doctools_d
ad20: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74  efinitions">.<dt
ad30: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
ad40: 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  depth</i></dt>.<
ad50: 64 64 3e 3c 70 3e 54 68 65 20 64 65 70 74 68 20  dd><p>The depth 
ad60: 69 73 20 74 68 65 20 69 6e 74 65 67 65 72 20 64  is the integer d
ad70: 65 70 74 68 20 6f 66 20 74 68 65 20 63 65 72 74  epth of the cert
ad80: 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63  ificate in the c
ad90: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e  ertificate chain
ada0: 2c 0a 77 68 65 72 65 20 30 20 69 73 20 74 68 65  ,.where 0 is the
adb0: 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74   peer certificat
adc0: 65 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c  e and higher val
add0: 75 65 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20  ues going up to 
ade0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 0a  the Certificate.
adf0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c  Authority (CA).<
ae00: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
ae10: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74  class="arg">cert
ae20: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
ae30: 3e 54 68 65 20 63 65 72 74 20 61 72 67 75 6d 65  >The cert argume
ae40: 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20  nt is a list of 
ae50: 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20  key-value pairs 
ae60: 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 6f 73 65  similar to those
ae70: 20 72 65 74 75 72 6e 65 64 20 62 79 0a 3c 62 20   returned by.<b 
ae80: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
ae90: 3a 73 74 61 74 75 73 3c 2f 62 3e 2e 3c 2f 70 3e  :status</b>.</p>
aea0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
aeb0: 73 73 3d 22 61 72 67 22 3e 73 74 61 74 75 73 3c  ss="arg">status<
aec0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
aed0: 54 68 65 20 73 74 61 74 75 73 20 61 72 67 75 6d  The status argum
aee0: 65 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65  ent is the boole
aef0: 61 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74  an validity of t
af00: 68 65 20 63 75 72 72 65 6e 74 20 63 65 72 74 69  he current certi
af10: 66 69 63 61 74 65 20 77 68 65 72 65 20 30 0a 69  ficate where 0.i
af20: 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20  s invalid and 1 
af30: 69 73 20 76 61 6c 69 64 2e 3c 2f 70 3e 3c 2f 64  is valid.</p></d
af40: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
af50: 22 61 72 67 22 3e 65 72 72 6f 72 3c 2f 69 3e 3c  "arg">error</i><
af60: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
af70: 65 72 72 6f 72 20 61 72 67 75 6d 65 6e 74 20 69  error argument i
af80: 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73  s the error mess
af90: 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e  age, if any, gen
afa0: 65 72 61 74 65 64 20 62 79 0a 3c 62 20 63 6c 61  erated by.<b cla
afb0: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 58 35  ss="function">X5
afc0: 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74  09_STORE_CTX_get
afd0: 5f 65 72 72 6f 72 28 29 3c 2f 62 3e 2e 3c 2f 70  _error()</b>.</p
afe0: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64  ></dd>.</dl></dd
aff0: 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65 66 65 72  >.</dl>.<p>Refer
b000: 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74  ence implementat
b010: 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61  ions of these ca
b020: 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76  llbacks are prov
b030: 69 64 65 64 20 69 6e 20 26 71 75 6f 74 3b 3c 62  ided in &quot;<b
b040: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c   class="file">tl
b050: 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 0a  s.tcl</b>&quot;.
b060: 61 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  as <b class="cmd
b070: 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c  ">tls::callback<
b080: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
b090: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  md">tls::passwor
b0a0: 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c  d</b>, and <b cl
b0b0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76  ass="cmd">tls::v
b0c0: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c  alidate_command<
b0d0: 2f 62 3e 0a 72 65 73 70 65 63 74 69 76 65 6c 79  /b>.respectively
b0e0: 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73  . Note that thes
b0f0: 65 20 61 72 65 20 6f 6e 6c 79 20 3c 65 6d 3e 73  e are only <em>s
b100: 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65  ample</em> imple
b110: 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 49 6e 20 61  mentations. In a
b120: 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74 69 63 20   more.realistic 
b130: 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77  deployment you w
b140: 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75  ould specify you
b150: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73  r own callback s
b160: 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54  cripts on each T
b170: 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67  LS.channel using
b180: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
b190: 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c  ption">-command<
b1a0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f  /b>, <b class="o
b1b0: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64  ption">-password
b1c0: 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61  </b>, and.<b cla
b1d0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c  ss="option">-val
b1e0: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62  idate_command</b
b1f0: 3e 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c  > options.</p>.<
b200: 70 3e 54 68 65 20 64 65 66 61 75 6c 74 20 62 65  p>The default be
b210: 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20  havior when the 
b220: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b230: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 61  ">-command</b> a
b240: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  nd <b class="opt
b250: 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63  ion">-validate_c
b260: 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f  ommand</b>.optio
b270: 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69  ns are not speci
b280: 66 69 65 64 2c 20 69 73 20 66 6f 72 20 54 63 6c  fied, is for Tcl
b290: 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74  TLS to process t
b2a0: 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69  he associated li
b2b0: 62 72 61 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20  brary.callbacks 
b2c0: 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20  internally. The 
b2d0: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72  default behavior
b2e0: 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61   when the <b cla
b2f0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73  ss="option">-pas
b300: 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e  sword</b> option
b310: 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65  .is not specifie
b320: 64 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20  d is for TclTLS 
b330: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61  to process the a
b340: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72  ssociated librar
b350: 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61  y callbacks by.a
b360: 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c  ttempting to cal
b370: 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  l <b class="cmd"
b380: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f  >tls::password</
b390: 62 3e 2e 20 54 68 65 20 64 69 66 66 65 72 65 6e  b>. The differen
b3a0: 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 65  ce between these
b3b0: 20 74 77 6f 0a 62 65 68 61 76 69 6f 72 73 20 69   two.behaviors i
b3c0: 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20  s a consequence 
b3d0: 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63  of maintaining c
b3e0: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74  ompatibility wit
b3f0: 68 20 65 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d  h earlier.implem
b400: 65 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c  entations.</p>.<
b410: 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66  p><em>The use of
b420: 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63   the reference c
b430: 61 6c 6c 62 61 63 6b 73 20 3c 62 20 63 6c 61 73  allbacks <b clas
b440: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c  s="cmd">tls::cal
b450: 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c  lback</b>, <b cl
b460: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70  ass="cmd">tls::p
b470: 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a 61 6e 64  assword</b>,.and
b480: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
b490: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f  tls::validate_co
b4a0: 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 6e 6f 74  mmand</b> is not
b4b0: 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 54 68   recommended. Th
b4c0: 65 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65  ey may be remove
b4d0: 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65  d from future re
b4e0: 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e  leases.</em></p>
b4f0: 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c  .</div>.</div>.<
b500: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 35  div id="section5
b510: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
b520: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
b530: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 35  a name="section5
b540: 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f 68 32 3e  ">Debug</a></h2>
b550: 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74 20 64 65 62  .<p>For most deb
b560: 75 67 67 69 6e 67 20 6e 65 65 64 73 2c 20 74 68  ugging needs, th
b570: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e <b class="opti
b580: 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b 3c 2f 62  on">-callback</b
b590: 3e 20 6f 70 74 69 6f 6e 20 63 61 6e 20 62 65 20  > option can be 
b5a0: 75 73 65 64 20 74 6f 20 70 72 6f 76 69 64 65 0a  used to provide.
b5b0: 73 75 66 66 69 63 69 65 6e 74 20 69 6e 73 69 67  sufficient insig
b5c0: 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d 61 74 69  ht and informati
b5d0: 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 20 68 61  on on the TLS ha
b5e0: 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 72 6f 67  ndshake and prog
b5f0: 72 65 73 73 2e 20 49 66 0a 66 75 72 74 68 65 72  ress. If.further
b600: 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67   troubleshooting
b610: 20 69 6e 73 69 67 68 74 20 69 73 20 6e 65 65 64   insight is need
b620: 65 64 2c 20 74 68 65 20 63 6f 6d 70 69 6c 65 20  ed, the compile 
b630: 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c 62 20 63  time option.<b c
b640: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 2d  lass="option">--
b650: 65 6e 61 62 6c 65 2d 64 65 62 75 67 3c 2f 62 3e  enable-debug</b>
b660: 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20   can be used to 
b670: 67 65 74 20 64 65 74 61 69 6c 65 64 20 65 78 65  get detailed exe
b680: 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73 74 61 74  cution flow stat
b690: 75 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c 53 20 6b  us.</p>.<p>TLS k
b6a0: 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62  ey logging can b
b6b0: 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74  e enabled by set
b6c0: 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e  ting the environ
b6d0: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62  ment variable.<b
b6e0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
b6f0: 22 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c  ">SSLKEYLOGFILE<
b700: 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20  /b> to the name 
b710: 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c  of the file to l
b720: 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e  og to. Then when
b730: 65 76 65 72 20 54 4c 53 20 6b 65 79 0a 6d 61 74  ever TLS key.mat
b740: 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74  erial is generat
b750: 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69  ed or received i
b760: 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64  t will be logged
b770: 20 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68   to the file. Th
b780: 69 73 20 69 73 20 75 73 65 66 75 6c 0a 66 6f 72  is is useful.for
b790: 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74   logging key dat
b7a0: 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f  a for network lo
b7b0: 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75  gging tools to u
b7c0: 73 65 20 74 6f 20 64 65 63 72 79 70 74 20 74 68  se to decrypt th
b7d0: 65 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c 70 3e 54  e data.</p>.<p>T
b7e0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  he <b class="var
b7f0: 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75  iable">tls::debu
b800: 67 3c 2f 62 3e 20 76 61 72 69 61 62 6c 65 20 70  g</b> variable p
b810: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64  rovides some add
b820: 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20  itional control 
b830: 6f 76 65 72 20 74 68 65 73 65 0a 72 65 66 65 72  over these.refer
b840: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20  ence callbacks. 
b850: 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a 65 72  Its value is zer
b860: 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 20 48 69  o by default. Hi
b870: 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64  gher values prod
b880: 75 63 65 20 6d 6f 72 65 0a 64 69 61 67 6e 6f 73  uce more.diagnos
b890: 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e 64 20  tic output, and 
b8a0: 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20  will also force 
b8b0: 74 68 65 20 76 65 72 69 66 79 20 6d 65 74 68 6f  the verify metho
b8c0: 64 20 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 63  d in <b class="c
b8d0: 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63  md">tls::callbac
b8e0: 6b 3c 2f 62 3e 0a 74 6f 20 61 63 63 65 70 74 20  k</b>.to accept 
b8f0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2c  the certificate,
b900: 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73   even when it is
b910: 20 69 6e 76 61 6c 69 64 20 69 66 20 74 68 65 0a   invalid if the.
b920: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b930: 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61  ">-validatecomma
b940: 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73  nd</b> option is
b950: 20 73 65 74 20 74 6f 20 3c 62 20 63 6c 61 73 73   set to <b class
b960: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69  ="cmd">tls::vali
b970: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
b980: 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65  .</p>.<p><em>The
b990: 20 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69   use of the vari
b9a0: 61 62 6c 65 20 3c 62 20 63 6c 61 73 73 3d 22 76  able <b class="v
b9b0: 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65  ariable">tls::de
b9c0: 62 75 67 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72  bug</b> is not r
b9d0: 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d  ecommended..It m
b9e0: 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72  ay be removed fr
b9f0: 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73  om future releas
ba00: 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64  es.</em></p>.</d
ba10: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63  iv>.<div id="sec
ba20: 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f  tion6" class="do
ba30: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
ba40: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63  <h2><a name="sec
ba50: 74 69 6f 6e 36 22 3e 44 65 62 75 67 20 45 78 61  tion6">Debug Exa
ba60: 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c  mples</a></h2>.<
ba70: 70 3e 54 68 65 73 65 20 65 78 61 6d 70 6c 65 73  p>These examples
ba80: 20 75 73 65 20 74 68 65 20 64 65 66 61 75 6c 74   use the default
ba90: 20 55 6e 69 78 20 70 6c 61 74 66 6f 72 6d 20 53   Unix platform S
baa0: 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 73 2e  SL certificates.
bab0: 20 46 6f 72 20 73 74 61 6e 64 61 72 64 0a 69 6e   For standard.in
bac0: 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20 2d 63 61  stallations, -ca
bad0: 64 69 72 20 61 6e 64 20 2d 63 61 66 69 6c 65 20  dir and -cafile 
bae0: 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 6e 65  should not be ne
baf0: 65 64 65 64 2e 20 49 66 20 79 6f 75 72 20 63 65  eded. If your ce
bb00: 72 74 69 66 69 63 61 74 65 73 0a 61 72 65 20 69  rtificates.are i
bb10: 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72 64 20 6c  n non-standard l
bb20: 6f 63 61 74 69 6f 6e 73 2c 20 73 70 65 63 69 66  ocations, specif
bb30: 79 20 2d 63 61 64 69 72 20 6f 72 20 2d 63 61 66  y -cadir or -caf
bb40: 69 6c 65 20 61 73 20 6e 65 65 64 65 64 2e 3c 2f  ile as needed.</
bb50: 70 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23 31  p>.<p>Example #1
bb60: 3a 20 55 73 65 20 48 54 54 50 20 70 61 63 6b 61  : Use HTTP packa
bb70: 67 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73  ge</p>.<pre clas
bb80: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d  s="doctools_exam
bb90: 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65  ple">.package re
bba0: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61  quire http.packa
bbb0: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73  ge require tls.s
bbc0: 65 74 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74  et url &quot;htt
bbd0: 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f  ps://www.tcl.tk/
bbe0: 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67  &quot;.http::reg
bbf0: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20  ister https 443 
bc00: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63  [list ::tls::soc
bc10: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e  ket -autoservern
bc20: 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31  ame 1 -require 1
bc30: 20 20 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73    -command ::tls
bc40: 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d 70 61 73 73  ::callback -pass
bc50: 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73 73  word ::tls::pass
bc60: 77 6f 72 64 20 20 2d 76 61 6c 69 64 61 74 65 63  word  -validatec
bc70: 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61  ommand ::tls::va
bc80: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5d 0a  lidate_command].
bc90: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f  # Check for erro
bca0: 72 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74  r.set token [htt
bcb0: 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a  p::geturl $url].
bcc0: 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75  if {[http::statu
bcd0: 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75  s $token] ne &qu
bce0: 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20  ot;ok&quot;} {. 
bcf0: 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20     puts [format 
bd00: 26 71 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71  &quot;Error %s&q
bd10: 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74  uot; [http::stat
bd20: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20  us $token]].}.# 
bd30: 47 65 74 20 77 65 62 20 70 61 67 65 0a 73 65 74  Get web page.set
bd40: 20 64 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 74   data [http::dat
bd50: 61 20 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 5b  a $token].puts [
bd60: 73 74 72 69 6e 67 20 6c 65 6e 67 74 68 20 24 64  string length $d
bd70: 61 74 61 5d 0a 23 20 43 6c 65 61 6e 75 70 0a 3a  ata].# Cleanup.:
bd80: 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24  :http::cleanup $
bd90: 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 70 3e  token.</pre>.<p>
bda0: 45 78 61 6d 70 6c 65 20 23 32 3a 20 55 73 65 20  Example #2: Use 
bdb0: 72 61 77 20 73 6f 63 6b 65 74 3c 2f 70 3e 0a 3c  raw socket</p>.<
bdc0: 70 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  pre class="docto
bdd0: 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61  ols_example">.pa
bde0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c  ckage require tl
bdf0: 73 0a 73 65 74 20 75 72 6c 20 26 71 75 6f 74 3b  s.set url &quot;
be00: 77 77 77 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67  www.tcl-lang.org
be10: 26 71 75 6f 74 3b 0a 73 65 74 20 70 6f 72 74 20  &quot;.set port 
be20: 34 34 33 0a 73 65 74 20 63 68 20 5b 74 6c 73 3a  443.set ch [tls:
be30: 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72  :socket -autoser
be40: 76 65 72 6e 61 6d 65 20 31 20 2d 73 65 72 76 65  vername 1 -serve
be50: 72 6e 61 6d 65 20 24 75 72 6c 20 2d 72 65 71 75  rname $url -requ
be60: 69 72 65 20 31 20 20 2d 61 6c 70 6e 20 7b 68 74  ire 1  -alpn {ht
be70: 74 70 2f 31 2e 31 7d 20 2d 63 6f 6d 6d 61 6e 64  tp/1.1} -command
be80: 20 3a 3a 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b   ::tls::callback
be90: 20 2d 70 61 73 73 77 6f 72 64 20 3a 3a 74 6c 73   -password ::tls
bea0: 3a 3a 70 61 73 73 77 6f 72 64 20 20 2d 76 61 6c  ::password  -val
beb0: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 20 3a 3a 74  idatecommand ::t
bec0: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d  ls::validate_com
bed0: 6d 61 6e 64 20 24 75 72 6c 20 24 70 6f 72 74 5d  mand $url $port]
bee0: 0a 63 68 61 6e 20 63 6f 6e 66 69 67 75 72 65 20  .chan configure 
bef0: 24 63 68 20 2d 62 75 66 66 65 72 73 69 7a 65 20  $ch -buffersize 
bf00: 36 35 35 33 36 0a 74 6c 73 3a 3a 68 61 6e 64 73  65536.tls::hands
bf10: 68 61 6b 65 20 24 63 68 0a 70 75 74 73 20 24 63  hake $ch.puts $c
bf20: 68 20 26 71 75 6f 74 3b 47 45 54 20 2f 20 48 54  h &quot;GET / HT
bf30: 54 50 2f 31 2e 31 26 71 75 6f 74 3b 0a 66 6c 75  TP/1.1&quot;.flu
bf40: 73 68 20 24 63 68 0a 61 66 74 65 72 20 35 30 30  sh $ch.after 500
bf50: 0a 73 65 74 20 64 61 74 61 20 5b 72 65 61 64 20  .set data [read 
bf60: 24 63 68 5d 0a 61 72 72 61 79 20 73 65 74 20 73  $ch].array set s
bf70: 74 61 74 75 73 20 5b 74 6c 73 3a 3a 73 74 61 74  tatus [tls::stat
bf80: 75 73 20 24 63 68 5d 0a 61 72 72 61 79 20 73 65  us $ch].array se
bf90: 74 20 63 6f 6e 6e 20 5b 74 6c 73 3a 3a 63 6f 6e  t conn [tls::con
bfa0: 6e 65 63 74 69 6f 6e 20 24 63 68 5d 0a 61 72 72  nection $ch].arr
bfb0: 61 79 20 73 65 74 20 63 68 61 6e 20 5b 63 68 61  ay set chan [cha
bfc0: 6e 20 63 6f 6e 66 69 67 75 72 65 20 24 63 68 5d  n configure $ch]
bfd0: 0a 63 6c 6f 73 65 20 24 63 68 0a 70 61 72 72 61  .close $ch.parra
bfe0: 79 20 73 74 61 74 75 73 0a 70 61 72 72 61 79 20  y status.parray 
bff0: 63 6f 6e 6e 0a 70 61 72 72 61 79 20 63 68 61 6e  conn.parray chan
c000: 0a 3c 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e 0a 3c  .</pre>.</div>.<
c010: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 37  div id="section7
c020: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
c030: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
c040: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 37  a name="section7
c050: 22 3e 48 54 54 50 20 50 61 63 6b 61 67 65 20 45  ">HTTP Package E
c060: 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 68 32 3e  xamples</a></h2>
c070: 0a 3c 70 3e 54 68 65 73 65 20 65 78 61 6d 70 6c  .<p>These exampl
c080: 65 73 20 75 73 65 20 74 68 65 20 64 65 66 61 75  es use the defau
c090: 6c 74 20 55 6e 69 78 20 70 6c 61 74 66 6f 72 6d  lt Unix platform
c0a0: 20 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 65   SSL certificate
c0b0: 73 2e 20 46 6f 72 20 73 74 61 6e 64 61 72 64 0a  s. For standard.
c0c0: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20 2d  installations, -
c0d0: 63 61 64 69 72 20 61 6e 64 20 2d 63 61 66 69 6c  cadir and -cafil
c0e0: 65 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20  e should not be 
c0f0: 6e 65 65 64 65 64 2e 20 49 66 20 79 6f 75 72 20  needed. If your 
c100: 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 72 65  certificates.are
c110: 20 69 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72 64   in non-standard
c120: 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 73 65 74 20   locations, set 
c130: 2d 63 61 64 69 72 20 6f 72 20 75 73 65 20 2d 63  -cadir or use -c
c140: 61 66 69 6c 65 20 61 73 20 6e 65 65 64 65 64 2e  afile as needed.
c150: 3c 2f 70 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20  </p>.<p>Example 
c160: 23 33 3a 20 47 65 74 20 77 65 62 20 70 61 67 65  #3: Get web page
c170: 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d  </p>.<pre class=
c180: 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c  "doctools_exampl
c190: 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75  e">.package requ
c1a0: 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65  ire http.package
c1b0: 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74   require tls.set
c1c0: 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 70 73   url &quot;https
c1d0: 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 26 71  ://www.tcl.tk/&q
c1e0: 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73  uot;.http::regis
c1f0: 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c  ter https 443 [l
c200: 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65  ist ::tls::socke
c210: 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d  t -autoservernam
c220: 65 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a  e 1 -require 1].
c230: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f  # Check for erro
c240: 72 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74  r.set token [htt
c250: 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a  p::geturl $url].
c260: 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75  if {[http::statu
c270: 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75  s $token] ne &qu
c280: 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20  ot;ok&quot;} {. 
c290: 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20     puts [format 
c2a0: 26 71 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71  &quot;Error %s&q
c2b0: 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74  uot; [http::stat
c2c0: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20  us $token]].}.# 
c2d0: 47 65 74 20 77 65 62 20 70 61 67 65 0a 73 65 74  Get web page.set
c2e0: 20 64 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 74   data [http::dat
c2f0: 61 20 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 24  a $token].puts $
c300: 64 61 74 61 0a 23 20 43 6c 65 61 6e 75 70 0a 3a  data.# Cleanup.:
c310: 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24  :http::cleanup $
c320: 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 70 3e  token.</pre>.<p>
c330: 45 78 61 6d 70 6c 65 20 23 34 3a 20 44 6f 77 6e  Example #4: Down
c340: 6c 6f 61 64 20 66 69 6c 65 3c 2f 70 3e 0a 3c 70  load file</p>.<p
c350: 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  re class="doctoo
c360: 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63  ls_example">.pac
c370: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74  kage require htt
c380: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  p.package requir
c390: 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 71  e tls.set url &q
c3a0: 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 69 6b 69  uot;https://wiki
c3b0: 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 73 69  .tcl-lang.org/si
c3c0: 74 65 6d 61 70 2e 78 6d 6c 26 71 75 6f 74 3b 0a  temap.xml&quot;.
c3d0: 73 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69  set filename [fi
c3e0: 6c 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a 68 74  le tail $url].ht
c3f0: 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74  tp::register htt
c400: 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74  ps 443 [list ::t
c410: 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f  ls::socket -auto
c420: 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65  servername 1 -re
c430: 71 75 69 72 65 20 31 5d 0a 23 20 47 65 74 20 66  quire 1].# Get f
c440: 69 6c 65 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e  ile.set ch [open
c450: 20 24 66 69 6c 65 6e 61 6d 65 20 77 62 5d 0a 73   $filename wb].s
c460: 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70  et token [::http
c470: 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 20 2d 62  ::geturl $url -b
c480: 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33 36 20 2d  locksize 65536 -
c490: 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 23 20 43  channel $ch].# C
c4a0: 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 68  leanup.close $ch
c4b0: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70  .::http::cleanup
c4c0: 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c   $token.</pre>.<
c4d0: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
c4e0: 65 63 74 69 6f 6e 38 22 20 63 6c 61 73 73 3d 22  ection8" class="
c4f0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
c500: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h2><a name="s
c510: 65 63 74 69 6f 6e 38 22 3e 53 70 65 63 69 61 6c  ection8">Special
c520: 20 43 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c   Considerations<
c530: 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20  /a></h2>.<p>The 
c540: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20  capabilities of 
c550: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e  this package can
c560: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79   vary enormously
c570: 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20   based upon how 
c580: 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70  the.linked to Op
c590: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61  enSSL library wa
c5a0: 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64  s configured and
c5b0: 20 62 75 69 6c 74 2e 20 4e 65 77 20 76 65 72 73   built. New vers
c5c0: 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 74  ions may obsolet
c5d0: 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f 6c  e.older protocol
c5e0: 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 6f   versions, add o
c5f0: 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 72 73  r remove ciphers
c600: 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 6c 74  , change default
c610: 20 76 61 6c 75 65 73 2c 20 65 74 63 2e 0a 55 73   values, etc..Us
c620: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  e the <b class="
c630: 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63  cmd">tls::protoc
c640: 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 73  ols</b> commands
c650: 20 74 6f 20 6f 62 74 61 69 6e 20 74 68 65 20 73   to obtain the s
c660: 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f  upported.protoco
c670: 6c 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a  l versions.</p>.
c680: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
c690: 73 65 65 2d 61 6c 73 6f 22 20 63 6c 61 73 73 3d  see-also" class=
c6a0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
c6b0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
c6c0: 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c  see-also">See Al
c6d0: 73 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 3c  so</a></h2>.<p><
c6e0: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
c6f0: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
c700: 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 68  ">OpenSSL</a>, h
c710: 74 74 70 2c 20 73 6f 63 6b 65 74 3c 2f 70 3e 0a  ttp, socket</p>.
c720: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
c730: 6b 65 79 77 6f 72 64 73 22 20 63 6c 61 73 73 3d  keywords" class=
c740: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
c750: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
c760: 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77 6f 72  keywords">Keywor
c770: 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 49  ds</a></h2>.<p>I
c780: 2f 4f 2c 20 49 50 20 41 64 64 72 65 73 73 2c 20  /O, IP Address, 
c790: 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 43  OpenSSL, SSL, TC
c7a0: 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53 2c 20  P, TLS, TclTLS, 
c7b0: 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49 2f 4f  asynchronous I/O
c7c0: 2c 20 62 69 6e 64 2c 20 63 65 72 74 69 66 69 63  , bind, certific
c7d0: 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 6f  ate, channel, co
c7e0: 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e  nnection, domain
c7f0: 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68 74 74   name, host, htt
c800: 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 74  ps, network, net
c810: 77 6f 72 6b 20 61 64 64 72 65 73 73 2c 20 73 6f  work address, so
c820: 63 6b 65 74 2c 20 74 6c 73 3c 2f 70 3e 0a 3c 2f  cket, tls</p>.</
c830: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63 61  div>.<div id="ca
c840: 74 65 67 6f 72 79 22 20 63 6c 61 73 73 3d 22 64  tegory" class="d
c850: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
c860: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 61  ><h2><a name="ca
c870: 74 65 67 6f 72 79 22 3e 43 61 74 65 67 6f 72 79  tegory">Category
c880: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 74 6c 73  </a></h2>.<p>tls
c890: 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76  </p>.</div>.<div
c8a0: 20 69 64 3d 22 63 6f 70 79 72 69 67 68 74 22 20   id="copyright" 
c8b0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
c8c0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20  section"><h2><a 
c8d0: 6e 61 6d 65 3d 22 63 6f 70 79 72 69 67 68 74 22  name="copyright"
c8e0: 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c 2f  >Copyright</a></
c8f0: 68 32 3e 0a 3c 70 3e 43 6f 70 79 72 69 67 68 74  h2>.<p>Copyright
c900: 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74   &copy; 1999 Mat
c910: 74 20 4e 65 77 6d 61 6e 3c 62 72 3e 0a 43 6f 70  t Newman<br>.Cop
c920: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30  yright &copy; 20
c930: 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73 74  04 Starfish Syst
c940: 65 6d 73 3c 62 72 3e 0a 43 6f 70 79 72 69 67 68  ems<br>.Copyrigh
c950: 74 20 26 63 6f 70 79 3b 20 32 30 32 34 20 42 72  t &copy; 2024 Br
c960: 69 61 6e 20 4f 27 48 61 67 61 6e 3c 2f 70 3e 0a  ian O'Hagan</p>.
c970: 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 3c 2f 62  </div>.</div></b
c980: 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a              ody></html>.