Hex Artifact Content

Artifact 5af1eb3236de27171a877450123fe5d9fe200f718ef210fe4c647bc06ac89f49:


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 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54  >. Starting in T
3aa0: 63 6c 54 4c 53 20 32 2e 30 2c 20 49 66 20 73 65  clTLS 2.0, If se
3ab0: 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63  t to <b class="c
3ac0: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20  onst">false</b> 
3ad0: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  and.<b class="op
3ae0: 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f  tion">-require</
3af0: 62 3e 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22  b> is <b class="
3b00: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c  const">true</b>,
3b10: 20 74 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20   then this will 
3b20: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 74 6f  be overridden to
3b30: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
3b40: 22 3e 74 72 75 65 3c 2f 62 3e 2e 0a 53 65 65 20  ">true</b>..See 
3b50: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63  <span class="sec
3b60: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23  tref"><a href="#
3b70: 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66  section3">Certif
3b80: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e  icate Validation
3b90: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20  </a></span> for 
3ba0: 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70  more details.</p
3bb0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
3bc0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65  ass="option">-re
3bd0: 71 75 69 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  quire</b> <i cla
3be0: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69  ss="arg">bool</i
3bf0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65  ></dt>.<dd><p>Re
3c00: 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 65  quire a valid ce
3c10: 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74  rtificate from t
3c20: 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 74  he peer during t
3c30: 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65  he SSL handshake
3c40: 2e 20 49 66 20 74 68 69 73 20 69 73 0a 73 65 74  . If this is.set
3c50: 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 3c   to true, then <
3c60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
3c70: 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 6d 75  >-request</b> mu
3c80: 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74  st also be set t
3c90: 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 74  o true and a eit
3ca0: 68 65 72 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  her.<b class="op
3cb0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
3cc0: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  , <b class="opti
3cd0: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c  on">-cafile</b>,
3ce0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
3cf0: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 2c  n">-castore</b>,
3d00: 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64   or a platform d
3d10: 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70  efault.must be p
3d20: 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72  rovided in order
3d30: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61   to validate aga
3d40: 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61 75 6c  inst. The defaul
3d50: 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 20  t in TclTLS 1.8 
3d60: 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72 73  and.earlier vers
3d70: 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c 61 73 73  ions is <b class
3d80: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
3d90: 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c 6c  b> since not all
3da0: 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 20   platforms have 
3db0: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 0a  certificates to.
3dc0: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74  validate against
3dd0: 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 61   in a form compa
3de0: 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e 53  tible with OpenS
3df0: 53 4c 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20  SL. Starting in 
3e00: 54 63 6c 54 4c 53 20 32 2e 30 2c 0a 74 68 65 20  TclTLS 2.0,.the 
3e10: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c  default is <b cl
3e20: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
3e30: 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e 20  </b>..See <span 
3e40: 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e  class="sectref">
3e50: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f  <a href="#sectio
3e60: 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 20  n3">Certificate 
3e70: 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f  Validation</a></
3e80: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64  span> for more d
3e90: 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  etails.</p></dd>
3ea0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
3eb0: 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69 74 79  ption">-security
3ec0: 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c  _level</b> <i cl
3ed0: 61 73 73 3d 22 61 72 67 22 3e 69 6e 74 65 67 65  ass="arg">intege
3ee0: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
3ef0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20  p>Specifies the 
3f00: 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 28  security level (
3f10: 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74 6f 20  value from 0 to 
3f20: 35 29 2e 20 54 68 65 20 73 65 63 75 72 69 74 79  5). The security
3f30: 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a 74   level affects.t
3f40: 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70 68 65  he allowed ciphe
3f50: 72 20 73 75 69 74 65 20 65 6e 63 72 79 70 74 69  r suite encrypti
3f60: 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73  on algorithms, s
3f70: 75 70 70 6f 72 74 65 64 20 45 43 43 20 63 75 72  upported ECC cur
3f80: 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64 20 73  ves,.supported s
3f90: 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74  ignature algorit
3fa0: 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65  hms, DH paramete
3fb0: 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69  r sizes, certifi
3fc0: 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73 0a 61  cate key sizes.a
3fd0: 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67  nd signature alg
3fe0: 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66  orithms. The def
3ff0: 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20  ault is 1 prior 
4000: 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 61  to OpenSSL 3.2 a
4010: 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65 72 2e  nd 2.thereafter.
4020: 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69 67   Level 3 and hig
4030: 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70 70  her disable supp
4040: 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e 20  ort for session 
4050: 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e 6c 79  tickets and.only
4060: 20 61 63 63 65 70 74 20 63 69 70 68 65 72 20 73   accept cipher s
4070: 75 69 74 65 73 20 74 68 61 74 20 70 72 6f 76 69  uites that provi
4080: 64 65 20 66 6f 72 77 61 72 64 20 73 65 63 72 65  de forward secre
4090: 63 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  cy.</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 3c 2f 62 3e 20 3c  n">-server</b> <
40c0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
40d0: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ol</i></dt>.<dd>
40e0: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 77 68 65  <p>Specifies whe
40f0: 74 68 65 72 20 74 6f 20 61 63 74 20 61 73 20 61  ther to act as a
4100: 20 73 65 72 76 65 72 20 61 6e 64 20 72 65 73 70   server and resp
4110: 6f 6e 64 20 77 69 74 68 20 61 20 73 65 72 76 65  ond with a serve
4120: 72 20 68 61 6e 64 73 68 61 6b 65 20 77 68 65 6e  r handshake when
4130: 20 61 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63   a.client connec
4140: 74 73 20 61 6e 64 20 70 72 6f 76 69 64 65 73 20  ts and provides 
4150: 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 61  a client handsha
4160: 6b 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ke. The default 
4170: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e  is <b class="con
4180: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c 2f  st">false</b>.</
4190: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
41a0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
41b0: 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69  ervername</b> <i
41c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73   class="arg">hos
41d0: 74 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tname</i></dt>.<
41e0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 79 20 74 68  dd><p>Specify th
41f0: 65 20 70 65 65 72 27 73 20 68 6f 73 74 6e 61 6d  e peer's hostnam
4200: 65 2e 20 54 68 69 73 20 69 73 20 75 73 65 64 20  e. This is used 
4210: 74 6f 20 73 65 74 20 74 68 65 20 54 4c 53 20 53  to set the TLS S
4220: 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63  erver Name Indic
4230: 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65  ation.(SNI) exte
4240: 6e 73 69 6f 6e 2e 20 53 65 74 20 74 68 69 73 20  nsion. Set this 
4250: 74 6f 20 74 68 65 20 65 78 70 65 63 74 65 64 20  to the expected 
4260: 73 65 72 76 65 72 6e 61 6d 65 20 69 6e 20 74 68  servername in th
4270: 65 20 73 65 72 76 65 72 27 73 20 63 65 72 74 69  e server's certi
4280: 66 69 63 61 74 65 0a 6f 72 20 6f 6e 65 20 6f 66  ficate.or one of
4290: 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74   the Subject Alt
42a0: 65 72 6e 61 74 65 20 4e 61 6d 65 73 20 28 53 41  ernate Names (SA
42b0: 4e 29 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20  N). Starting in 
42c0: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73  TclTLS 2.0, this
42d0: 20 77 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f   will.default to
42e0: 20 74 68 65 20 68 6f 73 74 20 66 6f 72 20 74 68   the host for th
42f0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
4300: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
4310: 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c 2f 64   command.</p></d
4320: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
4330: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f  "option">-sessio
4340: 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  n_id</b> <i clas
4350: 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73  s="arg">binary_s
4360: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tring</i></dt>.<
4370: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20  dd><p>Specifies 
4380: 74 68 65 20 73 65 73 73 69 6f 6e 20 69 64 20 74  the session id t
4390: 6f 20 72 65 73 75 6d 65 20 61 20 73 65 73 73 69  o resume a sessi
43a0: 6f 6e 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 65  on. Not supporte
43b0: 64 20 79 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  d yet.</p></dd>.
43c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
43d0: 74 69 6f 6e 22 3e 2d 73 73 6c 32 3c 2f 62 3e 20  tion">-ssl2</b> 
43e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
43f0: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ool</i></dt>.<dd
4400: 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  ><p>Enable use o
4410: 66 20 53 53 4c 20 76 32 2e 54 68 65 20 64 65 66  f SSL v2.The def
4420: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4430: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f  ="const">false</
4440: 62 3e 2e 0a 4f 70 65 6e 53 53 4c 20 31 2e 31 2b  b>..OpenSSL 1.1+
4450: 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 6f   no longer suppo
4460: 72 74 73 20 53 53 4c 20 76 32 2c 20 73 6f 20 74  rts SSL v2, so t
4470: 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 65  his may not have
4480: 20 61 6e 79 20 65 66 66 65 63 74 2e 0a 53 65 65   any effect..See
4490: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63   the <b class="c
44a0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  md">tls::protoco
44b0: 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66  ls</b> command f
44c0: 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f  or supported pro
44d0: 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e  tocols.</p></dd>
44e0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f  .<dt><b class="o
44f0: 70 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c 2f 62 3e  ption">-ssl3</b>
4500: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
4510: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  bool</i></dt>.<d
4520: 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20  d><p>Enable use 
4530: 6f 66 20 53 53 4c 20 76 33 2e 20 54 68 65 20 64  of SSL v3. The d
4540: 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61  efault is <b cla
4550: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65  ss="const">false
4560: 3c 2f 62 3e 2e 20 53 74 61 72 74 69 6e 67 20 69  </b>. Starting i
4570: 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 0a 75 73  n TclTLS 1.8,.us
4580: 65 20 6f 66 20 53 53 4c 20 76 33 20 69 66 20 6f  e of SSL v3 if o
4590: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 76 69  nly available vi
45a0: 61 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65  a a compile time
45b0: 20 6f 70 74 69 6f 6e 2e 0a 53 65 65 20 74 68 65   option..See the
45c0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
45d0: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f  tls::protocols</
45e0: 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73  b> command for s
45f0: 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f  upported protoco
4600: 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ls.</p></dd>.<dt
4610: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
4620: 6e 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69 20  n">-tls1</b> <i 
4630: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
4640: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
4650: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
4660: 4c 53 20 76 31 2e 20 53 74 61 72 74 69 6e 67 20  LS v1. Starting 
4670: 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74  in TclTLS 2.0, t
4680: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62  he default is <b
4690: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66   class="const">f
46a0: 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a 20  alse</b>..Note: 
46b0: 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20 53 48  TLS 1.0 needs SH
46c0: 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77  A1 to operate, w
46d0: 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61  hich is only ava
46e0: 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 69  ilable in securi
46f0: 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20 4f  ty level.0 for O
4700: 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53 65  pen SSL 3.0+. Se
4710: 65 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d 22  e the <i class="
4720: 61 72 67 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c  arg">-security_l
4730: 65 76 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e  evel</i> option.
4740: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
4750: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
4760: 2d 74 6c 73 31 2e 31 3c 2f 62 3e 20 3c 69 20 63  -tls1.1</b> <i c
4770: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
4780: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
4790: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
47a0: 53 20 76 31 2e 31 2e 20 53 74 61 72 74 69 6e 67  S v1.1. Starting
47b0: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20   in TclTLS 2.0, 
47c0: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c  the default is <
47d0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
47e0: 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a  false</b>..Note:
47f0: 20 54 4c 53 20 31 2e 31 20 6e 65 65 64 73 20 53   TLS 1.1 needs S
4800: 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20  HA1 to operate, 
4810: 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76  which is only av
4820: 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72  ailable in secur
4830: 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20  ity level.0 for 
4840: 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53  Open SSL 3.0+. S
4850: 65 65 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d  ee the <i class=
4860: 22 61 72 67 22 3e 2d 73 65 63 75 72 69 74 79 5f  "arg">-security_
4870: 6c 65 76 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e  level</i> option
4880: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
4890: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
48a0: 3e 2d 74 6c 73 31 2e 32 3c 2f 62 3e 20 3c 69 20  >-tls1.2</b> <i 
48b0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
48c0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
48d0: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
48e0: 4c 53 20 76 31 2e 32 2e 20 54 68 65 20 64 65 66  LS v1.2. The def
48f0: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73  ault is <b class
4900: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62  ="const">true</b
4910: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  >.</p></dd>.<dt>
4920: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
4930: 22 3e 2d 74 6c 73 31 2e 33 3c 2f 62 3e 20 3c 69  ">-tls1.3</b> <i
4940: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f   class="arg">boo
4950: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  l</i></dt>.<dd><
4960: 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20  p>Enable use of 
4970: 54 4c 53 20 76 31 2e 33 2e 20 54 68 65 20 64 65  TLS v1.3. The de
4980: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73  fault is <b clas
4990: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f  s="const">true</
49a0: 62 3e 2e 20 54 68 69 73 20 69 73 20 6f 6e 6c 79  b>. This is only
49b0: 20 61 76 61 69 6c 61 62 6c 65 0a 73 74 61 72 74   available.start
49c0: 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c  ing with OpenSSL
49d0: 20 31 2e 31 2e 31 20 61 6e 64 20 54 63 6c 54 4c   1.1.1 and TclTL
49e0: 53 20 31 2e 37 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  S 1.7.</p></dd>.
49f0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
4a00: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63  tion">-validatec
4a10: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c  ommand</b> <i cl
4a20: 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61  ass="arg">callba
4a30: 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ck</i></dt>.<dd>
4a40: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65  <p>Specifies the
4a50: 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e   callback comman
4a60: 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76  d to invoke to v
4a70: 61 6c 69 64 61 74 65 20 74 68 65 20 70 65 65 72  alidate the peer
4a80: 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 6e   certificates.an
4a90: 64 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 20 69  d other config i
4aa0: 6e 66 6f 20 64 75 72 69 6e 67 20 74 68 65 20 70  nfo during the p
4ab0: 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74  rotocol negotiat
4ac0: 69 6f 6e 20 70 68 61 73 65 2e 20 54 68 69 73 20  ion phase. This 
4ad0: 63 61 6e 20 62 65 20 75 73 65 64 0a 62 79 20 54  can be used.by T
4ae0: 43 4c 20 73 63 72 69 70 74 73 20 74 6f 20 70 65  CL scripts to pe
4af0: 72 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 6e 20  rform their own 
4b00: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69  Certificate Vali
4b10: 64 61 74 69 6f 6e 20 74 6f 20 73 75 70 70 6c 65  dation to supple
4b20: 6d 65 6e 74 20 74 68 65 0a 64 65 66 61 75 6c 74  ment the.default
4b30: 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76   validation prov
4b40: 69 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e  ided by OpenSSL.
4b50: 20 54 68 65 20 73 63 72 69 70 74 20 6d 75 73 74   The script must
4b60: 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 61   return a boolea
4b70: 6e 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69 6e  n true.to contin
4b80: 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74 69  ue the negotiati
4b90: 6f 6e 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c  on. See <span cl
4ba0: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61  ass="sectref"><a
4bb0: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34   href="#section4
4bc0: 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f  ">Callback Optio
4bd0: 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f  ns</a></span> fo
4be0: 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e  r more info.</p>
4bf0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e  </dd>.</dl></dd>
4c00: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 35 22  .<dt><a name="5"
4c10: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e  ><b class="cmd">
4c20: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62  tls::unimport</b
4c30: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
4c40: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
4c50: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6d  </dt>.<dd><p>Com
4c60: 70 6c 69 6d 65 6e 74 20 74 6f 20 3c 62 20 63 6c  pliment to <b cl
4c70: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69  ass="cmd">tls::i
4c80: 6d 70 6f 72 74 3c 2f 62 3e 2e 20 55 73 65 64 20  mport</b>. Used 
4c90: 74 6f 20 72 65 6d 6f 76 65 20 74 68 65 20 74 6f  to remove the to
4ca0: 70 20 6c 65 76 65 6c 20 73 74 61 63 6b 65 64 20  p level stacked 
4cb0: 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d 20 3c 69 20  channel.from <i 
4cc0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
4cd0: 6e 65 6c 3c 2f 69 3e 2e 20 54 68 69 73 20 75 6e  nel</i>. This un
4ce0: 73 74 61 63 6b 73 20 74 68 65 20 65 6e 63 72 79  stacks the encry
4cf0: 70 74 69 6f 6e 20 6f 66 20 61 20 72 65 67 75 6c  ption of a regul
4d00: 61 72 20 54 43 4c 20 63 68 61 6e 6e 65 6c 2e 20  ar TCL channel. 
4d10: 41 6e 0a 65 72 72 6f 72 20 69 73 20 74 68 72 6f  An.error is thro
4d20: 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74  wn if TLS is not
4d30: 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64   the top stacked
4d40: 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f   channel type.</
4d50: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  p></dd>.<dt><a n
4d60: 61 6d 65 3d 22 36 22 3e 3c 62 20 63 6c 61 73 73  ame="6"><b class
4d70: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61 6e 64  ="cmd">tls::hand
4d80: 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  shake</b> <i cla
4d90: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
4da0: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64  </i></a></dt>.<d
4db0: 64 3e 3c 70 3e 46 6f 72 63 65 73 20 74 68 65 20  d><p>Forces the 
4dc0: 54 4c 53 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20  TLS negotiation 
4dd0: 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 6b  handshake to tak
4de0: 65 20 70 6c 61 63 65 20 69 6d 6d 65 64 69 61 74  e place immediat
4df0: 65 6c 79 2c 20 61 6e 64 20 72 65 74 75 72 6e 73  ely, and returns
4e00: 20 30 0a 69 66 20 68 61 6e 64 73 68 61 6b 65 20   0.if handshake 
4e10: 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67  is still in prog
4e20: 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69  ress (non-blocki
4e30: 6e 67 29 2c 20 6f 72 20 31 20 69 66 20 74 68 65  ng), or 1 if the
4e40: 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 0a 73   handshake was.s
4e50: 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20 74 68  uccessful. If th
4e60: 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c  e handshake fail
4e70: 65 64 2c 20 61 6e 20 65 72 72 6f 72 20 77 69 6c  ed, an error wil
4e80: 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f  l be returned.</
4e90: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e  p></dd>.<dt><a n
4ea0: 61 6d 65 3d 22 37 22 3e 3c 62 20 63 6c 61 73 73  ame="7"><b class
4eb0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74  ="cmd">tls::stat
4ec0: 75 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61  us</b> <span cla
4ed0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 62 20 63 6c 61  ss="opt">?<b cla
4ee0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63  ss="option">-loc
4ef0: 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 6e 3e 20 3c  al</b>?</span> <
4f00: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
4f10: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64  annel</i></a></d
4f20: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e  t>.<dd><p>Return
4f30: 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 74  s the current st
4f40: 61 74 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63  atus of an SSL c
4f50: 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 75  hannel. The resu
4f60: 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20  lt is a list of 
4f70: 6b 65 79 2d 76 61 6c 75 65 0a 70 61 69 72 73 20  key-value.pairs 
4f80: 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 53  describing the S
4f90: 53 4c 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c  SL, certificate,
4fa0: 20 61 6e 64 20 63 65 72 74 69 66 69 63 61 74 65   and certificate
4fb0: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 73 74   verification st
4fc0: 61 74 75 73 2e 20 49 66 0a 74 68 65 20 53 53 4c  atus. If.the SSL
4fd0: 20 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e   handshake has n
4fe0: 6f 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64  ot yet completed
4ff0: 2c 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74 20  , an empty list 
5000: 69 73 20 72 65 74 75 72 6e 65 64 2e 20 49 66 20  is returned. If 
5010: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
5020: 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e  tion">-local</b>
5030: 20 6f 70 74 69 6f 6e 20 69 73 20 73 70 65 63 69   option is speci
5040: 66 69 65 64 2c 20 74 68 65 6e 20 74 68 65 20 6c  fied, then the l
5050: 6f 63 61 6c 20 63 65 72 74 69 66 69 63 61 74 65  ocal certificate
5060: 20 69 73 20 75 73 65 64 2e 20 52 65 74 75 72 6e   is used. Return
5070: 65 64 0a 76 61 6c 75 65 73 20 69 6e 63 6c 75 64  ed.values includ
5080: 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 74  e:</p>.<p>SSL St
5090: 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61  atus</p>.<dl cla
50a0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66  ss="doctools_def
50b0: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c  initions">.<dt><
50c0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
50d0: 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63  e">alpn</b> <i c
50e0: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f  lass="arg">proto
50f0: 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  col</i></dt>.<dd
5100: 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c  ><p>The protocol
5110: 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20   selected after 
5120: 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65  Application-Laye
5130: 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74  r Protocol Negot
5140: 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f  iation (ALPN).</
5150: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5160: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5170: 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c  cipher</b> <i cl
5180: 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65 72  ass="arg">cipher
5190: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
51a0: 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70  >The current cip
51b0: 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74  her in use for t
51c0: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c  he session.</p><
51d0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
51e0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 65 65  s="variable">pee
51f0: 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61  rname</b> <i cla
5200: 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69  ss="arg">name</i
5210: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
5220: 65 20 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20  e peername from 
5230: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e  the certificate.
5240: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5250: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5260: 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c  ">protocol</b> <
5270: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65  i class="arg">ve
5280: 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rsion</i></dt>.<
5290: 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63  dd><p>The protoc
52a0: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20  ol version used 
52b0: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  for the connecti
52c0: 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20  on: SSL2, SSL3, 
52d0: 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c  TLS1, TLS1.1, TL
52e0: 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72  S1.2, TLS1.3, or
52f0: 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f 64   unknown.</p></d
5300: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
5310: 22 76 61 72 69 61 62 6c 65 22 3e 73 62 69 74 73  "variable">sbits
5320: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
5330: 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  rg">n</i></dt>.<
5340: 64 64 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72  dd><p>The number
5350: 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f   of bits used fo
5360: 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65  r the session ke
5370: 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  y.</p></dd>.<dt>
5380: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
5390: 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 48 61 73  le">signatureHas
53a0: 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c  hAlgorithm</b> <
53b0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c  i class="arg">al
53c0: 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e  gorithm</i></dt>
53d0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e  .<dd><p>The sign
53e0: 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72  ature hash algor
53f0: 69 74 68 6d 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ithm.</p></dd>.<
5400: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5410: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65  iable">signature
5420: 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  Type</b> <i clas
5430: 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e  s="arg">type</i>
5440: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
5450: 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65 20   signature type 
5460: 76 61 6c 75 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  value.</p></dd>.
5470: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5480: 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79 44 65  riable">verifyDe
5490: 70 74 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  pth</b> <i class
54a0: 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74  ="arg">n</i></dt
54b0: 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d 75 6d  >.<dd><p>Maximum
54c0: 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 63   depth for the c
54d0: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e  ertificate chain
54e0: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 20 44   verification. D
54f0: 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f  efault is -1, to
5500: 20 63 68 65 63 6b 20 61 6c 6c 2e 3c 2f 70 3e 3c   check all.</p><
5510: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
5520: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72  s="variable">ver
5530: 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63  ifyMode</b> <i c
5540: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c  lass="arg">list<
5550: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5560: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63  List of certific
5570: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
5580: 20 6d 6f 64 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e   modes.</p></dd>
5590: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
55a0: 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79 52  ariable">verifyR
55b0: 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  esult</b> <i cla
55c0: 73 73 3d 22 61 72 67 22 3e 72 65 73 75 6c 74 3c  ss="arg">result<
55d0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
55e0: 43 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69  Certificate veri
55f0: 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 2e  fication result.
5600: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5610: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5620: 22 3e 63 61 5f 6e 61 6d 65 73 3c 2f 62 3e 20 3c  ">ca_names</b> <
5630: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69  i class="arg">li
5640: 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  st</i></dt>.<dd>
5650: 3c 70 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43  <p>List of the C
5660: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f  ertificate Autho
5670: 72 69 74 69 65 73 20 75 73 65 64 20 74 6f 20 63  rities used to c
5680: 72 65 61 74 65 20 74 68 65 20 63 65 72 74 69 66  reate the certif
5690: 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  icate.</p></dd>.
56a0: 3c 2f 64 6c 3e 0a 3c 70 3e 43 65 72 74 69 66 69  </dl>.<p>Certifi
56b0: 63 61 74 65 20 53 74 61 74 75 73 3c 2f 70 3e 0a  cate Status</p>.
56c0: 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  <dl class="docto
56d0: 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22  ols_definitions"
56e0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
56f0: 76 61 72 69 61 62 6c 65 22 3e 61 6c 6c 3c 2f 62  variable">all</b
5700: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5710: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e  >string</i></dt>
5720: 0a 3c 64 64 3e 3c 70 3e 44 75 6d 70 20 6f 66 20  .<dd><p>Dump of 
5730: 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20  all certificate 
5740: 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  info.</p></dd>.<
5750: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
5760: 69 61 62 6c 65 22 3e 76 65 72 73 69 6f 6e 3c 2f  iable">version</
5770: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
5780: 22 3e 76 61 6c 75 65 3c 2f 69 3e 3c 2f 64 74 3e  ">value</i></dt>
5790: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74  .<dd><p>The cert
57a0: 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e  ificate version.
57b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
57c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
57d0: 22 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f  ">serialNumber</
57e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
57f0: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74  ">string</i></dt
5800: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 72  >.<dd><p>The ser
5810: 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68  ial number of th
5820: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  e certificate as
5830: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f   a hex string.</
5840: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
5850: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
5860: 73 69 67 6e 61 74 75 72 65 3c 2f 62 3e 20 3c 69  signature</b> <i
5870: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67   class="arg">alg
5880: 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a  orithm</i></dt>.
5890: 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 20 61 6c  <dd><p>Cipher al
58a0: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72  gorithm used for
58b0: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67   certificate sig
58c0: 6e 61 74 75 72 65 2e 3c 2f 70 3e 3c 2f 64 64 3e  nature.</p></dd>
58d0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
58e0: 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72 3c  ariable">issuer<
58f0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5900: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
5910: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69  t>.<dd><p>The di
5920: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65  stinguished name
5930: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72   (DN) of the cer
5940: 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72 2e  tificate issuer.
5950: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
5960: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
5970: 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62 3e 20  ">notBefore</b> 
5980: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64  <i class="arg">d
5990: 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ate</i></dt>.<dd
59a0: 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e 6e 69 6e  ><p>The beginnin
59b0: 67 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65  g date of the ce
59c0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69  rtificate validi
59d0: 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ty.</p></dd>.<dt
59e0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
59f0: 62 6c 65 22 3e 6e 6f 74 41 66 74 65 72 3c 2f 62  ble">notAfter</b
5a00: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5a10: 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >date</i></dt>.<
5a20: 64 64 3e 3c 70 3e 54 68 65 20 65 78 70 69 72 61  dd><p>The expira
5a30: 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 65  tion date of the
5a40: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c   certificate val
5a50: 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  idity.</p></dd>.
5a60: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
5a70: 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 3c  riable">subject<
5a80: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5a90: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64  g">string</i></d
5aa0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69  t>.<dd><p>The di
5ab0: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65  stinguished name
5ac0: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72   (DN) of the cer
5ad0: 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 63 74  tificate subject
5ae0: 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 65  . Fields include
5af0: 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43  : Common.Name (C
5b00: 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e  N), Organization
5b10: 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20 6f   (O), Locality o
5b20: 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74  r City (L), Stat
5b30: 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53  e or Province (S
5b40: 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20 4e  ), and.Country N
5b50: 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c 2f 64 64  ame (C).</p></dd
5b60: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5b70: 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72  variable">issuer
5b80: 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20  UniqueID</b> <i 
5b90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69  class="arg">stri
5ba0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ng</i></dt>.<dd>
5bb0: 3c 70 3e 54 68 65 20 69 73 73 75 65 72 20 75 6e  <p>The issuer un
5bc0: 69 71 75 65 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64  ique id.</p></dd
5bd0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
5be0: 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63  variable">subjec
5bf0: 74 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69  tUniqueID</b> <i
5c00: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72   class="arg">str
5c10: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
5c20: 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65 63 74 20  ><p>The subject 
5c30: 75 6e 69 71 75 65 20 69 64 2e 3c 2f 70 3e 3c 2f  unique id.</p></
5c40: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5c50: 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 75 6d 5f  ="variable">num_
5c60: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20 3c  extensions</b> <
5c70: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c  i class="arg">n<
5c80: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5c90: 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66  Number of certif
5ca0: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73  icate extensions
5cb0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
5cc0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
5cd0: 65 22 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62  e">extensions</b
5ce0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
5cf0: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >list</i></dt>.<
5d00: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65  dd><p>List of ce
5d10: 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73  rtificate extens
5d20: 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 70 3e 3c 2f  ion names.</p></
5d30: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
5d40: 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 75 74 68  ="variable">auth
5d50: 6f 72 69 74 79 4b 65 79 49 64 65 6e 74 69 66 69  orityKeyIdentifi
5d60: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  er</b> <i class=
5d70: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
5d80: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 75 74  </dt>.<dd><p>Aut
5d90: 68 6f 72 69 74 79 20 4b 65 79 20 49 64 65 6e 74  hority Key Ident
5da0: 69 66 69 65 72 20 28 41 4b 49 29 20 6f 66 20 74  ifier (AKI) of t
5db0: 68 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 65  he Issuing CA ce
5dc0: 72 74 69 66 69 63 61 74 65 20 74 68 61 74 20 73  rtificate that s
5dd0: 69 67 6e 65 64 20 74 68 65 0a 53 53 4c 20 63 65  igned the.SSL ce
5de0: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68  rtificate as a h
5df0: 65 78 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20  ex string. This 
5e00: 76 61 6c 75 65 20 6d 61 74 63 68 65 73 20 74 68  value matches th
5e10: 65 20 53 4b 49 20 76 61 6c 75 65 20 6f 66 20 74  e SKI value of t
5e20: 68 65 0a 49 6e 74 65 72 6d 65 64 69 61 74 65 20  he.Intermediate 
5e30: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  CA certificate.<
5e40: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
5e50: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5e60: 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74  >subjectKeyIdent
5e70: 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61  ifier</b> <i cla
5e80: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c  ss="arg">string<
5e90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
5ea0: 53 75 62 6a 65 63 74 20 4b 65 79 20 49 64 65 6e  Subject Key Iden
5eb0: 74 69 66 69 65 72 20 28 53 4b 49 29 20 68 61 73  tifier (SKI) has
5ec0: 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63 20  h of the public 
5ed0: 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20 63  key inside the c
5ee0: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 0a  ertificate as a.
5ef0: 68 65 78 20 73 74 72 69 6e 67 2e 20 55 73 65 64  hex string. Used
5f00: 20 74 6f 20 69 64 65 6e 74 69 66 79 20 63 65 72   to identify cer
5f10: 74 69 66 69 63 61 74 65 73 20 74 68 61 74 20 63  tificates that c
5f20: 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 69 63 75  ontain a particu
5f30: 6c 61 72 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c  lar public key.<
5f40: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
5f50: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
5f60: 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c  >subjectAltName<
5f70: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
5f80: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e  g">list</i></dt>
5f90: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20  .<dd><p>List of 
5fa0: 61 6c 6c 20 6f 66 20 74 68 65 20 53 75 62 6a 65  all of the Subje
5fb0: 63 74 20 41 6c 74 65 72 6e 61 74 69 76 65 20 4e  ct Alternative N
5fc0: 61 6d 65 73 20 28 53 41 4e 29 20 69 6e 63 6c 75  ames (SAN) inclu
5fd0: 64 69 6e 67 20 64 6f 6d 61 69 6e 20 6e 61 6d 65  ding domain name
5fe0: 73 2c 20 73 75 62 0a 64 6f 6d 61 69 6e 73 2c 20  s, sub.domains, 
5ff0: 61 6e 64 20 49 50 20 61 64 64 72 65 73 73 65 73  and IP addresses
6000: 20 74 68 61 74 20 61 72 65 20 73 65 63 75 72 65   that are secure
6010: 64 20 62 79 20 74 68 65 20 63 65 72 74 69 66 69  d by the certifi
6020: 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  cate.</p></dd>.<
6030: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6040: 69 61 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e 20  iable">ocsp</b> 
6050: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c  <i class="arg">l
6060: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ist</i></dt>.<dd
6070: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20  ><p>List of all 
6080: 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61  Online Certifica
6090: 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63  te Status Protoc
60a0: 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74  ol (OCSP) URLs t
60b0: 68 61 74 20 63 61 6e 20 62 65 20 75 73 65 64 20  hat can be used 
60c0: 74 6f 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c  to.check the val
60d0: 69 64 69 74 79 20 6f 66 20 74 68 69 73 20 63 65  idity of this ce
60e0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f  rtificate.</p></
60f0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
6100: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 65 72 74  ="variable">cert
6110: 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c 69 20 63  ificate</b> <i c
6120: 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74 3c  lass="arg">cert<
6130: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
6140: 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20  The PEM encoded 
6150: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e  certificate.</p>
6160: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6170: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69  ss="variable">si
6180: 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d  gnatureAlgorithm
6190: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
61a0: 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69  rg">algorithm</i
61b0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69  ></dt>.<dd><p>Ci
61c0: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75  pher algorithm u
61d0: 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72 74  sed for the cert
61e0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
61f0: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  e.</p></dd>.<dt>
6200: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
6210: 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 56 61 6c  le">signatureVal
6220: 75 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  ue</b> <i class=
6230: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e  "arg">string</i>
6240: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72  </dt>.<dd><p>Cer
6250: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
6260: 72 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69  re as a hex stri
6270: 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74  ng.</p></dd>.<dt
6280: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61  ><b class="varia
6290: 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 44 69  ble">signatureDi
62a0: 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  gest</b> <i clas
62b0: 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c  s="arg">version<
62c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
62d0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
62e0: 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61 20  ing digest as a 
62f0: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c  hex string.</p><
6300: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
6310: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 75 62  s="variable">pub
6320: 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d 3c  licKeyAlgorithm<
6330: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
6340: 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e  g">algorithm</i>
6350: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72  </dt>.<dd><p>Cer
6360: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
6370: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c  re public key al
6380: 67 6f 72 69 74 68 6d 2e 3c 2f 70 3e 3c 2f 64 64  gorithm.</p></dd
6390: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22  >.<dt><b class="
63a0: 76 61 72 69 61 62 6c 65 22 3e 70 75 62 6c 69 63  variable">public
63b0: 4b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  Key</b> <i class
63c0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69  ="arg">string</i
63d0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65  ></dt>.<dd><p>Ce
63e0: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74  rtificate signat
63f0: 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61  ure public key a
6400: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c  s a hex string.<
6410: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
6420: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22  class="variable"
6430: 3e 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61  >bits</b> <i cla
6440: 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f  ss="arg">n</i></
6450: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4e 75 6d 62 65  dt>.<dd><p>Numbe
6460: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66  r of bits used f
6470: 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73  or certificate s
6480: 69 67 6e 61 74 75 72 65 20 6b 65 79 2e 3c 2f 70  ignature key.</p
6490: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
64a0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73  ass="variable">s
64b0: 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 62 3e 20 3c  elf_signed</b> <
64c0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f  i class="arg">bo
64d0: 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  olean</i></dt>.<
64e0: 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68  dd><p>Whether th
64f0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69  e certificate si
6500: 67 6e 61 74 75 72 65 20 69 73 20 73 65 6c 66 20  gnature is self 
6510: 73 69 67 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e  signed.</p></dd>
6520: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6530: 61 72 69 61 62 6c 65 22 3e 73 68 61 31 5f 68 61  ariable">sha1_ha
6540: 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  sh</b> <i class=
6550: 22 61 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f  "arg">hash</i></
6560: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 53  dt>.<dd><p>The S
6570: 48 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20  HA1 hash of the 
6580: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61  certificate as a
6590: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 70 3e   hex string.</p>
65a0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
65b0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 68  ss="variable">sh
65c0: 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20 3c 69  a256_hash</b> <i
65d0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61 73   class="arg">has
65e0: 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  h</i></dt>.<dd><
65f0: 70 3e 54 68 65 20 53 48 41 32 35 36 20 68 61 73  p>The SHA256 has
6600: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69  h of the certifi
6610: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74  cate as a hex st
6620: 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  ring.</p></dd>.<
6630: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  /dl></dd>.<dt><a
6640: 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 20 63 6c 61   name="8"><b cla
6650: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 6f  ss="cmd">tls::co
6660: 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20  nnection</b> <i 
6670: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e  class="arg">chan
6680: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  nel</i></a></dt>
6690: 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20  .<dd><p>Returns 
66a0: 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e  the current conn
66b0: 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66  ection status of
66c0: 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e   an SSL channel.
66d0: 20 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61   The result is a
66e0: 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d 76 61 6c   list.of key-val
66f0: 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62  ue pairs describ
6700: 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69  ing the connecti
6710: 6f 6e 2e 20 52 65 74 75 72 6e 65 64 20 76 61 6c  on. Returned val
6720: 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e  ues include:</p>
6730: 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f  .<p>SSL Status</
6740: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f  p>.<dl class="do
6750: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f  ctools_definitio
6760: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  ns">.<dt><b clas
6770: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 74 61  s="variable">sta
6780: 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  te</b> <i class=
6790: 22 61 72 67 22 3e 73 74 61 74 65 3c 2f 69 3e 3c  "arg">state</i><
67a0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74 61 74  /dt>.<dd><p>Stat
67b0: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74  e of the connect
67c0: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ion.</p></dd>.<d
67d0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
67e0: 61 62 6c 65 22 3e 73 65 72 76 65 72 6e 61 6d 65  able">servername
67f0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
6800: 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74  rg">name</i></dt
6810: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 61 6d  >.<dd><p>The nam
6820: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74  e of the connect
6830: 65 64 20 74 6f 20 73 65 72 76 65 72 2e 3c 2f 70  ed to server.</p
6840: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6850: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70  ass="variable">p
6860: 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20 63  rotocol</b> <i c
6870: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69  lass="arg">versi
6880: 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  on</i></dt>.<dd>
6890: 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  <p>The protocol 
68a0: 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72  version used for
68b0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a   the connection:
68c0: 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53   SSL2, SSL3, TLS
68d0: 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e  1, TLS1.1, TLS1.
68e0: 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e  2, TLS1.3, or un
68f0: 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  known.</p></dd>.
6900: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6910: 72 69 61 62 6c 65 22 3e 72 65 6e 65 67 6f 74 69  riable">renegoti
6920: 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64 3c 2f 62  ation_allowed</b
6930: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6940: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74  >boolean</i></dt
6950: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72  >.<dd><p>Whether
6960: 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f   protocol renego
6970: 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f  tiation is suppo
6980: 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e  rted or not.</p>
6990: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
69a0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
69b0: 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e  curity_level</b>
69c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
69d0: 6c 65 76 65 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  level</i></dt>.<
69e0: 64 64 3e 3c 70 3e 54 68 65 20 73 65 63 75 72 69  dd><p>The securi
69f0: 74 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66 6f  ty level used fo
6a00: 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63  r selection of c
6a10: 69 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a 65  iphers, key size
6a20: 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  , etc.</p></dd>.
6a30: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61  <dt><b class="va
6a40: 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f  riable">session_
6a50: 72 65 75 73 65 64 3c 2f 62 3e 20 3c 69 20 63 6c  reused</b> <i cl
6a60: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61  ass="arg">boolea
6a70: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  n</i></dt>.<dd><
6a80: 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 73 65  p>Whether the se
6a90: 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 72  ssion has been r
6aa0: 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70  eused or not.</p
6ab0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
6ac0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69  ass="variable">i
6ad0: 73 5f 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20  s_server</b> <i 
6ae0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c  class="arg">bool
6af0: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ean</i></dt>.<dd
6b00: 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20  ><p>Whether the 
6b10: 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f  connection is co
6b20: 6e 66 69 67 75 72 65 64 20 61 73 20 61 20 73 65  nfigured as a se
6b30: 72 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65  rver (1) or clie
6b40: 6e 74 20 28 30 29 2e 3c 2f 70 3e 3c 2f 64 64 3e  nt (0).</p></dd>
6b50: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6b60: 61 72 69 61 62 6c 65 22 3e 63 6f 6d 70 72 65 73  ariable">compres
6b70: 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  sion</b> <i clas
6b80: 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e  s="arg">mode</i>
6b90: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6d  </dt>.<dd><p>Com
6ba0: 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e  pression method.
6bb0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62  </p></dd>.<dt><b
6bc0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
6bd0: 22 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 62 3e 20  ">expansion</b> 
6be0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
6bf0: 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ode</i></dt>.<dd
6c00: 3e 3c 70 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65  ><p>Expansion me
6c10: 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  thod.</p></dd>.<
6c20: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6c30: 69 61 62 6c 65 22 3e 63 61 4c 69 73 74 3c 2f 62  iable">caList</b
6c40: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  > <i class="arg"
6c50: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >list</i></dt>.<
6c60: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 43 65  dd><p>List of Ce
6c70: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72  rtificate Author
6c80: 69 74 69 65 73 20 28 43 41 29 20 66 6f 72 20 58  ities (CA) for X
6c90: 2e 35 30 39 20 63 65 72 74 69 66 69 63 61 74 65  .509 certificate
6ca0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  .</p></dd>.</dl>
6cb0: 0a 3c 70 3e 43 69 70 68 65 72 20 49 6e 66 6f 3c  .<p>Cipher Info<
6cc0: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64  /p>.<dl class="d
6cd0: 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69  octools_definiti
6ce0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  ons">.<dt><b cla
6cf0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69  ss="variable">ci
6d00: 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  pher</b> <i clas
6d10: 73 3d 22 61 72 67 22 3e 63 69 70 68 65 72 3c 2f  s="arg">cipher</
6d20: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54  i></dt>.<dd><p>T
6d30: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65  he current ciphe
6d40: 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65  r in use for the
6d50: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e   connection.</p>
6d60: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
6d70: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 74  ss="variable">st
6d80: 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 62 3e 20  andard_name</b> 
6d90: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e  <i class="arg">n
6da0: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ame</i></dt>.<dd
6db0: 3e 3c 70 3e 54 68 65 20 73 74 61 6e 64 61 72 64  ><p>The standard
6dc0: 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70   RFC name of cip
6dd0: 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  her.</p></dd>.<d
6de0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6df0: 61 62 6c 65 22 3e 61 6c 67 6f 72 69 74 68 6d 5f  able">algorithm_
6e00: 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  bits</b> <i clas
6e10: 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64  s="arg">n</i></d
6e20: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75  t>.<dd><p>The nu
6e30: 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 65  mber of processe
6e40: 64 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  d bits used for 
6e50: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e  cipher.</p></dd>
6e60: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76  .<dt><b class="v
6e70: 61 72 69 61 62 6c 65 22 3e 73 65 63 72 65 74 5f  ariable">secret_
6e80: 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73  bits</b> <i clas
6e90: 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64  s="arg">n</i></d
6ea0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e 75  t>.<dd><p>The nu
6eb0: 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62  mber of secret b
6ec0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70  its used for cip
6ed0: 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  her.</p></dd>.<d
6ee0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
6ef0: 61 62 6c 65 22 3e 6d 69 6e 5f 76 65 72 73 69 6f  able">min_versio
6f00: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
6f10: 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e  arg">version</i>
6f20: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65  </dt>.<dd><p>The
6f30: 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f   minimum protoco
6f40: 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69  l version for ci
6f50: 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  pher.</p></dd>.<
6f60: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72  dt><b class="var
6f70: 69 61 62 6c 65 22 3e 63 69 70 68 65 72 5f 69 73  iable">cipher_is
6f80: 5f 61 65 61 64 3c 2f 62 3e 20 3c 69 20 63 6c 61  _aead</b> <i cla
6f90: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e  ss="arg">boolean
6fa0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
6fb0: 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 69 70  >Whether the cip
6fc0: 68 65 72 20 69 73 20 41 75 74 68 65 6e 74 69 63  her is Authentic
6fd0: 61 74 65 64 20 45 6e 63 72 79 70 74 69 6f 6e 20  ated Encryption 
6fe0: 77 69 74 68 20 41 73 73 6f 63 69 61 74 65 64 20  with Associated 
6ff0: 44 61 74 61 20 28 41 45 41 44 29 2e 3c 2f 70 3e  Data (AEAD).</p>
7000: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7010: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69  ss="variable">ci
7020: 70 68 65 72 5f 69 64 3c 2f 62 3e 20 3c 69 20 63  pher_id</b> <i c
7030: 6c 61 73 73 3d 22 61 72 67 22 3e 69 64 3c 2f 69  lass="arg">id</i
7040: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68  ></dt>.<dd><p>Th
7050: 65 20 4f 70 65 6e 53 53 4c 20 63 69 70 68 65 72  e OpenSSL cipher
7060: 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64   id.</p></dd>.<d
7070: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7080: 61 62 6c 65 22 3e 64 65 73 63 72 69 70 74 69 6f  able">descriptio
7090: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22  n</b> <i class="
70a0: 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c  arg">string</i><
70b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 20 74 65  /dt>.<dd><p>A te
70c0: 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f  xt description o
70d0: 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 70  f the cipher.</p
70e0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c  ></dd>.<dt><b cl
70f0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 68  ass="variable">h
7100: 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 74 3c  andshake_digest<
7110: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
7120: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f  g">boolean</i></
7130: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 67 65 73  dt>.<dd><p>Diges
7140: 74 20 75 73 65 64 20 64 75 72 69 6e 67 20 68 61  t used during ha
7150: 6e 64 73 68 61 6b 65 2e 3c 2f 70 3e 3c 2f 64 64  ndshake.</p></dd
7160: 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 53 65 73 73 69  >.</dl>.<p>Sessi
7170: 6f 6e 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20  on Info</p>.<dl 
7180: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
7190: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64  definitions">.<d
71a0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
71b0: 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c  able">alpn</b> <
71c0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72  i class="arg">pr
71d0: 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a  otocol</i></dt>.
71e0: 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f  <dd><p>The proto
71f0: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74  col selected aft
7200: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c  er Application-L
7210: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65  ayer Protocol Ne
7220: 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29  gotiation (ALPN)
7230: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c  .</p></dd>.<dt><
7240: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c  b class="variabl
7250: 65 22 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 62 3e  e">resumable</b>
7260: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
7270: 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e  boolean</i></dt>
7280: 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20  .<dd><p>Whether 
7290: 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61 6e 20  the session can 
72a0: 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f  be resumed or no
72b0: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  t.</p></dd>.<dt>
72c0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
72d0: 6c 65 22 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f  le">start_time</
72e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
72f0: 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64  ">seconds</i></d
7300: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 6d 65 20 73  t>.<dd><p>Time s
7310: 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61  ince session sta
7320: 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20  rted in seconds 
7330: 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 70 3e  since epoch.</p>
7340: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7350: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 69  ss="variable">ti
7360: 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69 20 63 6c 61  meout</b> <i cla
7370: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73  ss="arg">seconds
7380: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
7390: 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f 66  >Max duration of
73a0: 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63 6f   session in seco
73b0: 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65 2d  nds before time-
73c0: 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  out.</p></dd>.<d
73d0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
73e0: 61 62 6c 65 22 3e 6c 69 66 65 74 69 6d 65 3c 2f  able">lifetime</
73f0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
7400: 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64  ">seconds</i></d
7410: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73 73 69 6f  t>.<dd><p>Sessio
7420: 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d  n ticket lifetim
7430: 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64  e hint in second
7440: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  s.</p></dd>.<dt>
7450: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
7460: 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f  le">session_id</
7470: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  b> <i class="arg
7480: 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c  ">binary_string<
7490: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
74a0: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 69  Unique session i
74b0: 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73  d for use in res
74c0: 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f  uming the sessio
74d0: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  n.</p></dd>.<dt>
74e0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
74f0: 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b  le">session_tick
7500: 65 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d  et</b> <i class=
7510: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72  "arg">binary_str
7520: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  ing</i></dt>.<dd
7530: 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69  ><p>Unique sessi
7540: 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73  on ticket for us
7550: 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68  e in resuming th
7560: 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f  e session.</p></
7570: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73  dd>.<dt><b class
7580: 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 69 63 6b  ="variable">tick
7590: 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 62 3e 20  et_app_data</b> 
75a0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62  <i class="arg">b
75b0: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e  inary_string</i>
75c0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69  </dt>.<dd><p>Uni
75d0: 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b  que session tick
75e0: 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64  et application d
75f0: 61 74 61 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ata.</p></dd>.<d
7600: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  t><b class="vari
7610: 61 62 6c 65 22 3e 6d 61 73 74 65 72 5f 6b 65 79  able">master_key
7620: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
7630: 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e  rg">binary_strin
7640: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  g</i></dt>.<dd><
7650: 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e  p>Unique session
7660: 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c 2f 70 3e   master key.</p>
7670: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
7680: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65  ss="variable">se
7690: 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64 65  ssion_cache_mode
76a0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
76b0: 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74  rg">mode</i></dt
76c0: 3e 0a 3c 64 64 3e 3c 70 3e 53 65 72 76 65 72 20  >.<dd><p>Server 
76d0: 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65  cache mode (clie
76e0: 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62  nt, server, or b
76f0: 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  oth).</p></dd>.<
7700: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61  /dl></dd>.<dt><a
7710: 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 63 6c 61   name="9"><b cla
7720: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69  ss="cmd">tls::ci
7730: 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20  phers</b> <span 
7740: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20  class="opt">?<i 
7750: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74  class="arg">prot
7760: 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e  ocol</i>?</span>
7770: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70   <span class="op
7780: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72  t">?<i class="ar
7790: 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c  g">verbose</i>?<
77a0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61  /span> <span cla
77b0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61  ss="opt">?<i cla
77c0: 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74  ss="arg">support
77d0: 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f  ed</i>?</span></
77e0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57  a></dt>.<dd><p>W
77f0: 69 74 68 6f 75 74 20 61 6e 79 20 61 72 67 73 2c  ithout any args,
7800: 20 72 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20   returns a list 
7810: 6f 66 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63  of all symmetric
7820: 20 63 69 70 68 65 72 73 20 66 6f 72 20 75 73 65   ciphers for use
7830: 20 77 69 74 68 20 74 68 65 0a 3c 69 20 63 6c 61   with the.<i cla
7840: 73 73 3d 22 61 72 67 22 3e 2d 63 69 70 68 65 72  ss="arg">-cipher
7850: 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 20 57 69 74  </i> option. Wit
7860: 68 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  h <i class="arg"
7870: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f  >protocol</i>, o
7880: 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20  nly the ciphers 
7890: 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68  supported for th
78a0: 61 74 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20  at.protocol are 
78b0: 72 65 74 75 72 6e 65 64 2e 20 53 65 65 20 74 68  returned. See th
78c0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22  e <b class="cmd"
78d0: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c  >tls::protocols<
78e0: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20  /b> command for 
78f0: 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72  the supported.pr
7900: 6f 74 6f 63 6f 6c 73 2e 20 49 66 20 3c 69 20 63  otocols. If <i c
7910: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f  lass="arg">verbo
7920: 73 65 3c 2f 69 3e 20 69 73 20 73 70 65 63 69 66  se</i> is specif
7930: 69 65 64 20 61 73 20 74 72 75 65 20 74 68 65 6e  ied as true then
7940: 20 61 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61   a verbose, huma
7950: 6e 20 72 65 61 64 61 62 6c 65 0a 6c 69 73 74 20  n readable.list 
7960: 69 73 20 72 65 74 75 72 6e 65 64 20 77 69 74 68  is returned with
7970: 20 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f   additional info
7980: 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63  rmation on the c
7990: 69 70 68 65 72 2e 20 49 66 20 3c 69 20 63 6c 61  ipher. If <i cla
79a0: 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74  ss="arg">support
79b0: 65 64 3c 2f 69 3e 0a 69 73 20 73 70 65 63 69 66  ed</i>.is specif
79c0: 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 68 65  ied as true, the
79d0: 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65  n only the ciphe
79e0: 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72  rs supported for
79f0: 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62   protocol will b
7a00: 65 20 6c 69 73 74 65 64 2e 3c 2f 70 3e 3c 2f 64  e listed.</p></d
7a10: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22  d>.<dt><a name="
7a20: 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d  10"><b class="cm
7a30: 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  d">tls::protocol
7a40: 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c  s</b></a></dt>.<
7a50: 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 61 20  dd><p>Returns a 
7a60: 6c 69 73 74 20 6f 66 20 74 68 65 20 73 75 70 70  list of the supp
7a70: 6f 72 74 65 64 20 53 53 4c 2f 54 4c 53 20 70 72  orted SSL/TLS pr
7a80: 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20 76  otocols. Valid v
7a90: 61 6c 75 65 73 20 61 72 65 3a 0a 3c 62 20 63 6c  alues are:.<b cl
7aa0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c 32  ass="const">ssl2
7ab0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
7ac0: 63 6f 6e 73 74 22 3e 73 73 6c 33 3c 2f 62 3e 2c  const">ssl3</b>,
7ad0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74   <b class="const
7ae0: 22 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 20 63  ">tls1</b>, <b c
7af0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73  lass="const">tls
7b00: 31 2e 31 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  1.1</b>, <b clas
7b10: 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 32  s="const">tls1.2
7b20: 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61  </b>, and.<b cla
7b30: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 2e  ss="const">tls1.
7b40: 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73  3</b>. Exact lis
7b50: 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65  t depends on Ope
7b60: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64  nSSL version and
7b70: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c   compile time fl
7b80: 61 67 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  ags.</p></dd>.<d
7b90: 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 31 22 3e 3c  t><a name="11"><
7ba0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
7bb0: 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f  s::version</b></
7bc0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52  a></dt>.<dd><p>R
7bd0: 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53  eturns the OpenS
7be0: 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e  SL version strin
7bf0: 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  g.</p></dd>.</dl
7c00: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64  >.</div>.<div id
7c10: 3d 22 73 65 63 74 69 6f 6e 33 22 20 63 6c 61 73  ="section3" clas
7c20: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74  s="doctools_sect
7c30: 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65  ion"><h2><a name
7c40: 3d 22 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74  ="section3">Cert
7c50: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69  ificate Validati
7c60: 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76  on</a></h2>.<div
7c70: 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 31   id="subsection1
7c80: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
7c90: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68  s_subsection"><h
7ca0: 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65  3><a name="subse
7cb0: 63 74 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20  ction1">PKI and 
7cc0: 43 65 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e  Certificates</a>
7cd0: 3c 2f 68 33 3e 0a 3c 70 3e 55 73 69 6e 67 20 74  </h3>.<p>Using t
7ce0: 68 65 20 50 75 62 6c 69 63 20 4b 65 79 20 49 6e  he Public Key In
7cf0: 66 72 61 73 74 72 75 63 74 75 72 65 20 28 50 4b  frastructure (PK
7d00: 49 29 2c 20 65 61 63 68 20 75 73 65 72 20 63 72  I), each user cr
7d10: 65 61 74 65 73 20 61 20 70 72 69 76 61 74 65 20  eates a private 
7d20: 6b 65 79 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68  key that.only th
7d30: 65 79 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e  ey know about an
7d40: 64 20 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74  d a public key t
7d50: 68 65 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65  hey can exchange
7d60: 20 77 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72   with others for
7d70: 20 75 73 65 20 69 6e 0a 65 6e 63 72 79 70 74 69   use in.encrypti
7d80: 6e 67 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e  ng and decryptin
7d90: 67 20 64 61 74 61 2e 20 54 68 65 20 70 72 6f 63  g data. The proc
7da0: 65 73 73 20 69 73 20 74 68 65 20 73 65 6e 64 65  ess is the sende
7db0: 72 20 65 6e 63 72 79 70 74 73 20 74 68 65 69 72  r encrypts their
7dc0: 20 64 61 74 61 0a 75 73 69 6e 67 20 74 68 65 69   data.using thei
7dd0: 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e  r private key an
7de0: 64 20 74 68 65 20 72 65 63 65 69 76 65 72 27 73  d the receiver's
7df0: 20 70 75 62 6c 69 63 20 6b 65 79 2e 20 54 68 65   public key. The
7e00: 20 64 61 74 61 20 69 73 20 74 68 65 6e 20 73 65   data is then se
7e10: 6e 74 0a 74 6f 20 74 68 65 20 72 65 63 65 69 76  nt.to the receiv
7e20: 65 72 2e 20 49 6e 20 61 20 73 69 6d 69 6c 61 72  er. In a similar
7e30: 20 6d 61 6e 6e 65 72 2c 20 74 68 65 20 72 65 63   manner, the rec
7e40: 65 69 76 65 72 20 75 73 65 73 20 74 68 65 69 72  eiver uses their
7e50: 20 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64   private key and
7e60: 0a 74 68 65 20 73 65 6e 64 65 72 27 73 20 70 75  .the sender's pu
7e70: 62 6c 69 63 20 6b 65 79 20 74 6f 20 64 65 63 72  blic key to decr
7e80: 79 70 74 20 74 68 65 20 64 61 74 61 2e 20 54 68  ypt the data. Th
7e90: 69 73 20 70 72 6f 76 69 64 65 73 20 64 61 74 61  is provides data
7ea0: 20 69 6e 74 65 67 72 69 74 79 2c 20 74 6f 0a 65   integrity, to.e
7eb0: 6e 73 75 72 65 20 74 68 65 20 64 61 74 61 20 63  nsure the data c
7ec0: 61 6e 27 74 20 62 65 20 76 69 65 77 65 64 20 6f  an't be viewed o
7ed0: 72 20 61 6c 74 65 72 65 64 20 64 75 72 69 6e 67  r altered during
7ee0: 20 74 72 61 6e 73 70 6f 72 74 2e 20 53 65 65 20   transport. See 
7ef0: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
7f00: 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 61  tion">-key</b> a
7f10: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  nd <b class="opt
7f20: 69 6f 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62  ion">-keyfile</b
7f30: 3e 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f  > options for ho
7f40: 77 20 74 6f 20 73 70 65 63 69 66 79 20 74 68 65  w to specify the
7f50: 20 70 72 69 76 61 74 65 20 6b 65 79 2e 0a 41 6c   private key..Al
7f60: 73 6f 20 73 65 65 20 74 68 65 20 3c 62 20 63 6c  so see the <b cl
7f70: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61  ass="option">-pa
7f80: 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f  ssword</b> optio
7f90: 6e 20 66 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f  n for how to pro
7fa0: 76 69 64 65 20 74 68 65 20 70 61 73 73 77 6f 72  vide the passwor
7fb0: 64 2e 3c 2f 70 3e 0a 3c 70 3e 49 6e 20 6f 72 64  d.</p>.<p>In ord
7fc0: 65 72 20 74 6f 20 70 72 6f 76 69 64 65 20 61 75  er to provide au
7fd0: 74 68 65 6e 74 69 63 61 74 69 6f 6e 2c 20 69 2e  thentication, i.
7fe0: 65 2e 20 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65  e. ensuring some
7ff0: 6f 6e 65 20 69 73 20 77 68 6f 20 74 68 65 79 20  one is who they 
8000: 73 61 79 20 74 68 65 79 0a 61 72 65 2c 20 74 68  say they.are, th
8010: 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6e 64  e public key and
8020: 20 75 73 65 72 20 69 64 65 6e 74 69 66 69 63 61   user identifica
8030: 74 69 6f 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f  tion info is sto
8040: 72 65 64 20 69 6e 20 61 20 58 2e 35 30 39 0a 63  red in a X.509.c
8050: 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 20 74  ertificate and t
8060: 68 61 74 20 63 65 72 74 69 66 69 63 61 74 65 20  hat certificate 
8070: 69 73 20 61 75 74 68 65 6e 74 69 63 61 74 65 64  is authenticated
8080: 20 28 69 2e 65 2e 20 73 69 67 6e 65 64 29 20 62   (i.e. signed) b
8090: 79 20 61 20 43 65 72 74 69 66 69 63 61 74 65 0a  y a Certificate.
80a0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 20  Authority (CA). 
80b0: 55 73 65 72 73 20 63 61 6e 20 74 68 65 6e 20 65  Users can then e
80c0: 78 63 68 61 6e 67 65 20 74 68 65 73 65 20 63 65  xchange these ce
80d0: 72 74 69 66 69 63 61 74 65 73 20 64 75 72 69 6e  rtificates durin
80e0: 67 20 74 68 65 20 54 4c 53 0a 69 6e 69 74 69 61  g the TLS.initia
80f0: 6c 69 7a 61 74 69 6f 6e 20 70 72 6f 63 65 73 73  lization process
8100: 20 61 6e 64 20 63 68 65 63 6b 20 74 68 65 6d 20   and check them 
8110: 61 67 61 69 6e 73 74 20 74 68 65 20 72 6f 6f 74  against the root
8120: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73   CA certificates
8130: 20 74 6f 20 65 6e 73 75 72 65 0a 74 68 65 79 20   to ensure.they 
8140: 61 72 65 20 76 61 6c 69 64 2e 20 54 68 69 73 20  are valid. This 
8150: 69 73 20 68 61 6e 64 6c 65 64 20 62 79 20 4f 70  is handled by Op
8160: 65 6e 53 53 4c 20 76 69 61 20 74 68 65 20 3c 62  enSSL via the <b
8170: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8180: 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 61 6e 64  -request</b> and
8190: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
81a0: 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20  n">-require</b> 
81b0: 6f 70 74 69 6f 6e 73 2e 20 53 65 65 20 74 68 65  options. See the
81c0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f   <b class="optio
81d0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c  n">-cadir</b>, <
81e0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22  b class="option"
81f0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64  >-cadir</b>, and
8200: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  .<b class="optio
8210: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20  n">-castore</b> 
8220: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20  options for how 
8230: 74 70 20 73 70 65 63 69 66 79 20 77 68 65 72 65  tp specify where
8240: 20 74 6f 20 66 69 6e 64 20 74 68 65 20 43 41 20   to find the CA 
8250: 63 65 72 74 69 66 69 63 61 74 65 73 2e 0a 4f 70  certificates..Op
8260: 74 69 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66  tionally, in a f
8270: 75 74 75 72 65 20 72 65 6c 65 61 73 65 2c 20 74  uture release, t
8280: 68 65 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 20  hey can also be 
8290: 63 68 65 63 6b 65 64 20 61 67 61 69 6e 73 74 20  checked against 
82a0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 0a  the Certificate.
82b0: 52 65 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20  Revocation List 
82c0: 28 43 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64  (CRL) of revoked
82d0: 20 63 65 72 74 69 66 69 63 61 74 65 73 2e 20 43   certificates. C
82e0: 65 72 74 69 66 69 63 61 74 65 73 20 63 61 6e 20  ertificates can 
82f0: 61 6c 73 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67  also be.self-sig
8300: 6e 65 64 2c 20 62 75 74 20 74 68 65 79 20 61 72  ned, but they ar
8310: 65 20 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 74  e by default not
8320: 20 74 72 75 73 74 65 64 20 75 6e 6c 65 73 73 20   trusted unless 
8330: 79 6f 75 20 61 64 64 20 74 68 65 6d 20 74 6f 20  you add them to 
8340: 79 6f 75 72 0a 63 65 72 74 69 66 69 63 61 74 65  your.certificate
8350: 20 73 74 6f 72 65 2e 3c 2f 70 3e 0a 3c 70 3e 54   store.</p>.<p>T
8360: 79 70 69 63 61 6c 6c 79 20 77 68 65 6e 20 76 69  ypically when vi
8370: 73 69 74 69 6e 67 20 77 65 62 20 73 69 74 65 73  siting web sites
8380: 2c 20 6f 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e  , only the clien
8390: 74 20 6e 65 65 64 73 20 74 6f 20 63 68 65 63 6b  t needs to check
83a0: 20 74 68 65 20 73 65 72 76 65 72 27 73 0a 63 65   the server's.ce
83b0: 72 74 69 66 69 63 61 74 65 20 74 6f 20 65 6e 73  rtificate to ens
83c0: 75 72 65 20 69 74 20 69 73 20 76 61 6c 69 64 2e  ure it is valid.
83d0: 20 54 68 65 20 73 65 72 76 65 72 20 64 6f 65 73   The server does
83e0: 6e 27 74 20 6e 65 65 64 20 74 6f 20 63 68 65 63  n't need to chec
83f0: 6b 20 74 68 65 20 63 6c 69 65 6e 74 0a 63 65 72  k the client.cer
8400: 74 69 66 69 63 61 74 65 20 75 6e 6c 65 73 73 20  tificate unless 
8410: 79 6f 75 20 6e 65 65 64 20 74 6f 20 61 75 74 68  you need to auth
8420: 65 6e 74 69 63 61 74 65 20 77 69 74 68 20 74 68  enticate with th
8430: 65 6d 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63  em to login, etc
8440: 2e 20 53 65 65 20 74 68 65 0a 3c 62 20 63 6c 61  . See the.<b cla
8450: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72  ss="option">-cer
8460: 74 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61  t</b> and <b cla
8470: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72  ss="option">-cer
8480: 74 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  tfile</b> option
8490: 73 20 69 66 20 79 6f 75 20 6e 65 65 64 20 74 6f  s if you need to
84a0: 20 70 72 6f 76 69 64 65 20 61 20 63 65 72 74 69   provide a certi
84b0: 66 69 63 61 74 65 2e 3c 2f 70 3e 0a 3c 2f 64 69  ficate.</p>.</di
84c0: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73  v>.<div id="subs
84d0: 65 63 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22  ection2" class="
84e0: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74  doctools_subsect
84f0: 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65  ion"><h3><a name
8500: 3d 22 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53  ="subsection2">S
8510: 75 6d 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e  ummary of comman
8520: 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f  d line options</
8530: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 66  a></h3>.<p>The f
8540: 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73  ollowing options
8550: 20 61 72 65 20 75 73 65 64 20 66 6f 72 20 70 65   are used for pe
8560: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 76  er certificate v
8570: 61 6c 69 64 61 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c  alidation:</p>.<
8580: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
8590: 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74  ls_options">.<dt
85a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f  ><b class="optio
85b0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69  n">-cadir</b> <i
85c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72   class="arg">dir
85d0: 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a  ectory</i></dt>.
85e0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73  <dd><p>Specifies
85f0: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 77   the directory w
8600: 68 65 72 65 20 74 68 65 20 43 65 72 74 69 66 69  here the Certifi
8610: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28  cate Authority (
8620: 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 73  CA) certificates
8630: 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54 68 65   are.stored. The
8640: 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74   default is plat
8650: 66 6f 72 6d 20 73 70 65 63 69 66 69 63 2c 20 62  form specific, b
8660: 75 74 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71  ut is usually &q
8670: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
8680: 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 65 72  le">/etc/ssl/cer
8690: 74 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 6f 6e 0a  ts</b>&quot; on.
86a0: 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65  Linux/Unix syste
86b0: 6d 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ms. The default 
86c0: 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20  location can be 
86d0: 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68  overridden by th
86e0: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69  e.<b class="vari
86f0: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44  able">SSL_CERT_D
8700: 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65  IR</b> environme
8710: 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e  nt variable.</p>
8720: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61  </dd>.<dt><b cla
8730: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66  ss="option">-caf
8740: 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ile</b> <i class
8750: 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c  ="arg">filename<
8760: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
8770: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 69  Specifies the fi
8780: 6c 65 20 77 69 74 68 20 74 68 65 20 43 65 72 74  le with the Cert
8790: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74  ificate Authorit
87a0: 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61  y (CA) certifica
87b0: 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62  tes to use in.<b
87c0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50   class="const">P
87d0: 45 4d 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d  EM</b> file form
87e0: 61 74 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  at. The default 
87f0: 69 73 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73  is &quot;<b clas
8800: 73 3d 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65  s="file">cert.pe
8810: 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20  m</b>&quot;, in 
8820: 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65  the OpenSSL.dire
8830: 63 74 6f 72 79 2e 20 4f 6e 20 4c 69 6e 75 78 2f  ctory. On Linux/
8840: 55 6e 69 78 20 73 79 73 74 65 6d 73 2c 20 74 68  Unix systems, th
8850: 69 73 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71  is is usually &q
8860: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
8870: 6c 65 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 61 2d  le">/etc/ssl/ca-
8880: 62 75 6e 64 6c 65 2e 70 65 6d 3c 2f 62 3e 26 71  bundle.pem</b>&q
8890: 75 6f 74 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c  uot;..The defaul
88a0: 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76  t file can be ov
88b0: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20  erridden by the 
88c0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62  <b class="variab
88d0: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c  le">SSL_CERT_FIL
88e0: 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e  E</b> environmen
88f0: 74 0a 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c  t.variable.</p><
8900: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73  /dd>.<dt><b clas
8910: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74  s="option">-cast
8920: 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73  ore</b> <i class
8930: 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f  ="arg">URI</i></
8940: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69  dt>.<dd><p>Speci
8950: 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d  fies the Uniform
8960: 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69   Resource Identi
8970: 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20 74  fier (URI) for t
8980: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
8990: 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74  uthority.(CA) st
89a0: 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62  ore, which may b
89b0: 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61  e a single conta
89c0: 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f  iner or a catalo
89d0: 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e  g of containers.
89e0: 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f  .Starting with O
89f0: 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53  penSSL 3.2 on MS
8a00: 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f   Windows, set to
8a10: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d   &quot;<b class=
8a20: 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e  "const">org.open
8a30: 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c  ssl.winstore://<
8a40: 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65  /b>&quot;.to use
8a50: 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53   the built-in MS
8a60: 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69   Windows Certifi
8a70: 63 61 74 65 20 53 74 6f 72 65 2e 0a 54 68 69 73  cate Store..This
8a80: 20 73 74 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70   store only supp
8a90: 6f 72 74 73 20 72 6f 6f 74 20 63 65 72 74 69 66  orts root certif
8aa0: 69 63 61 74 65 20 73 74 6f 72 65 73 2e 20 53 65  icate stores. Se
8ab0: 65 0a 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73  e.<span class="s
8ac0: 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d  ectref"><a href=
8ad0: 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74  "#section3">Cert
8ae0: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69  ificate Validati
8af0: 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f  on</a></span> fo
8b00: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c  r more details.<
8b10: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
8b20: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
8b30: 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c 69 20 63  request</b> <i c
8b40: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c  lass="arg">bool<
8b50: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
8b60: 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69 66  Request a certif
8b70: 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70  icate from the p
8b80: 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53  eer during the S
8b90: 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 54 68  SL handshake. Th
8ba0: 69 73 20 69 73 20 6e 65 65 64 65 64 0a 74 6f 20  is is needed.to 
8bb0: 64 6f 20 43 65 72 74 69 66 69 63 61 74 65 20 56  do Certificate V
8bc0: 61 6c 69 64 61 74 69 6f 6e 2e 20 53 74 61 72 74  alidation. Start
8bd0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e  ing in TclTLS 1.
8be0: 38 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69  8, the default i
8bf0: 73 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  s.<b class="cons
8c00: 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 53 74 61  t">true</b>. Sta
8c10: 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20  rting in TclTLS 
8c20: 32 2e 30 2c 20 49 66 20 73 65 74 20 74 6f 20 3c  2.0, If set to <
8c30: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
8c40: 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 0a 3c 62  false</b> and.<b
8c50: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
8c60: 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73 20  -require</b> is 
8c70: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
8c80: 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e 20  >true</b>, then 
8c90: 74 68 69 73 20 77 69 6c 6c 20 62 65 20 6f 76 65  this will be ove
8ca0: 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63 6c  rridden to <b cl
8cb0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65  ass="const">true
8cc0: 3c 2f 62 3e 2e 0a 49 6e 20 61 64 64 69 74 69 6f  </b>..In additio
8cd0: 6e 2c 20 74 68 65 20 63 6c 69 65 6e 74 20 63 61  n, the client ca
8ce0: 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 6e 73 70 65  n manually inspe
8cf0: 63 74 20 61 6e 64 20 61 63 63 65 70 74 20 6f 72  ct and accept or
8d00: 20 72 65 6a 65 63 74 0a 65 61 63 68 20 63 65 72   reject.each cer
8d10: 74 69 66 69 63 61 74 65 20 75 73 69 6e 67 20 74  tificate using t
8d20: 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  he <i class="arg
8d30: 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61  ">-validatecomma
8d40: 6e 64 3c 2f 69 3e 20 6f 70 74 69 6f 6e 2e 3c 2f  nd</i> option.</
8d50: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63  p></dd>.<dt><b c
8d60: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72  lass="option">-r
8d70: 65 71 75 69 72 65 3c 2f 62 3e 20 3c 69 20 63 6c  equire</b> <i cl
8d80: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f  ass="arg">bool</
8d90: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52  i></dt>.<dd><p>R
8da0: 65 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 63  equire a valid c
8db0: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20  ertificate from 
8dc0: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20  the peer during 
8dd0: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b  the SSL handshak
8de0: 65 2e 20 49 66 20 74 68 69 73 20 69 73 0a 73 65  e. If this is.se
8df0: 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20  t to true, then 
8e00: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
8e10: 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 6d  ">-request</b> m
8e20: 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20  ust also be set 
8e30: 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65 69  to true and a ei
8e40: 74 68 65 72 0a 3c 62 20 63 6c 61 73 73 3d 22 6f  ther.<b class="o
8e50: 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62  ption">-cadir</b
8e60: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  >, <b class="opt
8e70: 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e  ion">-cafile</b>
8e80: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  , <b class="opti
8e90: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e  on">-castore</b>
8ea0: 2c 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20  , or a platform 
8eb0: 64 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 20  default.must be 
8ec0: 70 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65  provided in orde
8ed0: 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67  r to validate ag
8ee0: 61 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61 75  ainst. The defau
8ef0: 6c 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38  lt in TclTLS 1.8
8f00: 20 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72   and.earlier ver
8f10: 73 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c 61 73  sions is <b clas
8f20: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c  s="const">false<
8f30: 2f 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c  /b> since not al
8f40: 6c 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65  l platforms have
8f50: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f   certificates to
8f60: 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73  .validate agains
8f70: 74 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70  t in a form comp
8f80: 61 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e  atible with Open
8f90: 53 53 4c 2e 20 53 74 61 72 74 69 6e 67 20 69 6e  SSL. Starting in
8fa0: 20 54 63 6c 54 4c 53 20 32 2e 30 2c 0a 74 68 65   TclTLS 2.0,.the
8fb0: 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63   default is <b c
8fc0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75  lass="const">tru
8fd0: 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  e</b>.</p></dd>.
8fe0: 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69  </dl>.</div>.<di
8ff0: 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e  v id="subsection
9000: 33 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  3" class="doctoo
9010: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
9020: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73  h3><a name="subs
9030: 65 63 74 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72  ection3">When ar
9040: 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f  e command line o
9050: 70 74 69 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f  ptions needed?</
9060: 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 49 6e 20 54 63  a></h3>.<p>In Tc
9070: 6c 54 4c 53 20 31 2e 38 20 61 6e 64 20 65 61 72  lTLS 1.8 and ear
9080: 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63  lier versions, c
9090: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64  ertificate valid
90a0: 61 74 69 6f 6e 20 69 73 0a 3c 65 6d 3e 4e 4f 54  ation is.<em>NOT
90b0: 3c 2f 65 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79  </em> enabled by
90c0: 20 64 65 66 61 75 6c 74 2e 20 54 68 69 73 20 6c   default. This l
90d0: 69 6d 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65  imitation is due
90e0: 20 74 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20   to the lack of 
90f0: 61 20 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70  a common.cross p
9100: 6c 61 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65  latform database
9110: 20 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 20   of Certificate 
9120: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 70  Authority (CA) p
9130: 72 6f 76 69 64 65 64 20 63 65 72 74 69 66 69 63  rovided certific
9140: 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65  ates to.validate
9150: 20 61 67 61 69 6e 73 74 2e 20 4d 61 6e 79 20 4c   against. Many L
9160: 69 6e 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74  inux systems nat
9170: 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70  ively support Op
9180: 65 6e 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68  enSSL and thus h
9190: 61 76 65 0a 74 68 65 73 65 20 63 65 72 74 69 66  ave.these certif
91a0: 69 63 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64  icates installed
91b0: 20 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20   as part of the 
91c0: 4f 53 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e  OS, but MacOS an
91d0: 64 20 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20  d MS Windows do 
91e0: 6e 6f 74 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20  not..Staring in 
91f0: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73  TclTLS 2.0, this
9200: 20 68 61 73 20 62 65 65 6e 20 63 68 61 6e 67 65   has been change
9210: 64 20 74 6f 20 72 65 71 75 69 72 65 20 63 65 72  d to require cer
9220: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74  tificate validat
9230: 69 6f 6e 0a 62 79 20 64 65 66 61 75 6c 74 2e 20  ion.by default. 
9240: 49 6e 20 6f 72 64 65 72 20 74 6f 20 75 73 65 20  In order to use 
9250: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
9260: 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f  tion">-require</
9270: 62 3e 20 6f 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f  b> option, one o
9280: 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 0a  f the following.
9290: 6d 75 73 74 20 62 65 20 74 72 75 65 3a 3c 2f 70  must be true:</p
92a0: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<ul class="doc
92b0: 74 6f 6f 6c 73 5f 69 74 65 6d 69 7a 65 64 22 3e  tools_itemized">
92c0: 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78  .<li><p>On Linux
92d0: 20 61 6e 64 20 55 6e 69 78 20 73 79 73 74 65 6d   and Unix system
92e0: 73 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 61  s with OpenSSL a
92f0: 6c 72 65 61 64 79 20 69 6e 73 74 61 6c 6c 65 64  lready installed
9300: 20 6f 72 20 69 66 20 74 68 65 20 43 41 0a 63 65   or if the CA.ce
9310: 72 74 69 66 69 63 61 74 65 73 20 61 72 65 20 61  rtificates are a
9320: 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 4d 20  vailable in PEM 
9330: 66 6f 72 6d 61 74 2c 20 61 6e 64 20 69 66 20 74  format, and if t
9340: 68 65 79 20 61 72 65 20 73 74 6f 72 65 64 20 69  hey are stored i
9350: 6e 20 74 68 65 0a 73 74 61 6e 64 61 72 64 20 6c  n the.standard l
9360: 6f 63 61 74 69 6f 6e 73 2c 20 6f 72 20 69 66 20  ocations, or if 
9370: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61  the <b class="va
9380: 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54  riable">SSL_CERT
9390: 5f 44 49 52 3c 2f 62 3e 20 6f 72 20 3c 62 20 63  _DIR</b> or <b c
93a0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e  lass="variable">
93b0: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62  SSL_CERT_FILE</b
93c0: 3e 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61  >.environment va
93d0: 72 69 61 62 6c 65 73 20 61 72 65 20 73 65 74 2c  riables are set,
93e0: 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22   then <b class="
93f0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f  option">-cadir</
9400: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  b>, <b class="op
9410: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
9420: 2c 0a 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22  ,.and <b class="
9430: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
9440: 3c 2f 62 3e 20 61 72 65 6e 27 74 20 6e 65 65 64  </b> aren't need
9450: 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69  ed.</p></li>.<li
9460: 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c 20 69  ><p>If OpenSSL i
9470: 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 20  s not installed 
9480: 69 6e 20 74 68 65 20 64 65 66 61 75 6c 74 20 6c  in the default l
9490: 6f 63 61 74 69 6f 6e 2c 20 6f 72 20 77 68 65 6e  ocation, or when
94a0: 20 75 73 69 6e 67 20 4d 61 63 20 4f 53 0a 6f 72   using Mac OS.or
94b0: 20 4d 53 20 57 69 6e 64 6f 77 73 20 61 6e 64 20   MS Windows and 
94c0: 4f 70 65 6e 53 53 4c 20 69 73 20 69 6e 73 74 61  OpenSSL is insta
94d0: 6c 6c 65 64 2c 20 74 68 65 20 3c 62 20 63 6c 61  lled, the <b cla
94e0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
94f0: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61  L_CERT_DIR</b> a
9500: 6e 64 2f 6f 72 0a 3c 62 20 63 6c 61 73 73 3d 22  nd/or.<b class="
9510: 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45  variable">SSL_CE
9520: 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69  RT_FILE</b> envi
9530: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65  ronment variable
9540: 73 20 6f 72 20 74 68 65 20 6f 6e 65 20 6f 66 20  s or the one of 
9550: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the <b class="op
9560: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
9570: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  ,.<b class="opti
9580: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20  on">-cadir</b>, 
9590: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  or <b class="opt
95a0: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  ion">-castore</b
95b0: 3e 20 6f 70 74 69 6f 6e 73 20 6d 75 73 74 20 62  > options must b
95c0: 65 20 64 65 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f  e defined.</p></
95d0: 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53  li>.<li><p>On MS
95e0: 20 57 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69   Windows, starti
95f0: 6e 67 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 2e  ng in OpenSSL 3.
9600: 32 2c 20 69 74 20 69 73 20 6e 6f 77 20 70 6f 73  2, it is now pos
9610: 73 69 62 6c 65 20 74 6f 20 61 63 63 65 73 73 20  sible to access 
9620: 74 68 65 0a 62 75 69 6c 74 2d 69 6e 20 57 69 6e  the.built-in Win
9630: 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65  dows Certificate
9640: 20 53 74 6f 72 65 20 66 72 6f 6d 20 4f 70 65 6e   Store from Open
9650: 53 53 4c 2e 20 54 68 69 73 20 63 61 6e 20 75 74  SSL. This can ut
9660: 69 6c 69 7a 65 64 20 62 79 0a 73 65 74 74 69 6e  ilized by.settin
9670: 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  g the <b class="
9680: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65  option">-castore
9690: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 74 6f 20 26  </b> option to &
96a0: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63  quot;<b class="c
96b0: 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73  onst">org.openss
96c0: 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62  l.winstore://</b
96d0: 3e 26 71 75 6f 74 3b 2e 3c 2f 70 3e 3c 2f 6c 69  >&quot;.</p></li
96e0: 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e  >.<li><p>If Open
96f0: 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61  SSL is not insta
9700: 6c 6c 65 64 20 6f 72 20 74 68 65 20 43 41 20 63  lled or the CA c
9710: 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 20  ertificates are 
9720: 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e  not available in
9730: 20 50 45 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65   PEM.format, the
9740: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73   CA certificates
9750: 20 6d 75 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61   must be downloa
9760: 64 65 64 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65  ded and installe
9770: 64 20 77 69 74 68 20 74 68 65 20 75 73 65 72 0a  d with the user.
9780: 73 6f 66 74 77 61 72 65 2e 20 54 68 65 20 43 55  software. The CU
9790: 52 4c 20 74 65 61 6d 20 6d 61 6b 65 73 20 74 68  RL team makes th
97a0: 65 6d 20 61 76 61 69 6c 61 62 6c 65 20 61 74 0a  em available at.
97b0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f  <a href="https:/
97c0: 2f 63 75 72 6c 2e 73 65 2f 64 6f 63 73 2f 63 61  /curl.se/docs/ca
97d0: 65 78 74 72 61 63 74 2e 68 74 6d 6c 22 3e 43 41  extract.html">CA
97e0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 65 78   certificates ex
97f0: 74 72 61 63 74 65 64 0a 66 72 6f 6d 20 4d 6f 7a  tracted.from Moz
9800: 69 6c 6c 61 3c 2f 61 3e 20 69 6e 20 74 68 65 20  illa</a> in the 
9810: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22  &quot;<b class="
9820: 66 69 6c 65 22 3e 63 61 63 65 72 74 2e 70 65 6d  file">cacert.pem
9830: 3c 2f 62 3e 26 71 75 6f 74 3b 20 66 69 6c 65 2e  </b>&quot; file.
9840: 20 59 6f 75 20 6d 75 73 74 20 74 68 65 6e 20 65   You must then e
9850: 69 74 68 65 72 20 73 65 74 20 74 68 65 0a 3c 62  ither set the.<b
9860: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65   class="variable
9870: 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f  ">SSL_CERT_DIR</
9880: 62 3e 20 61 6e 64 2f 6f 72 20 3c 62 20 63 6c 61  b> and/or <b cla
9890: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53  ss="variable">SS
98a0: 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20  L_CERT_FILE</b> 
98b0: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69  environment vari
98c0: 61 62 6c 65 73 20 6f 72 20 74 68 65 0a 3c 62 20  ables or the.<b 
98d0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
98e0: 63 61 64 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 20  cadir</b> or <b 
98f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d  class="option">-
9900: 63 61 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f  cafile</b> optio
9910: 6e 73 20 74 6f 20 74 68 65 20 43 41 20 63 65 72  ns to the CA cer
9920: 74 20 66 69 6c 65 27 73 20 69 6e 73 74 61 6c 6c  t file's install
9930: 0a 6c 6f 63 61 74 69 6f 6e 2e 20 49 74 20 69 73  .location. It is
9940: 20 79 6f 75 72 20 72 65 73 70 6f 6e 73 69 62 69   your responsibi
9950: 6c 69 74 79 20 74 6f 20 6b 65 65 70 20 74 68 69  lity to keep thi
9960: 73 20 66 69 6c 65 20 75 70 20 74 6f 20 64 61 74  s file up to dat
9970: 65 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c  e.</p></li>.</ul
9980: 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a  >.</div>.</div>.
9990: 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e  <div id="section
99a0: 34 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  4" class="doctoo
99b0: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
99c0: 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e  <a name="section
99d0: 34 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69  4">Callback Opti
99e0: 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e  ons</a></h2>.<p>
99f0: 41 73 20 70 72 65 76 69 6f 75 73 6c 79 20 64 65  As previously de
9a00: 73 63 72 69 62 65 64 2c 20 65 61 63 68 20 63 68  scribed, each ch
9a10: 61 6e 6e 65 6c 20 63 61 6e 20 62 65 20 67 69 76  annel can be giv
9a20: 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61 6c  en their own cal
9a30: 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65  lbacks.to handle
9a40: 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70 72   intermediate pr
9a50: 6f 63 65 73 73 69 6e 67 20 62 79 20 74 68 65 20  ocessing by the 
9a60: 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c  OpenSSL library,
9a70: 20 75 73 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c   using the.<b cl
9a80: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f  ass="option">-co
9a90: 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c  mmand</b>, <b cl
9aa0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61  ass="option">-pa
9ab0: 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20  ssword</b>, and 
9ac0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
9ad0: 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d  ">-validate_comm
9ae0: 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 0a  and</b> options.
9af0: 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72  passed to either
9b00: 20 6f 66 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d   of <b class="cm
9b10: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  d">tls::socket</
9b20: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22  b> or <b class="
9b30: 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  cmd">tls::import
9b40: 3c 2f 62 3e 2e 0a 55 6e 6c 69 6b 65 20 70 72 65  </b>..Unlike pre
9b50: 76 69 6f 75 73 20 76 65 72 73 69 6f 6e 73 20 6f  vious versions o
9b60: 66 20 54 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69  f TclTLS, only i
9b70: 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 67  f the callback g
9b80: 65 6e 65 72 61 74 65 73 20 61 6e 20 65 72 72 6f  enerates an erro
9b90: 72 2c 0a 77 69 6c 6c 20 74 68 65 20 3c 62 20 63  r,.will the <b c
9ba0: 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 62 67  lass="syscmd">bg
9bb0: 65 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e  error</b> comman
9bc0: 64 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 69 74  d be invoked wit
9bd0: 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66 6f  h the error info
9be0: 72 6d 61 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64 69  rmation.</p>.<di
9bf0: 76 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e  v id="subsection
9c00: 34 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  4" class="doctoo
9c10: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c  ls_subsection"><
9c20: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73  h3><a name="subs
9c30: 65 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20  ection4">Values 
9c40: 66 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c  for Command Call
9c50: 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70  back</a></h3>.<p
9c60: 3e 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f  >The callback fo
9c70: 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  r the <b class="
9c80: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64  option">-command
9c90: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69  </b> option is i
9ca0: 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61  nvoked at severa
9cb0: 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20  l points during 
9cc0: 74 68 65 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64  the.OpenSSL hand
9cd0: 73 68 61 6b 65 20 61 6e 64 20 64 75 72 69 6e 67  shake and during
9ce0: 20 72 6f 75 74 69 6e 65 20 6f 70 65 72 61 74 69   routine operati
9cf0: 6f 6e 73 2e 20 53 65 65 20 62 65 6c 6f 77 20 66  ons. See below f
9d00: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a  or the possible.
9d10: 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64  arguments passed
9d20: 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b   to the callback
9d30: 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 73 20   script. Values 
9d40: 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68  returned from th
9d50: 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69  e callback are.i
9d60: 67 6e 6f 72 65 64 2e 3c 2f 70 3e 0a 3c 64 6c 20  gnored.</p>.<dl 
9d70: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f  class="doctools_
9d80: 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62  options">.<dt><b
9d90: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e   class="option">
9da0: 65 72 72 6f 72 3c 2f 62 3e 20 3c 69 20 63 6c 61  error</b> <i cla
9db0: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
9dc0: 49 64 20 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f  Id message</i></
9dd0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  dt>.<dd><p>This 
9de0: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
9df0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e   is invoked when
9e00: 65 76 65 72 20 61 6e 20 65 72 72 6f 72 20 6f 63  ever an error oc
9e10: 63 75 72 73 20 64 75 72 69 6e 67 20 74 68 65 20  curs during the 
9e20: 69 6e 69 74 69 61 6c 0a 63 6f 6e 6e 65 63 74 69  initial.connecti
9e30: 6f 6e 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f  on, handshake, o
9e40: 72 20 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73  r I/O operations
9e50: 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22  . The <i class="
9e60: 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e  arg">message</i>
9e70: 20 61 72 67 75 6d 65 6e 74 20 63 61 6e 20 62 65   argument can be
9e80: 0a 66 72 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72  .from the Tcl_Er
9e90: 72 6e 6f 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20  rnoMsg, OpenSSL 
9ea0: 66 75 6e 63 74 69 6f 6e 20 3c 62 20 63 6c 61 73  function <b clas
9eb0: 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 45 52 52  s="function">ERR
9ec0: 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74  _reason_error_st
9ed0: 72 69 6e 67 28 29 3c 2f 62 3e 2c 0a 6f 72 20 61  ring()</b>,.or a
9ee0: 20 63 75 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e   custom message.
9ef0: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69   This callback i
9f00: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53  s new for TclTLS
9f10: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
9f20: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
9f30: 69 6f 6e 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c 69  ion">info</b> <i
9f40: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
9f50: 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 6e  nnelId major min
9f60: 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 3c  or message type<
9f70: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e  /i></dt>.<dd><p>
9f80: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  This form of cal
9f90: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
9fa0: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   by the OpenSSL 
9fb0: 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73  function.<b clas
9fc0: 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c  s="function">SSL
9fd0: 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61  _set_info_callba
9fe0: 63 6b 28 29 3c 2f 62 3e 20 64 75 72 69 6e 67 20  ck()</b> during 
9ff0: 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e  the initial conn
a000: 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73  ection and hands
a010: 68 61 6b 65 0a 6f 70 65 72 61 74 69 6f 6e 73 2e  hake.operations.
a020: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61   The arguments a
a030: 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73  re:</p>.<dl clas
a040: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69  s="doctools_defi
a050: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69  nitions">.<dt><i
a060: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 61 6a   class="arg">maj
a070: 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  or</i></dt>.<dd>
a080: 3c 70 3e 4d 61 6a 6f 72 20 63 61 74 65 67 6f 72  <p>Major categor
a090: 79 20 66 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c  y for error. Val
a0a0: 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62  id enums are: <b
a0b0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68   class="const">h
a0c0: 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 2c 20 3c 62  andshake</b>, <b
a0d0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61   class="const">a
a0e0: 6c 65 72 74 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61  lert</b>,.<b cla
a0f0: 73 73 3d 22 63 6f 6e 73 74 22 3e 63 6f 6e 6e 65  ss="const">conne
a100: 63 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73  ct</b>, <b class
a110: 3d 22 63 6f 6e 73 74 22 3e 61 63 63 65 70 74 3c  ="const">accept<
a120: 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  /b>.</p></dd>.<d
a130: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
a140: 3e 6d 69 6e 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a  >minor</i></dt>.
a150: 3c 64 64 3e 3c 70 3e 4d 69 6e 6f 72 20 63 61 74  <dd><p>Minor cat
a160: 65 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 2e  egory for error.
a170: 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 65   Valid enums are
a180: 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  : <b class="cons
a190: 74 22 3e 73 74 61 72 74 3c 2f 62 3e 2c 20 3c 62  t">start</b>, <b
a1a0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 64   class="const">d
a1b0: 6f 6e 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73  one</b>, <b clas
a1c0: 73 3d 22 63 6f 6e 73 74 22 3e 72 65 61 64 3c 2f  s="const">read</
a1d0: 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f  b>,.<b class="co
a1e0: 6e 73 74 22 3e 77 72 69 74 65 3c 2f 62 3e 2c 20  nst">write</b>, 
a1f0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22  <b class="const"
a200: 3e 6c 6f 6f 70 3c 2f 62 3e 2c 20 3c 62 20 63 6c  >loop</b>, <b cl
a210: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 65 78 69 74  ass="const">exit
a220: 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  </b>.</p></dd>.<
a230: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
a240: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64  ">message</i></d
a250: 74 3e 0a 3c 64 64 3e 3c 70 3e 44 65 73 63 72 69  t>.<dd><p>Descri
a260: 70 74 69 76 65 20 6d 65 73 73 61 67 65 20 73 74  ptive message st
a270: 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 20 62  ring which may b
a280: 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 74 68  e generated eith
a290: 65 72 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22  er by.<b class="
a2a0: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 74  function">SSL_st
a2b0: 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28  ate_string_long(
a2c0: 29 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73  )</b> or <b clas
a2d0: 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c  s="function">SSL
a2e0: 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 69  _alert_desc_stri
a2f0: 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0a 64  ng_long()</b>,.d
a300: 65 70 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20  epending on the 
a310: 63 6f 6e 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64 64  context.</p></dd
a320: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
a330: 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64  arg">type</i></d
a340: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 61 6c  t>.<dd><p>For al
a350: 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69 62  erts, the possib
a360: 6c 65 20 76 61 6c 75 65 73 20 61 72 65 3a 20 3c  le values are: <
a370: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e  b class="const">
a380: 77 61 72 6e 69 6e 67 3c 2f 62 3e 2c 0a 3c 62 20  warning</b>,.<b 
a390: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61  class="const">fa
a3a0: 74 61 6c 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20  tal</b>, and <b 
a3b0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 75 6e  class="const">un
a3c0: 6b 6e 6f 77 6e 3c 2f 62 3e 2e 20 46 6f 72 20 6f  known</b>. For o
a3d0: 74 68 65 72 73 2c 20 3c 62 20 63 6c 61 73 73 3d  thers, <b class=
a3e0: 22 63 6f 6e 73 74 22 3e 69 6e 66 6f 3c 2f 62 3e  "const">info</b>
a3f0: 20 69 73 20 75 73 65 64 2e 0a 54 68 69 73 20 61   is used..This a
a400: 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66  rgument is new f
a410: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f  or TclTLS 1.8.</
a420: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64  p></dd>.</dl></d
a430: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
a440: 22 6f 70 74 69 6f 6e 22 3e 6d 65 73 73 61 67 65  "option">message
a450: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
a460: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 69  rg">channelId di
a470: 72 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20  rection version 
a480: 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 6d 65 73  content_type mes
a490: 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  sage</i></dt>.<d
a4a0: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f  d><p>This form o
a4b0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
a4c0: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65  voked by the Ope
a4d0: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62  nSSL function.<b
a4e0: 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e   class="function
a4f0: 22 3e 53 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61  ">SSL_set_msg_ca
a500: 6c 6c 62 61 63 6b 28 29 3c 2f 62 3e 20 77 68 65  llback()</b> whe
a510: 6e 65 76 65 72 20 61 20 6d 65 73 73 61 67 65 20  never a message 
a520: 69 73 20 73 65 6e 74 20 6f 72 20 72 65 63 65 69  is sent or recei
a530: 76 65 64 20 64 75 72 69 6e 67 20 74 68 65 0a 69  ved during the.i
a540: 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f  nitial connectio
a550: 6e 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72  n, handshake, or
a560: 20 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e   I/O operations.
a570: 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69   It is only avai
a580: 6c 61 62 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53  lable when.OpenS
a590: 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 20 77  SL is complied w
a5a0: 69 74 68 20 74 68 65 20 3c 62 20 63 6c 61 73 73  ith the <b class
a5b0: 3d 22 63 6f 6e 73 74 22 3e 65 6e 61 62 6c 65 2d  ="const">enable-
a5c0: 73 73 6c 2d 74 72 61 63 65 3c 2f 62 3e 20 6f 70  ssl-trace</b> op
a5d0: 74 69 6f 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62  tion. This callb
a5e0: 61 63 6b 20 69 73 0a 6e 65 77 20 66 6f 72 20 54  ack is.new for T
a5f0: 63 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61  clTLS 1.8. The a
a600: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70  rguments are:</p
a610: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63  >.<dl class="doc
a620: 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e  tools_definition
a630: 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73  s">.<dt><i class
a640: 3d 22 61 72 67 22 3e 64 69 72 65 63 74 69 6f 6e  ="arg">direction
a650: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
a660: 3e 44 69 72 65 63 74 69 6f 6e 20 69 73 20 65 69  >Direction is ei
a670: 74 68 65 72 20 3c 62 20 63 6c 61 73 73 3d 22 63  ther <b class="c
a680: 6f 6e 73 74 22 3e 53 65 6e 74 3c 2f 62 3e 20 6f  onst">Sent</b> o
a690: 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73  r <b class="cons
a6a0: 74 22 3e 52 65 63 65 69 76 65 64 3c 2f 62 3e 2e  t">Received</b>.
a6b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69  </p></dd>.<dt><i
a6c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72   class="arg">ver
a6d0: 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  sion</i></dt>.<d
a6e0: 64 3e 3c 70 3e 56 65 72 73 69 6f 6e 20 69 73 20  d><p>Version is 
a6f0: 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72  the protocol ver
a700: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  sion.</p></dd>.<
a710: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
a720: 22 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f  ">content_type</
a730: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43  i></dt>.<dd><p>C
a740: 6f 6e 74 65 6e 74 20 74 79 70 65 20 69 73 20 74  ontent type is t
a750: 68 65 20 6d 65 73 73 61 67 65 20 63 6f 6e 74 65  he message conte
a760: 6e 74 20 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64  nt type.</p></dd
a770: 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22  >.<dt><i class="
a780: 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e  arg">message</i>
a790: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 65 73  </dt>.<dd><p>Mes
a7a0: 73 61 67 65 20 69 73 20 6d 6f 72 65 20 69 6e 66  sage is more inf
a7b0: 6f 20 66 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c  o from the <b cl
a7c0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 53 53 4c 5f  ass="const">SSL_
a7d0: 74 72 61 63 65 3c 2f 62 3e 20 41 50 49 2e 3c 2f  trace</b> API.</
a7e0: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64  p></dd>.</dl></d
a7f0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
a800: 22 6f 70 74 69 6f 6e 22 3e 73 65 73 73 69 6f 6e  "option">session
a810: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61  </b> <i class="a
a820: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65  rg">channelId se
a830: 73 73 69 6f 6e 5f 69 64 20 73 65 73 73 69 6f 6e  ssion_id session
a840: 5f 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65  _ticket lifetime
a850: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70  </i></dt>.<dd><p
a860: 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61  >This form of ca
a870: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
a880: 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  d by the OpenSSL
a890: 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61   function.<b cla
a8a0: 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53  ss="function">SS
a8b0: 4c 5f 43 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e  L_CTX_sess_set_n
a8c0: 65 77 5f 63 62 28 29 3c 2f 62 3e 20 77 68 65 6e  ew_cb()</b> when
a8d0: 65 76 65 72 20 61 20 6e 65 77 20 73 65 73 73 69  ever a new sessi
a8e0: 6f 6e 20 69 64 20 69 73 20 73 65 6e 74 20 62 79  on id is sent by
a8f0: 20 74 68 65 0a 73 65 72 76 65 72 20 64 75 72 69   the.server duri
a900: 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 20 63  ng the initial c
a910: 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68 61  onnection and ha
a920: 6e 64 73 68 61 6b 65 20 61 6e 64 20 61 6c 73 6f  ndshake and also
a930: 20 64 75 72 69 6e 67 20 74 68 65 20 73 65 73 73   during the sess
a940: 69 6f 6e 0a 69 66 20 74 68 65 20 3c 62 20 63 6c  ion.if the <b cl
a950: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f  ass="option">-po
a960: 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e  st_handshake</b>
a970: 20 6f 70 74 69 6f 6e 20 69 73 20 73 65 74 20 74   option is set t
a980: 6f 20 74 72 75 65 2e 20 54 68 69 73 20 63 61 6c  o true. This cal
a990: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72  lback is new for
a9a0: 0a 54 63 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65  .TclTLS 1.8. The
a9b0: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c   arguments are:<
a9c0: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64  /p>.<dl class="d
a9d0: 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69  octools_definiti
a9e0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61  ons">.<dt><i cla
a9f0: 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69 6f 6e  ss="arg">session
aa00: 5f 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64  _id</i></dt>.<dd
aa10: 3e 3c 70 3e 53 65 73 73 69 6f 6e 20 49 64 20 69  ><p>Session Id i
aa20: 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65  s the current se
aa30: 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 72  ssion identifier
aa40: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69  </p></dd>.<dt><i
aa50: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 73   class="arg">ses
aa60: 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e 3c  sion_ticket</i><
aa70: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 63 6b  /dt>.<dd><p>Tick
aa80: 65 74 20 69 73 20 74 68 65 20 73 65 73 73 69 6f  et is the sessio
aa90: 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 3c 2f 70  n ticket info</p
aaa0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c  ></dd>.<dt><i cl
aab0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 66 65 74 69  ass="arg">lifeti
aac0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  me</i></dt>.<dd>
aad0: 3c 70 3e 4c 69 66 65 74 69 6d 65 20 69 73 20 74  <p>Lifetime is t
aae0: 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69  he ticket lifeti
aaf0: 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f  me in seconds.</
ab00: 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64  p></dd>.</dl></d
ab10: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d  d>.<dt><b class=
ab20: 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c  "option">verify<
ab30: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72  /b> <i class="ar
ab40: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65 70  g">channelId dep
ab50: 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65  th cert status e
ab60: 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64  rror</i></dt>.<d
ab70: 64 3e 3c 70 3e 54 68 69 73 20 63 61 6c 6c 62 61  d><p>This callba
ab80: 63 6b 20 77 61 73 20 6d 6f 76 65 64 20 74 6f 20  ck was moved to 
ab90: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
aba0: 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61  ">-validatecomma
abb0: 6e 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53  nd</b> in TclTLS
abc0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c   1.8.</p></dd>.<
abd0: 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76  /dl>.</div>.<div
abe0: 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 35   id="subsection5
abf0: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
ac00: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68  s_subsection"><h
ac10: 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65  3><a name="subse
ac20: 63 74 69 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66  ction5">Values f
ac30: 6f 72 20 50 61 73 73 77 6f 72 64 20 43 61 6c 6c  or Password Call
ac40: 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70  back</a></h3>.<p
ac50: 3e 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f  >The callback fo
ac60: 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  r the <b class="
ac70: 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72  option">-passwor
ac80: 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20  d</b> option is 
ac90: 69 6e 76 6f 6b 65 64 20 62 79 20 54 63 6c 54 4c  invoked by TclTL
aca0: 53 20 77 68 65 6e 65 76 65 72 20 4f 70 65 6e 53  S whenever OpenS
acb0: 53 4c 20 6e 65 65 64 73 0a 74 6f 20 6f 62 74 61  SL needs.to obta
acc0: 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 53  in a password. S
acd0: 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65  ee below for the
ace0: 20 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65   possible argume
acf0: 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68  nts passed to th
ad00: 65 0a 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70  e.callback scrip
ad10: 74 2e 20 54 68 65 20 75 73 65 72 20 70 72 6f 76  t. The user prov
ad20: 69 64 65 64 20 70 61 73 73 77 6f 72 64 20 69 73  ided password is
ad30: 20 65 78 70 65 63 74 65 64 20 74 6f 20 62 65 20   expected to be 
ad40: 72 65 74 75 72 6e 65 64 20 62 79 20 74 68 65 0a  returned by the.
ad50: 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e 0a 3c 64  callback.</p>.<d
ad60: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
ad70: 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  s_options">.<dt>
ad80: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
ad90: 22 3e 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c  ">password</b> <
ada0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 77  i class="arg">rw
adb0: 66 6c 61 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f 64  flag size</i></d
adc0: 74 3e 0a 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b 65  t>.<dd><p>Invoke
add0: 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f  d when loading o
ade0: 72 20 73 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63  r storing an enc
adf0: 72 79 70 74 65 64 20 50 45 4d 20 63 65 72 74 69  rypted PEM certi
ae00: 66 69 63 61 74 65 2e 20 54 68 65 20 61 72 67 75  ficate. The argu
ae10: 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c  ments are:</p>.<
ae20: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  dl class="doctoo
ae30: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e  ls_definitions">
ae40: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61  .<dt><i class="a
ae50: 72 67 22 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c 2f  rg">rwflag</i></
ae60: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 72  dt>.<dd><p>The r
ae70: 65 61 64 2f 77 72 69 74 65 20 66 6c 61 67 20 69  ead/write flag i
ae80: 73 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f  s 0 for reading/
ae90: 64 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20  decryption or 1 
aea0: 66 6f 72 20 77 72 69 74 69 6e 67 2f 65 6e 63 72  for writing/encr
aeb0: 79 70 74 69 6f 6e 2e 0a 54 68 65 20 6c 61 74 74  yption..The latt
aec0: 65 72 20 63 61 6e 20 62 65 20 75 73 65 64 20 74  er can be used t
aed0: 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68 65 6e  o determine when
aee0: 20 74 6f 20 70 72 6f 6d 70 74 20 74 68 65 20 75   to prompt the u
aef0: 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 6d 2e 0a  ser to confirm..
af00: 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73  This argument is
af10: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20   new for TclTLS 
af20: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64  1.8.</p></dd>.<d
af30: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22  t><i class="arg"
af40: 3e 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  >size</i></dt>.<
af50: 64 64 3e 3c 70 3e 54 68 65 20 73 69 7a 65 20 69  dd><p>The size i
af60: 73 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65  s the maximum le
af70: 6e 67 74 68 20 6f 66 20 74 68 65 20 70 61 73 73  ngth of the pass
af80: 77 6f 72 64 20 69 6e 20 62 79 74 65 73 2e 0a 54  word in bytes..T
af90: 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20  his argument is 
afa0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31  new for TclTLS 1
afb0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  .8.</p></dd>.</d
afc0: 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f  l></dd>.</dl>.</
afd0: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75  div>.<div id="su
afe0: 62 73 65 63 74 69 6f 6e 36 22 20 63 6c 61 73 73  bsection6" class
aff0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65  ="doctools_subse
b000: 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61  ction"><h3><a na
b010: 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 36 22  me="subsection6"
b020: 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61 6c 69  >Values for Vali
b030: 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c  date Command Cal
b040: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c  lback</a></h3>.<
b050: 70 3e 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 66  p>The callback f
b060: 6f 72 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d  or the <b class=
b070: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61  "option">-valida
b080: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70  tecommand</b> op
b090: 74 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20  tion is invoked 
b0a0: 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73  during the hands
b0b0: 68 61 6b 65 0a 70 72 6f 63 65 73 73 20 69 6e 20  hake.process in 
b0c0: 6f 72 64 65 72 20 66 6f 72 20 74 68 65 20 61 70  order for the ap
b0d0: 70 6c 69 63 61 74 69 6f 6e 20 74 6f 20 76 61 6c  plication to val
b0e0: 69 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 64  idate the provid
b0f0: 65 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65 65  ed value(s). See
b100: 0a 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70  .below for the p
b110: 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74  ossible argument
b120: 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20  s passed to the 
b130: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e  callback script.
b140: 20 49 66 20 6e 6f 74 0a 73 70 65 63 69 66 69 65   If not.specifie
b150: 64 2c 20 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20  d, OpenSSL will 
b160: 61 63 63 65 70 74 20 61 6c 6c 20 76 61 6c 69 64  accept all valid
b170: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61 6e   certificates an
b180: 64 20 65 78 74 65 6e 73 69 6f 6e 73 2e 20 54 6f  d extensions. To
b190: 20 72 65 6a 65 63 74 0a 74 68 65 20 76 61 6c 75   reject.the valu
b1a0: 65 20 61 6e 64 20 61 62 6f 72 74 20 74 68 65 20  e and abort the 
b1b0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20  connection, the 
b1c0: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20  callback should 
b1d0: 72 65 74 75 72 6e 20 30 2e 20 54 6f 20 61 63 63  return 0. To acc
b1e0: 65 70 74 20 74 68 65 0a 76 61 6c 75 65 20 61 6e  ept the.value an
b1f0: 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63  d continue the c
b200: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68  onnection, it sh
b210: 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e 20 54  ould return 1. T
b220: 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c  o reject the val
b230: 75 65 2c 20 62 75 74 0a 63 6f 6e 74 69 6e 75 65  ue, but.continue
b240: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c   the connection,
b250: 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72   it should retur
b260: 6e 20 32 2e 20 54 68 69 73 20 63 61 6c 6c 62 61  n 2. This callba
b270: 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63  ck is new for Tc
b280: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 0a 3c 64  lTLS 1.8.</p>.<d
b290: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  l class="doctool
b2a0: 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e  s_options">.<dt>
b2b0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b2c0: 22 3e 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c  ">alpn</b> <i cl
b2d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65  ass="arg">channe
b2e0: 6c 49 64 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74  lId protocol mat
b2f0: 63 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  ch</i></dt>.<dd>
b300: 3c 70 3e 46 6f 72 20 73 65 72 76 65 72 73 2c 20  <p>For servers, 
b310: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  this form of cal
b320: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
b330: 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74   when the client
b340: 20 41 4c 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20   ALPN extension 
b350: 69 73 0a 72 65 63 65 69 76 65 64 2e 20 49 66 20  is.received. If 
b360: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d  <i class="arg">m
b370: 61 74 63 68 3c 2f 69 3e 20 69 73 20 74 72 75 65  atch</i> is true
b380: 2c 20 74 68 65 6e 20 3c 69 20 63 6c 61 73 73 3d  , then <i class=
b390: 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  "arg">protocol</
b3a0: 69 3e 20 69 73 20 74 68 65 20 66 69 72 73 74 0a  i> is the first.
b3b0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
b3c0: 22 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 70 72 6f 74  ">-alpn</b> prot
b3d0: 6f 63 6f 6c 20 6f 70 74 69 6f 6e 20 69 6e 20 63  ocol option in c
b3e0: 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 20 74 68  ommon to both th
b3f0: 65 20 63 6c 69 65 6e 74 20 61 6e 64 20 73 65 72  e client and ser
b400: 76 65 72 2e 0a 49 66 20 6e 6f 74 2c 20 74 68 65  ver..If not, the
b410: 20 66 69 72 73 74 20 63 6c 69 65 6e 74 20 73 70   first client sp
b420: 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c  ecified protocol
b430: 20 69 73 20 75 73 65 64 2e 20 54 68 69 73 20 63   is used. This c
b440: 61 6c 6c 62 61 63 6b 20 69 73 20 63 61 6c 6c 65  allback is calle
b450: 64 0a 61 66 74 65 72 20 74 68 65 20 48 65 6c 6c  d.after the Hell
b460: 6f 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62  o and ALPN callb
b470: 61 63 6b 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  acks.</p></dd>.<
b480: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74  dt><b class="opt
b490: 69 6f 6e 22 3e 68 65 6c 6c 6f 3c 2f 62 3e 20 3c  ion">hello</b> <
b4a0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68  i class="arg">ch
b4b0: 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e 61  annelId serverna
b4c0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e  me</i></dt>.<dd>
b4d0: 3c 70 3e 46 6f 72 20 73 65 72 76 65 72 73 2c 20  <p>For servers, 
b4e0: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  this form of cal
b4f0: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
b500: 20 64 75 72 69 6e 67 20 63 6c 69 65 6e 74 20 68   during client h
b510: 65 6c 6c 6f 20 6d 65 73 73 61 67 65 0a 70 72 6f  ello message.pro
b520: 63 65 73 73 69 6e 67 2e 20 54 68 65 20 70 75 72  cessing. The pur
b530: 70 6f 73 65 20 69 73 20 73 6f 20 74 68 65 20 73  pose is so the s
b540: 65 72 76 65 72 20 63 61 6e 20 73 65 6c 65 63 74  erver can select
b550: 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65   the appropriate
b560: 20 63 65 72 74 69 66 69 63 61 74 65 0a 74 6f 20   certificate.to 
b570: 70 72 65 73 65 6e 74 20 74 6f 20 74 68 65 20 63  present to the c
b580: 6c 69 65 6e 74 2c 20 61 6e 64 20 74 6f 20 6d 61  lient, and to ma
b590: 6b 65 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 75  ke other configu
b5a0: 72 61 74 69 6f 6e 20 61 64 6a 75 73 74 6d 65 6e  ration adjustmen
b5b0: 74 73 20 72 65 6c 65 76 61 6e 74 0a 74 6f 20 74  ts relevant.to t
b5c0: 68 61 74 20 73 65 72 76 65 72 20 6e 61 6d 65 20  hat server name 
b5d0: 61 6e 64 20 69 74 73 20 63 6f 6e 66 69 67 75 72  and its configur
b5e0: 61 74 69 6f 6e 2e 20 49 74 20 69 73 20 63 61 6c  ation. It is cal
b5f0: 6c 65 64 20 62 65 66 6f 72 65 20 74 68 65 20 53  led before the S
b600: 4e 49 20 61 6e 64 20 41 4c 50 4e 0a 63 61 6c 6c  NI and ALPN.call
b610: 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a  backs.</p></dd>.
b620: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70  <dt><b class="op
b630: 74 69 6f 6e 22 3e 73 6e 69 3c 2f 62 3e 20 3c 69  tion">sni</b> <i
b640: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61   class="arg">cha
b650: 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e 61 6d  nnelId servernam
b660: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  e</i></dt>.<dd><
b670: 70 3e 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74  p>For servers, t
b680: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c  his form of call
b690: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20  back is invoked 
b6a0: 77 68 65 6e 20 74 68 65 20 53 65 72 76 65 72 20  when the Server 
b6b0: 4e 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a  Name Indication.
b6c0: 28 53 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 20  (SNI) extension 
b6d0: 69 73 20 72 65 63 65 69 76 65 64 2e 20 54 68 65  is received. The
b6e0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e   <i class="arg">
b6f0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 20 61  servername</i> a
b700: 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 63  rgument is the c
b710: 6c 69 65 6e 74 0a 70 72 6f 76 69 64 65 64 20 73  lient.provided s
b720: 65 72 76 65 72 20 6e 61 6d 65 20 73 70 65 63 69  erver name speci
b730: 66 69 65 64 20 69 6e 20 74 68 65 20 3c 62 20 63  fied in the <b c
b740: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73  lass="option">-s
b750: 65 72 76 65 72 6e 61 6d 65 26 6c 74 3b 2f 62 26  ervername&lt;/b&
b760: 67 74 3b 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20  gt;</b> option. 
b770: 54 68 65 0a 70 75 72 70 6f 73 65 20 69 73 20 73  The.purpose is s
b780: 6f 20 77 68 65 6e 20 61 20 73 65 72 76 65 72 20  o when a server 
b790: 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c  supports multipl
b7a0: 65 20 6e 61 6d 65 73 2c 20 74 68 65 20 72 69 67  e names, the rig
b7b0: 68 74 20 63 65 72 74 69 66 69 63 61 74 65 0a 63  ht certificate.c
b7c0: 61 6e 20 62 65 20 75 73 65 64 2e 20 49 74 20 69  an be used. It i
b7d0: 73 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20 74  s called after t
b7e0: 68 65 20 68 65 6c 6c 6f 20 63 61 6c 6c 62 61 63  he hello callbac
b7f0: 6b 20 62 75 74 20 62 65 66 6f 72 65 20 74 68 65  k but before the
b800: 20 41 4c 50 4e 0a 63 61 6c 6c 62 61 63 6b 2e 3c   ALPN.callback.<
b810: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20  /p></dd>.<dt><b 
b820: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76  class="option">v
b830: 65 72 69 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61  erify</b> <i cla
b840: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c  ss="arg">channel
b850: 49 64 20 64 65 70 74 68 20 63 65 72 74 20 73 74  Id depth cert st
b860: 61 74 75 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f  atus error</i></
b870: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20  dt>.<dd><p>This 
b880: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
b890: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f   is invoked by O
b8a0: 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65  penSSL when a ne
b8b0: 77 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  w certificate is
b8c0: 20 72 65 63 65 69 76 65 64 0a 66 72 6f 6d 20 74   received.from t
b8d0: 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f  he peer. It allo
b8e0: 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 6f  ws the client to
b8f0: 20 63 68 65 63 6b 20 74 68 65 20 63 65 72 74 69   check the certi
b900: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74  ficate verificat
b910: 69 6f 6e 0a 72 65 73 75 6c 74 73 20 61 6e 64 20  ion.results and 
b920: 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 20 74  choose whether t
b930: 6f 20 63 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f  o continue or no
b940: 74 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20  t. It is called 
b950: 66 6f 72 20 65 61 63 68 0a 63 65 72 74 69 66 69  for each.certifi
b960: 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74  cate in the cert
b970: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2e 20 54  ificate chain. T
b980: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 77 61 73  his callback was
b990: 20 6d 6f 76 65 64 20 66 72 6f 6d 0a 3c 62 20 63   moved from.<b c
b9a0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63  lass="option">-c
b9b0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63  ommand</b> in Tc
b9c0: 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72  lTLS 1.8. The ar
b9d0: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e  guments are:</p>
b9e0: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74  .<dl class="doct
b9f0: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73  ools_definitions
ba00: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d  ">.<dt><i class=
ba10: 22 61 72 67 22 3e 64 65 70 74 68 3c 2f 69 3e 3c  "arg">depth</i><
ba20: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20  /dt>.<dd><p>The 
ba30: 64 65 70 74 68 20 69 73 20 74 68 65 20 69 6e 74  depth is the int
ba40: 65 67 65 72 20 64 65 70 74 68 20 6f 66 20 74 68  eger depth of th
ba50: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e  e certificate in
ba60: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
ba70: 20 63 68 61 69 6e 2c 0a 77 68 65 72 65 20 30 20   chain,.where 0 
ba80: 69 73 20 74 68 65 20 70 65 65 72 20 63 65 72 74  is the peer cert
ba90: 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68  ificate and high
baa0: 65 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 20  er values going 
bab0: 75 70 20 74 6f 20 74 68 65 20 43 65 72 74 69 66  up to the Certif
bac0: 69 63 61 74 65 0a 41 75 74 68 6f 72 69 74 79 20  icate.Authority 
bad0: 28 43 41 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c  (CA).</p></dd>.<
bae0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67  dt><i class="arg
baf0: 22 3e 63 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a  ">cert</i></dt>.
bb00: 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74 20  <dd><p>The cert 
bb10: 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69  argument is a li
bb20: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20  st of key-value 
bb30: 70 61 69 72 73 20 73 69 6d 69 6c 61 72 20 74 6f  pairs similar to
bb40: 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20   those returned 
bb50: 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64  by.<b class="cmd
bb60: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62  ">tls::status</b
bb70: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e  >.</p></dd>.<dt>
bb80: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73  <i class="arg">s
bb90: 74 61 74 75 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c  tatus</i></dt>.<
bba0: 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 74 75 73  dd><p>The status
bbb0: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65   argument is the
bbc0: 20 62 6f 6f 6c 65 61 6e 20 76 61 6c 69 64 69 74   boolean validit
bbd0: 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74  y of the current
bbe0: 20 63 65 72 74 69 66 69 63 61 74 65 20 77 68 65   certificate whe
bbf0: 72 65 20 30 0a 69 73 20 69 6e 76 61 6c 69 64 20  re 0.is invalid 
bc00: 61 6e 64 20 31 20 69 73 20 76 61 6c 69 64 2e 3c  and 1 is valid.<
bc10: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20  /p></dd>.<dt><i 
bc20: 63 6c 61 73 73 3d 22 61 72 67 22 3e 65 72 72 6f  class="arg">erro
bc30: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c  r</i></dt>.<dd><
bc40: 70 3e 54 68 65 20 65 72 72 6f 72 20 61 72 67 75  p>The error argu
bc50: 6d 65 6e 74 20 69 73 20 74 68 65 20 65 72 72 6f  ment is the erro
bc60: 72 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e  r message, if an
bc70: 79 2c 20 67 65 6e 65 72 61 74 65 64 20 62 79 0a  y, generated by.
bc80: 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69  <b class="functi
bc90: 6f 6e 22 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43  on">X509_STORE_C
bca0: 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f  TX_get_error()</
bcb0: 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64  b>.</p></dd>.</d
bcc0: 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70  l></dd>.</dl>.<p
bcd0: 3e 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c 65  >Reference imple
bce0: 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 68  mentations of th
bcf0: 65 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 72  ese callbacks ar
bd00: 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 26 71  e provided in &q
bd10: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69  uot;<b class="fi
bd20: 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26  le">tls.tcl</b>&
bd30: 71 75 6f 74 3b 0a 61 73 20 3c 62 20 63 6c 61 73  quot;.as <b clas
bd40: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c  s="cmd">tls::cal
bd50: 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c  lback</b>, <b cl
bd60: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70  ass="cmd">tls::p
bd70: 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64  assword</b>, and
bd80: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
bd90: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f  tls::validate_co
bda0: 6d 6d 61 6e 64 3c 2f 62 3e 0a 72 65 73 70 65 63  mmand</b>.respec
bdb0: 74 69 76 65 6c 79 2e 20 4e 6f 74 65 20 74 68 61  tively. Note tha
bdc0: 74 20 74 68 65 73 65 20 61 72 65 20 6f 6e 6c 79  t these are only
bdd0: 20 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e   <em>sample</em>
bde0: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73   implementations
bdf0: 2e 20 49 6e 20 61 20 6d 6f 72 65 0a 72 65 61 6c  . In a more.real
be00: 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74  istic deployment
be10: 20 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69   you would speci
be20: 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c  fy your own call
be30: 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20  back scripts on 
be40: 65 61 63 68 20 54 4c 53 0a 63 68 61 6e 6e 65 6c  each TLS.channel
be50: 20 75 73 69 6e 67 20 74 68 65 20 3c 62 20 63 6c   using the <b cl
be60: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f  ass="option">-co
be70: 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c  mmand</b>, <b cl
be80: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61  ass="option">-pa
be90: 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a  ssword</b>, and.
bea0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
beb0: 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d  ">-validate_comm
bec0: 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e  and</b> options.
bed0: 3c 2f 70 3e 0a 3c 70 3e 54 68 65 20 64 65 66 61  </p>.<p>The defa
bee0: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65  ult behavior whe
bef0: 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22  n the <b class="
bf00: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64  option">-command
bf10: 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73  </b> and <b clas
bf20: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69  s="option">-vali
bf30: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e  date_command</b>
bf40: 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74  .options are not
bf50: 20 73 70 65 63 69 66 69 65 64 2c 20 69 73 20 66   specified, is f
bf60: 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f  or TclTLS to pro
bf70: 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61  cess the associa
bf80: 74 65 64 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c  ted library.call
bf90: 62 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79  backs internally
bfa0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 62 65  . The default be
bfb0: 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20  havior when the 
bfc0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e  <b class="option
bfd0: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20  ">-password</b> 
bfe0: 6f 70 74 69 6f 6e 0a 69 73 20 6e 6f 74 20 73 70  option.is not sp
bff0: 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20 54  ecified is for T
c000: 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73  clTLS to process
c010: 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20   the associated 
c020: 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b  library callback
c030: 73 20 62 79 0a 61 74 74 65 6d 70 74 69 6e 67 20  s by.attempting 
c040: 74 6f 20 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73  to call <b class
c050: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73  ="cmd">tls::pass
c060: 77 6f 72 64 3c 2f 62 3e 2e 20 54 68 65 20 64 69  word</b>. The di
c070: 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e  fference between
c080: 20 74 68 65 73 65 20 74 77 6f 0a 62 65 68 61 76   these two.behav
c090: 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71  iors is a conseq
c0a0: 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69  uence of maintai
c0b0: 6e 69 6e 67 20 63 6f 6d 70 61 74 69 62 69 6c 69  ning compatibili
c0c0: 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 0a  ty with earlier.
c0d0: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e  implementations.
c0e0: 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20  </p>.<p><em>The 
c0f0: 75 73 65 20 6f 66 20 74 68 65 20 72 65 66 65 72  use of the refer
c100: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c  ence callbacks <
c110: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c  b class="cmd">tl
c120: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c  s::callback</b>,
c130: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e   <b class="cmd">
c140: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62  tls::password</b
c150: 3e 2c 0a 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d  >,.and <b class=
c160: 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64  "cmd">tls::valid
c170: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20  ate_command</b> 
c180: 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64  is not recommend
c190: 65 64 2e 20 54 68 65 79 20 6d 61 79 20 62 65 20  ed. They may be 
c1a0: 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74  removed from fut
c1b0: 75 72 65 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65  ure releases.</e
c1c0: 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f  m></p>.</div>.</
c1d0: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65  div>.<div id="se
c1e0: 63 74 69 6f 6e 35 22 20 63 6c 61 73 73 3d 22 64  ction5" class="d
c1f0: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22  octools_section"
c200: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65  ><h2><a name="se
c210: 63 74 69 6f 6e 35 22 3e 44 65 62 75 67 3c 2f 61  ction5">Debug</a
c220: 3e 3c 2f 68 32 3e 0a 3c 70 3e 46 6f 72 20 6d 6f  ></h2>.<p>For mo
c230: 73 74 20 64 65 62 75 67 67 69 6e 67 20 6e 65 65  st debugging nee
c240: 64 73 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73  ds, the <b class
c250: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c 62  ="option">-callb
c260: 61 63 6b 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 63  ack</b> option c
c270: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 72  an be used to pr
c280: 6f 76 69 64 65 0a 73 75 66 66 69 63 69 65 6e 74  ovide.sufficient
c290: 20 69 6e 73 69 67 68 74 20 61 6e 64 20 69 6e 66   insight and inf
c2a0: 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20  ormation on the 
c2b0: 54 4c 53 20 68 61 6e 64 73 68 61 6b 65 20 61 6e  TLS handshake an
c2c0: 64 20 70 72 6f 67 72 65 73 73 2e 20 49 66 0a 66  d progress. If.f
c2d0: 75 72 74 68 65 72 20 74 72 6f 75 62 6c 65 73 68  urther troublesh
c2e0: 6f 6f 74 69 6e 67 20 69 6e 73 69 67 68 74 20 69  ooting insight i
c2f0: 73 20 6e 65 65 64 65 64 2c 20 74 68 65 20 63 6f  s needed, the co
c300: 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f  mpile time optio
c310: 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  n.<b class="opti
c320: 6f 6e 22 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65 62  on">--enable-deb
c330: 75 67 3c 2f 62 3e 20 63 61 6e 20 62 65 20 75 73  ug</b> can be us
c340: 65 64 20 74 6f 20 67 65 74 20 64 65 74 61 69 6c  ed to get detail
c350: 65 64 20 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f  ed execution flo
c360: 77 20 73 74 61 74 75 73 2e 3c 2f 70 3e 0a 3c 70  w status.</p>.<p
c370: 3e 54 4c 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67  >TLS key logging
c380: 20 63 61 6e 20 62 65 20 65 6e 61 62 6c 65 64 20   can be enabled 
c390: 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 65  by setting the e
c3a0: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61  nvironment varia
c3b0: 62 6c 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61  ble.<b class="va
c3c0: 72 69 61 62 6c 65 22 3e 53 53 4c 4b 45 59 4c 4f  riable">SSLKEYLO
c3d0: 47 46 49 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65  GFILE</b> to the
c3e0: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c   name of the fil
c3f0: 65 20 74 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65  e to log to. The
c400: 6e 20 77 68 65 6e 65 76 65 72 20 54 4c 53 20 6b  n whenever TLS k
c410: 65 79 0a 6d 61 74 65 72 69 61 6c 20 69 73 20 67  ey.material is g
c420: 65 6e 65 72 61 74 65 64 20 6f 72 20 72 65 63 65  enerated or rece
c430: 69 76 65 64 20 69 74 20 77 69 6c 6c 20 62 65 20  ived it will be 
c440: 6c 6f 67 67 65 64 20 74 6f 20 74 68 65 20 66 69  logged to the fi
c450: 6c 65 2e 20 54 68 69 73 20 69 73 20 75 73 65 66  le. This is usef
c460: 75 6c 0a 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b  ul.for logging k
c470: 65 79 20 64 61 74 61 20 66 6f 72 20 6e 65 74 77  ey data for netw
c480: 6f 72 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c  ork logging tool
c490: 73 20 74 6f 20 75 73 65 20 74 6f 20 64 65 63 72  s to use to decr
c4a0: 79 70 74 20 74 68 65 20 64 61 74 61 2e 3c 2f 70  ypt the data.</p
c4b0: 3e 0a 3c 70 3e 54 68 65 20 3c 62 20 63 6c 61 73  >.<p>The <b clas
c4c0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 6c 73  s="variable">tls
c4d0: 3a 3a 64 65 62 75 67 3c 2f 62 3e 20 76 61 72 69  ::debug</b> vari
c4e0: 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f  able provides so
c4f0: 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f  me additional co
c500: 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 0a 64  ntrol over the.d
c510: 65 62 75 67 20 6c 6f 67 67 69 6e 67 20 69 6e 20  ebug logging in 
c520: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d  the <b class="cm
c530: 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b  d">tls::callback
c540: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22  </b>, <b class="
c550: 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f  cmd">tls::passwo
c560: 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63  rd</b>, and.<b c
c570: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a  lass="cmd">tls::
c580: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
c590: 3c 2f 62 3e 20 64 65 66 61 75 6c 74 20 68 61 6e  </b> default han
c5a0: 64 6c 65 72 73 20 69 6e 20 26 71 75 6f 74 3b 3c  dlers in &quot;<
c5b0: 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74  b class="file">t
c5c0: 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b  ls.tcl</b>&quot;
c5d0: 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 76 61  ..The default va
c5e0: 6c 75 65 20 69 73 20 30 20 77 69 74 68 20 68 69  lue is 0 with hi
c5f0: 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64  gher values prod
c600: 75 63 69 6e 67 20 6d 6f 72 65 20 64 69 61 67 6e  ucing more diagn
c610: 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 0a 61 6e  ostic output,.an
c620: 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63  d will also forc
c630: 65 20 74 68 65 20 76 65 72 69 66 79 20 6d 65 74  e the verify met
c640: 68 6f 64 20 69 6e 20 3c 62 20 63 6c 61 73 73 3d  hod in <b class=
c650: 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62  "cmd">tls::callb
c660: 61 63 6b 3c 2f 62 3e 20 74 6f 20 61 63 63 65 70  ack</b> to accep
c670: 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 61 74  t the.certificat
c680: 65 2c 20 65 76 65 6e 20 69 66 20 69 74 20 69 73  e, even if it is
c690: 20 69 6e 76 61 6c 69 64 20 77 68 65 6e 20 74 68   invalid when th
c6a0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  e <b class="opti
c6b0: 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d  on">-validatecom
c6c0: 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 20  mand</b>.option 
c6d0: 69 73 20 73 65 74 20 74 6f 20 3c 62 20 63 6c 61  is set to <b cla
c6e0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61  ss="cmd">tls::va
c6f0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
c700: 62 3e 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54  b>.</p>.<p><em>T
c710: 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 76 61  he use of the va
c720: 72 69 61 62 6c 65 20 3c 62 20 63 6c 61 73 73 3d  riable <b class=
c730: 22 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a  "variable">tls::
c740: 64 65 62 75 67 3c 2f 62 3e 20 69 73 20 6e 6f 74  debug</b> is not
c750: 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74   recommended..It
c760: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20   may be removed 
c770: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65  from future rele
c780: 61 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c  ases.</em></p>.<
c790: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73  /div>.<div id="s
c7a0: 65 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22  ection6" class="
c7b0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e  doctools_section
c7c0: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73  "><h2><a name="s
c7d0: 65 63 74 69 6f 6e 36 22 3e 48 54 54 50 20 50 61  ection6">HTTP Pa
c7e0: 63 6b 61 67 65 20 45 78 61 6d 70 6c 65 73 3c 2f  ckage Examples</
c7f0: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 66  a></h2>.<p>The f
c800: 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 78 61  ollowing are exa
c810: 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 6f 20  mple scripts to 
c820: 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 70 61  download a webpa
c830: 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 69 6e  ge and file usin
c840: 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 6b 61  g the.http packa
c850: 67 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c  ge. See <span cl
c860: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61  ass="sectref"><a
c870: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33   href="#section3
c880: 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61  ">Certificate Va
c890: 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70  lidation</a></sp
c8a0: 61 6e 3e 20 66 6f 72 20 77 68 65 74 68 65 72 20  an> for whether 
c8b0: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70  the.<b class="op
c8c0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e  tion">-cadir</b>
c8d0: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69  , <b class="opti
c8e0: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c  on">-cafile</b>,
c8f0: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f   and <b class="o
c900: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c  ption">-castore<
c910: 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 61 72 65 20  /b> options are 
c920: 61 6c 73 6f 0a 6e 65 65 64 65 64 2e 20 53 65 65  also.needed. See
c930: 20 74 68 65 20 64 65 6d 6f 73 20 64 69 72 65 63   the demos direc
c940: 74 6f 72 79 20 66 6f 72 20 6d 6f 72 65 20 65 78  tory for more ex
c950: 61 6d 70 6c 65 20 73 63 72 69 70 74 73 2e 3c 2f  ample scripts.</
c960: 70 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23 31  p>.<p>Example #1
c970: 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62  : Download a web
c980: 20 70 61 67 65 3c 2f 70 3e 0a 3c 70 72 65 20 63   page</p>.<pre c
c990: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65  lass="doctools_e
c9a0: 78 61 6d 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65  xample">.package
c9b0: 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61   require http.pa
c9c0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c  ckage require tl
c9d0: 73 0a 73 65 74 20 75 72 6c 20 26 71 75 6f 74 3b  s.set url &quot;
c9e0: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e  https://www.tcl.
c9f0: 74 6b 2f 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a  tk/&quot;.http::
ca00: 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20 34  register https 4
ca10: 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a  43 [list ::tls::
ca20: 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76  socket -autoserv
ca30: 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 75 69 72  ername 1 -requir
ca40: 65 20 31 5d 0a 23 20 47 65 74 20 55 52 4c 0a 73  e 1].# Get URL.s
ca50: 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74 70 3a 3a  et token [http::
ca60: 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a 23 20 43  geturl $url].# C
ca70: 68 65 63 6b 20 66 6f 72 20 65 72 72 6f 72 0a 69  heck for error.i
ca80: 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 73  f {[http::status
ca90: 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f   $token] ne &quo
caa0: 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 20  t;ok&quot;} {.  
cab0: 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 26    puts [format &
cac0: 71 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71 75  quot;Error %s&qu
cad0: 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74 75  ot; [http::statu
cae0: 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 53  s $token]].}.# S
caf0: 61 76 65 20 77 65 62 20 70 61 67 65 20 74 6f 20  ave web page to 
cb00: 66 69 6c 65 0a 73 65 74 20 63 68 20 5b 6f 70 65  file.set ch [ope
cb10: 6e 20 65 78 61 6d 70 6c 65 2e 68 74 6d 6c 20 77  n example.html w
cb20: 62 5d 0a 70 75 74 73 20 24 63 68 20 5b 68 74 74  b].puts $ch [htt
cb30: 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65 6e 5d 0a  p::data $token].
cb40: 63 6c 6f 73 65 20 24 63 68 0a 23 20 43 6c 65 61  close $ch.# Clea
cb50: 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61  nup.::http::clea
cb60: 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65  nup $token.</pre
cb70: 3e 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23 32 3a  >.<p>Example #2:
cb80: 20 44 6f 77 6e 6c 6f 61 64 20 61 20 66 69 6c 65   Download a file
cb90: 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d  </p>.<pre class=
cba0: 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c  "doctools_exampl
cbb0: 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75  e">.package requ
cbc0: 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65  ire http.package
cbd0: 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74   require tls.set
cbe0: 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 70 73   url &quot;https
cbf0: 3a 2f 2f 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67  ://wiki.tcl-lang
cc00: 2e 6f 72 67 2f 73 69 74 65 6d 61 70 2e 78 6d 6c  .org/sitemap.xml
cc10: 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67  &quot;.http::reg
cc20: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20  ister https 443 
cc30: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63  [list ::tls::soc
cc40: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e  ket -autoservern
cc50: 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31  ame 1 -require 1
cc60: 5d 0a 23 20 4f 70 65 6e 20 6f 75 74 70 75 74 20  ].# Open output 
cc70: 66 69 6c 65 0a 73 65 74 20 66 69 6c 65 6e 61 6d  file.set filenam
cc80: 65 20 5b 66 69 6c 65 20 74 61 69 6c 20 24 75 72  e [file tail $ur
cc90: 6c 5d 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20  l].set ch [open 
cca0: 24 66 69 6c 65 6e 61 6d 65 20 77 62 5d 0a 23 20  $filename wb].# 
ccb0: 47 65 74 20 66 69 6c 65 0a 73 65 74 20 74 6f 6b  Get file.set tok
ccc0: 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 75  en [::http::getu
ccd0: 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 69  rl $url -blocksi
cce0: 7a 65 20 36 35 35 33 36 20 2d 63 68 61 6e 6e 65  ze 65536 -channe
ccf0: 6c 20 24 63 68 5d 0a 23 20 43 68 65 63 6b 20 66  l $ch].# Check f
cd00: 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74  or error.if {[ht
cd10: 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65  tp::status $toke
cd20: 6e 5d 20 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71  n] ne &quot;ok&q
cd30: 75 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73  uot;} {.    puts
cd40: 20 5b 66 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45   [format &quot;E
cd50: 72 72 6f 72 20 25 73 26 71 75 6f 74 3b 20 5b 68  rror %s&quot; [h
cd60: 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b  ttp::status $tok
cd70: 65 6e 5d 5d 0a 7d 0a 23 20 43 6c 65 61 6e 75 70  en]].}.# Cleanup
cd80: 0a 63 6c 6f 73 65 20 24 63 68 0a 3a 3a 68 74 74  .close $ch.::htt
cd90: 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65  p::cleanup $toke
cda0: 6e 0a 3c 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e 0a  n.</pre>.</div>.
cdb0: 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e  <div id="section
cdc0: 37 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f  7" class="doctoo
cdd0: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e  ls_section"><h2>
cde0: 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e  <a name="section
cdf0: 37 22 3e 53 70 65 63 69 61 6c 20 43 6f 6e 73 69  7">Special Consi
ce00: 64 65 72 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68  derations</a></h
ce10: 32 3e 0a 3c 70 3e 54 68 65 20 63 61 70 61 62 69  2>.<p>The capabi
ce20: 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73 20 70  lities of this p
ce30: 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72 79 20  ackage can vary 
ce40: 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65 64  enormously based
ce50: 20 75 70 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69   upon how the.li
ce60: 6e 6b 65 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20  nked to OpenSSL 
ce70: 6c 69 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66  library was conf
ce80: 69 67 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74  igured and built
ce90: 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d  . New versions m
cea0: 61 79 20 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65  ay obsolete.olde
ceb0: 72 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69  r protocol versi
cec0: 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f  ons, add or remo
ced0: 76 65 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e  ve ciphers, chan
cee0: 67 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65  ge default value
cef0: 73 2c 20 65 74 63 2e 0a 55 73 65 20 74 68 65 20  s, etc..Use the 
cf00: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74  <b class="cmd">t
cf10: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
cf20: 3e 20 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 6f 62  > commands to ob
cf30: 74 61 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74  tain the support
cf40: 65 64 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  ed.protocol vers
cf50: 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e  ions.</p>.</div>
cf60: 0a 3c 64 69 76 20 69 64 3d 22 73 65 65 2d 61 6c  .<div id="see-al
cf70: 73 6f 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  so" class="docto
cf80: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
cf90: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 65 2d 61 6c  ><a name="see-al
cfa0: 73 6f 22 3e 53 65 65 20 41 6c 73 6f 3c 2f 61 3e  so">See Also</a>
cfb0: 3c 2f 68 32 3e 0a 3c 70 3e 3c 61 20 68 72 65 66  </h2>.<p><a href
cfc0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70  ="https://www.op
cfd0: 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e  enssl.org/">Open
cfe0: 53 53 4c 3c 2f 61 3e 2c 20 68 74 74 70 2c 20 73  SSL</a>, http, s
cff0: 6f 63 6b 65 74 3c 2f 70 3e 0a 3c 2f 64 69 76 3e  ocket</p>.</div>
d000: 0a 3c 64 69 76 20 69 64 3d 22 6b 65 79 77 6f 72  .<div id="keywor
d010: 64 73 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f  ds" class="docto
d020: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32  ols_section"><h2
d030: 3e 3c 61 20 6e 61 6d 65 3d 22 6b 65 79 77 6f 72  ><a name="keywor
d040: 64 73 22 3e 4b 65 79 77 6f 72 64 73 3c 2f 61 3e  ds">Keywords</a>
d050: 3c 2f 68 32 3e 0a 3c 70 3e 49 2f 4f 2c 20 49 50  </h2>.<p>I/O, IP
d060: 20 41 64 64 72 65 73 73 2c 20 4f 70 65 6e 53 53   Address, OpenSS
d070: 4c 2c 20 53 53 4c 2c 20 54 43 50 2c 20 54 4c 53  L, SSL, TCP, TLS
d080: 2c 20 54 63 6c 54 4c 53 2c 20 61 73 79 6e 63 68  , TclTLS, asynch
d090: 72 6f 6e 6f 75 73 20 49 2f 4f 2c 20 62 69 6e 64  ronous I/O, bind
d0a0: 2c 20 63 65 72 74 69 66 69 63 61 74 65 2c 20 63  , certificate, c
d0b0: 68 61 6e 6e 65 6c 2c 20 63 6f 6e 6e 65 63 74 69  hannel, connecti
d0c0: 6f 6e 2c 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 2c  on, domain name,
d0d0: 20 68 6f 73 74 2c 20 68 74 74 70 73 2c 20 6e 65   host, https, ne
d0e0: 74 77 6f 72 6b 2c 20 6e 65 74 77 6f 72 6b 20 61  twork, network a
d0f0: 64 64 72 65 73 73 2c 20 73 6f 63 6b 65 74 2c 20  ddress, socket, 
d100: 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c  tls</p>.</div>.<
d110: 64 69 76 20 69 64 3d 22 63 61 74 65 67 6f 72 79  div id="category
d120: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c  " class="doctool
d130: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c  s_section"><h2><
d140: 61 20 6e 61 6d 65 3d 22 63 61 74 65 67 6f 72 79  a name="category
d150: 22 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f  ">Category</a></
d160: 68 32 3e 0a 3c 70 3e 74 6c 73 3c 2f 70 3e 0a 3c  h2>.<p>tls</p>.<
d170: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63  /div>.<div id="c
d180: 6f 70 79 72 69 67 68 74 22 20 63 6c 61 73 73 3d  opyright" class=
d190: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f  "doctools_sectio
d1a0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22  n"><h2><a name="
d1b0: 63 6f 70 79 72 69 67 68 74 22 3e 43 6f 70 79 72  copyright">Copyr
d1c0: 69 67 68 74 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70  ight</a></h2>.<p
d1d0: 3e 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79  >Copyright &copy
d1e0: 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d  ; 1999 Matt Newm
d1f0: 61 6e 3c 62 72 3e 0a 43 6f 70 79 72 69 67 68 74  an<br>.Copyright
d200: 20 26 63 6f 70 79 3b 20 32 30 30 34 20 53 74 61   &copy; 2004 Sta
d210: 72 66 69 73 68 20 53 79 73 74 65 6d 73 3c 62 72  rfish Systems<br
d220: 3e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70  >.Copyright &cop
d230: 79 3b 20 32 30 32 34 20 42 72 69 61 6e 20 4f 27  y; 2024 Brian O'
d240: 48 61 67 61 6e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e  Hagan</p>.</div>
d250: 0a 3c 2f 64 69 76 3e 3c 2f 62 6f 64 79 3e 3c 2f  .</div></body></
d260: 68 74 6d 6c 3e 0a                                html>.