Hex Artifact Content

Artifact c1d9a9463b86f6e97c826f166f779996a01f247535fdd9542391b0beebf642a6:


0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 3c  <!DOCTYPE html><
0010: 68 74 6d 6c 3e 3c 68 65 61 64 3e 0a 3c 6d 65 74  html><head>.<met
0020: 61 20 63 68 61 72 73 65 74 3d 22 55 54 46 2d 38  a charset="UTF-8
0030: 22 3e 0a 3c 6d 65 74 61 20 6e 61 6d 65 3d 22 76  ">.<meta name="v
0040: 69 65 77 70 6f 72 74 22 20 63 6f 6e 74 65 6e 74  iewport" content
0050: 3d 22 77 69 64 74 68 3d 64 65 76 69 63 65 2d 77  ="width=device-w
0060: 69 64 74 68 2c 20 69 6e 69 74 69 61 6c 2d 73 63  idth, initial-sc
0070: 61 6c 65 3d 31 22 3e 0a 3c 74 69 74 6c 65 3e 74  ale=1">.<title>t
0080: 6c 73 20 2d 20 54 63 6c 20 54 4c 53 20 65 78 74  ls - Tcl TLS ext
0090: 65 6e 73 69 6f 6e 3c 2f 74 69 74 6c 65 3e 0a 3c  ension</title>.<
00a0: 73 74 79 6c 65 20 74 79 70 65 3d 22 74 65 78 74  style type="text
00b0: 2f 63 73 73 22 3e 3c 21 2d 2d 0a 20 20 20 20 48  /css"><!--.    H
00c0: 54 4d 4c 20 7b 0a 09 62 61 63 6b 67 72 6f 75 6e  TML {..backgroun
00d0: 64 3a 20 09 23 46 46 46 46 46 46 3b 0a 09 63 6f  d: .#FFFFFF;..co
00e0: 6c 6f 72 3a 20 09 09 62 6c 61 63 6b 3b 0a 20 20  lor: ..black;.  
00f0: 20 20 7d 0a 20 20 20 20 42 4f 44 59 20 7b 0a 09    }.    BODY {..
0100: 62 61 63 6b 67 72 6f 75 6e 64 3a 20 09 23 46 46  background: .#FF
0110: 46 46 46 46 3b 0a 09 63 6f 6c 6f 72 3a 09 20 09  FFFF;..color:. .
0120: 62 6c 61 63 6b 3b 0a 20 20 20 20 7d 0a 20 20 20  black;.    }.   
0130: 20 44 49 56 2e 64 6f 63 74 6f 6f 6c 73 20 7b 0a   DIV.doctools {.
0140: 09 6d 61 72 67 69 6e 2d 6c 65 66 74 3a 09 31 30  .margin-left:.10
0150: 25 3b 0a 09 6d 61 72 67 69 6e 2d 72 69 67 68 74  %;..margin-right
0160: 3a 09 31 30 25 3b 0a 20 20 20 20 7d 0a 20 20 20  :.10%;.    }.   
0170: 20 44 49 56 2e 64 6f 63 74 6f 6f 6c 73 20 48 31   DIV.doctools H1
0180: 2c 44 49 56 2e 64 6f 63 74 6f 6f 6c 73 20 48 32  ,DIV.doctools H2
0190: 20 7b 0a 09 6d 61 72 67 69 6e 2d 6c 65 66 74 3a   {..margin-left:
01a0: 09 2d 35 25 3b 0a 20 20 20 20 7d 0a 20 20 20 20  .-5%;.    }.    
01b0: 48 31 2c 20 48 32 2c 20 48 33 2c 20 48 34 20 7b  H1, H2, H3, H4 {
01c0: 0a 09 6d 61 72 67 69 6e 2d 74 6f 70 3a 20 09 31  ..margin-top: .1
01d0: 65 6d 3b 0a 09 66 6f 6e 74 2d 66 61 6d 69 6c 79  em;..font-family
01e0: 3a 09 73 61 6e 73 2d 73 65 72 69 66 3b 0a 09 66  :.sans-serif;..f
01f0: 6f 6e 74 2d 73 69 7a 65 3a 09 6c 61 72 67 65 3b  ont-size:.large;
0200: 0a 09 63 6f 6c 6f 72 3a 09 09 23 30 30 35 41 39  ..color:..#005A9
0210: 43 3b 0a 09 62 61 63 6b 67 72 6f 75 6e 64 3a 20  C;..background: 
0220: 09 74 72 61 6e 73 70 61 72 65 6e 74 3b 0a 09 74  .transparent;..t
0230: 65 78 74 2d 61 6c 69 67 6e 3a 09 09 6c 65 66 74  ext-align:..left
0240: 3b 0a 20 20 20 20 7d 0a 20 20 20 20 48 31 2e 64  ;.    }.    H1.d
0250: 6f 63 74 6f 6f 6c 73 5f 74 69 74 6c 65 20 7b 0a  octools_title {.
0260: 09 74 65 78 74 2d 61 6c 69 67 6e 3a 20 63 65 6e  .text-align: cen
0270: 74 65 72 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55  ter;.    }.    U
0280: 4c 2c 4f 4c 20 7b 0a 09 6d 61 72 67 69 6e 2d 72  L,OL {..margin-r
0290: 69 67 68 74 3a 20 30 65 6d 3b 0a 09 6d 61 72 67  ight: 0em;..marg
02a0: 69 6e 2d 74 6f 70 3a 20 33 70 74 3b 0a 09 6d 61  in-top: 3pt;..ma
02b0: 72 67 69 6e 2d 62 6f 74 74 6f 6d 3a 20 33 70 74  rgin-bottom: 3pt
02c0: 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c 20 4c  ;.    }.    UL L
02d0: 49 20 7b 0a 09 6c 69 73 74 2d 73 74 79 6c 65 3a  I {..list-style:
02e0: 20 64 69 73 63 3b 0a 20 20 20 20 7d 0a 20 20 20   disc;.    }.   
02f0: 20 4f 4c 20 4c 49 20 7b 0a 09 6c 69 73 74 2d 73   OL LI {..list-s
0300: 74 79 6c 65 3a 20 64 65 63 69 6d 61 6c 3b 0a 20  tyle: decimal;. 
0310: 20 20 20 7d 0a 20 20 20 20 44 54 20 7b 0a 09 70     }.    DT {..p
0320: 61 64 64 69 6e 67 2d 74 6f 70 3a 20 09 31 65 78  adding-top: .1ex
0330: 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c 2e 64  ;.    }.    UL.d
0340: 6f 63 74 6f 6f 6c 73 5f 74 6f 63 2c 55 4c 2e 64  octools_toc,UL.d
0350: 6f 63 74 6f 6f 6c 73 5f 74 6f 63 20 55 4c 2c 20  octools_toc UL, 
0360: 55 4c 2e 64 6f 63 74 6f 6f 6c 73 5f 74 6f 63 20  UL.doctools_toc 
0370: 55 4c 20 55 4c 20 7b 0a 09 66 6f 6e 74 3a 09 09  UL UL {..font:..
0380: 6e 6f 72 6d 61 6c 20 31 32 70 74 2f 31 34 70 74  normal 12pt/14pt
0390: 20 73 61 6e 73 2d 73 65 72 69 66 3b 0a 09 6c 69   sans-serif;..li
03a0: 73 74 2d 73 74 79 6c 65 3a 09 6e 6f 6e 65 3b 0a  st-style:.none;.
03b0: 20 20 20 20 7d 0a 20 20 20 20 4c 49 2e 64 6f 63      }.    LI.doc
03c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 2c 20 4c  tools_section, L
03d0: 49 2e 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  I.doctools_subse
03e0: 63 74 69 6f 6e 20 7b 0a 09 6c 69 73 74 2d 73 74  ction {..list-st
03f0: 79 6c 65 3a 20 09 6e 6f 6e 65 3b 0a 09 6d 61 72  yle: .none;..mar
0400: 67 69 6e 2d 6c 65 66 74 3a 20 09 30 65 6d 3b 0a  gin-left: .0em;.
0410: 09 74 65 78 74 2d 69 6e 64 65 6e 74 3a 09 30 65  .text-indent:.0e
0420: 6d 3b 0a 09 70 61 64 64 69 6e 67 3a 20 09 30 65  m;..padding: .0e
0430: 6d 3b 0a 20 20 20 20 7d 0a 20 20 20 20 50 52 45  m;.    }.    PRE
0440: 20 7b 0a 09 64 69 73 70 6c 61 79 3a 20 09 62 6c   {..display: .bl
0450: 6f 63 6b 3b 0a 09 66 6f 6e 74 2d 66 61 6d 69 6c  ock;..font-famil
0460: 79 3a 09 6d 6f 6e 6f 73 70 61 63 65 3b 0a 09 77  y:.monospace;..w
0470: 68 69 74 65 2d 73 70 61 63 65 3a 09 70 72 65 3b  hite-space:.pre;
0480: 0a 09 6d 61 72 67 69 6e 3a 09 09 30 25 3b 0a 09  ..margin:..0%;..
0490: 70 61 64 64 69 6e 67 2d 74 6f 70 3a 09 30 2e 35  padding-top:.0.5
04a0: 65 78 3b 0a 09 70 61 64 64 69 6e 67 2d 62 6f 74  ex;..padding-bot
04b0: 74 6f 6d 3a 09 30 2e 35 65 78 3b 0a 09 70 61 64  tom:.0.5ex;..pad
04c0: 64 69 6e 67 2d 6c 65 66 74 3a 09 31 65 78 3b 0a  ding-left:.1ex;.
04d0: 09 70 61 64 64 69 6e 67 2d 72 69 67 68 74 3a 09  .padding-right:.
04e0: 31 65 78 3b 0a 09 77 69 64 74 68 3a 09 09 31 30  1ex;..width:..10
04f0: 30 25 3b 0a 20 20 20 20 7d 0a 20 20 20 20 50 52  0%;.    }.    PR
0500: 45 2e 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70  E.doctools_examp
0510: 6c 65 20 7b 0a 09 63 6f 6c 6f 72 3a 20 09 09 62  le {..color: ..b
0520: 6c 61 63 6b 3b 0a 09 62 61 63 6b 67 72 6f 75 6e  lack;..backgroun
0530: 64 3a 20 09 23 66 35 64 63 62 33 3b 0a 09 62 6f  d: .#f5dcb3;..bo
0540: 72 64 65 72 3a 09 09 31 70 78 20 73 6f 6c 69 64  rder:..1px solid
0550: 20 62 6c 61 63 6b 3b 0a 20 20 20 20 7d 0a 20 20   black;.    }.  
0560: 20 20 55 4c 2e 64 6f 63 74 6f 6f 6c 73 5f 72 65    UL.doctools_re
0570: 71 75 69 72 65 6d 65 6e 74 73 20 4c 49 2c 20 55  quirements LI, U
0580: 4c 2e 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61  L.doctools_synta
0590: 78 20 4c 49 20 7b 0a 09 6c 69 73 74 2d 73 74 79  x LI {..list-sty
05a0: 6c 65 3a 20 09 6e 6f 6e 65 3b 0a 09 6d 61 72 67  le: .none;..marg
05b0: 69 6e 2d 6c 65 66 74 3a 20 09 30 65 6d 3b 0a 09  in-left: .0em;..
05c0: 74 65 78 74 2d 69 6e 64 65 6e 74 3a 09 30 65 6d  text-indent:.0em
05d0: 3b 0a 09 70 61 64 64 69 6e 67 3a 09 30 65 6d 3b  ;..padding:.0em;
05e0: 0a 20 20 20 20 7d 0a 20 20 20 20 44 49 56 2e 64  .    }.    DIV.d
05f0: 6f 63 74 6f 6f 6c 73 5f 73 79 6e 6f 70 73 69 73  octools_synopsis
0600: 20 7b 0a 09 63 6f 6c 6f 72 3a 20 09 09 62 6c 61   {..color: ..bla
0610: 63 6b 3b 0a 09 62 61 63 6b 67 72 6f 75 6e 64 3a  ck;..background:
0620: 20 09 23 38 30 66 66 66 66 3b 0a 09 62 6f 72 64   .#80ffff;..bord
0630: 65 72 3a 09 09 31 70 78 20 73 6f 6c 69 64 20 62  er:..1px solid b
0640: 6c 61 63 6b 3b 0a 09 66 6f 6e 74 2d 66 61 6d 69  lack;..font-fami
0650: 6c 79 3a 09 73 65 72 69 66 3b 0a 09 6d 61 72 67  ly:.serif;..marg
0660: 69 6e 2d 74 6f 70 3a 20 09 31 65 6d 3b 0a 09 6d  in-top: .1em;..m
0670: 61 72 67 69 6e 2d 62 6f 74 74 6f 6d 3a 20 09 31  argin-bottom: .1
0680: 65 6d 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c  em;.    }.    UL
0690: 2e 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78  .doctools_syntax
06a0: 20 7b 0a 09 6d 61 72 67 69 6e 2d 74 6f 70 3a 20   {..margin-top: 
06b0: 09 31 65 6d 3b 0a 09 62 6f 72 64 65 72 2d 74 6f  .1em;..border-to
06c0: 70 3a 09 31 70 78 20 73 6f 6c 69 64 20 62 6c 61  p:.1px solid bla
06d0: 63 6b 3b 0a 20 20 20 20 7d 0a 20 20 20 20 55 4c  ck;.    }.    UL
06e0: 2e 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75 69 72  .doctools_requir
06f0: 65 6d 65 6e 74 73 20 7b 0a 09 6d 61 72 67 69 6e  ements {..margin
0700: 2d 62 6f 74 74 6f 6d 3a 20 09 31 65 6d 3b 0a 09  -bottom: .1em;..
0710: 62 6f 72 64 65 72 2d 62 6f 74 74 6f 6d 3a 09 31  border-bottom:.1
0720: 70 78 20 73 6f 6c 69 64 20 62 6c 61 63 6b 3b 0a  px solid black;.
0730: 20 20 20 20 7d 0a 2d 2d 3e 3c 2f 73 74 79 6c 65      }.--></style
0740: 3e 0a 3c 2f 68 65 61 64 3e 0a 3c 21 2d 2d 20 47  >.</head>.<!-- G
0750: 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 66 69  enerated from fi
0760: 6c 65 20 27 74 6c 73 2e 6d 61 6e 27 20 62 79 20  le 'tls.man' by 
0770: 74 63 6c 6c 69 62 2f 64 6f 63 74 6f 6f 6c 73 20  tcllib/doctools 
0780: 77 69 74 68 20 66 6f 72 6d 61 74 20 27 68 74 6d  with format 'htm
0790: 6c 27 0a 20 20 20 2d 2d 3e 0a 3c 21 2d 2d 20 43  l'.   -->.<!-- C
07a0: 6f 70 79 72 69 67 68 74 20 26 61 6d 70 3b 63 6f  opyright &amp;co
07b0: 70 79 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65  py; 1999 Matt Ne
07c0: 77 6d 61 6e 20 20 20 2d 2d 20 43 6f 70 79 72 69  wman   -- Copyri
07d0: 67 68 74 20 26 61 6d 70 3b 63 6f 70 79 3b 20 32  ght &amp;copy; 2
07e0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73  004 Starfish Sys
07f0: 74 65 6d 73 20 20 20 2d 2d 20 43 6f 70 79 72 69  tems   -- Copyri
0800: 67 68 74 20 26 61 6d 70 3b 63 6f 70 79 3b 20 32  ght &amp;copy; 2
0810: 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61  024 Brian O'Haga
0820: 6e 0a 20 20 20 2d 2d 3e 0a 3c 21 2d 2d 20 74 6c  n.   -->.<!-- tl
0830: 73 2e 6e 0a 20 20 20 2d 2d 3e 0a 3c 62 6f 64 79  s.n.   -->.<body
0840: 3e 3c 64 69 76 20 63 6c 61 73 73 3d 22 64 6f 63  ><div class="doc
0850: 74 6f 6f 6c 73 22 3e 0a 3c 68 31 20 63 6c 61 73  tools">.<h1 clas
0860: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 69 74 6c  s="doctools_titl
0870: 65 22 3e 74 6c 73 28 6e 29 20 32 2e 30 62 31 20  e">tls(n) 2.0b1 
0880: 74 6c 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c  tls &quot;Tcl TL
0890: 53 20 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74  S extension&quot
08a0: 3b 3c 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22  ;</h1>.<div id="
08b0: 6e 61 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63  name" class="doc
08c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
08d0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65  h2><a name="name
08e0: 22 3e 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a  ">Name</a></h2>.
08f0: 3c 70 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67  <p>tls - binding
0900: 20 74 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   to the OpenSSL 
0910: 6c 69 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72  library for encr
0920: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64  ypted socket and
0930: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d   I/O channel com
0940: 6d 75 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a  munications</p>.
0950: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22  </div>.<div id="
0960: 74 6f 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74  toc" class="doct
0970: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68  ools_section"><h
0980: 32 3e 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e  2><a name="toc">
0990: 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74  Table Of Content
09a0: 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63  s</a></h2>.<ul c
09b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74  lass="doctools_t
09c0: 6f 63 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  oc">.<li class="
09d0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
09e0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22  "><a href="#toc"
09f0: 3e 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e  >Table Of Conten
0a00: 74 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ts</a></li>.<li 
0a10: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0a20: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0a30: 3d 22 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e  ="#synopsis">Syn
0a40: 6f 70 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  opsis</a></li>.<
0a50: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0a60: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  ls_section"><a h
0a70: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e  ref="#section1">
0a80: 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c  Description</a><
0a90: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0aa0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
0ab0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
0ac0: 69 6f 6e 32 22 3e 43 6f 6d 6d 61 6e 64 73 3c 2f  ion2">Commands</
0ad0: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73  a></li>.<li clas
0ae0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
0af0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ion"><a href="#s
0b00: 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69  ection3">Certifi
0b10: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
0b20: 2f 61 3e 0a 3c 75 6c 3e 0a 3c 6c 69 20 63 6c 61  /a>.<ul>.<li cla
0b30: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62  ss="doctools_sub
0b40: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0b50: 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 31 22 3e  ="#subsection1">
0b60: 50 4b 49 20 61 6e 64 20 43 65 72 74 69 66 69 63  PKI and Certific
0b70: 61 74 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ates</a></li>.<l
0b80: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0b90: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61  s_subsection"><a
0ba0: 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69   href="#subsecti
0bb0: 6f 6e 32 22 3e 53 75 6d 6d 61 72 79 20 6f 66 20  on2">Summary of 
0bc0: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74  command line opt
0bd0: 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  ions</a></li>.<l
0be0: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  i class="doctool
0bf0: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61  s_subsection"><a
0c00: 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69   href="#subsecti
0c10: 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 63 6f  on3">When are co
0c20: 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f  mmand line optio
0c30: 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f  ns needed?</a></
0c40: 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a  li>.</ul>.</li>.
0c50: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <li class="docto
0c60: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20  ols_section"><a 
0c70: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22  href="#section4"
0c80: 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e  >Callback Option
0c90: 73 3c 2f 61 3e 0a 3c 75 6c 3e 0a 3c 6c 69 20 63  s</a>.<ul>.<li c
0ca0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
0cb0: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72  ubsection"><a hr
0cc0: 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 34  ef="#subsection4
0cd0: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d  ">Values for Com
0ce0: 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61  mand Callback</a
0cf0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73  ></li>.<li class
0d00: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
0d10: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22  ction"><a href="
0d20: 23 73 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 61  #subsection5">Va
0d30: 6c 75 65 73 20 66 6f 72 20 50 61 73 73 77 6f 72  lues for Passwor
0d40: 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f  d Callback</a></
0d50: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64  li>.<li class="d
0d60: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69  octools_subsecti
0d70: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75  on"><a href="#su
0d80: 62 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65  bsection6">Value
0d90: 73 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43  s for Validate C
0da0: 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c  ommand Callback<
0db0: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c  /a></li>.</ul>.<
0dc0: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0dd0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
0de0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
0df0: 69 6f 6e 35 22 3e 44 65 62 75 67 3c 2f 61 3e 3c  ion5">Debug</a><
0e00: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0e10: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
0e20: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
0e30: 69 6f 6e 36 22 3e 48 54 54 50 20 50 61 63 6b 61  ion6">HTTP Packa
0e40: 67 65 20 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c  ge Examples</a><
0e50: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22  /li>.<li class="
0e60: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
0e70: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
0e80: 69 6f 6e 37 22 3e 53 70 65 63 69 61 6c 20 43 6f  ion7">Special Co
0e90: 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c 2f 61 3e  nsiderations</a>
0ea0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d  </li>.<li class=
0eb0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
0ec0: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 65  n"><a href="#see
0ed0: 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73 6f 3c  -also">See Also<
0ee0: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61  /a></li>.<li cla
0ef0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
0f00: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23  tion"><a href="#
0f10: 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77 6f 72  keywords">Keywor
0f20: 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20  ds</a></li>.<li 
0f30: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
0f40: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66  section"><a href
0f50: 3d 22 23 63 61 74 65 67 6f 72 79 22 3e 43 61 74  ="#category">Cat
0f60: 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c  egory</a></li>.<
0f70: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  li class="doctoo
0f80: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68  ls_section"><a h
0f90: 72 65 66 3d 22 23 63 6f 70 79 72 69 67 68 74 22  ref="#copyright"
0fa0: 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c 2f  >Copyright</a></
0fb0: 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e  li>.</ul>.</div>
0fc0: 0a 3c 64 69 76 20 69 64 3d 22 73 79 6e 6f 70 73  .<div id="synops
0fd0: 69 73 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  is" class="docto
0fe0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
0ff0: 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 6e 6f 70 73  ><a name="synops
1000: 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f 61 3e  is">Synopsis</a>
1010: 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 6c 61 73 73  </h2>.<div class
1020: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 6f 70  ="doctools_synop
1030: 73 69 73 22 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d  sis">.<ul class=
1040: 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75 69 72  "doctools_requir
1050: 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 3e 70 61 63  ements">.<li>pac
1060: 6b 61 67 65 20 72 65 71 75 69 72 65 20 3c 62 20  kage require <b 
1070: 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e  class="pkgname">
1080: 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e 3c 2f 6c 69  Tcl 8.5-</b></li
1090: 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20 72 65  >.<li>package re
10a0: 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73 3d 22  quire <b class="
10b0: 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 20 32 2e 30  pkgname">tls 2.0
10c0: 62 31 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c  b1</b></li>.</ul
10d0: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<ul class="doc
10e0: 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 22 3e 0a 3c  tools_syntax">.<
10f0: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 22 3e  li><a href="#1">
1100: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1110: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70  ls::init</b> <sp
1120: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
1130: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
1140: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
1150: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1160: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1170: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
1180: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1190: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
11a0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
11b0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
11c0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a  /span></a></li>.
11d0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 32 22  <li><a href="#2"
11e0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
11f0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
1200: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74  <span class="opt
1210: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  ">?<i class="arg
1220: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f  ">-option</i>?</
1230: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
1240: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
1250: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69  s="arg">value</i
1260: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20  >?</span> <span 
1270: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
1280: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74  class="arg">-opt
1290: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69  ion value ...</i
12a0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
12b0: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69  ss="arg">host</i
12c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
12d0: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c  >port</i></a></l
12e0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22  i>.<li><a href="
12f0: 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  #3"><b class="cm
1300: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
1310: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  b> <b class="opt
1320: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e  ion">-server</b>
1330: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
1340: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61  command</i> <spa
1350: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
1360: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
1370: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e  ption</i>?</span
1380: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1390: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
13a0: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f  rg">value</i>?</
13b0: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73  span> <span clas
13c0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73  s="opt">?<i clas
13d0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20  s="arg">-option 
13e0: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f  value ...</i>?</
13f0: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22  span> <i class="
1400: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61  arg">port</i></a
1410: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72  ></li>.<li><a hr
1420: 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c 61 73 73  ef="#4"><b class
1430: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f  ="cmd">tls::impo
1440: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
1450: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
1460: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1470: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61  pt">?<i class="a
1480: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f  rg">-option</i>?
1490: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c  </span> <span cl
14a0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c  ass="opt">?<i cl
14b0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c  ass="arg">value<
14c0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61  /i>?</span> <spa
14d0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c  n class="opt">?<
14e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f  i class="arg">-o
14f0: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c  ption value ...<
1500: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1510: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
1520: 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22  ="#5"><b class="
1530: 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f  cmd">tls::unimpo
1540: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  rt</b> <i class=
1550: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
1560: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c  ></a></li>.<li><
1570: 61 20 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63  a href="#6"><b c
1580: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1590: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69  handshake</b> <i
15a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
15b0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69  nnel</i></a></li
15c0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
15d0: 37 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  7"><b class="cmd
15e0: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62  ">tls::status</b
15f0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f  > <span class="o
1600: 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f  pt">?<b class="o
1610: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62  ption">-local</b
1620: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61  >?</span> <i cla
1630: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
1640: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c  </i></a></li>.<l
1650: 69 3e 3c 61 20 68 72 65 66 3d 22 23 38 22 3e 3c  i><a href="#8"><
1660: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1670: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62  s::connection</b
1680: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
1690: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
16a0: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65  </li>.<li><a hre
16b0: 66 3d 22 23 39 22 3e 3c 62 20 63 6c 61 73 73 3d  f="#9"><b class=
16c0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65  "cmd">tls::ciphe
16d0: 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61  rs</b> <span cla
16e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
16f0: 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f  ss="arg">protoco
1700: 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73  l</i>?</span> <s
1710: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e  pan class="opt">
1720: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ?<i class="arg">
1730: 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70  verbose</i>?</sp
1740: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  an> <span class=
1750: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
1760: 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c  "arg">supported<
1770: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c  /i>?</span></a><
1780: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66  /li>.<li><a href
1790: 3d 22 23 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d  ="#10"><b class=
17a0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f  "cmd">tls::proto
17b0: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69  cols</b></a></li
17c0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23  >.<li><a href="#
17d0: 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  11"><b class="cm
17e0: 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c  d">tls::version<
17f0: 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75  /b></a></li>.</u
1800: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e  l>.</div>.</div>
1810: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f  .<div id="sectio
1820: 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  n1" class="docto
1830: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
1840: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f  ><a name="sectio
1850: 6e 31 22 3e 44 65 73 63 72 69 70 74 69 6f 6e 3c  n1">Description<
1860: 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 69 73  /a></h2>.<p>This
1870: 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69   extension provi
1880: 64 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61  des TCL script a
1890: 63 63 65 73 73 20 74 6f 20 73 65 63 75 72 65 20  ccess to secure 
18a0: 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61  socket communica
18b0: 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20  tions.using the 
18c0: 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20  Transport Layer 
18d0: 53 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70  Security (TLS) p
18e0: 72 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76  rotocol. It prov
18f0: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 0a 62  ides a generic.b
1900: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65  inding to <a hre
1910: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f  f="https://www.o
1920: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65  penssl.org/">Ope
1930: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a  nSSL</a>, utiliz
1940: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  ing the.<b class
1950: 3d 22 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74  ="syscmd">Tcl_St
1960: 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41  ackChannel</b> A
1970: 50 49 20 69 6e 20 54 43 4c 20 38 2e 34 20 61 6e  PI in TCL 8.4 an
1980: 64 20 68 69 67 68 65 72 2e 0a 54 68 65 73 65 20  d higher..These 
1990: 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65  sockets behave e
19a0: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20  xactly the same 
19b0: 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61  as channels crea
19c0: 74 65 64 20 75 73 69 6e 67 20 74 68 65 20 62 75  ted using the bu
19d0: 69 6c 74 2d 69 6e 0a 3c 62 20 63 6c 61 73 73 3d  ilt-in.<b class=
19e0: 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 3c  "syscmd">socket<
19f0: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c 20 61 6c 6f  /b> command, alo
1a00: 6e 67 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e  ng with addition
1a10: 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63  al options for c
1a20: 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 68 65 20 53  ontrolling.the S
1a30: 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c  SL/TLS session.<
1a40: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20  /p>.</div>.<div 
1a50: 69 64 3d 22 73 65 63 74 69 6f 6e 32 22 20 63 6c  id="section2" cl
1a60: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
1a70: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
1a80: 6d 65 3d 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f  me="section2">Co
1a90: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a  mmands</a></h2>.
1aa0: 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65  <p>Typically one
1ab0: 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c   would use the <
1ac0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
1ad0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f  s::socket</b> co
1ae0: 6d 6d 61 6e 64 20 74 6f 20 63 72 65 61 74 65 20  mmand to create 
1af0: 61 20 6e 65 77 20 65 6e 63 72 79 70 74 65 64 0a  a new encrypted.
1b00: 54 43 50 20 73 6f 63 6b 65 74 2e 20 49 74 20 69  TCP socket. It i
1b10: 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74  s compatible wit
1b20: 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 43 4c  h the native TCL
1b30: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d   <b class="syscm
1b40: 64 22 3e 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  d">::socket</b> 
1b50: 63 6f 6d 6d 61 6e 64 2e 0a 41 6c 74 65 72 6e 61  command..Alterna
1b60: 74 69 76 65 6c 79 20 66 6f 72 20 61 6e 20 65 78  tively for an ex
1b70: 69 73 74 69 6e 67 20 54 43 50 20 73 6f 63 6b 65  isting TCP socke
1b80: 74 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  t, the <b class=
1b90: 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72  "cmd">tls::impor
1ba0: 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 63 61  t</b> command ca
1bb0: 6e 20 62 65 0a 75 73 65 64 20 74 6f 20 73 74 61  n be.used to sta
1bc0: 72 74 20 54 4c 53 20 6f 6e 20 74 68 65 20 63 6f  rt TLS on the co
1bd0: 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64  nnection.</p>.<d
1be0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
1bf0: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
1c00: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 22 3e  <dt><a name="1">
1c10: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
1c20: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70  ls::init</b> <sp
1c30: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
1c40: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
1c50: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
1c60: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
1c70: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
1c80: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
1c90: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1ca0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1cb0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
1cc0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
1cd0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  /span></a></dt>.
1ce0: 3c 64 64 3e 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20  <dd><p>Optional 
1cf0: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20  function to set 
1d00: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69  the default opti
1d10: 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 62 20 63  ons used by <b c
1d20: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1d30: 73 6f 63 6b 65 74 3c 2f 62 3e 2e 20 49 66 20 79  socket</b>. If y
1d40: 6f 75 0a 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73  ou.call <b class
1d50: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f  ="cmd">tls::impo
1d60: 72 74 3c 2f 62 3e 20 64 69 72 65 63 74 6c 79 2c  rt</b> directly,
1d70: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61   this command ha
1d80: 73 20 6e 6f 20 65 66 66 65 63 74 2e 20 54 68 69  s no effect. Thi
1d90: 73 20 63 6f 6d 6d 61 6e 64 0a 73 75 70 70 6f 72  s command.suppor
1da0: 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61  ts all of the sa
1db0: 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68  me options as th
1dc0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
1dd0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
1de0: 20 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68   command, though
1df0: 20 79 6f 75 0a 73 68 6f 75 6c 64 20 6c 69 6d 69   you.should limi
1e00: 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74  t your options t
1e10: 6f 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74  o only TLS relat
1e20: 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c 2f 64 64  ed ones.</p></dd
1e30: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 32  >.<dt><a name="2
1e40: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
1e50: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
1e60: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
1e70: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
1e80: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c  g">-option</i>?<
1e90: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
1ea0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
1eb0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f  ss="arg">value</
1ec0: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
1ed0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
1ee0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70   class="arg">-op
1ef0: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f  tion value ...</
1f00: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c  i>?</span> <i cl
1f10: 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f  ass="arg">host</
1f20: 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  i> <i class="arg
1f30: 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f  ">port</i></a></
1f40: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  dt>.<dd><p>This 
1f50: 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63  is a helper func
1f60: 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a  tion that utiliz
1f70: 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e  es the underlyin
1f80: 67 20 63 6f 6d 6d 61 6e 64 73 20 3c 62 20 63 6c  g commands <b cl
1f90: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63  ass="syscmd">soc
1fa0: 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c 62 20 63  ket</b>.and <b c
1fb0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
1fc0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f 20 63 72  import</b> to cr
1fd0: 65 61 74 65 20 74 68 65 20 63 6f 6e 6e 65 63 74  eate the connect
1fe0: 69 6f 6e 2e 20 49 74 20 62 65 68 61 76 65 73 20  ion. It behaves 
1ff0: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a  the same as the.
2000: 6e 61 74 69 76 65 20 54 43 4c 20 3c 62 20 63 6c  native TCL <b cl
2010: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63  ass="syscmd">soc
2020: 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c  ket</b> command,
2030: 20 62 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72   but also suppor
2040: 74 73 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  ts the <b class=
2050: 22 63 6d 64 22 3e 74 6c 73 3a 69 6d 70 6f 72 74  "cmd">tls:import
2060: 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64 20 6f 70 74  </b>.command opt
2070: 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64  ions with one ad
2080: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 2e  ditional option.
2090: 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65 20   It returns the 
20a0: 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69  channel handle i
20b0: 64 0a 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f  d.for the new so
20c0: 63 6b 65 74 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  cket.</p>.<dl cl
20d0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70  ass="doctools_op
20e0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
20f0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61  lass="option">-a
2100: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62  utoservername</b
2110: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
2120: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
2130: 64 64 3e 3c 70 3e 49 66 20 3c 62 20 63 6c 61 73  dd><p>If <b clas
2140: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f  s="const">true</
2150: 62 3e 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c  b>, automaticall
2160: 79 20 73 65 74 20 74 68 65 20 3c 62 20 63 6c 61  y set the <b cla
2170: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72  ss="option">-ser
2180: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 61 72 67 75  vername</b> argu
2190: 6d 65 6e 74 20 74 6f 20 74 68 65 0a 3c 65 6d 3e  ment to the.<em>
21a0: 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  host</em> argume
21b0: 6e 74 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c  nt. Prior to Tcl
21c0: 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66  TLS 2.0, the def
21d0: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
21e0: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
21f0: 62 3e 2e 0a 53 74 61 72 74 69 6e 67 20 69 6e 20  b>..Starting in 
2200: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20  TclTLS 2.0, the 
2210: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c  default is <b cl
2220: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
2230: 3c 2f 62 3e 20 75 6e 6c 65 73 73 20 3c 62 20 63  </b> unless <b c
2240: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
2250: 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 0a 69 73  ervername</b>.is
2260: 20 61 6c 73 6f 20 73 70 65 63 69 66 69 65 64 2e   also specified.
2270: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c  </p></dd>.</dl><
2280: 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65  /dd>.<dt><a name
2290: 3d 22 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63  ="3"><b class="c
22a0: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  md">tls::socket<
22b0: 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  /b> <b class="op
22c0: 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62  tion">-server</b
22d0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
22e0: 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70  >command</i> <sp
22f0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
2300: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d  <i class="arg">-
2310: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61  option</i>?</spa
2320: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22  n> <span class="
2330: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22  opt">?<i class="
2340: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c  arg">value</i>?<
2350: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
2360: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
2370: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
2380: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c   value ...</i>?<
2390: 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d  /span> <i class=
23a0: 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f  "arg">port</i></
23b0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53  a></dt>.<dd><p>S
23c0: 61 6d 65 20 61 73 20 70 72 65 76 69 6f 75 73 2c  ame as previous,
23d0: 20 62 75 74 20 69 6e 73 74 65 61 64 20 63 72 65   but instead cre
23e0: 61 74 65 73 20 61 20 73 65 72 76 65 72 20 73 6f  ates a server so
23f0: 63 6b 65 74 20 66 6f 72 20 63 6c 69 65 6e 74 73  cket for clients
2400: 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 0a 6a   to connect to.j
2410: 75 73 74 20 6c 69 6b 65 20 74 68 65 20 54 63 6c  ust like the Tcl
2420: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d   <b class="syscm
2430: 64 22 3e 73 6f 63 6b 65 74 20 2d 73 65 72 76 65  d">socket -serve
2440: 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 20 49  r</b> command. I
2450: 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 68  t returns the ch
2460: 61 6e 6e 65 6c 0a 68 61 6e 64 6c 65 20 69 64 20  annel.handle id 
2470: 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b  for the new sock
2480: 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  et.</p></dd>.<dt
2490: 3e 3c 61 20 6e 61 6d 65 3d 22 34 22 3e 3c 62 20  ><a name="4"><b 
24a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
24b0: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63  :import</b> <i c
24c0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
24d0: 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61  el</i> <span cla
24e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
24f0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e  ss="arg">-option
2500: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70  </i>?</span> <sp
2510: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f  an class="opt">?
2520: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
2530: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  alue</i>?</span>
2540: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
2550: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
2560: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65  g">-option value
2570: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e   ...</i>?</span>
2580: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </a></dt>.<dd><p
2590: 3e 53 74 61 72 74 20 54 4c 53 20 65 6e 63 72 79  >Start TLS encry
25a0: 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61  ption on TCL cha
25b0: 6e 6e 65 6c 20 3c 69 20 63 6c 61 73 73 3d 22 61  nnel <i class="a
25c0: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20  rg">channel</i> 
25d0: 76 69 61 20 61 20 73 74 61 63 6b 65 64 20 63 68  via a stacked ch
25e0: 61 6e 6e 65 6c 2e 20 49 74 0a 6e 65 65 64 20 6e  annel. It.need n
25f0: 6f 74 20 62 65 20 61 20 73 6f 63 6b 65 74 2c 20  ot be a socket, 
2600: 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65  but must provide
2610: 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20   bi-directional 
2620: 66 6c 6f 77 2e 20 41 6c 73 6f 20 73 65 74 73 20  flow. Also sets 
2630: 73 65 73 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65  session.paramete
2640: 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73  rs for SSL hands
2650: 68 61 6b 65 2e 20 56 61 6c 69 64 20 6f 70 74 69  hake. Valid opti
2660: 6f 6e 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c  ons are:</p>.<dl
2670: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
2680: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  _options">.<dt><
2690: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
26a0: 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c  >-alpn</b> <i cl
26b0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f  ass="arg">list</
26c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c  i></dt>.<dd><p>L
26d0: 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73  ist of protocols
26e0: 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69 6e 67   to offer during
26f0: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79   Application-Lay
2700: 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f  er Protocol Nego
2710: 74 69 61 74 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20  tiation.(ALPN). 
2720: 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 62 20  For example: <b 
2730: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 32  class="const">h2
2740: 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73  </b> and <b clas
2750: 73 3d 22 63 6f 6e 73 74 22 3e 68 74 74 70 2f 31  s="const">http/1
2760: 2e 31 3c 2f 62 3e 2c 20 62 75 74 20 6e 6f 74 20  .1</b>, but not 
2770: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
2780: 3e 68 33 3c 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c  >h3</b> or.<b cl
2790: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 71 75 69 63  ass="const">quic
27a0: 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  </b>.</p></dd>.<
27b0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
27c0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20  ion">-cadir</b> 
27d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
27e0: 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74  irectory</i></dt
27f0: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69  >.<dd><p>Specifi
2800: 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79  es the directory
2810: 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69   where the Certi
2820: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79  ficate Authority
2830: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74   (CA) certificat
2840: 65 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54  es are.stored. T
2850: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c  he default is pl
2860: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20  atform specific 
2870: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61  and can be set a
2880: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20  t compile time. 
2890: 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61  The.default loca
28a0: 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72  tion can be over
28b0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62  ridden by the <b
28c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
28d0: 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f  ">SSL_CERT_DIR</
28e0: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76  b> environment.v
28f0: 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70  ariable. See <sp
2900: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65  an class="sectre
2910: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  f"><a href="#sec
2920: 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61  tion3">Certifica
2930: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61  te Validation</a
2940: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72  ></span> for mor
2950: 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f  e details.</p></
2960: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
2970: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c  ="option">-cafil
2980: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
2990: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69  arg">filename</i
29a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70  ></dt>.<dd><p>Sp
29b0: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65  ecifies the file
29c0: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66   with the Certif
29d0: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20  icate Authority 
29e0: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65  (CA) certificate
29f0: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63  s to use in.<b c
2a00: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d  lass="const">PEM
2a10: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74  </b> file format
2a20: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
2a30: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
2a40: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c  "file">cert.pem<
2a50: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68  /b>&quot;, in th
2a60: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74  e OpenSSL.direct
2a70: 6f 72 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74  ory. The default
2a80: 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65   file can be ove
2a90: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c  rridden by the <
2aa0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
2ab0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45  e">SSL_CERT_FILE
2ac0: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  </b> environment
2ad0: 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c  .variable. See <
2ae0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
2af0: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
2b00: 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69  ection3">Certifi
2b10: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
2b20: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
2b30: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e  ore details.</p>
2b40: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
2b50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73  ss="option">-cas
2b60: 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  tore</b> <i clas
2b70: 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c  s="arg">URI</i><
2b80: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63  /dt>.<dd><p>Spec
2b90: 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72  ifies the Unifor
2ba0: 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74  m Resource Ident
2bb0: 69 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20  ifier (URI) for 
2bc0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20  the Certificate 
2bd0: 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73  Authority.(CA) s
2be0: 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20  tore, which may 
2bf0: 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74  be a single cont
2c00: 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c  ainer or a catal
2c10: 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73  og of containers
2c20: 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20  ..Starting with 
2c30: 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d  OpenSSL 3.2 on M
2c40: 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74  S Windows, set t
2c50: 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  o &quot;<b class
2c60: 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65  ="const">org.ope
2c70: 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f  nssl.winstore://
2c80: 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73  </b>&quot;.to us
2c90: 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d  e the built-in M
2ca0: 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66  S Windows Certif
2cb0: 69 63 61 74 65 20 53 74 6f 72 65 2e 20 53 65 65  icate Store. See
2cc0: 0a 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65  .<span class="se
2cd0: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22  ctref"><a href="
2ce0: 23 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69  #section3">Certi
2cf0: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f  ficate Validatio
2d00: 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72  n</a></span> for
2d10: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f   more details.</
2d20: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
2d30: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
2d40: 65 72 74 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63  ertfile</b> <i c
2d50: 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e  lass="arg">filen
2d60: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ame</i></dt>.<dd
2d70: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68  ><p>Specifies th
2d80: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69  e name of the fi
2d90: 6c 65 20 77 69 74 68 20 74 68 65 20 63 65 72 74  le with the cert
2da0: 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 69  ificate to use i
2db0: 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61 73 20  n PEM format.as 
2dc0: 74 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e  the local (clien
2dd0: 74 20 6f 72 20 73 65 72 76 65 72 29 20 63 65 72  t or server) cer
2de0: 74 69 66 69 63 61 74 65 2e 20 49 74 20 61 6c 73  tificate. It als
2df0: 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70  o contains the p
2e00: 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f  ublic key.</p></
2e10: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
2e20: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c  ="option">-cert<
2e30: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
2e40: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
2e50: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
2e60: 69 65 73 20 74 68 65 20 63 65 72 74 69 66 69 63  ies the certific
2e70: 61 74 65 20 74 6f 20 75 73 65 20 61 73 20 61 20  ate to use as a 
2e80: 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69  DER encoded stri
2e90: 6e 67 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c  ng (X.509 DER).<
2ea0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
2eb0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
2ec0: 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  cipher</b> <i cl
2ed0: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
2ee0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
2ef0: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c  >Specifies the l
2f00: 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74  ist of ciphers t
2f10: 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e  o use for TLS 1.
2f20: 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20 63 6f  2 and earlier co
2f30: 6e 6e 65 63 74 69 6f 6e 73 2e 0a 53 74 72 69 6e  nnections..Strin
2f40: 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 26 71 75  g is a colon &qu
2f50: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  ot;<b class="con
2f60: 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20  st">:</b>&quot; 
2f70: 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f  separated list o
2f80: 66 20 63 69 70 68 65 72 73 2e 0a 43 69 70 68 65  f ciphers..Ciphe
2f90: 72 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e  rs can be combin
2fa0: 65 64 20 75 73 69 6e 67 20 74 68 65 20 26 71 75  ed using the &qu
2fb0: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  ot;<b class="con
2fc0: 73 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20  st">+</b>&quot; 
2fd0: 63 68 61 72 61 63 74 65 72 2e 0a 50 72 65 66 69  character..Prefi
2fe0: 78 65 73 20 63 61 6e 20 62 65 20 75 73 65 64 20  xes can be used 
2ff0: 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72  to permanently r
3000: 65 6d 6f 76 65 20 26 71 75 6f 74 3b 3c 62 20 63  emove &quot;<b c
3010: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f  lass="const">!</
3020: 62 3e 26 71 75 6f 74 3b 2c 20 64 65 6c 65 74 65  b>&quot;, delete
3030: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
3040: 22 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e 26 71 75  "const">-</b>&qu
3050: 6f 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20  ot;, or.move to 
3060: 74 68 65 20 65 6e 64 20 26 71 75 6f 74 3b 3c 62  the end &quot;<b
3070: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b   class="const">+
3080: 3c 2f 62 3e 26 71 75 6f 74 3b 20 61 20 73 70 65  </b>&quot; a spe
3090: 63 69 66 69 65 64 20 63 69 70 68 65 72 2e 0a 4b  cified cipher..K
30a0: 65 79 77 6f 72 64 73 20 3c 62 20 63 6c 61 73 73  eywords <b class
30b0: 3d 22 63 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47  ="const">@STRENG
30c0: 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20  TH</b> (sort by 
30d0: 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65  algorithm key le
30e0: 6e 67 74 68 29 2c 0a 3c 62 20 63 6c 61 73 73 3d  ngth),.<b class=
30f0: 22 63 6f 6e 73 74 22 3e 40 53 45 43 4c 45 56 45  "const">@SECLEVE
3100: 4c 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e  L=</b><em>n</em>
3110: 20 28 73 65 74 20 73 65 63 75 72 69 74 79 20 6c   (set security l
3120: 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a  evel to n), and.
3130: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
3140: 3e 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73  >DEFAULT</b> (us
3150: 65 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72  e default cipher
3160: 20 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20   list, at start 
3170: 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62  only) can also b
3180: 65 20 73 70 65 63 69 66 69 65 64 2e 0a 53 65 65  e specified..See
3190: 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74   the <a href="ht
31a0: 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73  tps://docs.opens
31b0: 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61  sl.org/master/ma
31c0: 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65  n1/openssl-ciphe
31d0: 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65  rs/#options">Ope
31e0: 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e  nSSL</a>.documen
31f0: 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66  tation for the f
3200: 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69  ull list of vali
3210: 64 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64  d values.</p></d
3220: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
3230: 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72  "option">-cipher
3240: 73 75 69 74 65 73 3c 2f 62 3e 20 3c 69 20 63 6c  suites</b> <i cl
3250: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67  ass="arg">string
3260: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
3270: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c  >Specifies the l
3280: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75  ist of cipher su
3290: 69 74 65 73 20 74 6f 20 75 73 65 20 66 6f 72 20  ites to use for 
32a0: 54 4c 53 20 31 2e 33 20 61 73 20 61 20 63 6f 6c  TLS 1.3 as a col
32b0: 6f 6e 0a 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  on.&quot;<b clas
32c0: 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26  s="const">:</b>&
32d0: 71 75 6f 74 3b 20 73 65 70 61 72 61 74 65 64 20  quot; separated 
32e0: 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73  list of cipher s
32f0: 75 69 74 65 20 6e 61 6d 65 73 2e 20 53 65 65 20  uite names. See 
3300: 74 68 65 0a 3c 61 20 68 72 65 66 3d 22 68 74 74  the.<a href="htt
3310: 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73  ps://docs.openss
3320: 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e  l.org/master/man
3330: 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72  1/openssl-cipher
3340: 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e  s/#options">Open
3350: 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74  SSL</a>.document
3360: 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75  ation for the fu
3370: 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64  ll list of valid
3380: 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64   values.</p></dd
3390: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
33a0: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64  option">-command
33b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
33c0: 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e  rg">callback</i>
33d0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
33e0: 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62  cifies the callb
33f0: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62  ack command to b
3400: 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76  e invoked at sev
3410: 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69  eral points duri
3420: 6e 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65  ng the.handshake
3430: 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c   to pass errors,
3440: 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61   tracing informa
3450: 74 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63  tion, and protoc
3460: 6f 6c 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65  ol messages..See
3470: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65   <span class="se
3480: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22  ctref"><a href="
3490: 23 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62  #section4">Callb
34a0: 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c  ack Options</a><
34b0: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20  /span> for more 
34c0: 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  info.</p></dd>.<
34d0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
34e0: 69 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f  ion">-dhparams</
34f0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
3500: 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f  ">filename</i></
3510: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
3520: 66 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d  fies the Diffie-
3530: 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72  Hellman (DH) par
3540: 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70  ameters file.</p
3550: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
3560: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65  ass="option">-ke
3570: 79 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  yfile</b> <i cla
3580: 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d  ss="arg">filenam
3590: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
35a0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
35b0: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65  private key file
35c0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
35d0: 20 74 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65   to use the file
35e0: 0a 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68  .specified by th
35f0: 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  e <i class="arg"
3600: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 69 3e 20 6f  >-certfile</i> o
3610: 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ption.</p></dd>.
3620: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
3630: 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 3c  tion">-key</b> <
3640: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74  i class="arg">st
3650: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  ring</i></dt>.<d
3660: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
3670: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 74  he private key t
3680: 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65  o use as a DER e
3690: 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 50  ncoded string (P
36a0: 4b 43 53 23 31 20 44 45 52 29 2e 3c 2f 70 3e 3c  KCS#1 DER).</p><
36b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
36c0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6d 6f 64 65  s="option">-mode
36d0: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  l</b> <i class="
36e0: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  arg">channel</i>
36f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72  </dt>.<dd><p>For
3700: 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20  ce this channel 
3710: 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d  to share the sam
3720: 65 20 3c 69 20 63 6c 61 73 73 3d 22 74 65 72 6d  e <i class="term
3730: 22 3e 53 53 4c 5f 43 54 58 3c 2f 69 3e 20 73 74  ">SSL_CTX</i> st
3740: 72 75 63 74 75 72 65 20 61 73 20 74 68 65 0a 73  ructure as the.s
3750: 70 65 63 69 66 69 65 64 20 3c 69 20 63 6c 61 73  pecified <i clas
3760: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
3770: 2f 69 3e 2c 20 61 6e 64 20 74 68 65 72 65 66 6f  /i>, and therefo
3780: 72 65 20 73 68 61 72 65 20 63 6f 6e 66 69 67 2c  re share config,
3790: 20 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 63 2e   callbacks, etc.
37a0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
37b0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
37c0: 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69  -password</b> <i
37d0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c   class="arg">cal
37e0: 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  lback</i></dt>.<
37f0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
3800: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d  the callback com
3810: 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77  mand to invoke w
3820: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64  hen OpenSSL need
3830: 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a 70 61  s to obtain a.pa
3840: 73 73 77 6f 72 64 2e 20 54 68 69 73 20 69 73 20  ssword. This is 
3850: 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74  typically used t
3860: 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69  o unlock the pri
3870: 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65  vate key of a ce
3880: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 65 20 63  rtificate..The c
3890: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72  allback should r
38a0: 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64  eturn a password
38b0: 20 73 74 72 69 6e 67 2e 20 53 65 65 20 3c 73 70   string. See <sp
38c0: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65  an class="sectre
38d0: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63  f"><a href="#sec
38e0: 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b 20  tion4">Callback 
38f0: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61  Options</a></spa
3900: 6e 3e 0a 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f  n>.for more info
3910: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
3920: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3930: 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65  >-post_handshake
3940: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
3950: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
3960: 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20 70  >.<dd><p>Allow p
3970: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73 65  ost-handshake se
3980: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70 64  ssion ticket upd
3990: 61 74 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ates.</p></dd>.<
39a0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
39b0: 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62  ion">-request</b
39c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
39d0: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
39e0: 64 64 3e 3c 70 3e 52 65 71 75 65 73 74 20 61 20  dd><p>Request a 
39f0: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d  certificate from
3a00: 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67   the peer during
3a10: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61   the SSL handsha
3a20: 6b 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64  ke. This is need
3a30: 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69  ed.to do Certifi
3a40: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e  cate Validation.
3a50: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c   Starting in Tcl
3a60: 54 4c 53 20 31 2e 38 2c 20 74 68 65 20 64 65 66  TLS 1.8, the def
3a70: 61 75 6c 74 20 69 73 0a 3c 62 20 63 6c 61 73 73  ault is.<b class
3a80: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62  ="const">true</b
3a90: 3e 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61  >..See <span cla
3aa0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20  ss="sectref"><a 
3ab0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22  href="#section3"
3ac0: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c  >Certificate Val
3ad0: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61  idation</a></spa
3ae0: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61  n> for more deta
3af0: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ils.</p></dd>.<d
3b00: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
3b10: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e  on">-require</b>
3b20: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
3b30: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
3b40: 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 76  d><p>Require a v
3b50: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65  alid certificate
3b60: 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64   from the peer d
3b70: 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61  uring the SSL ha
3b80: 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73  ndshake. If this
3b90: 20 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c   is.set to true,
3ba0: 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22   then <b class="
3bb0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74  option">-request
3bc0: 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62  </b> must also b
3bd0: 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e  e set to true an
3be0: 64 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 6c  d a either.<b cl
3bf0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
3c00: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  dir</b>, <b clas
3c10: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69  s="option">-cafi
3c20: 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  le</b>, <b class
3c30: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f  ="option">-casto
3c40: 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61  re</b>, or a pla
3c50: 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75  tform default.mu
3c60: 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69  st be provided i
3c70: 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64  n order to valid
3c80: 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65  ate against. The
3c90: 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54   default in TclT
3ca0: 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69  LS 1.8 and.earli
3cb0: 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 3c  er versions is <
3cc0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
3cd0: 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20  false</b> since 
3ce0: 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d  not all platform
3cf0: 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61  s have certifica
3d00: 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20  tes to.validate 
3d10: 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72  against in a for
3d20: 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74  m compatible wit
3d30: 68 20 4f 70 65 6e 53 53 4c 2e 0a 53 65 65 20 3c  h OpenSSL..See <
3d40: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74  span class="sect
3d50: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73  ref"><a href="#s
3d60: 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69  ection3">Certifi
3d70: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c  cate Validation<
3d80: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d  /a></span> for m
3d90: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e  ore details.</p>
3da0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
3db0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63  ss="option">-sec
3dc0: 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20  urity_level</b> 
3dd0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69  <i class="arg">i
3de0: 6e 74 65 67 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a  nteger</i></dt>.
3df0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
3e00: 20 74 68 65 20 73 65 63 75 72 69 74 79 20 6c 65   the security le
3e10: 76 65 6c 20 28 76 61 6c 75 65 20 66 72 6f 6d 20  vel (value from 
3e20: 30 20 74 6f 20 35 29 2e 20 54 68 65 20 73 65 63  0 to 5). The sec
3e30: 75 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65  urity level affe
3e40: 63 74 73 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20  cts.the allowed 
3e50: 63 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63  cipher suite enc
3e60: 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68  ryption algorith
3e70: 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43  ms, supported EC
3e80: 43 20 63 75 72 76 65 73 2c 0a 73 75 70 70 6f 72  C curves,.suppor
3e90: 74 65 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c  ted signature al
3ea0: 67 6f 72 69 74 68 6d 73 2c 20 44 48 20 70 61 72  gorithms, DH par
3eb0: 61 6d 65 74 65 72 20 73 69 7a 65 73 2c 20 63 65  ameter sizes, ce
3ec0: 72 74 69 66 69 63 61 74 65 20 6b 65 79 20 73 69  rtificate key si
3ed0: 7a 65 73 0a 61 6e 64 20 73 69 67 6e 61 74 75 72  zes.and signatur
3ee0: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68  e algorithms. Th
3ef0: 65 20 64 65 66 61 75 6c 74 20 69 73 20 31 20 70  e default is 1 p
3f00: 72 69 6f 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20  rior to OpenSSL 
3f10: 33 2e 32 20 61 6e 64 20 32 0a 74 68 65 72 65 61  3.2 and 2.therea
3f20: 66 74 65 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e  fter. Level 3 an
3f30: 64 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65  d higher disable
3f40: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73   support for ses
3f50: 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64  sion tickets and
3f60: 0a 6f 6e 6c 79 20 61 63 63 65 70 74 20 63 69 70  .only accept cip
3f70: 68 65 72 20 73 75 69 74 65 73 20 74 68 61 74 20  her suites that 
3f80: 70 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20  provide forward 
3f90: 73 65 63 72 65 63 79 2e 3c 2f 70 3e 3c 2f 64 64  secrecy.</p></dd
3fa0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
3fb0: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c  option">-server<
3fc0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
3fd0: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e  g">bool</i></dt>
3fe0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65  .<dd><p>Specifie
3ff0: 73 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74  s whether to act
4000: 20 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64   as a server and
4010: 20 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20   respond with a 
4020: 73 65 72 76 65 72 20 68 61 6e 64 73 68 61 6b 65  server handshake
4030: 20 77 68 65 6e 20 61 0a 63 6c 69 65 6e 74 20 63   when a.client c
4040: 6f 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76  onnects and prov
4050: 69 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61  ides a client ha
4060: 6e 64 73 68 61 6b 65 2e 20 54 68 65 20 64 65 66  ndshake. The def
4070: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4080: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
4090: 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  b>.</p></dd>.<dt
40a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
40b0: 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f  n">-servername</
40c0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
40d0: 22 3e 68 6f 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f  ">hostname</i></
40e0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
40f0: 66 79 20 74 68 65 20 70 65 65 72 27 73 20 68 6f  fy the peer's ho
4100: 73 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20  stname. This is 
4110: 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20  used to set the 
4120: 54 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 20  TLS Server Name 
4130: 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 4e 49 29  Indication.(SNI)
4140: 20 65 78 74 65 6e 73 69 6f 6e 2e 20 53 65 74 20   extension. Set 
4150: 74 68 69 73 20 74 6f 20 74 68 65 20 65 78 70 65  this to the expe
4160: 63 74 65 64 20 73 65 72 76 65 72 6e 61 6d 65 20  cted servername 
4170: 69 6e 20 74 68 65 20 73 65 72 76 65 72 27 73 20  in the server's 
4180: 63 65 72 74 69 66 69 63 61 74 65 0a 6f 72 20 6f  certificate.or o
4190: 6e 65 20 6f 66 20 74 68 65 20 53 75 62 6a 65 63  ne of the Subjec
41a0: 74 20 41 6c 74 65 72 6e 61 74 65 20 4e 61 6d 65  t Alternate Name
41b0: 73 20 28 53 41 4e 29 2e 20 53 74 61 72 74 69 6e  s (SAN). Startin
41c0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c  g in TclTLS 2.0,
41d0: 20 74 68 69 73 20 77 69 6c 6c 0a 64 65 66 61 75   this will.defau
41e0: 6c 74 20 74 6f 20 74 68 65 20 68 6f 73 74 20 66  lt to the host f
41f0: 6f 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  or the <b class=
4200: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65  "cmd">tls::socke
4210: 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c 2f  t</b> command.</
4220: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
4230: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
4240: 65 73 73 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69  ession_id</b> <i
4250: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e   class="arg">bin
4260: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f  ary_string</i></
4270: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
4280: 66 69 65 73 20 74 68 65 20 73 65 73 73 69 6f 6e  fies the session
4290: 20 69 64 20 74 6f 20 72 65 73 75 6d 65 20 61 20   id to resume a 
42a0: 73 65 73 73 69 6f 6e 2e 20 4e 6f 74 20 73 75 70  session. Not sup
42b0: 70 6f 72 74 65 64 20 79 65 74 2e 3c 2f 70 3e 3c  ported yet.</p><
42c0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
42d0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c 32  s="option">-ssl2
42e0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
42f0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74  rg">bool</i></dt
4300: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20  >.<dd><p>Enable 
4310: 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 54  use of SSL v2. T
4320: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
4330: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66   class="const">f
4340: 61 6c 73 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a 20  alse</b>. Note: 
4350: 52 65 63 65 6e 74 20 76 65 72 73 69 6f 6e 73 20  Recent versions 
4360: 6f 66 0a 4f 70 65 6e 53 53 4c 20 6e 6f 20 6c 6f  of.OpenSSL no lo
4370: 6e 67 65 72 20 73 75 70 70 6f 72 74 20 53 53 4c  nger support SSL
4380: 76 32 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 20  v2, so this may 
4390: 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 65 66 66  not have any eff
43a0: 65 63 74 2e 20 53 65 65 20 74 68 65 0a 3c 62 20  ect. See the.<b 
43b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
43c0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63  :protocols</b> c
43d0: 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75 70 70 6f  ommand for suppo
43e0: 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c  rted protocols.<
43f0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4400: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4410: 73 73 6c 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ssl3</b> <i clas
4420: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e  s="arg">bool</i>
4430: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61  </dt>.<dd><p>Ena
4440: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76  ble use of SSL v
4450: 33 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69  3. The default i
4460: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  s <b class="cons
4470: 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 20 4e 6f  t">false</b>. No
4480: 74 65 3a 20 52 65 63 65 6e 74 20 76 65 72 73 69  te: Recent versi
4490: 6f 6e 73 0a 6f 66 20 4f 70 65 6e 53 53 4c 20 6d  ons.of OpenSSL m
44a0: 61 79 20 68 61 76 65 20 74 68 69 73 20 64 69 73  ay have this dis
44b0: 61 62 6c 65 64 20 61 74 20 63 6f 6d 70 69 6c 65  abled at compile
44c0: 20 74 69 6d 65 2c 20 73 6f 20 74 68 69 73 20 6d   time, so this m
44d0: 61 79 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 0a  ay not have any.
44e0: 65 66 66 65 63 74 2e 20 53 65 65 20 74 68 65 20  effect. See the 
44f0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
4500: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
4510: 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 75  > command for su
4520: 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c  pported protocol
4530: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
4540: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
4550: 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69 20 63  ">-tls1</b> <i c
4560: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
4570: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
4580: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
4590: 53 20 76 31 2e 20 54 68 65 20 64 65 66 61 75 6c  S v1. The defaul
45a0: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
45b0: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20  onst">true</b>. 
45c0: 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 30 20 6e 65  Note: TLS 1.0 ne
45d0: 65 64 73 0a 53 48 41 31 20 74 6f 20 6f 70 65 72  eds.SHA1 to oper
45e0: 61 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e  ate, which is on
45f0: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20  ly available in 
4600: 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 30  security level 0
4610: 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e   for Open SSL 3.
4620: 30 2b 2e 0a 53 65 65 20 74 68 65 20 3c 69 20 63  0+..See the <i c
4630: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 73 65 63 75  lass="arg">-secu
4640: 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 69 3e 20 6f  rity_level</i> o
4650: 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ption.</p></dd>.
4660: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
4670: 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c 2f 62  tion">-tls1.1</b
4680: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4690: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >bool</i></dt>.<
46a0: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65  dd><p>Enable use
46b0: 20 6f 66 20 54 4c 53 20 76 31 2e 31 2e 20 54 68   of TLS v1.1. Th
46c0: 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20  e default is <b 
46d0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72  class="const">tr
46e0: 75 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a 20 54 4c  ue</b>. Note: TL
46f0: 53 20 31 2e 31 20 6e 65 65 64 73 0a 53 48 41 31  S 1.1 needs.SHA1
4700: 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69   to operate, whi
4710: 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c  ch is only avail
4720: 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69 74 79  able in security
4730: 20 6c 65 76 65 6c 20 30 20 66 6f 72 20 4f 70 65   level 0 for Ope
4740: 6e 20 53 53 4c 20 33 2e 30 2b 2e 0a 53 65 65 20  n SSL 3.0+..See 
4750: 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  the <i class="ar
4760: 67 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76  g">-security_lev
4770: 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 3c 2f  el</i> option.</
4780: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
4790: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74  lass="option">-t
47a0: 6c 73 31 2e 32 3c 2f 62 3e 20 3c 69 20 63 6c 61  ls1.2</b> <i cla
47b0: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69  ss="arg">bool</i
47c0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e  ></dt>.<dd><p>En
47d0: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20  able use of TLS 
47e0: 76 31 2e 32 2e 20 54 68 65 20 64 65 66 61 75 6c  v1.2. The defaul
47f0: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63  t is <b class="c
4800: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c  onst">true</b>.<
4810: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
4820: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
4830: 74 6c 73 31 2e 33 3c 2f 62 3e 20 3c 69 20 63 6c  tls1.3</b> <i cl
4840: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f  ass="arg">bool</
4850: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45  i></dt>.<dd><p>E
4860: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53  nable use of TLS
4870: 20 76 31 2e 33 2e 20 54 68 65 20 64 65 66 61 75   v1.3. The defau
4880: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  lt is <b class="
4890: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e  const">true</b>.
48a0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
48b0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
48c0: 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64  -validatecommand
48d0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
48e0: 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e  rg">callback</i>
48f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65  </dt>.<dd><p>Spe
4900: 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62  cifies the callb
4910: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69  ack command to i
4920: 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 74  nvoke to validat
4930: 65 20 74 68 65 20 70 65 65 72 20 63 65 72 74 69  e the peer certi
4940: 66 69 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 65  ficates.and othe
4950: 72 20 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 75  r config info du
4960: 72 69 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f  ring the protoco
4970: 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68  l negotiation ph
4980: 61 73 65 2e 20 54 68 69 73 20 63 61 6e 20 62 65  ase. This can be
4990: 20 75 73 65 64 0a 62 79 20 54 43 4c 20 73 63 72   used.by TCL scr
49a0: 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20  ipts to perform 
49b0: 74 68 65 69 72 20 6f 77 6e 20 43 65 72 74 69 66  their own Certif
49c0: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e  icate Validation
49d0: 20 74 6f 20 73 75 70 70 6c 65 6d 65 6e 74 20 74   to supplement t
49e0: 68 65 0a 64 65 66 61 75 6c 74 20 76 61 6c 69 64  he.default valid
49f0: 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62  ation provided b
4a00: 79 20 4f 70 65 6e 53 53 4c 2e 20 54 68 65 20 73  y OpenSSL. The s
4a10: 63 72 69 70 74 20 6d 75 73 74 20 72 65 74 75 72  cript must retur
4a20: 6e 20 61 20 62 6f 6f 6c 65 61 6e 20 74 72 75 65  n a boolean true
4a30: 0a 74 6f 20 63 6f 6e 74 69 6e 75 65 20 74 68 65  .to continue the
4a40: 20 6e 65 67 6f 74 69 61 74 69 6f 6e 2e 20 53 65   negotiation. Se
4a50: 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73  e <span class="s
4a60: 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d  ectref"><a href=
4a70: 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c  "#section4">Call
4a80: 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e  back Options</a>
4a90: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
4aa0: 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a   info.</p></dd>.
4ab0: 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  </dl></dd>.<dt><
4ac0: 61 20 6e 61 6d 65 3d 22 35 22 3e 3c 62 20 63 6c  a name="5"><b cl
4ad0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75  ass="cmd">tls::u
4ae0: 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63  nimport</b> <i c
4af0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e  lass="arg">chann
4b00: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  el</i></a></dt>.
4b10: 3c 64 64 3e 3c 70 3e 43 6f 6d 70 6c 69 6d 65 6e  <dd><p>Complimen
4b20: 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63  t to <b class="c
4b30: 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c  md">tls::import<
4b40: 2f 62 3e 2e 20 55 73 65 64 20 74 6f 20 72 65 6d  /b>. Used to rem
4b50: 6f 76 65 20 74 68 65 20 74 6f 70 20 6c 65 76 65  ove the top leve
4b60: 6c 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65  l stacked channe
4b70: 6c 0a 66 72 6f 6d 20 3c 69 20 63 6c 61 73 73 3d  l.from <i class=
4b80: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
4b90: 3e 2e 20 54 68 69 73 20 75 6e 73 74 61 63 6b 73  >. This unstacks
4ba0: 20 74 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20   the encryption 
4bb0: 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c  of a regular TCL
4bc0: 20 63 68 61 6e 6e 65 6c 2e 20 41 6e 0a 65 72 72   channel. An.err
4bd0: 6f 72 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20  or is thrown if 
4be0: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74  TLS is not the t
4bf0: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e  op stacked chann
4c00: 65 6c 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64  el type.</p></dd
4c10: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 36  >.<dt><a name="6
4c20: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
4c30: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c  >tls::handshake<
4c40: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
4c50: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f  g">channel</i></
4c60: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46  a></dt>.<dd><p>F
4c70: 6f 72 63 65 73 20 74 68 65 20 54 4c 53 20 6e 65  orces the TLS ne
4c80: 67 6f 74 69 61 74 69 6f 6e 20 68 61 6e 64 73 68  gotiation handsh
4c90: 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c 61 63  ake to take plac
4ca0: 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 2c 20 61  e immediately, a
4cb0: 6e 64 20 72 65 74 75 72 6e 73 20 30 0a 69 66 20  nd returns 0.if 
4cc0: 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69  handshake is sti
4cd0: 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28  ll in progress (
4ce0: 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f  non-blocking), o
4cf0: 72 20 31 20 69 66 20 74 68 65 20 68 61 6e 64 73  r 1 if the hands
4d00: 68 61 6b 65 20 77 61 73 0a 73 75 63 63 65 73 73  hake was.success
4d10: 66 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64  ful. If the hand
4d20: 73 68 61 6b 65 20 66 61 69 6c 65 64 2c 20 61 6e  shake failed, an
4d30: 20 65 72 72 6f 72 20 77 69 6c 6c 20 62 65 20 72   error will be r
4d40: 65 74 75 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64  eturned.</p></dd
4d50: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 37  >.<dt><a name="7
4d60: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  "><b class="cmd"
4d70: 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e  >tls::status</b>
4d80: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
4d90: 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70  t">?<b class="op
4da0: 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e  tion">-local</b>
4db0: 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73  ?</span> <i clas
4dc0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c  s="arg">channel<
4dd0: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64  /i></a></dt>.<dd
4de0: 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20  ><p>Returns the 
4df0: 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f  current status o
4e00: 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c  f an SSL channel
4e10: 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20  . The result is 
4e20: 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61  a list of key-va
4e30: 6c 75 65 0a 70 61 69 72 73 20 64 65 73 63 72 69  lue.pairs descri
4e40: 62 69 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65  bing the SSL, ce
4e50: 72 74 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63  rtificate, and c
4e60: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66  ertificate verif
4e70: 69 63 61 74 69 6f 6e 20 73 74 61 74 75 73 2e 20  ication status. 
4e80: 49 66 0a 74 68 65 20 53 53 4c 20 68 61 6e 64 73  If.the SSL hands
4e90: 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74  hake has not yet
4ea0: 20 63 6f 6d 70 6c 65 74 65 64 2c 20 61 6e 20 65   completed, an e
4eb0: 6d 70 74 79 20 6c 69 73 74 20 69 73 20 72 65 74  mpty list is ret
4ec0: 75 72 6e 65 64 2e 20 49 66 20 74 68 65 0a 3c 62  urned. If the.<b
4ed0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
4ee0: 2d 6c 6f 63 61 6c 3c 2f 62 3e 20 6f 70 74 69 6f  -local</b> optio
4ef0: 6e 20 69 73 20 73 70 65 63 69 66 69 65 64 2c 20  n is specified, 
4f00: 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63  then the local c
4f10: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 75 73  ertificate is us
4f20: 65 64 2e 20 52 65 74 75 72 6e 65 64 0a 76 61 6c  ed. Returned.val
4f30: 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e  ues include:</p>
4f40: 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f  .<p>SSL Status</
4f50: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
4f60: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
4f70: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
4f80: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70  s="variable">alp
4f90: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
4fa0: 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69  arg">protocol</i
4fb0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
4fc0: 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63  e protocol selec
4fd0: 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63  ted after Applic
4fe0: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74  ation-Layer Prot
4ff0: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e  ocol Negotiation
5000: 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64   (ALPN).</p></dd
5010: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5020: 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72  variable">cipher
5030: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5040: 72 67 22 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f  rg">cipher</i></
5050: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63  dt>.<dd><p>The c
5060: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e  urrent cipher in
5070: 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 65 73   use for the ses
5080: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  sion.</p></dd>.<
5090: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
50a0: 69 61 62 6c 65 22 3e 70 65 65 72 6e 61 6d 65 3c  iable">peername<
50b0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
50c0: 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e  g">name</i></dt>
50d0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 65 65 72  .<dd><p>The peer
50e0: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65  name from the ce
50f0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f  rtificate.</p></
5100: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5110: 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 72 6f 74  ="variable">prot
5120: 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ocol</b> <i clas
5130: 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c  s="arg">version<
5140: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5150: 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72  The protocol ver
5160: 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68  sion used for th
5170: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53  e connection: SS
5180: 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20  L2, SSL3, TLS1, 
5190: 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20  TLS1.1, TLS1.2, 
51a0: 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f  TLS1.3, or unkno
51b0: 77 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  wn.</p></dd>.<dt
51c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
51d0: 62 6c 65 22 3e 73 62 69 74 73 3c 2f 62 3e 20 3c  ble">sbits</b> <
51e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c  i class="arg">n<
51f0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5200: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 62 69  The number of bi
5210: 74 73 20 75 73 65 64 20 66 6f 72 20 74 68 65 20  ts used for the 
5220: 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c 2f 70 3e  session key.</p>
5230: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
5240: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69  ss="variable">si
5250: 67 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f 72  gnatureHashAlgor
5260: 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ithm</b> <i clas
5270: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68  s="arg">algorith
5280: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  m</i></dt>.<dd><
5290: 70 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20  p>The signature 
52a0: 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e 3c  hash algorithm.<
52b0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
52c0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
52d0: 3e 73 69 67 6e 61 74 75 72 65 54 79 70 65 3c 2f  >signatureType</
52e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
52f0: 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">type</i></dt>.
5300: 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e 61  <dd><p>The signa
5310: 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 2e  ture type value.
5320: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5330: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5340: 22 3e 76 65 72 69 66 79 44 65 70 74 68 3c 2f 62  ">verifyDepth</b
5350: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5360: 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  >n</i></dt>.<dd>
5370: 3c 70 3e 4d 61 78 69 6d 75 6d 20 64 65 70 74 68  <p>Maximum depth
5380: 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69   for the certifi
5390: 63 61 74 65 20 63 68 61 69 6e 20 76 65 72 69 66  cate chain verif
53a0: 69 63 61 74 69 6f 6e 2e 20 44 65 66 61 75 6c 74  ication. Default
53b0: 20 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 6b   is -1, to check
53c0: 20 61 6c 6c 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   all.</p></dd>.<
53d0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
53e0: 69 61 62 6c 65 22 3e 76 65 72 69 66 79 4d 6f 64  iable">verifyMod
53f0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
5400: 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64  arg">list</i></d
5410: 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f  t>.<dd><p>List o
5420: 66 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65  f certificate ve
5430: 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 73  rification modes
5440: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5450: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5460: 65 22 3e 76 65 72 69 66 79 52 65 73 75 6c 74 3c  e">verifyResult<
5470: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5480: 67 22 3e 72 65 73 75 6c 74 3c 2f 69 3e 3c 2f 64  g">result</i></d
5490: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66  t>.<dd><p>Certif
54a0: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69  icate verificati
54b0: 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 70 3e 3c 2f  on result.</p></
54c0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
54d0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61 5f 6e  ="variable">ca_n
54e0: 61 6d 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ames</b> <i clas
54f0: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e  s="arg">list</i>
5500: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73  </dt>.<dd><p>Lis
5510: 74 20 6f 66 20 74 68 65 20 43 65 72 74 69 66 69  t of the Certifi
5520: 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73  cate Authorities
5530: 20 75 73 65 64 20 74 6f 20 63 72 65 61 74 65 20   used to create 
5540: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e  the certificate.
5550: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a  </p></dd>.</dl>.
5560: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 53  <p>Certificate S
5570: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c  tatus</p>.<dl cl
5580: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65  ass="doctools_de
5590: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  finitions">.<dt>
55a0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
55b0: 6c 65 22 3e 61 6c 6c 3c 2f 62 3e 20 3c 69 20 63  le">all</b> <i c
55c0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e  lass="arg">strin
55d0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
55e0: 70 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65  p>Dump of all ce
55f0: 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 2e 3c  rtificate info.<
5600: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
5610: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5620: 3e 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20  >version</b> <i 
5630: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75  class="arg">valu
5640: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
5650: 70 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 74  p>The certificat
5660: 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f  e version.</p></
5670: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5680: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 72 69  ="variable">seri
5690: 61 6c 4e 75 6d 62 65 72 3c 2f 62 3e 20 3c 69 20  alNumber</b> <i 
56a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
56b0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
56c0: 3c 70 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75  <p>The serial nu
56d0: 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 72 74  mber of the cert
56e0: 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78  ificate as a hex
56f0: 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64   string.</p></dd
5700: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5710: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74  variable">signat
5720: 75 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ure</b> <i class
5730: 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d  ="arg">algorithm
5740: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
5750: 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68  >Cipher algorith
5760: 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69  m used for certi
5770: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65  ficate signature
5780: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5790: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
57a0: 65 22 3e 69 73 73 75 65 72 3c 2f 62 3e 20 3c 69  e">issuer</b> <i
57b0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
57c0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
57d0: 3e 3c 70 3e 54 68 65 20 64 69 73 74 69 6e 67 75  ><p>The distingu
57e0: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20  ished name (DN) 
57f0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
5800: 74 65 20 69 73 73 75 65 72 2e 3c 2f 70 3e 3c 2f  te issuer.</p></
5810: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5820: 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 6f 74 42  ="variable">notB
5830: 65 66 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  efore</b> <i cla
5840: 73 73 3d 22 61 72 67 22 3e 64 61 74 65 3c 2f 69  ss="arg">date</i
5850: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
5860: 65 20 62 65 67 69 6e 6e 69 6e 67 20 64 61 74 65  e beginning date
5870: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63   of the certific
5880: 61 74 65 20 76 61 6c 69 64 69 74 79 2e 3c 2f 70  ate validity.</p
5890: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
58a0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e  ass="variable">n
58b0: 6f 74 41 66 74 65 72 3c 2f 62 3e 20 3c 69 20 63  otAfter</b> <i c
58c0: 6c 61 73 73 3d 22 61 72 67 22 3e 64 61 74 65 3c  lass="arg">date<
58d0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
58e0: 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e 20 64  The expiration d
58f0: 61 74 65 20 6f 66 20 74 68 65 20 63 65 72 74 69  ate of the certi
5900: 66 69 63 61 74 65 20 76 61 6c 69 64 69 74 79 2e  ficate validity.
5910: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5920: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5930: 22 3e 73 75 62 6a 65 63 74 3c 2f 62 3e 20 3c 69  ">subject</b> <i
5940: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
5950: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
5960: 3e 3c 70 3e 54 68 65 20 64 69 73 74 69 6e 67 75  ><p>The distingu
5970: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20  ished name (DN) 
5980: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
5990: 74 65 20 73 75 62 6a 65 63 74 2e 20 46 69 65 6c  te subject. Fiel
59a0: 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d  ds include: Comm
59b0: 6f 6e 0a 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72  on.Name (CN), Or
59c0: 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20  ganization (O), 
59d0: 4c 6f 63 61 6c 69 74 79 20 6f 72 20 43 69 74 79  Locality or City
59e0: 20 28 4c 29 2c 20 53 74 61 74 65 20 6f 72 20 50   (L), State or P
59f0: 72 6f 76 69 6e 63 65 20 28 53 29 2c 20 61 6e 64  rovince (S), and
5a00: 0a 43 6f 75 6e 74 72 79 20 4e 61 6d 65 20 28 43  .Country Name (C
5a10: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  ).</p></dd>.<dt>
5a20: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5a30: 6c 65 22 3e 69 73 73 75 65 72 55 6e 69 71 75 65  le">issuerUnique
5a40: 49 44 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ID</b> <i class=
5a50: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
5a60: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
5a70: 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 20 69   issuer unique i
5a80: 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  d.</p></dd>.<dt>
5a90: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5aa0: 6c 65 22 3e 73 75 62 6a 65 63 74 55 6e 69 71 75  le">subjectUniqu
5ab0: 65 49 44 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  eID</b> <i class
5ac0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
5ad0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
5ae0: 65 20 73 75 62 6a 65 63 74 20 75 6e 69 71 75 65  e subject unique
5af0: 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64   id.</p></dd>.<d
5b00: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5b10: 61 62 6c 65 22 3e 6e 75 6d 5f 65 78 74 65 6e 73  able">num_extens
5b20: 69 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  ions</b> <i clas
5b30: 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64  s="arg">n</i></d
5b40: 74 3e 0a 3c 64 64 3e 3c 70 3e 4e 75 6d 62 65 72  t>.<dd><p>Number
5b50: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20   of certificate 
5b60: 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 70 3e 3c  extensions.</p><
5b70: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5b80: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 65 78 74  s="variable">ext
5b90: 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63  ensions</b> <i c
5ba0: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c  lass="arg">list<
5bb0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5bc0: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63  List of certific
5bd0: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61  ate extension na
5be0: 6d 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  mes.</p></dd>.<d
5bf0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5c00: 61 62 6c 65 22 3e 61 75 74 68 6f 72 69 74 79 4b  able">authorityK
5c10: 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e  eyIdentifier</b>
5c20: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
5c30: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
5c40: 3c 64 64 3e 3c 70 3e 41 75 74 68 6f 72 69 74 79  <dd><p>Authority
5c50: 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 20   Key Identifier 
5c60: 28 41 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73  (AKI) of the Iss
5c70: 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 63  uing CA certific
5c80: 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 20  ate that signed 
5c90: 74 68 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63  the.SSL certific
5ca0: 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72  ate as a hex str
5cb0: 69 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20  ing. This value 
5cc0: 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 20  matches the SKI 
5cd0: 76 61 6c 75 65 20 6f 66 20 74 68 65 0a 49 6e 74  value of the.Int
5ce0: 65 72 6d 65 64 69 61 74 65 20 43 41 20 63 65 72  ermediate CA cer
5cf0: 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64  tificate.</p></d
5d00: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5d10: 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65  "variable">subje
5d20: 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c  ctKeyIdentifier<
5d30: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5d40: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
5d50: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 75 62 6a 65 63  t>.<dd><p>Subjec
5d60: 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72  t Key Identifier
5d70: 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66 20 74   (SKI) hash of t
5d80: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69 6e  he public key in
5d90: 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66 69  side the certifi
5da0: 63 61 74 65 20 61 73 20 61 0a 68 65 78 20 73 74  cate as a.hex st
5db0: 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64  ring. Used to id
5dc0: 65 6e 74 69 66 79 20 63 65 72 74 69 66 69 63 61  entify certifica
5dd0: 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e  tes that contain
5de0: 20 61 20 70 61 72 74 69 63 75 6c 61 72 20 70 75   a particular pu
5df0: 62 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64  blic key.</p></d
5e00: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5e10: 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65  "variable">subje
5e20: 63 74 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 3c 69  ctAltName</b> <i
5e30: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73   class="arg">lis
5e40: 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  t</i></dt>.<dd><
5e50: 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66  p>List of all of
5e60: 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74   the Subject Alt
5e70: 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 28  ernative Names (
5e80: 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 64  SAN) including d
5e90: 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62  omain names, sub
5ea0: 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 50  .domains, and IP
5eb0: 20 61 64 64 72 65 73 73 65 73 20 74 68 61 74 20   addresses that 
5ec0: 61 72 65 20 73 65 63 75 72 65 64 20 62 79 20 74  are secured by t
5ed0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  he certificate.<
5ee0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
5ef0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5f00: 3e 6f 63 73 70 3c 2f 62 3e 20 3c 69 20 63 6c 61  >ocsp</b> <i cla
5f10: 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69  ss="arg">list</i
5f20: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69  ></dt>.<dd><p>Li
5f30: 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65  st of all Online
5f40: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61   Certificate Sta
5f50: 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43  tus Protocol (OC
5f60: 53 50 29 20 55 52 4c 73 20 74 68 61 74 20 63 61  SP) URLs that ca
5f70: 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 63 68 65  n be used to.che
5f80: 63 6b 20 74 68 65 20 76 61 6c 69 64 69 74 79 20  ck the validity 
5f90: 6f 66 20 74 68 69 73 20 63 65 72 74 69 66 69 63  of this certific
5fa0: 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ate.</p></dd>.<d
5fb0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
5fc0: 61 62 6c 65 22 3e 63 65 72 74 69 66 69 63 61 74  able">certificat
5fd0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  e</b> <i class="
5fe0: 61 72 67 22 3e 63 65 72 74 3c 2f 69 3e 3c 2f 64  arg">cert</i></d
5ff0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 50 45  t>.<dd><p>The PE
6000: 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 74 69 66  M encoded certif
6010: 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  icate.</p></dd>.
6020: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6030: 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72  riable">signatur
6040: 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c  eAlgorithm</b> <
6050: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c  i class="arg">al
6060: 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e  gorithm</i></dt>
6070: 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 20 61  .<dd><p>Cipher a
6080: 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f  lgorithm used fo
6090: 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  r the certificat
60a0: 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 70 3e  e signature.</p>
60b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
60c0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69  ss="variable">si
60d0: 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f 62 3e  gnatureValue</b>
60e0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
60f0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
6100: 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61  <dd><p>Certifica
6110: 74 65 20 73 69 67 6e 61 74 75 72 65 20 61 73 20  te signature as 
6120: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 70  a hex string.</p
6130: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6140: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
6150: 69 67 6e 61 74 75 72 65 44 69 67 65 73 74 3c 2f  ignatureDigest</
6160: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6170: 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64  ">version</i></d
6180: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66  t>.<dd><p>Certif
6190: 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64 69  icate signing di
61a0: 67 65 73 74 20 61 73 20 61 20 68 65 78 20 73 74  gest as a hex st
61b0: 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ring.</p></dd>.<
61c0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
61d0: 69 61 62 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79  iable">publicKey
61e0: 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69  Algorithm</b> <i
61f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67   class="arg">alg
6200: 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a  orithm</i></dt>.
6210: 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61  <dd><p>Certifica
6220: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62  te signature pub
6230: 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68  lic key algorith
6240: 6d 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  m.</p></dd>.<dt>
6250: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6260: 6c 65 22 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 62  le">publicKey</b
6270: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6280: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  >string</i></dt>
6290: 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63  .<dd><p>Certific
62a0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75  ate signature pu
62b0: 62 6c 69 63 20 6b 65 79 20 61 73 20 61 20 68 65  blic key as a he
62c0: 78 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64  x string.</p></d
62d0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
62e0: 22 76 61 72 69 61 62 6c 65 22 3e 62 69 74 73 3c  "variable">bits<
62f0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6300: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  g">n</i></dt>.<d
6310: 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 62  d><p>Number of b
6320: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 72  its used for cer
6330: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
6340: 72 65 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e  re key.</p></dd>
6350: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6360: 61 72 69 61 62 6c 65 22 3e 73 65 6c 66 5f 73 69  ariable">self_si
6370: 67 6e 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  gned</b> <i clas
6380: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c  s="arg">boolean<
6390: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
63a0: 57 68 65 74 68 65 72 20 74 68 65 20 63 65 72 74  Whether the cert
63b0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
63c0: 65 20 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64  e is self signed
63d0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
63e0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
63f0: 65 22 3e 73 68 61 31 5f 68 61 73 68 3c 2f 62 3e  e">sha1_hash</b>
6400: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6410: 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  hash</i></dt>.<d
6420: 64 3e 3c 70 3e 54 68 65 20 53 48 41 31 20 68 61  d><p>The SHA1 ha
6430: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
6440: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
6450: 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  tring.</p></dd>.
6460: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6470: 72 69 61 62 6c 65 22 3e 73 68 61 32 35 36 5f 68  riable">sha256_h
6480: 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ash</b> <i class
6490: 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c  ="arg">hash</i><
64a0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
64b0: 53 48 41 32 35 36 20 68 61 73 68 20 6f 66 20 74  SHA256 hash of t
64c0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61  he certificate a
64d0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c  s a hex string.<
64e0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
64f0: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  dd>.<dt><a name=
6500: 22 38 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  "8"><b class="cm
6510: 64 22 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  d">tls::connecti
6520: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  on</b> <i class=
6530: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69  "arg">channel</i
6540: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  ></a></dt>.<dd><
6550: 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75  p>Returns the cu
6560: 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  rrent connection
6570: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
6580: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72  L channel. The r
6590: 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 0a  esult is a list.
65a0: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69  of key-value pai
65b0: 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 68  rs describing th
65c0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 20 52 65  e connection. Re
65d0: 74 75 72 6e 65 64 20 76 61 6c 75 65 73 20 69 6e  turned values in
65e0: 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53  clude:</p>.<p>SS
65f0: 4c 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c  L Status</p>.<dl
6600: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73   class="doctools
6610: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c  _definitions">.<
6620: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6630: 69 61 62 6c 65 22 3e 73 74 61 74 65 3c 2f 62 3e  iable">state</b>
6640: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
6650: 73 74 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  state</i></dt>.<
6660: 64 64 3e 3c 70 3e 53 74 61 74 65 20 6f 66 20 74  dd><p>State of t
6670: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f  he connection.</
6680: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6690: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
66a0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c  servername</b> <
66b0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61  i class="arg">na
66c0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  me</i></dt>.<dd>
66d0: 3c 70 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74  <p>The name of t
66e0: 68 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20  he connected to 
66f0: 73 65 72 76 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  server.</p></dd>
6700: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6710: 61 72 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f  ariable">protoco
6720: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  l</b> <i class="
6730: 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e  arg">version</i>
6740: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
6750: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f   protocol versio
6760: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63  n used for the c
6770: 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c  onnection: SSL2,
6780: 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53   SSL3, TLS1, TLS
6790: 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53  1.1, TLS1.2, TLS
67a0: 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e  1.3, or unknown.
67b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
67c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
67d0: 22 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f  ">renegotiation_
67e0: 61 6c 6c 6f 77 65 64 3c 2f 62 3e 20 3c 69 20 63  allowed</b> <i c
67f0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65  lass="arg">boole
6800: 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  an</i></dt>.<dd>
6810: 3c 70 3e 57 68 65 74 68 65 72 20 70 72 6f 74 6f  <p>Whether proto
6820: 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 6f  col renegotiatio
6830: 6e 20 69 73 20 73 75 70 70 6f 72 74 65 64 20 6f  n is supported o
6840: 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  r not.</p></dd>.
6850: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6860: 72 69 61 62 6c 65 22 3e 73 65 63 75 72 69 74 79  riable">security
6870: 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c  _level</b> <i cl
6880: 61 73 73 3d 22 61 72 67 22 3e 6c 65 76 65 6c 3c  ass="arg">level<
6890: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
68a0: 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76  The security lev
68b0: 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65  el used for sele
68c0: 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73  ction of ciphers
68d0: 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e  , key size, etc.
68e0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
68f0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6900: 22 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64  ">session_reused
6910: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6920: 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c  rg">boolean</i><
6930: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74  /dt>.<dd><p>Whet
6940: 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20  her the session 
6950: 68 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 20  has been reused 
6960: 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e  or not.</p></dd>
6970: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6980: 61 72 69 61 62 6c 65 22 3e 69 73 5f 73 65 72 76  ariable">is_serv
6990: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  er</b> <i class=
69a0: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69  "arg">boolean</i
69b0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68  ></dt>.<dd><p>Wh
69c0: 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63  ether the connec
69d0: 74 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72  tion is configur
69e0: 65 64 20 61 73 20 61 20 73 65 72 76 65 72 20 28  ed as a server (
69f0: 31 29 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29  1) or client (0)
6a00: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
6a10: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
6a20: 65 22 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f  e">compression</
6a30: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6a40: 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">mode</i></dt>.
6a50: 3c 64 64 3e 3c 70 3e 43 6f 6d 70 72 65 73 73 69  <dd><p>Compressi
6a60: 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f  on method.</p></
6a70: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6a80: 3d 22 76 61 72 69 61 62 6c 65 22 3e 65 78 70 61  ="variable">expa
6a90: 6e 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61  nsion</b> <i cla
6aa0: 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69  ss="arg">mode</i
6ab0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 78  ></dt>.<dd><p>Ex
6ac0: 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c  pansion method.<
6ad0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6ae0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6af0: 3e 63 61 4c 69 73 74 3c 2f 62 3e 20 3c 69 20 63  >caList</b> <i c
6b00: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c  lass="arg">list<
6b10: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6b20: 4c 69 73 74 20 6f 66 20 43 65 72 74 69 66 69 63  List of Certific
6b30: 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20  ate Authorities 
6b40: 28 43 41 29 20 66 6f 72 20 58 2e 35 30 39 20 63  (CA) for X.509 c
6b50: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c  ertificate.</p><
6b60: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 69  /dd>.</dl>.<p>Ci
6b70: 70 68 65 72 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64  pher Info</p>.<d
6b80: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
6b90: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a  s_definitions">.
6ba0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6bb0: 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f  riable">cipher</
6bc0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6bd0: 22 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74  ">cipher</i></dt
6be0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75 72  >.<dd><p>The cur
6bf0: 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75  rent cipher in u
6c00: 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65  se for the conne
6c10: 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  ction.</p></dd>.
6c20: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6c30: 72 69 61 62 6c 65 22 3e 73 74 61 6e 64 61 72 64  riable">standard
6c40: 5f 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  _name</b> <i cla
6c50: 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69  ss="arg">name</i
6c60: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
6c70: 65 20 73 74 61 6e 64 61 72 64 20 52 46 43 20 6e  e standard RFC n
6c80: 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f  ame of cipher.</
6c90: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6ca0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6cb0: 61 6c 67 6f 72 69 74 68 6d 5f 62 69 74 73 3c 2f  algorithm_bits</
6cc0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6cd0: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ">n</i></dt>.<dd
6ce0: 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f  ><p>The number o
6cf0: 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 74 73  f processed bits
6d00: 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 72   used for cipher
6d10: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
6d20: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
6d30: 65 22 3e 73 65 63 72 65 74 5f 62 69 74 73 3c 2f  e">secret_bits</
6d40: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
6d50: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ">n</i></dt>.<dd
6d60: 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f  ><p>The number o
6d70: 66 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73  f secret bits us
6d80: 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f  ed for cipher.</
6d90: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6da0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6db0: 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f 62 3e 20  min_version</b> 
6dc0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76  <i class="arg">v
6dd0: 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a  ersion</i></dt>.
6de0: 3c 64 64 3e 3c 70 3e 54 68 65 20 6d 69 6e 69 6d  <dd><p>The minim
6df0: 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  um protocol vers
6e00: 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 2e 3c  ion for cipher.<
6e10: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6e20: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6e30: 3e 63 69 70 68 65 72 5f 69 73 5f 61 65 61 64 3c  >cipher_is_aead<
6e40: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6e50: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f  g">boolean</i></
6e60: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68  dt>.<dd><p>Wheth
6e70: 65 72 20 74 68 65 20 63 69 70 68 65 72 20 69 73  er the cipher is
6e80: 20 41 75 74 68 65 6e 74 69 63 61 74 65 64 20 45   Authenticated E
6e90: 6e 63 72 79 70 74 69 6f 6e 20 77 69 74 68 20 41  ncryption with A
6ea0: 73 73 6f 63 69 61 74 65 64 20 44 61 74 61 20 28  ssociated Data (
6eb0: 41 45 41 44 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  AEAD).</p></dd>.
6ec0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6ed0: 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 5f 69  riable">cipher_i
6ee0: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  d</b> <i class="
6ef0: 61 72 67 22 3e 69 64 3c 2f 69 3e 3c 2f 64 74 3e  arg">id</i></dt>
6f00: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 4f 70 65 6e  .<dd><p>The Open
6f10: 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f  SSL cipher id.</
6f20: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
6f30: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
6f40: 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 62 3e 20  description</b> 
6f50: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
6f60: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
6f70: 64 64 3e 3c 70 3e 41 20 74 65 78 74 20 64 65 73  dd><p>A text des
6f80: 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 65 20  cription of the 
6f90: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
6fa0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6fb0: 61 72 69 61 62 6c 65 22 3e 68 61 6e 64 73 68 61  ariable">handsha
6fc0: 6b 65 5f 64 69 67 65 73 74 3c 2f 62 3e 20 3c 69  ke_digest</b> <i
6fd0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
6fe0: 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  lean</i></dt>.<d
6ff0: 64 3e 3c 70 3e 44 69 67 65 73 74 20 75 73 65 64  d><p>Digest used
7000: 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b   during handshak
7010: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  e.</p></dd>.</dl
7020: 3e 0a 3c 70 3e 53 65 73 73 69 6f 6e 20 49 6e 66  >.<p>Session Inf
7030: 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  o</p>.<dl class=
7040: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69  "doctools_defini
7050: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63  tions">.<dt><b c
7060: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
7070: 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  alpn</b> <i clas
7080: 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c  s="arg">protocol
7090: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
70a0: 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65  >The protocol se
70b0: 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70 70  lected after App
70c0: 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50  lication-Layer P
70d0: 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74  rotocol Negotiat
70e0: 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e 3c  ion (ALPN).</p><
70f0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
7100: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 72 65 73  s="variable">res
7110: 75 6d 61 62 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c  umable</b> <i cl
7120: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61  ass="arg">boolea
7130: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
7140: 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 73 65  p>Whether the se
7150: 73 73 69 6f 6e 20 63 61 6e 20 62 65 20 72 65 73  ssion can be res
7160: 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e  umed or not.</p>
7170: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7180: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 74  ss="variable">st
7190: 61 72 74 5f 74 69 6d 65 3c 2f 62 3e 20 3c 69 20  art_time</b> <i 
71a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f  class="arg">seco
71b0: 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  nds</i></dt>.<dd
71c0: 3e 3c 70 3e 54 69 6d 65 20 73 69 6e 63 65 20 73  ><p>Time since s
71d0: 65 73 73 69 6f 6e 20 73 74 61 72 74 65 64 20 69  ession started i
71e0: 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 65 20  n seconds since 
71f0: 65 70 6f 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  epoch.</p></dd>.
7200: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7210: 72 69 61 62 6c 65 22 3e 74 69 6d 65 6f 75 74 3c  riable">timeout<
7220: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7230: 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f  g">seconds</i></
7240: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 20 64  dt>.<dd><p>Max d
7250: 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 73 69  uration of sessi
7260: 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 62 65  on in seconds be
7270: 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f  fore time-out.</
7280: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
7290: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
72a0: 6c 69 66 65 74 69 6d 65 3c 2f 62 3e 20 3c 69 20  lifetime</b> <i 
72b0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f  class="arg">seco
72c0: 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  nds</i></dt>.<dd
72d0: 3e 3c 70 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b  ><p>Session tick
72e0: 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e 74  et lifetime hint
72f0: 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e   in seconds.</p>
7300: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7310: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
7320: 73 73 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20  ssion_id</b> <i 
7330: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61  class="arg">bina
7340: 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  ry_string</i></d
7350: 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65  t>.<dd><p>Unique
7360: 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20   session id for 
7370: 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20  use in resuming 
7380: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e  the session.</p>
7390: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
73a0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
73b0: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62 3e  ssion_ticket</b>
73c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
73d0: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69  binary_string</i
73e0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e  ></dt>.<dd><p>Un
73f0: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63  ique session tic
7400: 6b 65 74 20 66 6f 72 20 75 73 65 20 69 6e 20 72  ket for use in r
7410: 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73  esuming the sess
7420: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ion.</p></dd>.<d
7430: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7440: 61 62 6c 65 22 3e 74 69 63 6b 65 74 5f 61 70 70  able">ticket_app
7450: 5f 64 61 74 61 3c 2f 62 3e 20 3c 69 20 63 6c 61  _data</b> <i cla
7460: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f  ss="arg">binary_
7470: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a  string</i></dt>.
7480: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65  <dd><p>Unique se
7490: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70  ssion ticket app
74a0: 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f  lication data.</
74b0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
74c0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
74d0: 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 62 3e 20 3c  master_key</b> <
74e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69  i class="arg">bi
74f0: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c  nary_string</i><
7500: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71  /dt>.<dd><p>Uniq
7510: 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65  ue session maste
7520: 72 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  r key.</p></dd>.
7530: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
7540: 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f  riable">session_
7550: 63 61 63 68 65 5f 6d 6f 64 65 3c 2f 62 3e 20 3c  cache_mode</b> <
7560: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f  i class="arg">mo
7570: 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  de</i></dt>.<dd>
7580: 3c 70 3e 53 65 72 76 65 72 20 63 61 63 68 65 20  <p>Server cache 
7590: 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c 20 73 65  mode (client, se
75a0: 72 76 65 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c  rver, or both).<
75b0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f  /p></dd>.</dl></
75c0: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d  dd>.<dt><a name=
75d0: 22 39 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  "9"><b class="cm
75e0: 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c  d">tls::ciphers<
75f0: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d  /b> <span class=
7600: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d  "opt">?<i class=
7610: 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  "arg">protocol</
7620: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e  i>?</span> <span
7630: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69   class="opt">?<i
7640: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72   class="arg">ver
7650: 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  bose</i>?</span>
7660: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
7670: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
7680: 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e  g">supported</i>
7690: 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74  ?</span></a></dt
76a0: 3e 0a 3c 64 64 3e 3c 70 3e 57 69 74 68 6f 75 74  >.<dd><p>Without
76b0: 20 61 6e 79 20 61 72 67 73 2c 20 72 65 74 75 72   any args, retur
76c0: 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c  ns a list of all
76d0: 20 73 79 6d 6d 65 74 72 69 63 20 63 69 70 68 65   symmetric ciphe
76e0: 72 73 20 66 6f 72 20 75 73 65 20 77 69 74 68 20  rs for use with 
76f0: 74 68 65 0a 3c 69 20 63 6c 61 73 73 3d 22 61 72  the.<i class="ar
7700: 67 22 3e 2d 63 69 70 68 65 72 3c 2f 69 3e 20 6f  g">-cipher</i> o
7710: 70 74 69 6f 6e 2e 20 57 69 74 68 20 3c 69 20 63  ption. With <i c
7720: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f  lass="arg">proto
7730: 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c 79 20 74 68  col</i>, only th
7740: 65 20 63 69 70 68 65 72 73 20 73 75 70 70 6f 72  e ciphers suppor
7750: 74 65 64 20 66 6f 72 20 74 68 61 74 0a 70 72 6f  ted for that.pro
7760: 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 75 72 6e  tocol are return
7770: 65 64 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63  ed. See the <b c
7780: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
7790: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f  protocols</b> co
77a0: 6d 6d 61 6e 64 20 66 6f 72 20 74 68 65 20 73 75  mmand for the su
77b0: 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c  pported.protocol
77c0: 73 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22  s. If <i class="
77d0: 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e  arg">verbose</i>
77e0: 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73   is specified as
77f0: 20 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72   true then a ver
7800: 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64  bose, human read
7810: 61 62 6c 65 0a 6c 69 73 74 20 69 73 20 72 65 74  able.list is ret
7820: 75 72 6e 65 64 20 77 69 74 68 20 61 64 64 69 74  urned with addit
7830: 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f  ional informatio
7840: 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e  n on the cipher.
7850: 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61 72   If <i class="ar
7860: 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e  g">supported</i>
7870: 0a 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73  .is specified as
7880: 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c 79   true, then only
7890: 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70   the ciphers sup
78a0: 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f 74 6f  ported for proto
78b0: 63 6f 6c 20 77 69 6c 6c 20 62 65 20 6c 69 73 74  col will be list
78c0: 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ed.</p></dd>.<dt
78d0: 3e 3c 61 20 6e 61 6d 65 3d 22 31 30 22 3e 3c 62  ><a name="10"><b
78e0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
78f0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c  ::protocols</b><
7900: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /a></dt>.<dd><p>
7910: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
7920: 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20  f the supported 
7930: 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c  SSL/TLS protocol
7940: 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 20  s. Valid values 
7950: 61 72 65 3a 0a 3c 62 20 63 6c 61 73 73 3d 22 63  are:.<b class="c
7960: 6f 6e 73 74 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20  onst">ssl2</b>, 
7970: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
7980: 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c  >ssl3</b>, <b cl
7990: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31  ass="const">tls1
79a0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
79b0: 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 31 3c 2f 62  const">tls1.1</b
79c0: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  >, <b class="con
79d0: 73 74 22 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20  st">tls1.2</b>, 
79e0: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f  and.<b class="co
79f0: 6e 73 74 22 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e  nst">tls1.3</b>.
7a00: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65   Exact list depe
7a10: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76  nds on OpenSSL v
7a20: 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69  ersion and compi
7a30: 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 3c 2f  le time flags.</
7a40: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  p></dd>.<dt><a n
7a50: 61 6d 65 3d 22 31 31 22 3e 3c 62 20 63 6c 61 73  ame="11"><b clas
7a60: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72  s="cmd">tls::ver
7a70: 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74  sion</b></a></dt
7a80: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73  >.<dd><p>Returns
7a90: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72   the OpenSSL ver
7aa0: 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 70 3e  sion string.</p>
7ab0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69  </dd>.</dl>.</di
7ac0: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74  v>.<div id="sect
7ad0: 69 6f 6e 33 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion3" class="doc
7ae0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
7af0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74  h2><a name="sect
7b00: 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74  ion3">Certificat
7b10: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
7b20: 3c 2f 68 32 3e 0a 3c 64 69 76 20 69 64 3d 22 73  </h2>.<div id="s
7b30: 75 62 73 65 63 74 69 6f 6e 31 22 20 63 6c 61 73  ubsection1" clas
7b40: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73  s="doctools_subs
7b50: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e  ection"><h3><a n
7b60: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 31  ame="subsection1
7b70: 22 3e 50 4b 49 20 61 6e 64 20 43 65 72 74 69 66  ">PKI and Certif
7b80: 69 63 61 74 65 73 3c 2f 61 3e 3c 2f 68 33 3e 0a  icates</a></h3>.
7b90: 3c 70 3e 55 73 69 6e 67 20 74 68 65 20 50 75 62  <p>Using the Pub
7ba0: 6c 69 63 20 4b 65 79 20 49 6e 66 72 61 73 74 72  lic Key Infrastr
7bb0: 75 63 74 75 72 65 20 28 50 4b 49 29 2c 20 65 61  ucture (PKI), ea
7bc0: 63 68 20 75 73 65 72 20 63 72 65 61 74 65 73 20  ch user creates 
7bd0: 61 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 68  a private key th
7be0: 61 74 0a 6f 6e 6c 79 20 74 68 65 79 20 6b 6e 6f  at.only they kno
7bf0: 77 20 61 62 6f 75 74 20 61 6e 64 20 61 20 70 75  w about and a pu
7c00: 62 6c 69 63 20 6b 65 79 20 74 68 65 79 20 63 61  blic key they ca
7c10: 6e 20 65 78 63 68 61 6e 67 65 20 77 69 74 68 20  n exchange with 
7c20: 6f 74 68 65 72 73 20 66 6f 72 20 75 73 65 20 69  others for use i
7c30: 6e 0a 65 6e 63 72 79 70 74 69 6e 67 20 61 6e 64  n.encrypting and
7c40: 20 64 65 63 72 79 70 74 69 6e 67 20 64 61 74 61   decrypting data
7c50: 2e 20 54 68 65 20 70 72 6f 63 65 73 73 20 69 73  . The process is
7c60: 20 74 68 65 20 73 65 6e 64 65 72 20 65 6e 63 72   the sender encr
7c70: 79 70 74 73 20 74 68 65 69 72 20 64 61 74 61 0a  ypts their data.
7c80: 75 73 69 6e 67 20 74 68 65 69 72 20 70 72 69 76  using their priv
7c90: 61 74 65 20 6b 65 79 20 61 6e 64 20 74 68 65 20  ate key and the 
7ca0: 72 65 63 65 69 76 65 72 27 73 20 70 75 62 6c 69  receiver's publi
7cb0: 63 20 6b 65 79 2e 20 54 68 65 20 64 61 74 61 20  c key. The data 
7cc0: 69 73 20 74 68 65 6e 20 73 65 6e 74 0a 74 6f 20  is then sent.to 
7cd0: 74 68 65 20 72 65 63 65 69 76 65 72 2e 20 49 6e  the receiver. In
7ce0: 20 61 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e 65   a similar manne
7cf0: 72 2c 20 74 68 65 20 72 65 63 65 69 76 65 72 20  r, the receiver 
7d00: 75 73 65 73 20 74 68 65 69 72 20 70 72 69 76 61  uses their priva
7d10: 74 65 20 6b 65 79 20 61 6e 64 0a 74 68 65 20 73  te key and.the s
7d20: 65 6e 64 65 72 27 73 20 70 75 62 6c 69 63 20 6b  ender's public k
7d30: 65 79 20 74 6f 20 64 65 63 72 79 70 74 20 74 68  ey to decrypt th
7d40: 65 20 64 61 74 61 2e 20 54 68 69 73 20 70 72 6f  e data. This pro
7d50: 76 69 64 65 73 20 64 61 74 61 20 69 6e 74 65 67  vides data integ
7d60: 72 69 74 79 2c 20 74 6f 0a 65 6e 73 75 72 65 20  rity, to.ensure 
7d70: 74 68 65 20 64 61 74 61 20 63 61 6e 27 74 20 62  the data can't b
7d80: 65 20 76 69 65 77 65 64 20 6f 72 20 61 6c 74 65  e viewed or alte
7d90: 72 65 64 20 64 75 72 69 6e 67 20 74 72 61 6e 73  red during trans
7da0: 70 6f 72 74 2e 20 53 65 65 20 74 68 65 0a 3c 62  port. See the.<b
7db0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
7dc0: 2d 6b 65 79 3c 2f 62 3e 20 61 6e 64 20 3c 62 20  -key</b> and <b 
7dd0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
7de0: 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69  keyfile</b> opti
7df0: 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73  ons for how to s
7e00: 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61  pecify the priva
7e10: 74 65 20 6b 65 79 2e 0a 41 6c 73 6f 20 73 65 65  te key..Also see
7e20: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f   the <b class="o
7e30: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64  ption">-password
7e40: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 66 6f 72 20  </b> option for 
7e50: 68 6f 77 20 74 6f 20 70 72 6f 76 69 64 65 20 74  how to provide t
7e60: 68 65 20 70 61 73 73 77 6f 72 64 2e 3c 2f 70 3e  he password.</p>
7e70: 0a 3c 70 3e 49 6e 20 6f 72 64 65 72 20 74 6f 20  .<p>In order to 
7e80: 70 72 6f 76 69 64 65 20 61 75 74 68 65 6e 74 69  provide authenti
7e90: 63 61 74 69 6f 6e 2c 20 69 2e 65 2e 20 65 6e 73  cation, i.e. ens
7ea0: 75 72 69 6e 67 20 73 6f 6d 65 6f 6e 65 20 69 73  uring someone is
7eb0: 20 77 68 6f 20 74 68 65 79 20 73 61 79 20 74 68   who they say th
7ec0: 65 79 0a 61 72 65 2c 20 74 68 65 20 70 75 62 6c  ey.are, the publ
7ed0: 69 63 20 6b 65 79 20 61 6e 64 20 75 73 65 72 20  ic key and user 
7ee0: 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e 20 69  identification i
7ef0: 6e 66 6f 20 69 73 20 73 74 6f 72 65 64 20 69 6e  nfo is stored in
7f00: 20 61 20 58 2e 35 30 39 0a 63 65 72 74 69 66 69   a X.509.certifi
7f10: 63 61 74 65 20 61 6e 64 20 74 68 61 74 20 63 65  cate and that ce
7f20: 72 74 69 66 69 63 61 74 65 20 69 73 20 61 75 74  rtificate is aut
7f30: 68 65 6e 74 69 63 61 74 65 64 20 28 69 2e 65 2e  henticated (i.e.
7f40: 20 73 69 67 6e 65 64 29 20 62 79 20 61 20 43 65   signed) by a Ce
7f50: 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f 72  rtificate.Author
7f60: 69 74 79 20 28 43 41 29 2e 20 55 73 65 72 73 20  ity (CA). Users 
7f70: 63 61 6e 20 74 68 65 6e 20 65 78 63 68 61 6e 67  can then exchang
7f80: 65 20 74 68 65 73 65 20 63 65 72 74 69 66 69 63  e these certific
7f90: 61 74 65 73 20 64 75 72 69 6e 67 20 74 68 65 20  ates during the 
7fa0: 54 4c 53 0a 69 6e 69 74 69 61 6c 69 7a 61 74 69  TLS.initializati
7fb0: 6f 6e 20 70 72 6f 63 65 73 73 20 61 6e 64 20 63  on process and c
7fc0: 68 65 63 6b 20 74 68 65 6d 20 61 67 61 69 6e 73  heck them agains
7fd0: 74 20 74 68 65 20 72 6f 6f 74 20 43 41 20 63 65  t the root CA ce
7fe0: 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 65 6e  rtificates to en
7ff0: 73 75 72 65 0a 74 68 65 79 20 61 72 65 20 76 61  sure.they are va
8000: 6c 69 64 2e 20 54 68 69 73 20 69 73 20 68 61 6e  lid. This is han
8010: 64 6c 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20  dled by OpenSSL 
8020: 76 69 61 20 74 68 65 20 3c 62 20 63 6c 61 73 73  via the <b class
8030: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65  ="option">-reque
8040: 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c 62 20 63 6c  st</b> and.<b cl
8050: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65  ass="option">-re
8060: 71 75 69 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  quire</b> option
8070: 73 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c  s. See the <b cl
8080: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
8090: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  dir</b>, <b clas
80a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69  s="option">-cadi
80b0: 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c  r</b>, and.<b cl
80c0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
80d0: 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  store</b> option
80e0: 73 20 66 6f 72 20 68 6f 77 20 74 70 20 73 70 65  s for how tp spe
80f0: 63 69 66 79 20 77 68 65 72 65 20 74 6f 20 66 69  cify where to fi
8100: 6e 64 20 74 68 65 20 43 41 20 63 65 72 74 69 66  nd the CA certif
8110: 69 63 61 74 65 73 2e 0a 4f 70 74 69 6f 6e 61 6c  icates..Optional
8120: 6c 79 2c 20 69 6e 20 61 20 66 75 74 75 72 65 20  ly, in a future 
8130: 72 65 6c 65 61 73 65 2c 20 74 68 65 79 20 63 61  release, they ca
8140: 6e 20 61 6c 73 6f 20 62 65 20 63 68 65 63 6b 65  n also be checke
8150: 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 43 65  d against the Ce
8160: 72 74 69 66 69 63 61 74 65 0a 52 65 76 6f 63 61  rtificate.Revoca
8170: 74 69 6f 6e 20 4c 69 73 74 20 28 43 52 4c 29 20  tion List (CRL) 
8180: 6f 66 20 72 65 76 6f 6b 65 64 20 63 65 72 74 69  of revoked certi
8190: 66 69 63 61 74 65 73 2e 20 43 65 72 74 69 66 69  ficates. Certifi
81a0: 63 61 74 65 73 20 63 61 6e 20 61 6c 73 6f 20 62  cates can also b
81b0: 65 0a 73 65 6c 66 2d 73 69 67 6e 65 64 2c 20 62  e.self-signed, b
81c0: 75 74 20 74 68 65 79 20 61 72 65 20 62 79 20 64  ut they are by d
81d0: 65 66 61 75 6c 74 20 6e 6f 74 20 74 72 75 73 74  efault not trust
81e0: 65 64 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 64  ed unless you ad
81f0: 64 20 74 68 65 6d 20 74 6f 20 79 6f 75 72 0a 63  d them to your.c
8200: 65 72 74 69 66 69 63 61 74 65 20 73 74 6f 72 65  ertificate store
8210: 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70 69 63 61 6c  .</p>.<p>Typical
8220: 6c 79 20 77 68 65 6e 20 76 69 73 69 74 69 6e 67  ly when visiting
8230: 20 77 65 62 20 73 69 74 65 73 2c 20 6f 6e 6c 79   web sites, only
8240: 20 74 68 65 20 63 6c 69 65 6e 74 20 6e 65 65 64   the client need
8250: 73 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 73  s to check the s
8260: 65 72 76 65 72 27 73 0a 63 65 72 74 69 66 69 63  erver's.certific
8270: 61 74 65 20 74 6f 20 65 6e 73 75 72 65 20 69 74  ate to ensure it
8280: 20 69 73 20 76 61 6c 69 64 2e 20 54 68 65 20 73   is valid. The s
8290: 65 72 76 65 72 20 64 6f 65 73 6e 27 74 20 6e 65  erver doesn't ne
82a0: 65 64 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20  ed to check the 
82b0: 63 6c 69 65 6e 74 0a 63 65 72 74 69 66 69 63 61  client.certifica
82c0: 74 65 20 75 6e 6c 65 73 73 20 79 6f 75 20 6e 65  te unless you ne
82d0: 65 64 20 74 6f 20 61 75 74 68 65 6e 74 69 63 61  ed to authentica
82e0: 74 65 20 77 69 74 68 20 74 68 65 6d 20 74 6f 20  te with them to 
82f0: 6c 6f 67 69 6e 2c 20 65 74 63 2e 20 53 65 65 20  login, etc. See 
8300: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
8310: 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e 20  tion">-cert</b> 
8320: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and <b class="op
8330: 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65 3c  tion">-certfile<
8340: 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 69 66 20 79  /b> options if y
8350: 6f 75 20 6e 65 65 64 20 74 6f 20 70 72 6f 76 69  ou need to provi
8360: 64 65 20 61 20 63 65 72 74 69 66 69 63 61 74 65  de a certificate
8370: 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  .</p>.</div>.<di
8380: 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e  v id="subsection
8390: 32 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  2" class="doctoo
83a0: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
83b0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73  h3><a name="subs
83c0: 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d 61 72 79  ection2">Summary
83d0: 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65   of command line
83e0: 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 33   options</a></h3
83f0: 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69  >.<p>The followi
8400: 6e 67 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 75  ng options are u
8410: 73 65 64 20 66 6f 72 20 70 65 65 72 20 63 65 72  sed for peer cer
8420: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74  tificate validat
8430: 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  ion:</p>.<dl cla
8440: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74  ss="doctools_opt
8450: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ions">.<dt><b cl
8460: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61  ass="option">-ca
8470: 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  dir</b> <i class
8480: 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f 72 79  ="arg">directory
8490: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
84a0: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64  >Specifies the d
84b0: 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74  irectory where t
84c0: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
84d0: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65  uthority (CA) ce
84e0: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 0a 73  rtificates are.s
84f0: 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 61 75  tored. The defau
8500: 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 73  lt is platform s
8510: 70 65 63 69 66 69 63 2c 20 62 75 74 20 69 73 20  pecific, but is 
8520: 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62  usually &quot;<b
8530: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65   class="file">/e
8540: 74 63 2f 73 73 6c 2f 63 65 72 74 73 3c 2f 62 3e  tc/ssl/certs</b>
8550: 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 6e 75 78 2f  &quot; on.Linux/
8560: 55 6e 69 78 20 73 79 73 74 65 6d 73 2e 20 54 68  Unix systems. Th
8570: 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69  e default locati
8580: 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69  on can be overri
8590: 64 64 65 6e 20 62 79 20 74 68 65 0a 3c 62 20 63  dden by the.<b c
85a0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
85b0: 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e  SSL_CERT_DIR</b>
85c0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72   environment var
85d0: 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  iable.</p></dd>.
85e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
85f0: 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62  tion">-cafile</b
8600: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
8610: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64  >filename</i></d
8620: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66  t>.<dd><p>Specif
8630: 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 69 74  ies the file wit
8640: 68 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74  h the Certificat
8650: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e Authority (CA)
8660: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f   certificates to
8670: 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73   use in.<b class
8680: 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e  ="const">PEM</b>
8690: 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68   file format. Th
86a0: 65 20 64 65 66 61 75 6c 74 20 69 73 20 26 71 75  e default is &qu
86b0: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
86c0: 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26  e">cert.pem</b>&
86d0: 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70  quot;, in the Op
86e0: 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 2e  enSSL.directory.
86f0: 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e 69 78 20 73   On Linux/Unix s
8700: 79 73 74 65 6d 73 2c 20 74 68 69 73 20 69 73 20  ystems, this is 
8710: 75 73 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62  usually &quot;<b
8720: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65   class="file">/e
8730: 74 63 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 6c 65  tc/ssl/ca-bundle
8740: 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a  .pem</b>&quot;..
8750: 54 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65  The default file
8760: 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64   can be overridd
8770: 65 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61  en by the <b cla
8780: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
8790: 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20  L_CERT_FILE</b> 
87a0: 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69  environment.vari
87b0: 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  able.</p></dd>.<
87c0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
87d0: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
87e0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
87f0: 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  >URI</i></dt>.<d
8800: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74  d><p>Specifies t
8810: 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75  he Uniform Resou
8820: 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 28  rce Identifier (
8830: 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 72  URI) for the Cer
8840: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
8850: 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77  ty.(CA) store, w
8860: 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69  hich may be a si
8870: 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f  ngle container o
8880: 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63  r a catalog of c
8890: 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 74  ontainers..Start
88a0: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ing with OpenSSL
88b0: 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f   3.2 on MS Windo
88c0: 77 73 2c 20 73 65 74 20 74 6f 20 26 71 75 6f 74  ws, set to &quot
88d0: 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  ;<b class="const
88e0: 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69  ">org.openssl.wi
88f0: 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75  nstore://</b>&qu
8900: 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68 65 20 62  ot;.to use the b
8910: 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f  uilt-in MS Windo
8920: 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53  ws Certificate S
8930: 74 6f 72 65 2e 0a 54 68 69 73 20 73 74 6f 72 65  tore..This store
8940: 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73 20 72   only supports r
8950: 6f 6f 74 20 63 65 72 74 69 66 69 63 61 74 65 20  oot certificate 
8960: 73 74 6f 72 65 73 2e 20 53 65 65 0a 3c 73 70 61  stores. See.<spa
8970: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
8980: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
8990: 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74  ion3">Certificat
89a0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
89b0: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65  </span> for more
89c0: 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64   details.</p></d
89d0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
89e0: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73  "option">-reques
89f0: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  t</b> <i class="
8a00: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64  arg">bool</i></d
8a10: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73  t>.<dd><p>Reques
8a20: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20  t a certificate 
8a30: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75  from the peer du
8a40: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e  ring the SSL han
8a50: 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20  dshake. This is 
8a60: 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72  needed.to do Cer
8a70: 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74  tificate Validat
8a80: 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  ion. Starting in
8a90: 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65   TclTLS 1.8, the
8aa0: 20 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63   default is.<b c
8ab0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
8ac0: 65 3c 2f 62 3e 2e 20 49 6e 20 61 64 64 69 74 69  e</b>. In additi
8ad0: 6f 6e 2c 20 74 68 65 20 63 6c 69 65 6e 74 20 63  on, the client c
8ae0: 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 6e 73 70  an manually insp
8af0: 65 63 74 20 61 6e 64 20 61 63 63 65 70 74 20 6f  ect and accept o
8b00: 72 20 72 65 6a 65 63 74 0a 65 61 63 68 20 63 65  r reject.each ce
8b10: 72 74 69 66 69 63 61 74 65 20 75 73 69 6e 67 20  rtificate using 
8b20: 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  the <i class="ar
8b30: 67 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d  g">-validatecomm
8b40: 61 6e 64 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 3c  and</i> option.<
8b50: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
8b60: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8b70: 72 65 71 75 69 72 65 3c 2f 62 3e 20 3c 69 20 63  require</b> <i c
8b80: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
8b90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
8ba0: 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 64 20  Require a valid 
8bb0: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d  certificate from
8bc0: 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67   the peer during
8bd0: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61   the SSL handsha
8be0: 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73 0a 73  ke. If this is.s
8bf0: 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e  et to true, then
8c00: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
8c10: 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20  n">-request</b> 
8c20: 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74  must also be set
8c30: 20 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65   to true and a e
8c40: 69 74 68 65 72 0a 3c 62 20 63 6c 61 73 73 3d 22  ither.<b class="
8c50: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
8c60: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
8c70: 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62  tion">-cafile</b
8c80: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  >, <b class="opt
8c90: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
8ca0: 3e 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d  >, or a platform
8cb0: 20 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 65   default.must be
8cc0: 20 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64   provided in ord
8cd0: 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61  er to validate a
8ce0: 67 61 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61  gainst. The defa
8cf0: 75 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e  ult in TclTLS 1.
8d00: 38 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65  8 and.earlier ve
8d10: 72 73 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c 61  rsions is <b cla
8d20: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65  ss="const">false
8d30: 3c 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20 61  </b> since not a
8d40: 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76  ll platforms hav
8d50: 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74  e certificates t
8d60: 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e  o.validate again
8d70: 73 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d  st in a form com
8d80: 70 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65  patible with Ope
8d90: 6e 53 53 4c 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  nSSL.</p></dd>.<
8da0: 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76  /dl>.</div>.<div
8db0: 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 33   id="subsection3
8dc0: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
8dd0: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68  s_subsection"><h
8de0: 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65  3><a name="subse
8df0: 63 74 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65  ction3">When are
8e00: 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70   command line op
8e10: 74 69 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61  tions needed?</a
8e20: 3e 3c 2f 68 33 3e 0a 3c 70 3e 49 6e 20 54 63 6c  ></h3>.<p>In Tcl
8e30: 54 4c 53 20 31 2e 38 20 61 6e 64 20 65 61 72 6c  TLS 1.8 and earl
8e40: 69 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65  ier versions, ce
8e50: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61  rtificate valida
8e60: 74 69 6f 6e 20 69 73 0a 3c 65 6d 3e 4e 4f 54 3c  tion is.<em>NOT<
8e70: 2f 65 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79 20  /em> enabled by 
8e80: 64 65 66 61 75 6c 74 2e 20 54 68 69 73 20 6c 69  default. This li
8e90: 6d 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20  mitation is due 
8ea0: 74 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61  to the lack of a
8eb0: 20 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c   common.cross pl
8ec0: 61 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20  atform database 
8ed0: 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41  of Certificate A
8ee0: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 70 72  uthority (CA) pr
8ef0: 6f 76 69 64 65 64 20 63 65 72 74 69 66 69 63 61  ovided certifica
8f00: 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20  tes to.validate 
8f10: 61 67 61 69 6e 73 74 2e 20 4d 61 6e 79 20 4c 69  against. Many Li
8f20: 6e 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69  nux systems nati
8f30: 76 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65  vely support Ope
8f40: 6e 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61  nSSL and thus ha
8f50: 76 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69  ve.these certifi
8f60: 63 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20  cates installed 
8f70: 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f  as part of the O
8f80: 53 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64  S, but MacOS and
8f90: 20 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e   MS Windows do n
8fa0: 6f 74 2e 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20  ot..In order to 
8fb0: 75 73 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73  use the <b class
8fc0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69  ="option">-requi
8fd0: 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2c 20 6f  re</b> option, o
8fe0: 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77  ne of the follow
8ff0: 69 6e 67 0a 6d 75 73 74 20 62 65 20 74 72 75 65  ing.must be true
9000: 3a 3c 2f 70 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d  :</p>.<ul class=
9010: 22 64 6f 63 74 6f 6f 6c 73 5f 69 74 65 6d 69 7a  "doctools_itemiz
9020: 65 64 22 3e 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4c  ed">.<li><p>On L
9030: 69 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 73 79  inux and Unix sy
9040: 73 74 65 6d 73 20 77 69 74 68 20 4f 70 65 6e 53  stems with OpenS
9050: 53 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 74 61  SL already insta
9060: 6c 6c 65 64 20 6f 72 20 69 66 20 74 68 65 20 43  lled or if the C
9070: 41 0a 63 65 72 74 69 66 69 63 61 74 65 73 20 61  A.certificates a
9080: 72 65 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20  re available in 
9090: 50 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e 64 20  PEM format, and 
90a0: 69 66 20 74 68 65 79 20 61 72 65 20 73 74 6f 72  if they are stor
90b0: 65 64 20 69 6e 20 74 68 65 0a 73 74 61 6e 64 61  ed in the.standa
90c0: 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f 72  rd locations, or
90d0: 20 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73   if the <b class
90e0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f  ="variable">SSL_
90f0: 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 6f 72 20  CERT_DIR</b> or 
9100: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
9110: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c  le">SSL_CERT_FIL
9120: 45 3c 2f 62 3e 0a 65 6e 76 69 72 6f 6e 6d 65 6e  E</b>.environmen
9130: 74 20 76 61 72 69 61 62 6c 65 73 20 61 72 65 20  t variables are 
9140: 73 65 74 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61  set, then <b cla
9150: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64  ss="option">-cad
9160: 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ir</b>, <b class
9170: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
9180: 3c 2f 62 3e 2c 0a 61 6e 64 20 3c 62 20 63 6c 61  </b>,.and <b cla
9190: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73  ss="option">-cas
91a0: 74 6f 72 65 3c 2f 62 3e 20 61 72 65 6e 27 74 20  tore</b> aren't 
91b0: 6e 65 65 64 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e  needed.</p></li>
91c0: 0a 3c 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e 53  .<li><p>If OpenS
91d0: 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c  SL is not instal
91e0: 6c 65 64 20 69 6e 20 74 68 65 20 64 65 66 61 75  led in the defau
91f0: 6c 74 20 6c 6f 63 61 74 69 6f 6e 2c 20 6f 72 20  lt location, or 
9200: 77 68 65 6e 20 75 73 69 6e 67 20 4d 61 63 20 4f  when using Mac O
9210: 53 0a 6f 72 20 4d 53 20 57 69 6e 64 6f 77 73 20  S.or MS Windows 
9220: 61 6e 64 20 4f 70 65 6e 53 53 4c 20 69 73 20 69  and OpenSSL is i
9230: 6e 73 74 61 6c 6c 65 64 2c 20 74 68 65 20 3c 62  nstalled, the <b
9240: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
9250: 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f  ">SSL_CERT_DIR</
9260: 62 3e 20 61 6e 64 2f 6f 72 0a 3c 62 20 63 6c 61  b> and/or.<b cla
9270: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
9280: 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20  L_CERT_FILE</b> 
9290: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  environment vari
92a0: 61 62 6c 65 73 20 6f 72 20 74 68 65 20 6f 6e 65  ables or the one
92b0: 20 6f 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73   of the <b class
92c0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
92d0: 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22  </b>,.<b class="
92e0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
92f0: 62 3e 2c 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d  b>, or <b class=
9300: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72  "option">-castor
9310: 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 6d 75  e</b> options mu
9320: 73 74 20 62 65 20 64 65 66 69 6e 65 64 2e 3c 2f  st be defined.</
9330: 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 4f  p></li>.<li><p>O
9340: 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 74  n MS Windows, st
9350: 61 72 74 69 6e 67 20 69 6e 20 4f 70 65 6e 53 53  arting in OpenSS
9360: 4c 20 33 2e 32 2c 20 69 74 20 69 73 20 6e 6f 77  L 3.2, it is now
9370: 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 61 63 63   possible to acc
9380: 65 73 73 20 74 68 65 0a 62 75 69 6c 74 2d 69 6e  ess the.built-in
9390: 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69   Windows Certifi
93a0: 63 61 74 65 20 53 74 6f 72 65 20 66 72 6f 6d 20  cate Store from 
93b0: 4f 70 65 6e 53 53 4c 2e 20 54 68 69 73 20 63 61  OpenSSL. This ca
93c0: 6e 20 75 74 69 6c 69 7a 65 64 20 62 79 0a 73 65  n utilized by.se
93d0: 74 74 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61  tting the <b cla
93e0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73  ss="option">-cas
93f0: 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20  tore</b> option 
9400: 74 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  to &quot;<b clas
9410: 73 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70  s="const">org.op
9420: 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f  enssl.winstore:/
9430: 2f 3c 2f 62 3e 26 71 75 6f 74 3b 2e 3c 2f 70 3e  /</b>&quot;.</p>
9440: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20  </li>.<li><p>If 
9450: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69  OpenSSL is not i
9460: 6e 73 74 61 6c 6c 65 64 20 6f 72 20 74 68 65 20  nstalled or the 
9470: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20  CA certificates 
9480: 61 72 65 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c  are not availabl
9490: 65 20 69 6e 20 50 45 4d 0a 66 6f 72 6d 61 74 2c  e in PEM.format,
94a0: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63   the CA certific
94b0: 61 74 65 73 20 6d 75 73 74 20 62 65 20 64 6f 77  ates must be dow
94c0: 6e 6c 6f 61 64 65 64 20 61 6e 64 20 69 6e 73 74  nloaded and inst
94d0: 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 20 75  alled with the u
94e0: 73 65 72 0a 73 6f 66 74 77 61 72 65 2e 20 54 68  ser.software. Th
94f0: 65 20 43 55 52 4c 20 74 65 61 6d 20 6d 61 6b 65  e CURL team make
9500: 73 20 74 68 65 6d 20 61 76 61 69 6c 61 62 6c 65  s them available
9510: 20 61 74 0a 3c 61 20 68 72 65 66 3d 22 68 74 74   at.<a href="htt
9520: 70 73 3a 2f 2f 63 75 72 6c 2e 73 65 2f 64 6f 63  ps://curl.se/doc
9530: 73 2f 63 61 65 78 74 72 61 63 74 2e 68 74 6d 6c  s/caextract.html
9540: 22 3e 43 41 20 63 65 72 74 69 66 69 63 61 74 65  ">CA certificate
9550: 73 20 65 78 74 72 61 63 74 65 64 0a 66 72 6f 6d  s extracted.from
9560: 20 4d 6f 7a 69 6c 6c 61 3c 2f 61 3e 20 69 6e 20   Mozilla</a> in 
9570: 74 68 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61  the &quot;<b cla
9580: 73 73 3d 22 66 69 6c 65 22 3e 63 61 63 65 72 74  ss="file">cacert
9590: 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 20 66  .pem</b>&quot; f
95a0: 69 6c 65 2e 20 59 6f 75 20 6d 75 73 74 20 74 68  ile. You must th
95b0: 65 6e 20 65 69 74 68 65 72 20 73 65 74 20 74 68  en either set th
95c0: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  e.<b class="vari
95d0: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44  able">SSL_CERT_D
95e0: 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 20 3c 62  IR</b> and/or <b
95f0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
9600: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c  ">SSL_CERT_FILE<
9610: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  /b> environment 
9620: 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 65  variables or the
9630: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
9640: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 6f 72  n">-cadir</b> or
9650: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
9660: 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 6f  n">-cafile</b> o
9670: 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 43 41  ptions to the CA
9680: 20 63 65 72 74 20 66 69 6c 65 27 73 20 69 6e 73   cert file's ins
9690: 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 2e 20 49  tall.location. I
96a0: 74 20 69 73 20 79 6f 75 72 20 72 65 73 70 6f 6e  t is your respon
96b0: 73 69 62 69 6c 69 74 79 20 74 6f 20 6b 65 65 70  sibility to keep
96c0: 20 74 68 69 73 20 66 69 6c 65 20 75 70 20 74 6f   this file up to
96d0: 20 64 61 74 65 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a   date.</p></li>.
96e0: 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64  </ul>.</div>.</d
96f0: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63  iv>.<div id="sec
9700: 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 6f  tion4" class="do
9710: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
9720: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63  <h2><a name="sec
9730: 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b 20  tion4">Callback 
9740: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e  Options</a></h2>
9750: 0a 3c 70 3e 41 73 20 70 72 65 76 69 6f 75 73 6c  .<p>As previousl
9760: 79 20 64 65 73 63 72 69 62 65 64 2c 20 65 61 63  y described, eac
9770: 68 20 63 68 61 6e 6e 65 6c 20 63 61 6e 20 62 65  h channel can be
9780: 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e   given their own
9790: 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61   callbacks.to ha
97a0: 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74  ndle intermediat
97b0: 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20  e processing by 
97c0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72  the OpenSSL libr
97d0: 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c  ary, using the.<
97e0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
97f0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c  >-command</b>, <
9800: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
9810: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20  >-password</b>, 
9820: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and <b class="op
9830: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f  tion">-validate_
9840: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69  command</b> opti
9850: 6f 6e 73 0a 70 61 73 73 65 64 20 74 6f 20 65 69  ons.passed to ei
9860: 74 68 65 72 20 6f 66 20 3c 62 20 63 6c 61 73 73  ther of <b class
9870: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b  ="cmd">tls::sock
9880: 65 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61  et</b> or <b cla
9890: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d  ss="cmd">tls::im
98a0: 70 6f 72 74 3c 2f 62 3e 2e 0a 55 6e 6c 69 6b 65  port</b>..Unlike
98b0: 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 6f   previous versio
98c0: 6e 73 20 6f 66 20 54 63 6c 54 4c 53 2c 20 6f 6e  ns of TclTLS, on
98d0: 6c 79 20 69 66 20 74 68 65 20 63 61 6c 6c 62 61  ly if the callba
98e0: 63 6b 20 67 65 6e 65 72 61 74 65 73 20 61 6e 20  ck generates an 
98f0: 65 72 72 6f 72 2c 0a 77 69 6c 6c 20 74 68 65 20  error,.will the 
9900: 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64  <b class="syscmd
9910: 22 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f  ">bgerror</b> co
9920: 6d 6d 61 6e 64 20 62 65 20 69 6e 76 6f 6b 65 64  mmand be invoked
9930: 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72 20   with the error 
9940: 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 3c 2f 70 3e  information.</p>
9950: 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63  .<div id="subsec
9960: 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 6f  tion4" class="do
9970: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f  ctools_subsectio
9980: 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h3><a name="
9990: 73 75 62 73 65 63 74 69 6f 6e 34 22 3e 56 61 6c  subsection4">Val
99a0: 75 65 73 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 20  ues for Command 
99b0: 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33  Callback</a></h3
99c0: 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c 62 61 63  >.<p>The callbac
99d0: 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 63 6c 61  k for the <b cla
99e0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d  ss="option">-com
99f0: 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20  mand</b> option 
9a00: 69 73 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65  is invoked at se
9a10: 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72  veral points dur
9a20: 69 6e 67 20 74 68 65 0a 4f 70 65 6e 53 53 4c 20  ing the.OpenSSL 
9a30: 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 64 75  handshake and du
9a40: 72 69 6e 67 20 72 6f 75 74 69 6e 65 20 6f 70 65  ring routine ope
9a50: 72 61 74 69 6f 6e 73 2e 20 53 65 65 20 62 65 6c  rations. See bel
9a60: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69  ow for the possi
9a70: 62 6c 65 0a 61 72 67 75 6d 65 6e 74 73 20 70 61  ble.arguments pa
9a80: 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c  ssed to the call
9a90: 62 61 63 6b 20 73 63 72 69 70 74 2e 20 56 61 6c  back script. Val
9aa0: 75 65 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f  ues returned fro
9ab0: 6d 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 61  m the callback a
9ac0: 72 65 0a 69 67 6e 6f 72 65 64 2e 3c 2f 70 3e 0a  re.ignored.</p>.
9ad0: 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <dl class="docto
9ae0: 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64  ols_options">.<d
9af0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  t><b class="opti
9b00: 6f 6e 22 3e 65 72 72 6f 72 3c 2f 62 3e 20 3c 69  on">error</b> <i
9b10: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
9b20: 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 3c 2f  nnelId message</
9b30: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
9b40: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c  his form of call
9b50: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20  back is invoked 
9b60: 77 68 65 6e 65 76 65 72 20 61 6e 20 65 72 72 6f  whenever an erro
9b70: 72 20 6f 63 63 75 72 73 20 64 75 72 69 6e 67 20  r occurs during 
9b80: 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 6f 6e 6e  the initial.conn
9b90: 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b  ection, handshak
9ba0: 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74  e, or I/O operat
9bb0: 69 6f 6e 73 2e 20 54 68 65 20 3c 69 20 63 6c 61  ions. The <i cla
9bc0: 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 65  ss="arg">message
9bd0: 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 63 61  </i> argument ca
9be0: 6e 20 62 65 0a 66 72 6f 6d 20 74 68 65 20 54 63  n be.from the Tc
9bf0: 6c 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f 70 65 6e  l_ErrnoMsg, Open
9c00: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 20 3c 62 20  SSL function <b 
9c10: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22  class="function"
9c20: 3e 45 52 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f  >ERR_reason_erro
9c30: 72 5f 73 74 72 69 6e 67 28 29 3c 2f 62 3e 2c 0a  r_string()</b>,.
9c40: 6f 72 20 61 20 63 75 73 74 6f 6d 20 6d 65 73 73  or a custom mess
9c50: 61 67 65 2e 20 54 68 69 73 20 63 61 6c 6c 62 61  age. This callba
9c60: 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ck is new for Tc
9c70: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
9c80: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
9c90: 22 6f 70 74 69 6f 6e 22 3e 69 6e 66 6f 3c 2f 62  "option">info</b
9ca0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
9cb0: 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72  >channelId major
9cc0: 20 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 20 74   minor message t
9cd0: 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ype</i></dt>.<dd
9ce0: 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66  ><p>This form of
9cf0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
9d00: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e  oked by the Open
9d10: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20  SSL function.<b 
9d20: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22  class="function"
9d30: 3e 53 53 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 61  >SSL_set_info_ca
9d40: 6c 6c 62 61 63 6b 28 29 3c 2f 62 3e 20 64 75 72  llback()</b> dur
9d50: 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 20  ing the initial 
9d60: 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68  connection and h
9d70: 61 6e 64 73 68 61 6b 65 0a 6f 70 65 72 61 74 69  andshake.operati
9d80: 6f 6e 73 2e 20 54 68 65 20 61 72 67 75 6d 65 6e  ons. The argumen
9d90: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20  ts are:</p>.<dl 
9da0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
9db0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
9dc0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
9dd0: 3e 6d 61 6a 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a  >major</i></dt>.
9de0: 3c 64 64 3e 3c 70 3e 4d 61 6a 6f 72 20 63 61 74  <dd><p>Major cat
9df0: 65 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 2e  egory for error.
9e00: 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 65   Valid enums are
9e10: 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  : <b class="cons
9e20: 74 22 3e 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e  t">handshake</b>
9e30: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
9e40: 74 22 3e 61 6c 65 72 74 3c 2f 62 3e 2c 0a 3c 62  t">alert</b>,.<b
9e50: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 63   class="const">c
9e60: 6f 6e 6e 65 63 74 3c 2f 62 3e 2c 20 3c 62 20 63  onnect</b>, <b c
9e70: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61 63 63  lass="const">acc
9e80: 65 70 74 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64  ept</b>.</p></dd
9e90: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
9ea0: 61 72 67 22 3e 6d 69 6e 6f 72 3c 2f 69 3e 3c 2f  arg">minor</i></
9eb0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 69 6e 6f 72  dt>.<dd><p>Minor
9ec0: 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65 72   category for er
9ed0: 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73  ror. Valid enums
9ee0: 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22   are: <b class="
9ef0: 63 6f 6e 73 74 22 3e 73 74 61 72 74 3c 2f 62 3e  const">start</b>
9f00: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  , <b class="cons
9f10: 74 22 3e 64 6f 6e 65 3c 2f 62 3e 2c 20 3c 62 20  t">done</b>, <b 
9f20: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 72 65  class="const">re
9f30: 61 64 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73  ad</b>,.<b class
9f40: 3d 22 63 6f 6e 73 74 22 3e 77 72 69 74 65 3c 2f  ="const">write</
9f50: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>, <b class="co
9f60: 6e 73 74 22 3e 6c 6f 6f 70 3c 2f 62 3e 2c 20 3c  nst">loop</b>, <
9f70: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
9f80: 65 78 69 74 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64  exit</b>.</p></d
9f90: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
9fa0: 22 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69  "arg">message</i
9fb0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 65  ></dt>.<dd><p>De
9fc0: 73 63 72 69 70 74 69 76 65 20 6d 65 73 73 61 67  scriptive messag
9fd0: 65 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d  e string which m
9fe0: 61 79 20 62 65 20 67 65 6e 65 72 61 74 65 64 20  ay be generated 
9ff0: 65 69 74 68 65 72 20 62 79 0a 3c 62 20 63 6c 61  either by.<b cla
a000: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53  ss="function">SS
a010: 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c  L_state_string_l
a020: 6f 6e 67 28 29 3c 2f 62 3e 20 6f 72 20 3c 62 20  ong()</b> or <b 
a030: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22  class="function"
a040: 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f  >SSL_alert_desc_
a050: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62  string_long()</b
a060: 3e 2c 0a 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20  >,.depending on 
a070: 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c 2f 70 3e  the context.</p>
a080: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
a090: 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f 69  ss="arg">type</i
a0a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f  ></dt>.<dd><p>Fo
a0b0: 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f  r alerts, the po
a0c0: 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 61 72  ssible values ar
a0d0: 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  e: <b class="con
a0e0: 73 74 22 3e 77 61 72 6e 69 6e 67 3c 2f 62 3e 2c  st">warning</b>,
a0f0: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74  .<b class="const
a100: 22 3e 66 61 74 61 6c 3c 2f 62 3e 2c 20 61 6e 64  ">fatal</b>, and
a110: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
a120: 22 3e 75 6e 6b 6e 6f 77 6e 3c 2f 62 3e 2e 20 46  ">unknown</b>. F
a130: 6f 72 20 6f 74 68 65 72 73 2c 20 3c 62 20 63 6c  or others, <b cl
a140: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 69 6e 66 6f  ass="const">info
a150: 3c 2f 62 3e 20 69 73 20 75 73 65 64 2e 0a 54 68  </b> is used..Th
a160: 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e  is argument is n
a170: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e  ew for TclTLS 1.
a180: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  8.</p></dd>.</dl
a190: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
a1a0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 6d 65 73  ass="option">mes
a1b0: 73 61 67 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  sage</b> <i clas
a1c0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49  s="arg">channelI
a1d0: 64 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73  d direction vers
a1e0: 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65  ion content_type
a1f0: 20 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74   message</i></dt
a200: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f  >.<dd><p>This fo
a210: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
a220: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65  s invoked by the
a230: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
a240: 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63  n.<b class="func
a250: 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 6d 73  tion">SSL_set_ms
a260: 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 62 3e  g_callback()</b>
a270: 20 77 68 65 6e 65 76 65 72 20 61 20 6d 65 73 73   whenever a mess
a280: 61 67 65 20 69 73 20 73 65 6e 74 20 6f 72 20 72  age is sent or r
a290: 65 63 65 69 76 65 64 20 64 75 72 69 6e 67 20 74  eceived during t
a2a0: 68 65 0a 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65  he.initial conne
a2b0: 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b 65  ction, handshake
a2c0: 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74 69  , or I/O operati
a2d0: 6f 6e 73 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20  ons. It is only 
a2e0: 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a 4f  available when.O
a2f0: 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69  penSSL is compli
a300: 65 64 20 77 69 74 68 20 74 68 65 20 3c 62 20 63  ed with the <b c
a310: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 65 6e 61  lass="const">ena
a320: 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 3c 2f 62  ble-ssl-trace</b
a330: 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69 73 20 63  > option. This c
a340: 61 6c 6c 62 61 63 6b 20 69 73 0a 6e 65 77 20 66  allback is.new f
a350: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 20 54  or TclTLS 1.8. T
a360: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65  he arguments are
a370: 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d  :</p>.<dl class=
a380: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69  "doctools_defini
a390: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63  tions">.<dt><i c
a3a0: 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63  lass="arg">direc
a3b0: 74 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  tion</i></dt>.<d
a3c0: 64 3e 3c 70 3e 44 69 72 65 63 74 69 6f 6e 20 69  d><p>Direction i
a3d0: 73 20 65 69 74 68 65 72 20 3c 62 20 63 6c 61 73  s either <b clas
a3e0: 73 3d 22 63 6f 6e 73 74 22 3e 53 65 6e 74 3c 2f  s="const">Sent</
a3f0: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22  b> or <b class="
a400: 63 6f 6e 73 74 22 3e 52 65 63 65 69 76 65 64 3c  const">Received<
a410: 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  /b>.</p></dd>.<d
a420: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
a430: 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74  >version</i></dt
a440: 3e 0a 3c 64 64 3e 3c 70 3e 56 65 72 73 69 6f 6e  >.<dd><p>Version
a450: 20 69 73 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c   is the protocol
a460: 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64   version.</p></d
a470: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
a480: 22 61 72 67 22 3e 63 6f 6e 74 65 6e 74 5f 74 79  "arg">content_ty
a490: 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  pe</i></dt>.<dd>
a4a0: 3c 70 3e 43 6f 6e 74 65 6e 74 20 74 79 70 65 20  <p>Content type 
a4b0: 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 20 63  is the message c
a4c0: 6f 6e 74 65 6e 74 20 74 79 70 65 2e 3c 2f 70 3e  ontent type.</p>
a4d0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  </dd>.<dt><i cla
a4e0: 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 65  ss="arg">message
a4f0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
a500: 3e 4d 65 73 73 61 67 65 20 69 73 20 6d 6f 72 65  >Message is more
a510: 20 69 6e 66 6f 20 66 72 6f 6d 20 74 68 65 20 3c   info from the <
a520: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
a530: 53 53 4c 5f 74 72 61 63 65 3c 2f 62 3e 20 41 50  SSL_trace</b> AP
a540: 49 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  I.</p></dd>.</dl
a550: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
a560: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 65 73  ass="option">ses
a570: 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  sion</b> <i clas
a580: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49  s="arg">channelI
a590: 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 65 73  d session_id ses
a5a0: 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66 65  sion_ticket life
a5b0: 74 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  time</i></dt>.<d
a5c0: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f  d><p>This form o
a5d0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
a5e0: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65  voked by the Ope
a5f0: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62  nSSL function.<b
a600: 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e   class="function
a610: 22 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73  ">SSL_CTX_sess_s
a620: 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 62 3e 20  et_new_cb()</b> 
a630: 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 20 73  whenever a new s
a640: 65 73 73 69 6f 6e 20 69 64 20 69 73 20 73 65 6e  ession id is sen
a650: 74 20 62 79 20 74 68 65 0a 73 65 72 76 65 72 20  t by the.server 
a660: 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69  during the initi
a670: 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e  al connection an
a680: 64 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20  d handshake and 
a690: 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 68 65 20  also during the 
a6a0: 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 65 20 3c  session.if the <
a6b0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
a6c0: 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65  >-post_handshake
a6d0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73  </b> option is s
a6e0: 65 74 20 74 6f 20 74 72 75 65 2e 20 54 68 69 73  et to true. This
a6f0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77   callback is new
a700: 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 2e 38 2e   for.TclTLS 1.8.
a710: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61   The arguments a
a720: 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  re:</p>.<dl clas
a730: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69  s="doctools_defi
a740: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69  nitions">.<dt><i
a750: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 73   class="arg">ses
a760: 73 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e  sion_id</i></dt>
a770: 0a 3c 64 64 3e 3c 70 3e 53 65 73 73 69 6f 6e 20  .<dd><p>Session 
a780: 49 64 20 69 73 20 74 68 65 20 63 75 72 72 65 6e  Id is the curren
a790: 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69  t session identi
a7a0: 66 69 65 72 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  fier</p></dd>.<d
a7b0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
a7c0: 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c  >session_ticket<
a7d0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
a7e0: 54 69 63 6b 65 74 20 69 73 20 74 68 65 20 73 65  Ticket is the se
a7f0: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66  ssion ticket inf
a800: 6f 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  o</p></dd>.<dt><
a810: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69  i class="arg">li
a820: 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  fetime</i></dt>.
a830: 3c 64 64 3e 3c 70 3e 4c 69 66 65 74 69 6d 65 20  <dd><p>Lifetime 
a840: 69 73 20 74 68 65 20 74 69 63 6b 65 74 20 6c 69  is the ticket li
a850: 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64  fetime in second
a860: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  s.</p></dd>.</dl
a870: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
a880: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72  ass="option">ver
a890: 69 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ify</b> <i class
a8a0: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64  ="arg">channelId
a8b0: 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74   depth cert stat
a8c0: 75 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74  us error</i></dt
a8d0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 63 61  >.<dd><p>This ca
a8e0: 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 64  llback was moved
a8f0: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70   to <b class="op
a900: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63  tion">-validatec
a910: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63  ommand</b> in Tc
a920: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64  lTLS 1.8.</p></d
a930: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a  d>.</dl>.</div>.
a940: 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 74  <div id="subsect
a950: 69 6f 6e 35 22 20 63 6c 61 73 73 3d 22 64 6f 63  ion5" class="doc
a960: 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e  tools_subsection
a970: 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h3><a name="s
a980: 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 61 6c 75  ubsection5">Valu
a990: 65 73 20 66 6f 72 20 50 61 73 73 77 6f 72 64 20  es for Password 
a9a0: 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33  Callback</a></h3
a9b0: 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c 62 61 63  >.<p>The callbac
a9c0: 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 63 6c 61  k for the <b cla
a9d0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73  ss="option">-pas
a9e0: 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e  sword</b> option
a9f0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 54   is invoked by T
aa00: 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 72 20 4f  clTLS whenever O
aa10: 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a 74 6f 20  penSSL needs.to 
aa20: 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72  obtain a passwor
aa30: 64 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72  d. See below for
aa40: 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 72   the possible ar
aa50: 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74  guments passed t
aa60: 6f 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b 20 73  o the.callback s
aa70: 63 72 69 70 74 2e 20 54 68 65 20 75 73 65 72 20  cript. The user 
aa80: 70 72 6f 76 69 64 65 64 20 70 61 73 73 77 6f 72  provided passwor
aa90: 64 20 69 73 20 65 78 70 65 63 74 65 64 20 74 6f  d is expected to
aaa0: 20 62 65 20 72 65 74 75 72 6e 65 64 20 62 79 20   be returned by 
aab0: 74 68 65 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70  the.callback.</p
aac0: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
aad0: 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a  tools_options">.
aae0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
aaf0: 74 69 6f 6e 22 3e 70 61 73 73 77 6f 72 64 3c 2f  tion">password</
ab00: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
ab10: 22 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 69  ">rwflag size</i
ab20: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 6e  ></dt>.<dd><p>In
ab30: 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 69  voked when loadi
ab40: 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 6e  ng or storing an
ab50: 20 65 6e 63 72 79 70 74 65 64 20 50 45 4d 20 63   encrypted PEM c
ab60: 65 72 74 69 66 69 63 61 74 65 2e 20 54 68 65 20  ertificate. The 
ab70: 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f  arguments are:</
ab80: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
ab90: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
aba0: 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73  ns">.<dt><i clas
abb0: 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 67 3c 2f  s="arg">rwflag</
abc0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
abd0: 68 65 20 72 65 61 64 2f 77 72 69 74 65 20 66 6c  he read/write fl
abe0: 61 67 20 69 73 20 30 20 66 6f 72 20 72 65 61 64  ag is 0 for read
abf0: 69 6e 67 2f 64 65 63 72 79 70 74 69 6f 6e 20 6f  ing/decryption o
ac00: 72 20 31 20 66 6f 72 20 77 72 69 74 69 6e 67 2f  r 1 for writing/
ac10: 65 6e 63 72 79 70 74 69 6f 6e 2e 0a 54 68 65 20  encryption..The 
ac20: 6c 61 74 74 65 72 20 63 61 6e 20 62 65 20 75 73  latter can be us
ac30: 65 64 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20  ed to determine 
ac40: 77 68 65 6e 20 74 6f 20 70 72 6f 6d 70 74 20 74  when to prompt t
ac50: 68 65 20 75 73 65 72 20 74 6f 20 63 6f 6e 66 69  he user to confi
ac60: 72 6d 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e  rm..This argumen
ac70: 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c  t is new for Tcl
ac80: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64  TLS 1.8.</p></dd
ac90: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
aca0: 61 72 67 22 3e 73 69 7a 65 3c 2f 69 3e 3c 2f 64  arg">size</i></d
acb0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69  t>.<dd><p>The si
acc0: 7a 65 20 69 73 20 74 68 65 20 6d 61 78 69 6d 75  ze is the maximu
acd0: 6d 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20  m length of the 
ace0: 70 61 73 73 77 6f 72 64 20 69 6e 20 62 79 74 65  password in byte
acf0: 73 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74  s..This argument
ad00: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54   is new for TclT
ad10: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e  LS 1.8.</p></dd>
ad20: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  .</dl></dd>.</dl
ad30: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
ad40: 3d 22 73 75 62 73 65 63 74 69 6f 6e 36 22 20 63  ="subsection6" c
ad50: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73  lass="doctools_s
ad60: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c  ubsection"><h3><
ad70: 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69  a name="subsecti
ad80: 6f 6e 36 22 3e 56 61 6c 75 65 73 20 66 6f 72 20  on6">Values for 
ad90: 56 61 6c 69 64 61 74 65 20 43 6f 6d 6d 61 6e 64  Validate Command
ada0: 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68   Callback</a></h
adb0: 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c 62 61  3>.<p>The callba
adc0: 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 63 6c  ck for the <b cl
add0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61  ass="option">-va
ade0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62  lidatecommand</b
adf0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f  > option is invo
ae00: 6b 65 64 20 64 75 72 69 6e 67 20 74 68 65 20 68  ked during the h
ae10: 61 6e 64 73 68 61 6b 65 0a 70 72 6f 63 65 73 73  andshake.process
ae20: 20 69 6e 20 6f 72 64 65 72 20 66 6f 72 20 74 68   in order for th
ae30: 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 74 6f  e application to
ae40: 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 72   validate the pr
ae50: 6f 76 69 64 65 64 20 76 61 6c 75 65 28 73 29 2e  ovided value(s).
ae60: 20 53 65 65 0a 62 65 6c 6f 77 20 66 6f 72 20 74   See.below for t
ae70: 68 65 20 70 6f 73 73 69 62 6c 65 20 61 72 67 75  he possible argu
ae80: 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20  ments passed to 
ae90: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72  the callback scr
aea0: 69 70 74 2e 20 49 66 20 6e 6f 74 0a 73 70 65 63  ipt. If not.spec
aeb0: 69 66 69 65 64 2c 20 4f 70 65 6e 53 53 4c 20 77  ified, OpenSSL w
aec0: 69 6c 6c 20 61 63 63 65 70 74 20 61 6c 6c 20 76  ill accept all v
aed0: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65  alid certificate
aee0: 73 20 61 6e 64 20 65 78 74 65 6e 73 69 6f 6e 73  s and extensions
aef0: 2e 20 54 6f 20 72 65 6a 65 63 74 0a 74 68 65 20  . To reject.the 
af00: 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 20  value and abort 
af10: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20  the connection, 
af20: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f  the callback sho
af30: 75 6c 64 20 72 65 74 75 72 6e 20 30 2e 20 54 6f  uld return 0. To
af40: 20 61 63 63 65 70 74 20 74 68 65 0a 76 61 6c 75   accept the.valu
af50: 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74  e and continue t
af60: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69  he connection, i
af70: 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20  t should return 
af80: 31 2e 20 54 6f 20 72 65 6a 65 63 74 20 74 68 65  1. To reject the
af90: 20 76 61 6c 75 65 2c 20 62 75 74 0a 63 6f 6e 74   value, but.cont
afa0: 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74  inue the connect
afb0: 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72  ion, it should r
afc0: 65 74 75 72 6e 20 32 2e 20 54 68 69 73 20 63 61  eturn 2. This ca
afd0: 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f  llback is new fo
afe0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70  r TclTLS 1.8.</p
aff0: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
b000: 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a  tools_options">.
b010: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
b020: 74 69 6f 6e 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c  tion">alpn</b> <
b030: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
b040: 61 6e 6e 65 6c 49 64 20 70 72 6f 74 6f 63 6f 6c  annelId protocol
b050: 20 6d 61 74 63 68 3c 2f 69 3e 3c 2f 64 74 3e 0a   match</i></dt>.
b060: 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65  <dd><p>For serve
b070: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66  rs, this form of
b080: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
b090: 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63 6c  oked when the cl
b0a0: 69 65 6e 74 20 41 4c 50 4e 20 65 78 74 65 6e 73  ient ALPN extens
b0b0: 69 6f 6e 20 69 73 0a 72 65 63 65 69 76 65 64 2e  ion is.received.
b0c0: 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61 72   If <i class="ar
b0d0: 67 22 3e 6d 61 74 63 68 3c 2f 69 3e 20 69 73 20  g">match</i> is 
b0e0: 74 72 75 65 2c 20 74 68 65 6e 20 3c 69 20 63 6c  true, then <i cl
b0f0: 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63  ass="arg">protoc
b100: 6f 6c 3c 2f 69 3e 20 69 73 20 74 68 65 20 66 69  ol</i> is the fi
b110: 72 73 74 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  rst.<b class="op
b120: 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62 3e 20  tion">-alpn</b> 
b130: 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f 6e 20  protocol option 
b140: 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74  in common to bot
b150: 68 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64  h the client and
b160: 20 73 65 72 76 65 72 2e 0a 49 66 20 6e 6f 74 2c   server..If not,
b170: 20 74 68 65 20 66 69 72 73 74 20 63 6c 69 65 6e   the first clien
b180: 74 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74  t specified prot
b190: 6f 63 6f 6c 20 69 73 20 75 73 65 64 2e 20 54 68  ocol is used. Th
b1a0: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 63  is callback is c
b1b0: 61 6c 6c 65 64 0a 61 66 74 65 72 20 74 68 65 20  alled.after the 
b1c0: 48 65 6c 6c 6f 20 61 6e 64 20 41 4c 50 4e 20 63  Hello and ALPN c
b1d0: 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f 64  allbacks.</p></d
b1e0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
b1f0: 22 6f 70 74 69 6f 6e 22 3e 68 65 6c 6c 6f 3c 2f  "option">hello</
b200: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
b210: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76  ">channelId serv
b220: 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a  ername</i></dt>.
b230: 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65  <dd><p>For serve
b240: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66  rs, this form of
b250: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
b260: 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65  oked during clie
b270: 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 65  nt hello message
b280: 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 65  .processing. The
b290: 20 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 74   purpose is so t
b2a0: 68 65 20 73 65 72 76 65 72 20 63 61 6e 20 73 65  he server can se
b2b0: 6c 65 63 74 20 74 68 65 20 61 70 70 72 6f 70 72  lect the appropr
b2c0: 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74 65  iate certificate
b2d0: 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 74  .to present to t
b2e0: 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74  he client, and t
b2f0: 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f 6e  o make other con
b300: 66 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 73  figuration adjus
b310: 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 0a  tments relevant.
b320: 74 6f 20 74 68 61 74 20 73 65 72 76 65 72 20 6e  to that server n
b330: 61 6d 65 20 61 6e 64 20 69 74 73 20 63 6f 6e 66  ame and its conf
b340: 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 20 69 73  iguration. It is
b350: 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74   called before t
b360: 68 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 0a  he SNI and ALPN.
b370: 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f  callbacks.</p></
b380: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
b390: 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 3c 2f 62  ="option">sni</b
b3a0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
b3b0: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65  >channelId serve
b3c0: 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rname</i></dt>.<
b3d0: 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 72  dd><p>For server
b3e0: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20  s, this form of 
b3f0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
b400: 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 72  ked when the Ser
b410: 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74  ver Name Indicat
b420: 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73  ion.(SNI) extens
b430: 69 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 2e  ion is received.
b440: 20 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61   The <i class="a
b450: 72 67 22 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f  rg">servername</
b460: 69 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74  i> argument is t
b470: 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 64  he client.provid
b480: 65 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 73  ed server name s
b490: 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20  pecified in the 
b4a0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b4b0: 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 26 6c 74  ">-servername&lt
b4c0: 3b 2f 62 26 67 74 3b 3c 2f 62 3e 20 6f 70 74 69  ;/b&gt;</b> opti
b4d0: 6f 6e 2e 20 54 68 65 0a 70 75 72 70 6f 73 65 20  on. The.purpose 
b4e0: 69 73 20 73 6f 20 77 68 65 6e 20 61 20 73 65 72  is so when a ser
b4f0: 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c  ver supports mul
b500: 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 65  tiple names, the
b510: 20 72 69 67 68 74 20 63 65 72 74 69 66 69 63 61   right certifica
b520: 74 65 0a 63 61 6e 20 62 65 20 75 73 65 64 2e 20  te.can be used. 
b530: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 66 74  It is called aft
b540: 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 63 61 6c  er the hello cal
b550: 6c 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72 65  lback but before
b560: 20 74 68 65 20 41 4c 50 4e 0a 63 61 6c 6c 62 61   the ALPN.callba
b570: 63 6b 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ck.</p></dd>.<dt
b580: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
b590: 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69  n">verify</b> <i
b5a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b5b0: 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 72  nnelId depth cer
b5c0: 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f  t status error</
b5d0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
b5e0: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c  his form of call
b5f0: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20  back is invoked 
b600: 62 79 20 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20  by OpenSSL when 
b610: 61 20 6e 65 77 20 63 65 72 74 69 66 69 63 61 74  a new certificat
b620: 65 20 69 73 20 72 65 63 65 69 76 65 64 0a 66 72  e is received.fr
b630: 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 20  om the peer. It 
b640: 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e  allows the clien
b650: 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 63  t to check the c
b660: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66  ertificate verif
b670: 69 63 61 74 69 6f 6e 0a 72 65 73 75 6c 74 73 20  ication.results 
b680: 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 65 74 68  and choose wheth
b690: 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65 20 6f  er to continue o
b6a0: 72 20 6e 6f 74 2e 20 49 74 20 69 73 20 63 61 6c  r not. It is cal
b6b0: 6c 65 64 20 66 6f 72 20 65 61 63 68 0a 63 65 72  led for each.cer
b6c0: 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20  tificate in the 
b6d0: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69  certificate chai
b6e0: 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b  n. This callback
b6f0: 20 77 61 73 20 6d 6f 76 65 64 20 66 72 6f 6d 0a   was moved from.
b700: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b710: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69  ">-command</b> i
b720: 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 20 54 68  n TclTLS 1.8. Th
b730: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a  e arguments are:
b740: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22  </p>.<dl class="
b750: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74  doctools_definit
b760: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ions">.<dt><i cl
b770: 61 73 73 3d 22 61 72 67 22 3e 64 65 70 74 68 3c  ass="arg">depth<
b780: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
b790: 54 68 65 20 64 65 70 74 68 20 69 73 20 74 68 65  The depth is the
b7a0: 20 69 6e 74 65 67 65 72 20 64 65 70 74 68 20 6f   integer depth o
b7b0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
b7c0: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69  e in the certifi
b7d0: 63 61 74 65 20 63 68 61 69 6e 2c 0a 77 68 65 72  cate chain,.wher
b7e0: 65 20 30 20 69 73 20 74 68 65 20 70 65 65 72 20  e 0 is the peer 
b7f0: 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 20  certificate and 
b800: 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 67 6f  higher values go
b810: 69 6e 67 20 75 70 20 74 6f 20 74 68 65 20 43 65  ing up to the Ce
b820: 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f 72  rtificate.Author
b830: 69 74 79 20 28 43 41 29 2e 3c 2f 70 3e 3c 2f 64  ity (CA).</p></d
b840: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  d>.<dt><i class=
b850: 22 61 72 67 22 3e 63 65 72 74 3c 2f 69 3e 3c 2f  "arg">cert</i></
b860: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63  dt>.<dd><p>The c
b870: 65 72 74 20 61 72 67 75 6d 65 6e 74 20 69 73 20  ert argument is 
b880: 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61  a list of key-va
b890: 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c 61  lue pairs simila
b8a0: 72 20 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72  r to those retur
b8b0: 6e 65 64 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d  ned by.<b class=
b8c0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75  "cmd">tls::statu
b8d0: 73 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  s</b>.</p></dd>.
b8e0: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72  <dt><i class="ar
b8f0: 67 22 3e 73 74 61 74 75 73 3c 2f 69 3e 3c 2f 64  g">status</i></d
b900: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 74  t>.<dd><p>The st
b910: 61 74 75 73 20 61 72 67 75 6d 65 6e 74 20 69 73  atus argument is
b920: 20 74 68 65 20 62 6f 6f 6c 65 61 6e 20 76 61 6c   the boolean val
b930: 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 75 72  idity of the cur
b940: 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 65  rent certificate
b950: 20 77 68 65 72 65 20 30 0a 69 73 20 69 6e 76 61   where 0.is inva
b960: 6c 69 64 20 61 6e 64 20 31 20 69 73 20 76 61 6c  lid and 1 is val
b970: 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  id.</p></dd>.<dt
b980: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e  ><i class="arg">
b990: 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  error</i></dt>.<
b9a0: 64 64 3e 3c 70 3e 54 68 65 20 65 72 72 6f 72 20  dd><p>The error 
b9b0: 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20  argument is the 
b9c0: 65 72 72 6f 72 20 6d 65 73 73 61 67 65 2c 20 69  error message, i
b9d0: 66 20 61 6e 79 2c 20 67 65 6e 65 72 61 74 65 64  f any, generated
b9e0: 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75   by.<b class="fu
b9f0: 6e 63 74 69 6f 6e 22 3e 58 35 30 39 5f 53 54 4f  nction">X509_STO
ba00: 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f 72  RE_CTX_get_error
ba10: 28 29 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e  ()</b>.</p></dd>
ba20: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  .</dl></dd>.</dl
ba30: 3e 0a 3c 70 3e 52 65 66 65 72 65 6e 63 65 20 69  >.<p>Reference i
ba40: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f  mplementations o
ba50: 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 6b  f these callback
ba60: 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 69  s are provided i
ba70: 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73  n &quot;<b class
ba80: 3d 22 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c  ="file">tls.tcl<
ba90: 2f 62 3e 26 71 75 6f 74 3b 0a 61 73 20 3c 62 20  /b>&quot;.as <b 
baa0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a  class="cmd">tls:
bab0: 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c  :callback</b>, <
bac0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
bad0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c  s::password</b>,
bae0: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63   and <b class="c
baf0: 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74  md">tls::validat
bb00: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 72 65  e_command</b>.re
bb10: 73 70 65 63 74 69 76 65 6c 79 2e 20 4e 6f 74 65  spectively. Note
bb20: 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 20   that these are 
bb30: 6f 6e 6c 79 20 3c 65 6d 3e 73 61 6d 70 6c 65 3c  only <em>sample<
bb40: 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74  /em> implementat
bb50: 69 6f 6e 73 2e 20 49 6e 20 61 20 6d 6f 72 65 0a  ions. In a more.
bb60: 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c 6f 79  realistic deploy
bb70: 6d 65 6e 74 20 79 6f 75 20 77 6f 75 6c 64 20 73  ment you would s
bb80: 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 6e 20  pecify your own 
bb90: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 73  callback scripts
bba0: 20 6f 6e 20 65 61 63 68 20 54 4c 53 0a 63 68 61   on each TLS.cha
bbb0: 6e 6e 65 6c 20 75 73 69 6e 67 20 74 68 65 20 3c  nnel using the <
bbc0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
bbd0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c  >-command</b>, <
bbe0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
bbf0: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20  >-password</b>, 
bc00: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and.<b class="op
bc10: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 5f  tion">-validate_
bc20: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69  command</b> opti
bc30: 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 68 65 20  ons.</p>.<p>The 
bc40: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72  default behavior
bc50: 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61   when the <b cla
bc60: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d  ss="option">-com
bc70: 6d 61 6e 64 3c 2f 62 3e 20 61 6e 64 20 3c 62 20  mand</b> and <b 
bc80: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
bc90: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
bca0: 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 73 20 61 72 65  </b>.options are
bcb0: 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2c 20   not specified, 
bcc0: 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f  is for TclTLS to
bcd0: 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73   process the ass
bce0: 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 0a  ociated library.
bcf0: 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e  callbacks intern
bd00: 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 75 6c  ally. The defaul
bd10: 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20  t behavior when 
bd20: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
bd30: 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c  tion">-password<
bd40: 2f 62 3e 20 6f 70 74 69 6f 6e 0a 69 73 20 6e 6f  /b> option.is no
bd50: 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66  t specified is f
bd60: 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f  or TclTLS to pro
bd70: 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61  cess the associa
bd80: 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c  ted library call
bd90: 62 61 63 6b 73 20 62 79 0a 61 74 74 65 6d 70 74  backs by.attempt
bda0: 69 6e 67 20 74 6f 20 63 61 6c 6c 20 3c 62 20 63  ing to call <b c
bdb0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
bdc0: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2e 20 54 68  password</b>. Th
bdd0: 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 74  e difference bet
bde0: 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f 0a 62  ween these two.b
bdf0: 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 63 6f  ehaviors is a co
be00: 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 69  nsequence of mai
be10: 6e 74 61 69 6e 69 6e 67 20 63 6f 6d 70 61 74 69  ntaining compati
be20: 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 72 6c  bility with earl
be30: 69 65 72 0a 69 6d 70 6c 65 6d 65 6e 74 61 74 69  ier.implementati
be40: 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e  ons.</p>.<p><em>
be50: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 72  The use of the r
be60: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63  eference callbac
be70: 6b 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  ks <b class="cmd
be80: 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c  ">tls::callback<
be90: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63  /b>, <b class="c
bea0: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  md">tls::passwor
beb0: 64 3c 2f 62 3e 2c 0a 61 6e 64 20 3c 62 20 63 6c  d</b>,.and <b cl
bec0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76  ass="cmd">tls::v
bed0: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c  alidate_command<
bee0: 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d  /b> is not recom
bef0: 6d 65 6e 64 65 64 2e 20 54 68 65 79 20 6d 61 79  mended. They may
bf00: 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d   be removed from
bf10: 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73   future releases
bf20: 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 76  .</em></p>.</div
bf30: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
bf40: 3d 22 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 73  ="section5" clas
bf50: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
bf60: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
bf70: 3d 22 73 65 63 74 69 6f 6e 35 22 3e 44 65 62 75  ="section5">Debu
bf80: 67 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 46 6f  g</a></h2>.<p>Fo
bf90: 72 20 6d 6f 73 74 20 64 65 62 75 67 67 69 6e 67  r most debugging
bfa0: 20 6e 65 65 64 73 2c 20 74 68 65 20 3c 62 20 63   needs, the <b c
bfb0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
bfc0: 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 6f 70 74 69  allback</b> opti
bfd0: 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 74  on can be used t
bfe0: 6f 20 70 72 6f 76 69 64 65 0a 73 75 66 66 69 63  o provide.suffic
bff0: 69 65 6e 74 20 69 6e 73 69 67 68 74 20 61 6e 64  ient insight and
c000: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20   information on 
c010: 74 68 65 20 54 4c 53 20 68 61 6e 64 73 68 61 6b  the TLS handshak
c020: 65 20 61 6e 64 20 70 72 6f 67 72 65 73 73 2e 20  e and progress. 
c030: 49 66 0a 66 75 72 74 68 65 72 20 74 72 6f 75 62  If.further troub
c040: 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e 73 69 67  leshooting insig
c050: 68 74 20 69 73 20 6e 65 65 64 65 64 2c 20 74 68  ht is needed, th
c060: 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f  e compile time o
c070: 70 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22  ption.<b class="
c080: 6f 70 74 69 6f 6e 22 3e 2d 2d 65 6e 61 62 6c 65  option">--enable
c090: 2d 64 65 62 75 67 3c 2f 62 3e 20 63 61 6e 20 62  -debug</b> can b
c0a0: 65 20 75 73 65 64 20 74 6f 20 67 65 74 20 64 65  e used to get de
c0b0: 74 61 69 6c 65 64 20 65 78 65 63 75 74 69 6f 6e  tailed execution
c0c0: 20 66 6c 6f 77 20 73 74 61 74 75 73 2e 3c 2f 70   flow status.</p
c0d0: 3e 0a 3c 70 3e 54 4c 53 20 6b 65 79 20 6c 6f 67  >.<p>TLS key log
c0e0: 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62  ging can be enab
c0f0: 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 74  led by setting t
c100: 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76  he environment v
c110: 61 72 69 61 62 6c 65 0a 3c 62 20 63 6c 61 73 73  ariable.<b class
c120: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 4b  ="variable">SSLK
c130: 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f  EYLOGFILE</b> to
c140: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65   the name of the
c150: 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e   file to log to.
c160: 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54   Then whenever T
c170: 4c 53 20 6b 65 79 0a 6d 61 74 65 72 69 61 6c 20  LS key.material 
c180: 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20  is generated or 
c190: 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c  received it will
c1a0: 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68   be logged to th
c1b0: 65 20 66 69 6c 65 2e 20 54 68 69 73 20 69 73 20  e file. This is 
c1c0: 75 73 65 66 75 6c 0a 66 6f 72 20 6c 6f 67 67 69  useful.for loggi
c1d0: 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72 20  ng key data for 
c1e0: 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 20  network logging 
c1f0: 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f 20  tools to use to 
c200: 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 61  decrypt the data
c210: 2e 3c 2f 70 3e 0a 3c 70 3e 54 68 65 20 3c 62 20  .</p>.<p>The <b 
c220: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
c230: 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 62 3e 20  >tls::debug</b> 
c240: 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65  variable provide
c250: 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61  s some additiona
c260: 6c 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74  l control over t
c270: 68 65 0a 64 65 62 75 67 20 6c 6f 67 67 69 6e 67  he.debug logging
c280: 20 69 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73   in the <b class
c290: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c  ="cmd">tls::call
c2a0: 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61  back</b>, <b cla
c2b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61  ss="cmd">tls::pa
c2c0: 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a  ssword</b>, and.
c2d0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
c2e0: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d  ls::validate_com
c2f0: 6d 61 6e 64 3c 2f 62 3e 20 64 65 66 61 75 6c 74  mand</b> default
c300: 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 26 71 75   handlers in &qu
c310: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c  ot;<b class="fil
c320: 65 22 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71  e">tls.tcl</b>&q
c330: 75 6f 74 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c  uot;..The defaul
c340: 74 20 76 61 6c 75 65 20 69 73 20 30 20 77 69 74  t value is 0 wit
c350: 68 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20  h higher values 
c360: 70 72 6f 64 75 63 69 6e 67 20 6d 6f 72 65 20 64  producing more d
c370: 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 74  iagnostic output
c380: 2c 0a 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20  ,.and will also 
c390: 66 6f 72 63 65 20 74 68 65 20 76 65 72 69 66 79  force the verify
c3a0: 20 6d 65 74 68 6f 64 20 69 6e 20 3c 62 20 63 6c   method in <b cl
c3b0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63  ass="cmd">tls::c
c3c0: 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 74 6f 20 61  allback</b> to a
c3d0: 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66  ccept the.certif
c3e0: 69 63 61 74 65 2c 20 65 76 65 6e 20 69 66 20 69  icate, even if i
c3f0: 74 20 69 73 20 69 6e 76 61 6c 69 64 20 77 68 65  t is invalid whe
c400: 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  n the <b class="
c410: 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74  option">-validat
c420: 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74  ecommand</b>.opt
c430: 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 3c 62  ion is set to <b
c440: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73   class="cmd">tls
c450: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61  ::validate_comma
c460: 6e 64 3c 2f 62 3e 2e 3c 2f 70 3e 0a 3c 70 3e 3c  nd</b>.</p>.<p><
c470: 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20 74 68  em>The use of th
c480: 65 20 76 61 72 69 61 62 6c 65 20 3c 62 20 63 6c  e variable <b cl
c490: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74  ass="variable">t
c4a0: 6c 73 3a 3a 64 65 62 75 67 3c 2f 62 3e 20 69 73  ls::debug</b> is
c4b0: 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64   not recommended
c4c0: 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f  ..It may be remo
c4d0: 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20  ved from future 
c4e0: 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f  releases.</em></
c4f0: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  p>.</div>.<div i
c500: 64 3d 22 73 65 63 74 69 6f 6e 36 22 20 63 6c 61  d="section6" cla
c510: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63  ss="doctools_sec
c520: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d  tion"><h2><a nam
c530: 65 3d 22 73 65 63 74 69 6f 6e 36 22 3e 48 54 54  e="section6">HTT
c540: 50 20 50 61 63 6b 61 67 65 20 45 78 61 6d 70 6c  P Package Exampl
c550: 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54  es</a></h2>.<p>T
c560: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65  he following are
c570: 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74 73   example scripts
c580: 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 61 20 77   to download a w
c590: 65 62 70 61 67 65 20 61 6e 64 20 66 69 6c 65 20  ebpage and file 
c5a0: 75 73 69 6e 67 20 74 68 65 0a 68 74 74 70 20 70  using the.http p
c5b0: 61 63 6b 61 67 65 2e 20 53 65 65 20 3c 73 70 61  ackage. See <spa
c5c0: 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66  n class="sectref
c5d0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74  "><a href="#sect
c5e0: 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74  ion3">Certificat
c5f0: 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e  e Validation</a>
c600: 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 77 68 65 74  </span> for whet
c610: 68 65 72 20 74 68 65 0a 3c 62 20 63 6c 61 73 73  her the.<b class
c620: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72  ="option">-cadir
c630: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
c640: 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c  option">-cafile<
c650: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73  /b>, and <b clas
c660: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
c670: 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20  ore</b> options 
c680: 61 72 65 20 61 6c 73 6f 0a 6e 65 65 64 65 64 2e  are also.needed.
c690: 20 53 65 65 20 74 68 65 20 64 65 6d 6f 73 20 64   See the demos d
c6a0: 69 72 65 63 74 6f 72 79 20 66 6f 72 20 6d 6f 72  irectory for mor
c6b0: 65 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74  e example script
c6c0: 73 2e 3c 2f 70 3e 0a 3c 70 3e 45 78 61 6d 70 6c  s.</p>.<p>Exampl
c6d0: 65 20 23 31 3a 20 44 6f 77 6e 6c 6f 61 64 20 61  e #1: Download a
c6e0: 20 77 65 62 20 70 61 67 65 3c 2f 70 3e 0a 3c 70   web page</p>.<p
c6f0: 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  re class="doctoo
c700: 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63  ls_example">.pac
c710: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74  kage require htt
c720: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  p.package requir
c730: 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 71  e tls.set url &q
c740: 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 77 77 2e  uot;https://www.
c750: 74 63 6c 2e 74 6b 2f 26 71 75 6f 74 3b 0a 68 74  tcl.tk/&quot;.ht
c760: 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74  tp::register htt
c770: 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74  ps 443 [list ::t
c780: 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f  ls::socket -auto
c790: 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65  servername 1 -re
c7a0: 71 75 69 72 65 20 31 5d 0a 23 20 47 65 74 20 55  quire 1].# Get U
c7b0: 52 4c 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74  RL.set token [ht
c7c0: 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d  tp::geturl $url]
c7d0: 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72  .# Check for err
c7e0: 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74  or.if {[http::st
c7f0: 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20  atus $token] ne 
c800: 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20  &quot;ok&quot;} 
c810: 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 6f 72 6d  {.    puts [form
c820: 61 74 20 26 71 75 6f 74 3b 45 72 72 6f 72 20 25  at &quot;Error %
c830: 73 26 71 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73  s&quot; [http::s
c840: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d  tatus $token]].}
c850: 0a 23 20 53 61 76 65 20 77 65 62 20 70 61 67 65  .# Save web page
c860: 20 74 6f 20 66 69 6c 65 0a 73 65 74 20 63 68 20   to file.set ch 
c870: 5b 6f 70 65 6e 20 65 78 61 6d 70 6c 65 2e 68 74  [open example.ht
c880: 6d 6c 20 77 62 5d 0a 70 75 74 73 20 24 63 68 20  ml wb].puts $ch 
c890: 5b 68 74 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b  [http::data $tok
c8a0: 65 6e 5d 0a 63 6c 6f 73 65 20 24 63 68 0a 23 20  en].close $ch.# 
c8b0: 43 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a  Cleanup.::http::
c8c0: 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c  cleanup $token.<
c8d0: 2f 70 72 65 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65  /pre>.<p>Example
c8e0: 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 20   #2: Download a 
c8f0: 66 69 6c 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c  file</p>.<pre cl
c900: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78  ass="doctools_ex
c910: 61 6d 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20  ample">.package 
c920: 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63  require http.pac
c930: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73  kage require tls
c940: 0a 73 65 74 20 75 72 6c 20 26 71 75 6f 74 3b 68  .set url &quot;h
c950: 74 74 70 73 3a 2f 2f 77 69 6b 69 2e 74 63 6c 2d  ttps://wiki.tcl-
c960: 6c 61 6e 67 2e 6f 72 67 2f 73 69 74 65 6d 61 70  lang.org/sitemap
c970: 2e 78 6d 6c 26 71 75 6f 74 3b 0a 68 74 74 70 3a  .xml&quot;.http:
c980: 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20  :register https 
c990: 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a  443 [list ::tls:
c9a0: 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72  :socket -autoser
c9b0: 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 75 69  vername 1 -requi
c9c0: 72 65 20 31 5d 0a 23 20 4f 70 65 6e 20 6f 75 74  re 1].# Open out
c9d0: 70 75 74 20 66 69 6c 65 0a 73 65 74 20 66 69 6c  put file.set fil
c9e0: 65 6e 61 6d 65 20 5b 66 69 6c 65 20 74 61 69 6c  ename [file tail
c9f0: 20 24 75 72 6c 5d 0a 73 65 74 20 63 68 20 5b 6f   $url].set ch [o
ca00: 70 65 6e 20 24 66 69 6c 65 6e 61 6d 65 20 77 62  pen $filename wb
ca10: 5d 0a 23 20 47 65 74 20 66 69 6c 65 0a 73 65 74  ].# Get file.set
ca20: 20 74 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a   token [::http::
ca30: 67 65 74 75 72 6c 20 24 75 72 6c 20 2d 62 6c 6f  geturl $url -blo
ca40: 63 6b 73 69 7a 65 20 36 35 35 33 36 20 2d 63 68  cksize 65536 -ch
ca50: 61 6e 6e 65 6c 20 24 63 68 5d 0a 23 20 43 68 65  annel $ch].# Che
ca60: 63 6b 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20  ck for error.if 
ca70: 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24  {[http::status $
ca80: 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b  token] ne &quot;
ca90: 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 20 20 20  ok&quot;} {.    
caa0: 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71 75  puts [format &qu
cab0: 6f 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f 74  ot;Error %s&quot
cac0: 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20  ; [http::status 
cad0: 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 43 6c 65  $token]].}.# Cle
cae0: 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 68 0a 3a  anup.close $ch.:
caf0: 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24  :http::cleanup $
cb00: 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 2f 64  token.</pre>.</d
cb10: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63  iv>.<div id="sec
cb20: 74 69 6f 6e 37 22 20 63 6c 61 73 73 3d 22 64 6f  tion7" class="do
cb30: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e  ctools_section">
cb40: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63  <h2><a name="sec
cb50: 74 69 6f 6e 37 22 3e 53 70 65 63 69 61 6c 20 43  tion7">Special C
cb60: 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c 2f 61  onsiderations</a
cb70: 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 63 61  ></h2>.<p>The ca
cb80: 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74 68  pabilities of th
cb90: 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20 76  is package can v
cba0: 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62  ary enormously b
cbb0: 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 74 68  ased upon how th
cbc0: 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 65 6e  e.linked to Open
cbd0: 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20  SSL library was 
cbe0: 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62  configured and b
cbf0: 75 69 6c 74 2e 20 4e 65 77 20 76 65 72 73 69 6f  uilt. New versio
cc00: 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 74 65 0a  ns may obsolete.
cc10: 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f 6c 20 76  older protocol v
cc20: 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 6f 72 20  ersions, add or 
cc30: 72 65 6d 6f 76 65 20 63 69 70 68 65 72 73 2c 20  remove ciphers, 
cc40: 63 68 61 6e 67 65 20 64 65 66 61 75 6c 74 20 76  change default v
cc50: 61 6c 75 65 73 2c 20 65 74 63 2e 0a 55 73 65 20  alues, etc..Use 
cc60: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  the <b class="cm
cc70: 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  d">tls::protocol
cc80: 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 73 20 74  s</b> commands t
cc90: 6f 20 6f 62 74 61 69 6e 20 74 68 65 20 73 75 70  o obtain the sup
cca0: 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c 20  ported.protocol 
ccb0: 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 2f  versions.</p>.</
ccc0: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65  div>.<div id="se
ccd0: 65 2d 61 6c 73 6f 22 20 63 6c 61 73 73 3d 22 64  e-also" class="d
cce0: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
ccf0: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65  ><h2><a name="se
cd00: 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73 6f  e-also">See Also
cd10: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 3c 61 20  </a></h2>.<p><a 
cd20: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77  href="https://ww
cd30: 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e  w.openssl.org/">
cd40: 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 68 74 74  OpenSSL</a>, htt
cd50: 70 2c 20 73 6f 63 6b 65 74 3c 2f 70 3e 0a 3c 2f  p, socket</p>.</
cd60: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 6b 65  div>.<div id="ke
cd70: 79 77 6f 72 64 73 22 20 63 6c 61 73 73 3d 22 64  ywords" class="d
cd80: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
cd90: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6b 65  ><h2><a name="ke
cda0: 79 77 6f 72 64 73 22 3e 4b 65 79 77 6f 72 64 73  ywords">Keywords
cdb0: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 49 2f 4f  </a></h2>.<p>I/O
cdc0: 2c 20 49 50 20 41 64 64 72 65 73 73 2c 20 4f 70  , IP Address, Op
cdd0: 65 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 43 50 2c  enSSL, SSL, TCP,
cde0: 20 54 4c 53 2c 20 54 63 6c 54 4c 53 2c 20 61 73   TLS, TclTLS, as
cdf0: 79 6e 63 68 72 6f 6e 6f 75 73 20 49 2f 4f 2c 20  ynchronous I/O, 
ce00: 62 69 6e 64 2c 20 63 65 72 74 69 66 69 63 61 74  bind, certificat
ce10: 65 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 6f 6e 6e  e, channel, conn
ce20: 65 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e 20 6e  ection, domain n
ce30: 61 6d 65 2c 20 68 6f 73 74 2c 20 68 74 74 70 73  ame, host, https
ce40: 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 74 77 6f  , network, netwo
ce50: 72 6b 20 61 64 64 72 65 73 73 2c 20 73 6f 63 6b  rk address, sock
ce60: 65 74 2c 20 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 69  et, tls</p>.</di
ce70: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63 61 74 65  v>.<div id="cate
ce80: 67 6f 72 79 22 20 63 6c 61 73 73 3d 22 64 6f 63  gory" class="doc
ce90: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c  tools_section"><
cea0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 61 74 65  h2><a name="cate
ceb0: 67 6f 72 79 22 3e 43 61 74 65 67 6f 72 79 3c 2f  gory">Category</
cec0: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 74 6c 73 3c 2f  a></h2>.<p>tls</
ced0: 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69  p>.</div>.<div i
cee0: 64 3d 22 63 6f 70 79 72 69 67 68 74 22 20 63 6c  d="copyright" cl
cef0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65  ass="doctools_se
cf00: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61  ction"><h2><a na
cf10: 6d 65 3d 22 63 6f 70 79 72 69 67 68 74 22 3e 43  me="copyright">C
cf20: 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c 2f 68 32  opyright</a></h2
cf30: 3e 0a 3c 70 3e 43 6f 70 79 72 69 67 68 74 20 26  >.<p>Copyright &
cf40: 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 74 20  copy; 1999 Matt 
cf50: 4e 65 77 6d 61 6e 3c 62 72 3e 0a 43 6f 70 79 72  Newman<br>.Copyr
cf60: 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34  ight &copy; 2004
cf70: 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d   Starfish System
cf80: 73 3c 62 72 3e 0a 43 6f 70 79 72 69 67 68 74 20  s<br>.Copyright 
cf90: 26 63 6f 70 79 3b 20 32 30 32 34 20 42 72 69 61  &copy; 2024 Bria
cfa0: 6e 20 4f 27 48 61 67 61 6e 3c 2f 70 3e 0a 3c 2f  n O'Hagan</p>.</
cfb0: 64 69 76 3e 0a 3c 2f 64 69 76 3e 3c 2f 62 6f 64  div>.</div></bod
cfc0: 79 3e 3c 2f 68 74 6d 6c 3e 0a                    y></html>.