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 &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 &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 &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 2e 31 20 e">tls(n) 2.0.1
0880: 74 6c 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c tls "Tcl TL
0890: 53 20 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74 S extension"
08a0: 3b 3c 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22 ;</h1>.<div id="
08b0: 6e 61 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63 name" class="doc
08c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
08d0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65 h2><a name="name
08e0: 22 3e 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a ">Name</a></h2>.
08f0: 3c 70 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67 <p>tls - binding
0900: 20 74 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 to the OpenSSL
0910: 6c 69 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72 library for encr
0920: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64 ypted socket and
0930: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d I/O channel com
0940: 6d 75 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a munications</p>.
0950: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
0960: 74 6f 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 toc" class="doct
0970: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 ools_section"><h
0980: 32 3e 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e 2><a name="toc">
0990: 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 Table Of Content
09a0: 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63 s</a></h2>.<ul c
09b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 lass="doctools_t
09c0: 6f 63 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 oc">.<li class="
09d0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
09e0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22 "><a href="#toc"
09f0: 3e 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e >Table Of Conten
0a00: 74 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 ts</a></li>.<li
0a10: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
0a20: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 section"><a href
0a30: 3d 22 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e ="#synopsis">Syn
0a40: 6f 70 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c opsis</a></li>.<
0a50: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0a60: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 ls_section"><a h
0a70: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e ref="#section1">
0a80: 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c Description</a><
0a90: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 /li>.<li class="
0aa0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
0ab0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 "><a href="#sect
0ac0: 69 6f 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69 6c ion2">Compatibil
0ad0: 69 74 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 ity</a></li>.<li
0ae0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
0af0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 _section"><a hre
0b00: 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 6f f="#section3">Co
0b10: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a mmands</a></li>.
0b20: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f <li class="docto
0b30: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 ols_section"><a
0b40: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 href="#section4"
0b50: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c >Certificate Val
0b60: 69 64 61 74 69 6f 6e 3c 2f 61 3e 0a 3c 75 6c 3e idation</a>.<ul>
0b70: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<li class="doct
0b80: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 ools_subsection"
0b90: 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 ><a href="#subse
0ba0: 63 74 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 ction1">PKI and
0bb0: 43 65 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e Certificates</a>
0bc0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d </li>.<li class=
0bd0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 "doctools_subsec
0be0: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 tion"><a href="#
0bf0: 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d subsection2">Sum
0c00: 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 mary of command
0c10: 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e line options</a>
0c20: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d </li>.<li class=
0c30: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 "doctools_subsec
0c40: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 tion"><a href="#
0c50: 73 75 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65 subsection3">Whe
0c60: 6e 20 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 n are command li
0c70: 6e 65 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65 ne options neede
0c80: 64 3f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c d?</a></li>.</ul
0c90: 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 >.</li>.<li clas
0ca0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 s="doctools_sect
0cb0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 ion"><a href="#s
0cc0: 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 ection5">Callbac
0cd0: 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 0a 3c 75 k Options</a>.<u
0ce0: 6c 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f l>.<li class="do
0cf0: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f ctools_subsectio
0d00: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 n"><a href="#sub
0d10: 73 65 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73 section4">Values
0d20: 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c for Command Cal
0d30: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c lback</a></li>.<
0d40: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0d50: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c ls_subsection"><
0d60: 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 a href="#subsect
0d70: 69 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 ion5">Values for
0d80: 20 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 Password Callba
0d90: 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 ck</a></li>.<li
0da0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
0db0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 subsection"><a h
0dc0: 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e ref="#subsection
0dd0: 36 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61 6">Values for Va
0de0: 6c 69 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43 lidate Command C
0df0: 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e allback</a></li>
0e00: 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 .</ul>.</li>.<li
0e10: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
0e20: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 _section"><a hre
0e30: 66 3d 22 23 73 65 63 74 69 6f 6e 36 22 3e 44 65 f="#section6">De
0e40: 62 75 67 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 bug</a></li>.<li
0e50: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
0e60: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 _section"><a hre
0e70: 66 3d 22 23 73 65 63 74 69 6f 6e 37 22 3e 45 78 f="#section7">Ex
0e80: 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a amples</a></li>.
0e90: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f <li class="docto
0ea0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 ols_section"><a
0eb0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 38 22 href="#section8"
0ec0: 3e 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 >Special Conside
0ed0: 72 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e rations</a></li>
0ee0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<li class="doct
0ef0: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 ools_section"><a
0f00: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 39 href="#section9
0f10: 22 3e 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73 ">Error Messages
0f20: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c </a></li>.<li cl
0f30: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 ass="doctools_se
0f40: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 ction"><a href="
0f50: 23 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 #see-also">See A
0f60: 6c 73 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 lso</a></li>.<li
0f70: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
0f80: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 _section"><a hre
0f90: 66 3d 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65 f="#keywords">Ke
0fa0: 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a ywords</a></li>.
0fb0: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f <li class="docto
0fc0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 ols_section"><a
0fd0: 68 72 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22 href="#category"
0fe0: 3e 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c >Category</a></l
0ff0: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f i>.<li class="do
1000: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
1010: 3c 61 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69 <a href="#copyri
1020: 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f ght">Copyright</
1030: 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f a></li>.</ul>.</
1040: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79 div>.<div id="sy
1050: 6e 6f 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64 nopsis" class="d
1060: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 octools_section"
1070: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 ><h2><a name="sy
1080: 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73 nopsis">Synopsis
1090: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 </a></h2>.<div c
10a0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
10b0: 79 6e 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c ynopsis">.<ul cl
10c0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 ass="doctools_re
10d0: 71 75 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 quirements">.<li
10e0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
10f0: 20 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61 <b class="pkgna
1100: 6d 65 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e me">Tcl 8.5-</b>
1110: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 </li>.<li>packag
1120: 65 20 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 e require <b cla
1130: 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 ss="pkgname">tls
1140: 20 32 2e 30 2e 31 3c 2f 62 3e 3c 2f 6c 69 3e 0a 2.0.1</b></li>.
1150: 3c 2f 75 6c 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d </ul>.<ul class=
1160: 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 "doctools_syntax
1170: 22 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 ">.<li><a href="
1180: 23 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d #1"><b class="cm
1190: 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e d">tls::init</b>
11a0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
11b0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
11c0: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c g">-option</i>?<
11d0: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
11e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
11f0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f ss="arg">value</
1200: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e i>?</span> <span
1210: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 class="opt">?<i
1220: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 class="arg">-op
1230: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f tion value ...</
1240: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f i>?</span></a></
1250: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d li>.<li><a href=
1260: 22 23 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 "#2"><b class="c
1270: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c md">tls::socket<
1280: 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d /b> <span class=
1290: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d "opt">?<i class=
12a0: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 "arg">-option</i
12b0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
12c0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
12d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 class="arg">valu
12e0: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 e</i>?</span> <s
12f0: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
1300: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ?<i class="arg">
1310: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e -option value ..
1320: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 .</i>?</span> <i
1330: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 class="arg">hos
1340: 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22 t</i> <i class="
1350: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 arg">port</i></a
1360: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 ></li>.<li><a hr
1370: 65 66 3d 22 23 33 22 3e 3c 62 20 63 6c 61 73 73 ef="#3"><b class
1380: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b ="cmd">tls::sock
1390: 65 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d et</b> <b class=
13a0: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 "option">-server
13b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
13c0: 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 rg">command</i>
13d0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
13e0: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
13f0: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f ">-option</i>?</
1400: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
1410: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1420: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 s="arg">value</i
1430: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
1440: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
1450: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 class="arg">-opt
1460: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 ion value ...</i
1470: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 >?</span> <i cla
1480: 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 ss="arg">port</i
1490: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c ></a></li>.<li><
14a0: 61 20 68 72 65 66 3d 22 23 34 22 3e 3c 62 20 63 a href="#4"><b c
14b0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
14c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c import</b> <i cl
14d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
14e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 l</i> <span clas
14f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1500: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c s="arg">-option<
1510: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
1520: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1530: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 i class="arg">va
1540: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 lue</i>?</span>
1550: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
1560: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
1570: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 ">-option value
1580: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c ...</i>?</span><
1590: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 /a></li>.<li><a
15a0: 68 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c 61 href="#5"><b cla
15b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 ss="cmd">tls::st
15c0: 61 72 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c arttls</b> <i cl
15d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
15e0: 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 l</i> <span clas
15f0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1600: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c s="arg">-option<
1610: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
1620: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1630: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 i class="arg">va
1640: 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 lue</i>?</span>
1650: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
1660: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
1670: 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 ">-option value
1680: 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c ...</i>?</span><
1690: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 /a></li>.<li><a
16a0: 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63 6c 61 href="#6"><b cla
16b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 68 61 ss="cmd">tls::ha
16c0: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 ndshake</b> <i c
16d0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
16e0: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a el</i></a></li>.
16f0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 37 22 <li><a href="#7"
1700: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e ><b class="cmd">
1710: 74 6c 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f 62 tls::shutdown</b
1720: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
1730: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
1740: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 </li>.<li><a hre
1750: 66 3d 22 23 38 22 3e 3c 62 20 63 6c 61 73 73 3d f="#8"><b class=
1760: 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 "cmd">tls::unimp
1770: 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ort</b> <i class
1780: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f ="arg">channel</
1790: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e i></a></li>.<li>
17a0: 3c 61 20 68 72 65 66 3d 22 23 39 22 3e 3c 62 20 <a href="#9"><b
17b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
17c0: 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 :unstack</b> <i
17d0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e class="arg">chan
17e0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e nel</i></a></li>
17f0: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 .<li><a href="#1
1800: 30 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 0"><b class="cmd
1810: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 ">tls::status</b
1820: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1830: 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f pt">?<b class="o
1840: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 ption">-local</b
1850: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 >?</span> <i cla
1860: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c ss="arg">channel
1870: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c </i></a></li>.<l
1880: 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 31 22 3e i><a href="#11">
1890: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
18a0: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f ls::connection</
18b0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
18c0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 ">channel</i></a
18d0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 ></li>.<li><a hr
18e0: 65 66 3d 22 23 31 32 22 3e 3c 62 20 63 6c 61 73 ef="#12"><b clas
18f0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 s="cmd">tls::cip
1900: 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 hers</b> <span c
1910: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 lass="opt">?<i c
1920: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f lass="arg">proto
1930: 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 col</i>?</span>
1940: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
1950: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
1960: 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f ">verbose</i>?</
1970: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
1980: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1990: 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 s="arg">supporte
19a0: 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 d</i>?</span></a
19b0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 ></li>.<li><a hr
19c0: 65 66 3d 22 23 31 33 22 3e 3c 62 20 63 6c 61 73 ef="#13"><b clas
19d0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f s="cmd">tls::pro
19e0: 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f tocols</b></a></
19f0: 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d li>.<li><a href=
1a00: 22 23 31 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22 "#14"><b class="
1a10: 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f cmd">tls::versio
1a20: 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c n</b></a></li>.<
1a30: 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 /ul>.</div>.</di
1a40: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 v>.<div id="sect
1a50: 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 ion1" class="doc
1a60: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
1a70: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 h2><a name="sect
1a80: 69 6f 6e 31 22 3e 44 65 73 63 72 69 70 74 69 6f ion1">Descriptio
1a90: 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 n</a></h2>.<p>Th
1aa0: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f is extension pro
1ab0: 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 74 vides TCL script
1ac0: 20 61 63 63 65 73 73 20 74 6f 20 53 65 63 75 72 access to Secur
1ad0: 65 20 53 6f 63 6b 65 74 20 4c 61 79 65 72 20 28 e Socket Layer (
1ae0: 53 53 4c 29 0a 63 6f 6d 6d 75 6e 69 63 61 74 69 SSL).communicati
1af0: 6f 6e 73 20 75 73 69 6e 67 20 74 68 65 20 54 72 ons using the Tr
1b00: 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65 ansport Layer Se
1b10: 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f curity (TLS) pro
1b20: 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64 tocol. It provid
1b30: 65 73 20 61 0a 67 65 6e 65 72 69 63 20 62 69 6e es a.generic bin
1b40: 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 3d ding to <a href=
1b50: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 "https://www.ope
1b60: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 nssl.org/">OpenS
1b70: 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e SL</a>, utilizin
1b80: 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 g the.<b class="
1b90: 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74 61 63 syscmd">Tcl_Stac
1ba0: 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49 kChannel</b> API
1bb0: 20 69 6e 20 54 43 4c 20 38 2e 34 20 6f 72 20 6c in TCL 8.4 or l
1bc0: 61 74 65 72 2e 20 54 68 65 73 65 20 73 6f 63 6b ater. These sock
1bd0: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74 ets behave exact
1be0: 6c 79 0a 74 68 65 20 73 61 6d 65 20 61 73 20 63 ly.the same as c
1bf0: 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 hannels created
1c00: 75 73 69 6e 67 20 74 68 65 20 62 75 69 6c 74 2d using the built-
1c10: 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 in <b class="sys
1c20: 63 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 cmd">socket</b>
1c30: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 0a 70 72 6f command, but.pro
1c40: 76 69 64 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 vide additional
1c50: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 options for cont
1c60: 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53 4c 2f rolling the SSL/
1c70: 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e TLS session.</p>
1c80: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d .</div>.<div id=
1c90: 22 73 65 63 74 69 6f 6e 32 22 20 63 6c 61 73 73 "section2" class
1ca0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 ="doctools_secti
1cb0: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d on"><h2><a name=
1cc0: 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f 6d 70 61 "section2">Compa
1cd0: 74 69 62 69 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32 tibility</a></h2
1ce0: 3e 0a 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73 >.<p>This extens
1cf0: 69 6f 6e 20 69 73 20 63 6f 6d 70 61 74 69 62 6c ion is compatibl
1d00: 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 e with OpenSSL 1
1d10: 2e 31 2e 31 20 6f 72 20 6c 61 74 65 72 20 69 6e .1.1 or later in
1d20: 63 6c 75 64 69 6e 67 20 74 68 65 20 33 2e 78 20 cluding the 3.x
1d30: 61 6e 64 20 34 2e 30 0a 72 65 6c 65 61 73 65 73 and 4.0.releases
1d40: 2e 20 49 74 20 72 65 71 75 69 72 65 73 20 54 63 . It requires Tc
1d50: 6c 20 76 65 72 73 69 6f 6e 20 38 2e 35 20 6f 72 l version 8.5 or
1d60: 20 6c 61 74 65 72 20 61 6e 64 20 77 69 6c 6c 20 later and will
1d70: 77 6f 72 6b 20 77 69 74 68 20 54 63 6c 20 39 2e work with Tcl 9.
1d80: 30 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 0.</p>.</div>.<d
1d90: 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 33 22 iv id="section3"
1da0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
1db0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 _section"><h2><a
1dc0: 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 33 22 name="section3"
1dd0: 3e 43 6f 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 >Commands</a></h
1de0: 32 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 2>.<p>The follow
1df0: 69 6e 67 20 61 72 65 20 74 68 65 20 63 6f 6d 6d ing are the comm
1e00: 61 6e 64 73 20 70 72 6f 76 69 64 65 64 20 62 79 ands provided by
1e10: 20 74 68 65 20 54 63 4c 54 4c 53 20 70 61 63 6b the TcLTLS pack
1e20: 61 67 65 2e 20 53 65 65 0a 3c 73 70 61 6e 20 63 age. See.<span c
1e30: 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c lass="sectref"><
1e40: 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e a href="#section
1e50: 37 22 3e 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 7">Examples</a><
1e60: 2f 73 70 61 6e 3e 20 66 6f 72 20 65 78 61 6d 70 /span> for examp
1e70: 6c 65 20 75 73 61 67 65 20 61 6e 64 20 74 68 65 le usage and the
1e80: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d "<b class=
1e90: 22 66 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 3e "file">demos</b>
1ea0: 26 71 75 6f 74 3b 20 64 69 72 65 63 74 6f 72 79 " directory
1eb0: 20 66 6f 72 0a 6d 6f 72 65 20 65 78 61 6d 70 6c for.more exampl
1ec0: 65 20 75 73 61 67 65 2e 3c 2f 70 3e 0a 3c 64 6c e usage.</p>.<dl
1ed0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
1ee0: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c _definitions">.<
1ef0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 22 3e 3c dt><a name="1"><
1f00: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
1f10: 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 61 s::init</b> <spa
1f20: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1f30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
1f40: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e ption</i>?</span
1f50: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1f60: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1f70: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f rg">value</i>?</
1f80: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
1f90: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1fa0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 s="arg">-option
1fb0: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f value ...</i>?</
1fc0: 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c span></a></dt>.<
1fd0: 64 64 3e 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20 66 dd><p>Optional f
1fe0: 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 unction to set t
1ff0: 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f he default optio
2000: 6e 73 20 75 73 65 64 20 62 79 20 3c 62 20 63 6c ns used by <b cl
2010: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 ass="cmd">tls::s
2020: 6f 63 6b 65 74 3c 2f 62 3e 2e 20 49 66 20 79 6f ocket</b>. If yo
2030: 75 0a 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d u.call <b class=
2040: 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 "cmd">tls::impor
2050: 74 3c 2f 62 3e 20 64 69 72 65 63 74 6c 79 2c 20 t</b> directly,
2060: 74 68 65 20 76 61 6c 75 65 73 20 73 65 74 20 62 the values set b
2070: 79 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 y this command h
2080: 61 76 65 20 6e 6f 20 65 66 66 65 63 74 2e 0a 54 ave no effect..T
2090: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 73 75 70 70 his command supp
20a0: 6f 72 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 orts all of the
20b0: 73 61 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 same options as
20c0: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d the <b class="cm
20d0: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
20e0: 62 3e 20 63 6f 6d 6d 61 6e 64 2c 0a 74 68 6f 75 b> command,.thou
20f0: 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 gh you should li
2100: 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 mit your options
2110: 20 74 6f 20 6f 6e 6c 79 20 74 68 65 20 54 4c 53 to only the TLS
2120: 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f related ones.</
2130: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e p></dd>.<dt><a n
2140: 61 6d 65 3d 22 32 22 3e 3c 62 20 63 6c 61 73 73 ame="2"><b class
2150: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b ="cmd">tls::sock
2160: 65 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 et</b> <span cla
2170: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
2180: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
2190: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 </i>?</span> <sp
21a0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
21b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 <i class="arg">v
21c0: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e alue</i>?</span>
21d0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
21e0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
21f0: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 g">-option value
2200: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e ...</i>?</span>
2210: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
2220: 68 6f 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 host</i> <i clas
2230: 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e s="arg">port</i>
2240: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </a></dt>.<dd><p
2250: 3e 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 >This is a helpe
2260: 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 r function that
2270: 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 utilizes the und
2280: 65 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 erlying commands
2290: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d <b class="syscm
22a0: 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 6e d">socket</b>.an
22b0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 d <b class="cmd"
22c0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e >tls::import</b>
22d0: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 to create the c
22e0: 6f 6e 6e 65 63 74 69 6f 6e 2e 20 49 74 20 62 65 onnection. It be
22f0: 68 61 76 65 73 20 74 68 65 20 73 61 6d 65 20 61 haves the same a
2300: 73 20 74 68 65 0a 6e 61 74 69 76 65 20 54 43 4c s the.native TCL
2310: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d <b class="syscm
2320: 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f d">socket</b> co
2330: 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20 mmand, but also
2340: 73 75 70 70 6f 72 74 73 20 74 68 65 20 3c 62 20 supports the <b
2350: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
2360: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d :import</b>.comm
2370: 61 6e 64 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 and options with
2380: 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 one additional
2390: 6f 70 74 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 option. It retur
23a0: 6e 73 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 ns the channel h
23b0: 61 6e 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 andle id.for the
23c0: 20 6e 65 77 20 73 6f 63 6b 65 74 2e 20 41 64 64 new socket. Add
23d0: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 itional options
23e0: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 are:</p>.<dl cla
23f0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 ss="doctools_opt
2400: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c ions">.<dt><b cl
2410: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 75 ass="option">-au
2420: 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e toservername</b>
2430: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
2440: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 bool</i></dt>.<d
2450: 64 3e 3c 70 3e 49 66 20 3c 62 20 63 6c 61 73 73 d><p>If <b class
2460: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 ="const">true</b
2470: 3e 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 >, automatically
2480: 20 73 65 74 20 74 68 65 20 3c 62 20 63 6c 61 73 set the <b clas
2490: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 s="option">-serv
24a0: 65 72 6e 61 6d 65 3c 2f 62 3e 20 61 72 67 75 6d ername</b> argum
24b0: 65 6e 74 20 74 6f 20 74 68 65 0a 3c 65 6d 3e 68 ent to the.<em>h
24c0: 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e ost</em> argumen
24d0: 74 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c 54 t. Prior to TclT
24e0: 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 LS 2.0, the defa
24f0: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d ult is <b class=
2500: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 "const">false</b
2510: 3e 2e 0a 53 74 61 72 74 69 6e 67 20 69 6e 20 54 >..Starting in T
2520: 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 clTLS 2.0, the d
2530: 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 efault is <b cla
2540: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c ss="const">true<
2550: 2f 62 3e 20 75 6e 6c 65 73 73 20 3c 62 20 63 6c /b> unless <b cl
2560: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 ass="option">-se
2570: 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 0a 69 73 20 rvername</b>.is
2580: 61 6c 73 6f 20 73 70 65 63 69 66 69 65 64 2e 3c also specified.<
2590: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f /p></dd>.</dl></
25a0: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d dd>.<dt><a name=
25b0: 22 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d "3"><b class="cm
25c0: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
25d0: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 b> <b class="opt
25e0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e ion">-server</b>
25f0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
2600: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 command</i> <spa
2610: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
2620: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
2630: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e ption</i>?</span
2640: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
2650: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
2660: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f rg">value</i>?</
2670: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
2680: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
2690: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 s="arg">-option
26a0: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f value ...</i>?</
26b0: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 span> <i class="
26c0: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 arg">port</i></a
26d0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 61 ></dt>.<dd><p>Sa
26e0: 6d 65 20 61 73 20 70 72 65 76 69 6f 75 73 20 63 me as previous c
26f0: 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 69 6e 73 74 ommand, but inst
2700: 65 61 64 20 63 72 65 61 74 65 73 20 61 20 73 65 ead creates a se
2710: 72 76 65 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 rver socket for
2720: 63 6c 69 65 6e 74 73 20 74 6f 0a 63 6f 6e 6e 65 clients to.conne
2730: 63 74 20 74 6f 20 6a 75 73 74 20 6c 69 6b 65 20 ct to just like
2740: 74 68 65 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 the Tcl <b class
2750: 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 ="syscmd">socket
2760: 20 2d 73 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d -server</b> com
2770: 6d 61 6e 64 2e 20 49 74 20 72 65 74 75 72 6e 73 mand. It returns
2780: 20 74 68 65 0a 63 68 61 6e 6e 65 6c 20 68 61 6e the.channel han
2790: 64 6c 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e dle id for the n
27a0: 65 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f ew socket.</p></
27b0: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d dd>.<dt><a name=
27c0: 22 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d "4"><b class="cm
27d0: 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f d">tls::import</
27e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
27f0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 ">channel</i> <s
2800: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
2810: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ?<i class="arg">
2820: 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 -option</i>?</sp
2830: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d an> <span class=
2840: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d "opt">?<i class=
2850: 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f "arg">value</i>?
2860: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c </span> <span cl
2870: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c ass="opt">?<i cl
2880: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f ass="arg">-optio
2890: 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f n value ...</i>?
28a0: 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e </span></a></dt>
28b0: 0a 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .<dd></dd>.<dt><
28c0: 61 20 6e 61 6d 65 3d 22 35 22 3e 3c 62 20 63 6c a name="5"><b cl
28d0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 ass="cmd">tls::s
28e0: 74 61 72 74 74 6c 73 3c 2f 62 3e 20 3c 69 20 63 tarttls</b> <i c
28f0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
2900: 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 el</i> <span cla
2910: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
2920: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
2930: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 </i>?</span> <sp
2940: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
2950: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 <i class="arg">v
2960: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e alue</i>?</span>
2970: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
2980: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
2990: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 g">-option value
29a0: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e ...</i>?</span>
29b0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </a></dt>.<dd><p
29c0: 3e 53 74 61 72 74 20 54 4c 53 20 65 6e 63 72 79 >Start TLS encry
29d0: 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 ption on TCL cha
29e0: 6e 6e 65 6c 20 3c 69 20 63 6c 61 73 73 3d 22 61 nnel <i class="a
29f0: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 rg">channel</i>
2a00: 76 69 61 20 61 20 73 74 61 63 6b 65 64 20 63 68 via a stacked ch
2a10: 61 6e 6e 65 6c 2e 20 49 74 0a 6e 65 65 64 20 6e annel. It.need n
2a20: 6f 74 20 62 65 20 61 20 73 6f 63 6b 65 74 2c 20 ot be a socket,
2a30: 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 but must provide
2a40: 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 bi-directional
2a50: 66 6c 6f 77 2e 20 41 6c 73 6f 20 73 65 74 73 20 flow. Also sets
2a60: 73 65 73 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65 session.paramete
2a70: 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 rs for SSL hands
2a80: 68 61 6b 65 2e 20 56 61 6c 69 64 20 6f 70 74 69 hake. Valid opti
2a90: 6f 6e 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c ons are:</p>.<dl
2aa0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
2ab0: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c _options">.<dt><
2ac0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
2ad0: 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c >-alpn</b> <i cl
2ae0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f ass="arg">list</
2af0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c i></dt>.<dd><p>L
2b00: 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 ist of protocols
2b10: 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69 6e 67 to offer during
2b20: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
2b30: 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f er Protocol Nego
2b40: 74 69 61 74 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20 tiation.(ALPN).
2b50: 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 62 20 For example: <b
2b60: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 32 class="const">h2
2b70: 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 </b> and <b clas
2b80: 73 3d 22 63 6f 6e 73 74 22 3e 68 74 74 70 2f 31 s="const">http/1
2b90: 2e 31 3c 2f 62 3e 2c 20 62 75 74 20 6e 6f 74 20 .1</b>, but not
2ba0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
2bb0: 3e 68 33 3c 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c >h3</b> or.<b cl
2bc0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 71 75 69 63 ass="const">quic
2bd0: 3c 2f 62 3e 2e 20 54 68 69 73 20 6f 70 74 69 6f </b>. This optio
2be0: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c n is new for Tcl
2bf0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
2c00: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
2c10: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f option">-cadir</
2c20: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
2c30: 22 3e 64 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c ">directory</i><
2c40: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 /dt>.<dd><p>Spec
2c50: 69 66 69 65 73 20 74 68 65 20 64 69 72 65 63 74 ifies the direct
2c60: 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 43 65 ory where the Ce
2c70: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
2c80: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 ity (CA) certifi
2c90: 63 61 74 65 73 20 61 72 65 0a 73 74 6f 72 65 64 cates are.stored
2ca0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
2cb0: 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66 platform specif
2cc0: 69 63 20 61 6e 64 20 63 61 6e 20 62 65 20 73 65 ic and can be se
2cd0: 74 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d t at compile tim
2ce0: 65 2e 20 54 68 65 0a 64 65 66 61 75 6c 74 20 6c e. The.default l
2cf0: 6f 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f ocation can be o
2d00: 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 verridden by the
2d10: 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 <b class="varia
2d20: 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 ble">SSL_CERT_DI
2d30: 52 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e R</b> environmen
2d40: 74 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 t.variable. See
2d50: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 <span class="sec
2d60: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 tref"><a href="#
2d70: 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 section4">Certif
2d80: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
2d90: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 </a></span> for
2da0: 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 more details.</p
2db0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
2dc0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
2dd0: 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 file</b> <i clas
2de0: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 s="arg">filename
2df0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
2e00: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 >Specifies the f
2e10: 69 6c 65 20 77 69 74 68 20 74 68 65 20 43 65 72 ile with the Cer
2e20: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 tificate Authori
2e30: 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 ty (CA) certific
2e40: 61 74 65 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c ates to use in.<
2e50: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
2e60: 50 45 4d 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 PEM</b> file for
2e70: 6d 61 74 2e 20 54 68 65 20 64 65 66 61 75 6c 74 mat. The default
2e80: 20 69 73 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 is "<b cla
2e90: 73 73 3d 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 ss="file">cert.p
2ea0: 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e em</b>", in
2eb0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 the OpenSSL.dir
2ec0: 65 63 74 6f 72 79 2e 20 54 68 65 20 64 65 66 61 ectory. The defa
2ed0: 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 ult file can be
2ee0: 6f 76 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 overridden by th
2ef0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 e <b class="vari
2f00: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 able">SSL_CERT_F
2f10: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d ILE</b> environm
2f20: 65 6e 74 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 ent.variable. Se
2f30: 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 e <span class="s
2f40: 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d ectref"><a href=
2f50: 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 "#section4">Cert
2f60: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
2f70: 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f on</a></span> fo
2f80: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c r more details.<
2f90: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
2fa0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
2fb0: 63 61 73 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 castore</b> <i c
2fc0: 6c 61 73 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f lass="arg">URI</
2fd0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 i></dt>.<dd><p>S
2fe0: 70 65 63 69 66 69 65 73 20 74 68 65 20 55 6e 69 pecifies the Uni
2ff0: 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 64 form Resource Id
3000: 65 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 66 entifier (URI) f
3010: 6f 72 20 74 68 65 20 43 65 72 74 69 66 69 63 61 or the Certifica
3020: 74 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 41 te Authority.(CA
3030: 29 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 6d ) store, which m
3040: 61 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 63 ay be a single c
3050: 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 61 ontainer or a ca
3060: 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e talog of contain
3070: 65 72 73 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 ers..Starting wi
3080: 74 68 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f th OpenSSL 3.2 o
3090: 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 n MS Windows, se
30a0: 74 20 74 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c t to "<b cl
30b0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e ass="const">org.
30c0: 6f 70 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 openssl.winstore
30d0: 3a 2f 2f 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f ://</b>".to
30e0: 20 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 use the built-i
30f0: 6e 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 72 n MS Windows Cer
3100: 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 2e 0a tificate Store..
3110: 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d See <span class=
3120: 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 "sectref"><a hre
3130: 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 65 f="#section4">Ce
3140: 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 rtificate Valida
3150: 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 tion</a></span>
3160: 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 for more details
3170: 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 ..This option is
3180: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
3190: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
31a0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
31b0: 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 on">-certfile</b
31c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
31d0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 >filename</i></d
31e0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 t>.<dd><p>Specif
31f0: 69 65 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 ies the name of
3200: 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 the file with th
3210: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f e certificate to
3220: 20 75 73 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d use in PEM form
3230: 61 74 0a 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 at.as the local
3240: 28 63 6c 69 65 6e 74 20 6f 72 20 73 65 72 76 65 (client or serve
3250: 72 29 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 r) certificate.
3260: 49 74 20 61 6c 73 6f 20 63 6f 6e 74 61 69 6e 73 It also contains
3270: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 2e the public key.
3280: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
3290: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
32a0: 2d 63 65 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 -cert</b> <i cla
32b0: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c ss="arg">string<
32c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
32d0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 65 Specifies the ce
32e0: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 rtificate to use
32f0: 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 as a DER encode
3300: 64 20 73 74 72 69 6e 67 20 28 58 2e 35 30 39 20 d string (X.509
3310: 44 45 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c DER).</p></dd>.<
3320: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
3330: 69 6f 6e 22 3e 2d 63 69 70 68 65 72 3c 2f 62 3e ion">-cipher</b>
3340: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
3350: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a string</i></dt>.
3360: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 <dd><p>Specifies
3370: 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63 69 70 the list of cip
3380: 68 65 72 73 20 74 6f 20 75 73 65 20 66 6f 72 20 hers to use for
3390: 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 61 72 6c TLS 1.2 and earl
33a0: 69 65 72 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e ier connections.
33b0: 0a 53 74 72 69 6e 67 20 69 73 20 61 20 63 6f 6c .String is a col
33c0: 6f 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 on "<b clas
33d0: 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 s="const">:</b>&
33e0: 71 75 6f 74 3b 20 73 65 70 61 72 61 74 65 64 20 quot; separated
33f0: 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 2e list of ciphers.
3400: 0a 43 69 70 68 65 72 73 20 63 61 6e 20 62 65 20 .Ciphers can be
3410: 63 6f 6d 62 69 6e 65 64 20 75 73 69 6e 67 20 74 combined using t
3420: 68 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 he "<b clas
3430: 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c 2f 62 3e 26 s="const">+</b>&
3440: 71 75 6f 74 3b 20 63 68 61 72 61 63 74 65 72 2e quot; character.
3450: 0a 50 72 65 66 69 78 65 73 20 63 61 6e 20 62 65 .Prefixes can be
3460: 20 75 73 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 used to permane
3470: 6e 74 6c 79 20 72 65 6d 6f 76 65 20 26 71 75 6f ntly remove &quo
3480: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 t;<b class="cons
3490: 74 22 3e 21 3c 2f 62 3e 26 71 75 6f 74 3b 2c 20 t">!</b>",
34a0: 64 65 6c 65 74 65 20 26 71 75 6f 74 3b 3c 62 20 delete "<b
34b0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2d 3c class="const">-<
34c0: 2f 62 3e 26 71 75 6f 74 3b 2c 20 6f 72 0a 6d 6f /b>", or.mo
34d0: 76 65 20 74 6f 20 74 68 65 20 65 6e 64 20 26 71 ve to the end &q
34e0: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f uot;<b class="co
34f0: 6e 73 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b nst">+</b>"
3500: 20 61 20 73 70 65 63 69 66 69 65 64 20 63 69 70 a specified cip
3510: 68 65 72 2e 0a 4b 65 79 77 6f 72 64 73 20 3c 62 her..Keywords <b
3520: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 40 class="const">@
3530: 53 54 52 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f STRENGTH</b> (so
3540: 72 74 20 62 79 20 61 6c 67 6f 72 69 74 68 6d 20 rt by algorithm
3550: 6b 65 79 20 6c 65 6e 67 74 68 29 2c 0a 3c 62 20 key length),.<b
3560: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 40 53 class="const">@S
3570: 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 65 6d 3e ECLEVEL=</b><em>
3580: 6e 3c 2f 65 6d 3e 20 28 73 65 74 20 73 65 63 75 n</em> (set secu
3590: 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 rity level to n)
35a0: 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 , and.<b class="
35b0: 63 6f 6e 73 74 22 3e 44 45 46 41 55 4c 54 3c 2f const">DEFAULT</
35c0: 62 3e 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 b> (use default
35d0: 63 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 20 cipher list, at
35e0: 73 74 61 72 74 20 6f 6e 6c 79 29 20 63 61 6e 20 start only) can
35f0: 61 6c 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 also be specifie
3600: 64 2e 0a 53 65 65 20 74 68 65 20 3c 61 20 68 72 d..See the <a hr
3610: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 64 6f 63 73 ef="https://docs
3620: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 .openssl.org/mas
3630: 74 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c ter/man1/openssl
3640: 2d 63 69 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e -ciphers/#option
3650: 73 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 s">OpenSSL</a>.d
3660: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 ocumentation for
3670: 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f the full list o
3680: 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 3c f valid values.<
3690: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
36a0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
36b0: 63 69 70 68 65 72 73 75 69 74 65 73 3c 2f 62 3e ciphersuites</b>
36c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
36d0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a string</i></dt>.
36e0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 <dd><p>Specifies
36f0: 20 74 68 65 20 6c 69 73 74 20 6f 66 20 63 69 70 the list of cip
3700: 68 65 72 20 73 75 69 74 65 73 20 74 6f 20 75 73 her suites to us
3710: 65 20 66 6f 72 20 54 4c 53 20 31 2e 33 20 61 73 e for TLS 1.3 as
3720: 20 61 20 63 6f 6c 6f 6e 0a 26 71 75 6f 74 3b 3c a colon."<
3730: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
3740: 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 73 65 70 61 :</b>" sepa
3750: 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 rated list of ci
3760: 70 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 pher suite names
3770: 2e 20 53 65 65 20 74 68 65 0a 3c 61 20 68 72 65 . See the.<a hre
3780: 66 3d 22 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e f="https://docs.
3790: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 6d 61 73 74 openssl.org/mast
37a0: 65 72 2f 6d 61 6e 31 2f 6f 70 65 6e 73 73 6c 2d er/man1/openssl-
37b0: 63 69 70 68 65 72 73 2f 23 6f 70 74 69 6f 6e 73 ciphers/#options
37c0: 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 0a 64 6f ">OpenSSL</a>.do
37d0: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 cumentation for
37e0: 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 20 6f 66 the full list of
37f0: 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 0a 54 valid values..T
3800: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 his option is ne
3810: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
3820: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
3830: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
3840: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 >-command</b> <i
3850: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c class="arg">cal
3860: 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c lback</i></dt>.<
3870: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 dd><p>Specifies
3880: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d the callback com
3890: 6d 61 6e 64 20 74 6f 20 62 65 20 69 6e 76 6f 6b mand to be invok
38a0: 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f ed at several po
38b0: 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a ints during the.
38c0: 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 70 61 73 handshake to pas
38d0: 73 20 65 72 72 6f 72 73 2c 20 74 72 61 63 69 6e s errors, tracin
38e0: 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 g information, a
38f0: 6e 64 20 70 72 6f 74 6f 63 6f 6c 20 6d 65 73 73 nd protocol mess
3900: 61 67 65 73 2e 0a 53 65 65 20 3c 73 70 61 6e 20 ages..See <span
3910: 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e class="sectref">
3920: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f <a href="#sectio
3930: 6e 35 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 n5">Callback Opt
3940: 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 ions</a></span>
3950: 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f for more info.</
3960: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
3970: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 64 lass="option">-d
3980: 68 70 61 72 61 6d 73 3c 2f 62 3e 20 3c 69 20 63 hparams</b> <i c
3990: 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e lass="arg">filen
39a0: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ame</i></dt>.<dd
39b0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 ><p>Specifies th
39c0: 65 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e e Diffie-Hellman
39d0: 20 28 44 48 29 20 70 61 72 61 6d 65 74 65 72 73 (DH) parameters
39e0: 20 66 69 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a file.</p></dd>.
39f0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
3a00: 74 69 6f 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f tion">-keyfile</
3a10: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
3a20: 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f ">filename</i></
3a30: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 dt>.<dd><p>Speci
3a40: 66 69 65 73 20 74 68 65 20 70 72 69 76 61 74 65 fies the private
3a50: 20 6b 65 79 20 66 69 6c 65 2e 20 54 68 65 20 64 key file. The d
3a60: 65 66 61 75 6c 74 20 69 73 20 74 6f 20 75 73 65 efault is to use
3a70: 20 74 68 65 20 66 69 6c 65 0a 73 70 65 63 69 66 the file.specif
3a80: 69 65 64 20 62 79 20 74 68 65 20 3c 62 20 63 6c ied by the <b cl
3a90: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 ass="option">-ce
3aa0: 72 74 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f rtfile</b> optio
3ab0: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e n.</p></dd>.<dt>
3ac0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
3ad0: 22 3e 2d 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c ">-key</b> <i cl
3ae0: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 ass="arg">string
3af0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
3b00: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 70 >Specifies the p
3b10: 72 69 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73 rivate key to us
3b20: 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 e as a DER encod
3b30: 65 64 20 73 74 72 69 6e 67 20 28 50 4b 43 53 23 ed string (PKCS#
3b40: 31 20 44 45 52 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 1 DER).</p></dd>
3b50: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
3b60: 70 74 69 6f 6e 22 3e 2d 6d 6f 64 65 6c 3c 2f 62 ption">-model</b
3b70: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
3b80: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 64 74 >channel</i></dt
3b90: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 20 74 >.<dd><p>Force t
3ba0: 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 his channel to s
3bb0: 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c 69 hare the same <i
3bc0: 20 63 6c 61 73 73 3d 22 74 65 72 6d 22 3e 53 53 class="term">SS
3bd0: 4c 5f 43 54 58 3c 2f 69 3e 20 73 74 72 75 63 74 L_CTX</i> struct
3be0: 75 72 65 20 61 73 20 74 68 65 0a 73 70 65 63 69 ure as the.speci
3bf0: 66 69 65 64 20 3c 69 20 63 6c 61 73 73 3d 22 61 fied <i class="a
3c00: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2c rg">channel</i>,
3c10: 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 73 and therefore s
3c20: 68 61 72 65 20 63 6f 6e 66 69 67 2c 20 63 61 6c hare config, cal
3c30: 6c 62 61 63 6b 73 2c 20 65 74 63 2e 3c 2f 70 3e lbacks, etc.</p>
3c40: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
3c50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 ss="option">-pas
3c60: 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 sword</b> <i cla
3c70: 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 61 63 ss="arg">callbac
3c80: 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c k</i></dt>.<dd><
3c90: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 p>Specifies the
3ca0: 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 callback command
3cb0: 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 to invoke when
3cc0: 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f OpenSSL needs to
3cd0: 20 6f 62 74 61 69 6e 20 61 0a 70 61 73 73 77 6f obtain a.passwo
3ce0: 72 64 2e 20 54 68 69 73 20 69 73 20 74 79 70 69 rd. This is typi
3cf0: 63 61 6c 6c 79 20 75 73 65 64 20 74 6f 20 75 6e cally used to un
3d00: 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 65 lock the private
3d10: 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74 69 66 key of a certif
3d20: 69 63 61 74 65 2e 0a 54 68 65 20 63 61 6c 6c 62 icate..The callb
3d30: 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 ack should retur
3d40: 6e 20 61 20 70 61 73 73 77 6f 72 64 20 73 74 72 n a password str
3d50: 69 6e 67 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e ing. This option
3d60: 20 68 61 73 20 63 68 61 6e 67 65 64 20 66 6f 72 has changed for
3d70: 0a 54 63 6c 54 4c 53 20 31 2e 38 2e 20 53 65 65 .TclTLS 1.8. See
3d80: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 <span class="se
3d90: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 ctref"><a href="
3da0: 23 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 #section5">Callb
3db0: 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c ack Options</a><
3dc0: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
3dd0: 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c info.</p></dd>.<
3de0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
3df0: 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 ion">-post_hands
3e00: 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 hake</b> <i clas
3e10: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
3e20: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c </dt>.<dd><p>All
3e30: 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b ow post-handshak
3e40: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
3e50: 20 75 70 64 61 74 65 73 2e 20 54 68 69 73 20 6f updates. This o
3e60: 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 ption is new for
3e70: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
3e80: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
3e90: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 ss="option">-req
3ea0: 75 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 uest</b> <i clas
3eb0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
3ec0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 </dt>.<dd><p>Req
3ed0: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 uest a certifica
3ee0: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 te from the peer
3ef0: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 during the SSL
3f00: 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73 20 handshake. This
3f10: 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 is needed.to do
3f20: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 Certificate Vali
3f30: 64 61 74 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 dation. Starting
3f40: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 in TclTLS 1.8,
3f50: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 3c the default is.<
3f60: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
3f70: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 true</b> for cli
3f80: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e ent connections.
3f90: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
3fa0: 54 4c 53 20 32 2e 30 2c 20 69 66 20 73 65 74 20 TLS 2.0, if set
3fb0: 74 6f 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e to.<b class="con
3fc0: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e st">false</b> an
3fd0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
3fe0: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e on">-require</b>
3ff0: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
4000: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 nst">true</b>, t
4010: 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65 hen this will be
4020: 0a 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 3c .overridden to <
4030: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
4040: 74 72 75 65 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 true</b>..See <s
4050: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 pan class="sectr
4060: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 ef"><a href="#se
4070: 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 ction4">Certific
4080: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f ate Validation</
4090: 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f a></span> for mo
40a0: 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c re details.</p><
40b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
40c0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 s="option">-requ
40d0: 69 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ire</b> <i class
40e0: 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c ="arg">bool</i><
40f0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 /dt>.<dd><p>Requ
4100: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 ire a valid cert
4110: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 ificate from the
4120: 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 peer during the
4130: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 SSL handshake.
4140: 49 66 20 74 68 69 73 20 69 73 0a 73 65 74 20 74 If this is.set t
4150: 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 62 20 o true, then <b
4160: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
4170: 72 65 71 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74 request</b> must
4180: 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 also be set to
4190: 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 true and a eithe
41a0: 72 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 r.<b class="opti
41b0: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 on">-cadir</b>,
41c0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
41d0: 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c ">-cafile</b>, <
41e0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
41f0: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f >-castore</b>, o
4200: 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 r a platform def
4210: 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 72 6f ault.must be pro
4220: 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72 20 74 vided in order t
4230: 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e o validate again
4240: 73 74 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 st. The default
4250: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e in TclTLS 1.8 an
4260: 64 0a 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f d.earlier versio
4270: 6e 73 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 ns is <b class="
4280: 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e const">false</b>
4290: 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 since not all p
42a0: 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 20 63 65 latforms have ce
42b0: 72 74 69 66 69 63 61 74 65 73 20 74 6f 0a 76 61 rtificates to.va
42c0: 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 20 69 lidate against i
42d0: 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 n a form compati
42e0: 62 6c 65 20 77 69 74 68 20 4f 70 65 6e 53 53 4c ble with OpenSSL
42f0: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
4300: 6c 54 4c 53 20 32 2e 30 2c 0a 74 68 65 20 64 65 lTLS 2.0,.the de
4310: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 fault is <b clas
4320: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f s="const">true</
4330: 62 3e 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f b> for client co
4340: 6e 6e 65 63 74 69 6f 6e 73 2e 0a 53 65 65 20 3c nnections..See <
4350: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 span class="sect
4360: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 ref"><a href="#s
4370: 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 ection4">Certifi
4380: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c cate Validation<
4390: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d /a></span> for m
43a0: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e ore details.</p>
43b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
43c0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 63 ss="option">-sec
43d0: 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e 20 urity_level</b>
43e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 <i class="arg">i
43f0: 6e 74 65 67 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a nteger</i></dt>.
4400: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 <dd><p>Specifies
4410: 20 74 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 the security le
4420: 76 65 6c 20 28 76 61 6c 75 65 20 66 72 6f 6d 20 vel (value from
4430: 30 20 74 6f 20 35 29 2e 20 54 68 65 20 73 65 63 0 to 5). The sec
4440: 75 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 urity level affe
4450: 63 74 73 0a 74 68 65 20 61 6c 6c 6f 77 65 64 20 cts.the allowed
4460: 63 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 cipher suite enc
4470: 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 ryption algorith
4480: 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 ms, supported EC
4490: 43 20 63 75 72 76 65 73 2c 0a 73 75 70 70 6f 72 C curves,.suppor
44a0: 74 65 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c ted signature al
44b0: 67 6f 72 69 74 68 6d 73 2c 20 44 48 20 70 61 72 gorithms, DH par
44c0: 61 6d 65 74 65 72 20 73 69 7a 65 73 2c 20 63 65 ameter sizes, ce
44d0: 72 74 69 66 69 63 61 74 65 20 6b 65 79 20 73 69 rtificate key si
44e0: 7a 65 73 0a 61 6e 64 20 73 69 67 6e 61 74 75 72 zes.and signatur
44f0: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 e algorithms. Th
4500: 65 20 64 65 66 61 75 6c 74 20 69 73 20 31 20 70 e default is 1 p
4510: 72 69 6f 72 20 74 6f 20 4f 70 65 6e 53 53 4c 20 rior to OpenSSL
4520: 33 2e 32 20 61 6e 64 20 32 0a 74 68 65 72 65 61 3.2 and 2.therea
4530: 66 74 65 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e fter. Level 3 an
4540: 64 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 d higher disable
4550: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 support for ses
4560: 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 sion tickets and
4570: 0a 6f 6e 6c 79 20 61 63 63 65 70 74 20 63 69 70 .only accept cip
4580: 68 65 72 20 73 75 69 74 65 73 20 74 68 61 74 20 her suites that
4590: 70 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20 provide forward
45a0: 73 65 63 72 65 63 79 2e 0a 54 68 69 73 20 6f 70 secrecy..This op
45b0: 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 tion is new for
45c0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
45d0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
45e0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 s="option">-serv
45f0: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d er</b> <i class=
4600: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f "arg">bool</i></
4610: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 dt>.<dd><p>Speci
4620: 66 69 65 73 20 77 68 65 74 68 65 72 20 74 6f 20 fies whether to
4630: 61 63 74 20 61 73 20 61 20 73 65 72 76 65 72 20 act as a server
4640: 61 6e 64 20 72 65 73 70 6f 6e 64 20 77 69 74 68 and respond with
4650: 20 61 20 73 65 72 76 65 72 20 68 61 6e 64 73 68 a server handsh
4660: 61 6b 65 20 77 68 65 6e 20 61 0a 63 6c 69 65 6e ake when a.clien
4670: 74 20 63 6f 6e 6e 65 63 74 73 20 61 6e 64 20 70 t connects and p
4680: 72 6f 76 69 64 65 73 20 61 20 63 6c 69 65 6e 74 rovides a client
4690: 20 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 65 20 handshake. The
46a0: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c default is <b cl
46b0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 ass="const">fals
46c0: 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a e</b>.</p></dd>.
46d0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
46e0: 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d tion">-servernam
46f0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
4700: 61 72 67 22 3e 68 6f 73 74 6e 61 6d 65 3c 2f 69 arg">hostname</i
4710: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
4720: 65 63 69 66 79 20 74 68 65 20 70 65 65 72 27 73 ecify the peer's
4730: 20 68 6f 73 74 6e 61 6d 65 2e 20 54 68 69 73 20 hostname. This
4740: 69 73 20 75 73 65 64 20 74 6f 20 73 65 74 20 74 is used to set t
4750: 68 65 20 54 4c 53 20 53 65 72 76 65 72 20 4e 61 he TLS Server Na
4760: 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 0a 28 53 me Indication.(S
4770: 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 2e 20 53 NI) extension. S
4780: 65 74 20 74 68 69 73 20 74 6f 20 74 68 65 20 65 et this to the e
4790: 78 70 65 63 74 65 64 20 73 65 72 76 65 72 6e 61 xpected serverna
47a0: 6d 65 20 69 6e 20 74 68 65 20 73 65 72 76 65 72 me in the server
47b0: 27 73 20 63 65 72 74 69 66 69 63 61 74 65 0a 6f 's certificate.o
47c0: 72 20 6f 6e 65 20 6f 66 20 74 68 65 20 53 75 62 r one of the Sub
47d0: 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 65 20 4e ject Alternate N
47e0: 61 6d 65 73 20 28 53 41 4e 29 2e 20 53 74 61 72 ames (SAN). Star
47f0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
4800: 2e 30 2c 20 74 68 69 73 20 77 69 6c 6c 0a 64 65 .0, this will.de
4810: 66 61 75 6c 74 20 74 6f 20 74 68 65 20 68 6f 73 fault to the hos
4820: 74 20 66 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c t from the <b cl
4830: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 ass="cmd">tls::s
4840: 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e ocket</b> comman
4850: 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e d.</p></dd>.<dt>
4860: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
4870: 22 3e 2d 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 62 ">-session_id</b
4880: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
4890: 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f >binary_string</
48a0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 i></dt>.<dd><p>S
48b0: 70 65 63 69 66 69 65 73 20 74 68 65 20 73 65 73 pecifies the ses
48c0: 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 75 6d sion id to resum
48d0: 65 20 61 20 73 65 73 73 69 6f 6e 2e 20 4e 6f 74 e a session. Not
48e0: 20 73 75 70 70 6f 72 74 65 64 20 79 65 74 2e 0a supported yet..
48f0: 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e This option is n
4900: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
4910: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</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 73 73 6c 32 3c 2f 62 3e 20 3c 69 20 63 ">-ssl2</b> <i c
4940: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c lass="arg">bool<
4950: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
4960: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 Enable use of SS
4970: 4c 20 76 32 2e 54 68 65 20 64 65 66 61 75 6c 74 L v2.The default
4980: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
4990: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a nst">false</b>..
49a0: 4f 70 65 6e 53 53 4c 20 31 2e 31 2b 20 6e 6f 20 OpenSSL 1.1+ no
49b0: 6c 6f 6e 67 65 72 20 73 75 70 70 6f 72 74 73 20 longer supports
49c0: 53 53 4c 20 76 32 2c 20 73 6f 20 74 68 69 73 20 SSL v2, so this
49d0: 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 may not have any
49e0: 20 65 66 66 65 63 74 2e 0a 53 65 65 20 74 68 65 effect..See the
49f0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
4a00: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f tls::protocols</
4a10: 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 73 b> command for s
4a20: 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f upported protoco
4a30: 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ls.</p></dd>.<dt
4a40: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f ><b class="optio
4a50: 6e 22 3e 2d 73 73 6c 33 3c 2f 62 3e 20 3c 69 20 n">-ssl3</b> <i
4a60: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
4a70: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
4a80: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 >Enable use of S
4a90: 53 4c 20 76 33 2e 20 54 68 65 20 64 65 66 61 75 SL v3. The defau
4aa0: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 lt is <b class="
4ab0: 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e const">false</b>
4ac0: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
4ad0: 6c 54 4c 53 20 31 2e 38 2c 0a 75 73 65 20 6f 66 lTLS 1.8,.use of
4ae0: 20 53 53 4c 20 76 33 20 69 66 20 6f 6e 6c 79 20 SSL v3 if only
4af0: 61 76 61 69 6c 61 62 6c 65 20 76 69 61 20 61 20 available via a
4b00: 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 compile time opt
4b10: 69 6f 6e 2e 0a 4f 70 65 6e 53 53 4c 20 34 2e 30 ion..OpenSSL 4.0
4b20: 2b 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 + no longer supp
4b30: 6f 72 74 73 20 53 53 4c 20 76 33 2c 20 73 6f 20 orts SSL v3, so
4b40: 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 this may not hav
4b50: 65 20 61 6e 79 20 65 66 66 65 63 74 2e 0a 53 65 e any effect..Se
4b60: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 e the <b class="
4b70: 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 cmd">tls::protoc
4b80: 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 ols</b> command
4b90: 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 for supported pr
4ba0: 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 otocols.</p></dd
4bb0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
4bc0: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 3c 2f 62 option">-tls1</b
4bd0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
4be0: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
4bf0: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 dd><p>Enable use
4c00: 20 6f 66 20 54 4c 53 20 76 31 2e 20 53 74 61 72 of TLS v1. Star
4c10: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
4c20: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 .0, the default
4c30: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
4c40: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e st">false</b>..N
4c50: 6f 74 65 3a 20 54 4c 53 20 31 2e 30 20 6e 65 65 ote: TLS 1.0 nee
4c60: 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61 ds SHA1 to opera
4c70: 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c te, which is onl
4c80: 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 y available in s
4c90: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 ecurity level.0
4ca0: 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30 for Open SSL 3.0
4cb0: 2b 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c +. See the <b cl
4cc0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 ass="option">-se
4cd0: 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e curity_level</b>
4ce0: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 option.</p></dd
4cf0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
4d00: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c option">-tls1.1<
4d10: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
4d20: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e g">bool</i></dt>
4d30: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 .<dd><p>Enable u
4d40: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 31 2e 20 se of TLS v1.1.
4d50: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 Starting in TclT
4d60: 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 LS 2.0, the defa
4d70: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d ult is <b class=
4d80: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 "const">false</b
4d90: 3e 2e 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 31 >..Note: TLS 1.1
4da0: 20 6e 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f needs SHA1 to o
4db0: 70 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 perate, which is
4dc0: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 only available
4dd0: 69 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 in security leve
4de0: 6c 0a 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c l.0 for Open SSL
4df0: 20 33 2e 30 2b 2e 20 53 65 65 20 74 68 65 20 3c 3.0+. See the <
4e00: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4e10: 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c >-security_level
4e20: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e </b> option.</p>
4e30: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
4e40: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 ss="option">-tls
4e50: 31 2e 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 1.2</b> <i class
4e60: 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c ="arg">bool</i><
4e70: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 /dt>.<dd><p>Enab
4e80: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
4e90: 2e 32 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 .2. The default
4ea0: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
4eb0: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 st">true</b>.</p
4ec0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
4ed0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c ass="option">-tl
4ee0: 73 31 2e 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 s1.3</b> <i clas
4ef0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
4f00: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 </dt>.<dd><p>Ena
4f10: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 ble use of TLS v
4f20: 31 2e 33 2e 20 54 68 65 20 64 65 66 61 75 6c 74 1.3. The default
4f30: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
4f40: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 54 nst">true</b>. T
4f50: 68 69 73 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 his is only avai
4f60: 6c 61 62 6c 65 0a 73 74 61 72 74 69 6e 67 20 77 lable.starting w
4f70: 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e ith OpenSSL 1.1.
4f80: 31 20 61 6e 64 20 54 63 6c 54 4c 53 20 31 2e 37 1 and TclTLS 1.7
4f90: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
4fa0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4fb0: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e >-validatecomman
4fc0: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 d</b> <i class="
4fd0: 61 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 arg">callback</i
4fe0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
4ff0: 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c ecifies the call
5000: 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 back command to
5010: 69 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 invoke to valida
5020: 74 65 20 74 68 65 20 70 65 65 72 20 63 65 72 74 te the peer cert
5030: 69 66 69 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 ificates.and oth
5040: 65 72 20 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 er config info d
5050: 75 72 69 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 uring the protoc
5060: 6f 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 ol negotiation p
5070: 68 61 73 65 2e 20 54 68 69 73 20 63 61 6e 20 62 hase. This can b
5080: 65 20 75 73 65 64 0a 62 79 20 54 43 4c 20 73 63 e used.by TCL sc
5090: 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d ripts to perform
50a0: 20 74 68 65 69 72 20 6f 77 6e 20 43 65 72 74 69 their own Certi
50b0: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f ficate Validatio
50c0: 6e 20 74 6f 20 73 75 70 70 6c 65 6d 65 6e 74 20 n to supplement
50d0: 74 68 65 0a 64 65 66 61 75 6c 74 20 76 61 6c 69 the.default vali
50e0: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 dation provided
50f0: 62 79 20 4f 70 65 6e 53 53 4c 2e 20 54 68 65 20 by OpenSSL. The
5100: 73 63 72 69 70 74 20 6d 75 73 74 20 72 65 74 75 script must retu
5110: 72 6e 20 61 20 62 6f 6f 6c 65 61 6e 20 74 72 75 rn a boolean tru
5120: 65 0a 74 6f 20 63 6f 6e 74 69 6e 75 65 20 74 68 e.to continue th
5130: 65 20 6e 65 67 6f 74 69 61 74 69 6f 6e 2e 20 53 e negotiation. S
5140: 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 ee <span class="
5150: 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 sectref"><a href
5160: 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c ="#section5">Cal
5170: 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 lback Options</a
5180: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 ></span> for mor
5190: 65 20 69 6e 66 6f 2e 0a 54 68 69 73 20 6f 70 74 e info..This opt
51a0: 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ion is new for T
51b0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
51c0: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c dd>.</dl></dd>.<
51d0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 36 22 3e 3c dt><a name="6"><
51e0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
51f0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
5200: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
5210: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c channel</i></a><
5220: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 /dt>.<dd><p>Forc
5230: 65 73 20 74 68 65 20 54 4c 53 20 6e 65 67 6f 74 es the TLS negot
5240: 69 61 74 69 6f 6e 20 68 61 6e 64 73 68 61 6b 65 iation handshake
5250: 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 65 20 69 to take place i
5260: 6d 6d 65 64 69 61 74 65 6c 79 2c 20 61 6e 64 20 mmediately, and
5270: 72 65 74 75 72 6e 73 20 30 0a 69 66 20 68 61 6e returns 0.if han
5280: 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 dshake is still
5290: 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e in progress (non
52a0: 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 -blocking), or 1
52b0: 20 69 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b if the handshak
52c0: 65 20 77 61 73 0a 73 75 63 63 65 73 73 66 75 6c e was.successful
52d0: 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 . If the handsha
52e0: 6b 65 20 66 61 69 6c 65 64 2c 20 61 6e 20 65 72 ke failed, an er
52f0: 72 6f 72 20 77 69 6c 6c 20 62 65 20 72 65 74 75 ror will be retu
5300: 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c rned.</p></dd>.<
5310: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 37 22 3e 3c dt><a name="7"><
5320: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
5330: 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f 62 3e 20 s::shutdown</b>
5340: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
5350: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f hannel</i></a></
5360: 64 74 3e 0a 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 dt>.<dd></dd>.<d
5370: 74 3e 3c 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 t><a name="8"><b
5380: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
5390: 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c ::unimport</b> <
53a0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 i class="arg">ch
53b0: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 annel</i></a></d
53c0: 74 3e 0a 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 t>.<dd></dd>.<dt
53d0: 3e 3c 61 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 ><a name="9"><b
53e0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
53f0: 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 :unstack</b> <i
5400: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e class="arg">chan
5410: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e nel</i></a></dt>
5420: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 74 65 72 .<dd><p>This ter
5430: 6d 69 6e 61 74 65 73 20 74 68 65 20 53 53 4c 2f minates the SSL/
5440: 54 4c 53 20 73 65 73 73 69 6f 6e 20 62 79 20 73 TLS session by s
5450: 65 6e 64 69 6e 67 20 74 68 65 20 26 71 75 6f 74 ending the "
5460: 3b 63 6c 6f 73 65 5f 6e 6f 74 69 66 79 26 71 75 ;close_notify&qu
5470: 6f 74 3b 20 6d 65 73 73 61 67 65 20 61 6e 64 0a ot; message and.
5480: 72 65 6d 6f 76 65 73 20 74 68 65 20 74 6f 70 20 removes the top
5490: 6c 65 76 65 6c 20 73 74 61 63 6b 65 64 20 63 68 level stacked ch
54a0: 61 6e 6e 65 6c 20 66 72 6f 6d 20 3c 69 20 63 6c annel from <i cl
54b0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
54c0: 6c 3c 2f 69 3e 2c 20 62 75 74 20 69 74 20 64 6f l</i>, but it do
54d0: 65 73 20 6e 6f 74 20 63 6c 6f 73 65 0a 74 68 65 es not close.the
54e0: 20 73 6f 63 6b 65 74 2e 20 49 74 20 69 73 20 74 socket. It is t
54f0: 68 65 20 63 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f he compliment to
5500: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
5510: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 tls::import</b>
5520: 62 79 20 65 6e 64 69 6e 67 20 65 6e 63 72 79 70 by ending encryp
5530: 74 69 6f 6e 20 6f 66 0a 61 20 54 43 4c 20 63 68 tion of.a TCL ch
5540: 61 6e 6e 65 6c 2e 20 41 6e 20 65 72 72 6f 72 20 annel. An error
5550: 69 73 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 is thrown if TLS
5560: 20 69 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 is not the top
5570: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 stacked channel
5580: 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c type.</p></dd>.<
5590: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 30 22 3e dt><a name="10">
55a0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
55b0: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c ls::status</b> <
55c0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
55d0: 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 >?<b class="opti
55e0: 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c on">-local</b>?<
55f0: 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d /span> <i class=
5600: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
5610: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c ></a></dt>.<dd><
5620: 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 p>Returns the cu
5630: 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 20 rrent status of
5640: 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 an SSL channel.
5650: 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 The result is a
5660: 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 list of key-valu
5670: 65 0a 70 61 69 72 73 20 64 65 73 63 72 69 62 69 e.pairs describi
5680: 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65 72 74 ng the SSL, cert
5690: 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63 65 72 ificate, and cer
56a0: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 tificate verific
56b0: 61 74 69 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 ation status. If
56c0: 0a 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 .the SSL handsha
56d0: 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 ke has not yet c
56e0: 6f 6d 70 6c 65 74 65 64 2c 20 61 6e 20 65 6d 70 ompleted, an emp
56f0: 74 79 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 ty list is retur
5700: 6e 65 64 2e 20 49 66 20 74 68 65 0a 3c 62 20 63 ned. If the.<b c
5710: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c lass="option">-l
5720: 6f 63 61 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 ocal</b> option
5730: 69 73 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 is specified, th
5740: 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 en the local cer
5750: 74 69 66 69 63 61 74 65 20 69 73 20 75 73 65 64 tificate is used
5760: 2e 0a 52 65 74 75 72 6e 65 64 20 76 61 6c 75 65 ..Returned value
5770: 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c s include:</p>.<
5780: 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 70 3e p>SSL Status</p>
5790: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
57a0: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 ools_definitions
57b0: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d ">.<dt><b class=
57c0: 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c "variable">alpn<
57d0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
57e0: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c g">protocol</i><
57f0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
5800: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 protocol selecte
5810: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 d after Applicat
5820: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
5830: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 ol Negotiation (
5840: 41 4c 50 4e 29 2e 0a 54 68 69 73 20 76 61 6c 75 ALPN)..This valu
5850: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5860: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5870: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5880: 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 variable">cipher
5890: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
58a0: 72 67 22 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f rg">cipher</i></
58b0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 dt>.<dd><p>The c
58c0: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e urrent cipher in
58d0: 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 65 73 use for the ses
58e0: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c sion.</p></dd>.<
58f0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5900: 69 61 62 6c 65 22 3e 70 65 65 72 6e 61 6d 65 3c iable">peername<
5910: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
5920: 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e g">name</i></dt>
5930: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 65 65 72 .<dd><p>The peer
5940: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 name from the ce
5950: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 rtificate..This
5960: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5970: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
5980: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
5990: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 72 ss="variable">pr
59a0: 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c otocol</b> <i cl
59b0: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f ass="arg">versio
59c0: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
59d0: 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 p>The protocol v
59e0: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 ersion used for
59f0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 the connection:
5a00: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 SSL2, SSL3, TLS1
5a10: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 , TLS1.1, TLS1.2
5a20: 2c 0a 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b ,.TLS1.3, or unk
5a30: 6e 6f 77 6e 2e 20 54 68 69 73 20 76 61 6c 75 65 nown. This value
5a40: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
5a50: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
5a60: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
5a70: 61 72 69 61 62 6c 65 22 3e 73 62 69 74 73 3c 2f ariable">sbits</
5a80: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
5a90: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ">n</i></dt>.<dd
5aa0: 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f ><p>The number o
5ab0: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 f bits used for
5ac0: 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e the session key.
5ad0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
5ae0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
5af0: 22 3e 73 69 67 6e 61 74 75 72 65 48 61 73 68 41 ">signatureHashA
5b00: 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 lgorithm</b> <i
5b10: 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f class="arg">algo
5b20: 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c rithm</i></dt>.<
5b30: 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e 61 74 dd><p>The signat
5b40: 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 ure hash algorit
5b50: 68 6d 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 hm..This value i
5b60: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5b70: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
5b80: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5b90: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 iable">signature
5ba0: 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 Type</b> <i clas
5bb0: 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e s="arg">type</i>
5bc0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
5bd0: 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65 20 signature type
5be0: 76 61 6c 75 65 2e 0a 54 68 69 73 20 76 61 6c 75 value..This valu
5bf0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5c00: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5c10: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5c20: 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79 variable">verify
5c30: 44 65 70 74 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 Depth</b> <i cla
5c40: 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f ss="arg">n</i></
5c50: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d dt>.<dd><p>Maxim
5c60: 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 um depth for the
5c70: 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 certificate cha
5c80: 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e in verification.
5c90: 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 Default is -1,
5ca0: 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 0a 54 68 to check all..Th
5cb0: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
5cc0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c for TclTLS 1.8.<
5cd0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
5ce0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
5cf0: 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 >verifyMode</b>
5d00: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c <i class="arg">l
5d10: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ist</i></dt>.<dd
5d20: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 ><p>List of cert
5d30: 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 ificate verifica
5d40: 74 69 6f 6e 20 6d 6f 64 65 73 2e 0a 54 68 69 73 tion modes..This
5d50: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
5d60: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 r TclTLS 1.8.</p
5d70: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
5d80: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 ass="variable">v
5d90: 65 72 69 66 79 52 65 73 75 6c 74 3c 2f 62 3e 20 erifyResult</b>
5da0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 <i class="arg">r
5db0: 65 73 75 6c 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c esult</i></dt>.<
5dc0: 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 dd><p>Certificat
5dd0: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 e verification r
5de0: 65 73 75 6c 74 2e 0a 54 68 69 73 20 76 61 6c 75 esult..This valu
5df0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5e00: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5e10: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5e20: 76 61 72 69 61 62 6c 65 22 3e 63 61 5f 6e 61 6d variable">ca_nam
5e30: 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d es</b> <i class=
5e40: 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f "arg">list</i></
5e50: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 dt>.<dd><p>List
5e60: 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61 of the Certifica
5e70: 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75 te Authorities u
5e80: 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68 sed to create th
5e90: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 e certificate..T
5ea0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
5eb0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
5ec0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a </p></dd>.</dl>.
5ed0: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 53 <p>Certificate S
5ee0: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c tatus</p>.<dl cl
5ef0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 ass="doctools_de
5f00: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e finitions">.<dt>
5f10: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
5f20: 6c 65 22 3e 61 6c 6c 3c 2f 62 3e 20 3c 69 20 63 le">all</b> <i c
5f30: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e lass="arg">strin
5f40: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
5f50: 70 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 p>Dump of all ce
5f60: 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 2e 0a rtificate info..
5f70: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
5f80: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
5f90: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
5fa0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
5fb0: 65 22 3e 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c e">version</b> <
5fc0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 i class="arg">va
5fd0: 6c 75 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 lue</i></dt>.<dd
5fe0: 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 66 69 63 ><p>The certific
5ff0: 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e ate version.</p>
6000: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
6010: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 ss="variable">se
6020: 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 62 3e 20 3c rialNumber</b> <
6030: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
6040: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
6050: 64 3e 3c 70 3e 54 68 65 20 73 65 72 69 61 6c 20 d><p>The serial
6060: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
6070: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
6080: 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 ex string..This
6090: 76 61 6c 75 65 20 77 61 73 20 63 68 61 6e 67 65 value was change
60a0: 64 20 66 72 6f 6d 20 73 65 72 69 61 6c 20 69 6e d from serial in
60b0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
60c0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
60d0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 ss="variable">si
60e0: 67 6e 61 74 75 72 65 3c 2f 62 3e 20 3c 69 20 63 gnature</b> <i c
60f0: 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 lass="arg">algor
6100: 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ithm</i></dt>.<d
6110: 64 3e 3c 70 3e 43 69 70 68 65 72 20 61 6c 67 6f d><p>Cipher algo
6120: 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 rithm used for c
6130: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
6140: 74 75 72 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 ture..This value
6150: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
6160: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
6170: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
6180: 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72 3c ariable">issuer<
6190: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
61a0: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
61b0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69 t>.<dd><p>The di
61c0: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
61d0: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
61e0: 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72 2e tificate issuer.
61f0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
6200: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
6210: 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62 3e 20 ">notBefore</b>
6220: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 <i class="arg">d
6230: 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ate</i></dt>.<dd
6240: 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e 6e 69 6e ><p>The beginnin
6250: 67 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65 g date of the ce
6260: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69 rtificate validi
6270: 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ty.</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 6e 6f 74 41 66 74 65 72 3c 2f 62 ble">notAfter</b
62a0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
62b0: 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >date</i></dt>.<
62c0: 64 64 3e 3c 70 3e 54 68 65 20 65 78 70 69 72 61 dd><p>The expira
62d0: 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 65 tion date of the
62e0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
62f0: 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a idity.</p></dd>.
6300: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
6310: 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 3c riable">subject<
6320: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6330: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
6340: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69 t>.<dd><p>The di
6350: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
6360: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
6370: 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 63 74 tificate subject
6380: 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 . Fields include
6390: 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 : Common.Name (C
63a0: 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e N), Organization
63b0: 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20 6f (O), Locality o
63c0: 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74 r City (L), Stat
63d0: 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53 e or Province (S
63e0: 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20 4e ), and.Country N
63f0: 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c 2f 64 64 ame (C).</p></dd
6400: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
6410: 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72 variable">issuer
6420: 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20 UniqueID</b> <i
6430: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 class="arg">stri
6440: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ng</i></dt>.<dd>
6450: 3c 70 3e 54 68 65 20 69 73 73 75 65 72 20 75 6e <p>The issuer un
6460: 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20 76 61 ique id..This va
6470: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
6480: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
6490: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
64a0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a ="variable">subj
64b0: 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 ectUniqueID</b>
64c0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
64d0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
64e0: 64 64 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65 63 dd><p>The subjec
64f0: 74 20 75 6e 69 71 75 65 20 69 64 2e 0a 54 68 69 t unique id..Thi
6500: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
6510: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f or TclTLS 1.8.</
6520: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
6530: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
6540: 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f num_extensions</
6550: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
6560: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ">n</i></dt>.<dd
6570: 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 ><p>Number of ce
6580: 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 rtificate extens
6590: 69 6f 6e 73 2e 0a 54 68 69 73 20 76 61 6c 75 65 ions..This value
65a0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
65b0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
65c0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
65d0: 61 72 69 61 62 6c 65 22 3e 65 78 74 65 6e 73 69 ariable">extensi
65e0: 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ons</b> <i class
65f0: 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c ="arg">list</i><
6600: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 /dt>.<dd><p>List
6610: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 of certificate
6620: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e extension names.
6630: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
6640: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
6650: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</p></dd>.<dt>
6660: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
6670: 6c 65 22 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 le">authorityKey
6680: 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c Identifier</b> <
6690: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
66a0: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
66b0: 64 3e 3c 70 3e 41 75 74 68 6f 72 69 74 79 20 4b d><p>Authority K
66c0: 65 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 41 ey Identifier (A
66d0: 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73 75 69 KI) of the Issui
66e0: 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 61 74 ng CA certificat
66f0: 65 20 74 68 61 74 20 73 69 67 6e 65 64 20 74 68 e that signed th
6700: 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 e.SSL certificat
6710: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e e as a hex strin
6720: 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d 61 g. This value ma
6730: 74 63 68 65 73 20 74 68 65 20 53 4b 49 20 76 61 tches the SKI va
6740: 6c 75 65 20 6f 66 20 74 68 65 0a 49 6e 74 65 72 lue of the.Inter
6750: 6d 65 64 69 61 74 65 20 43 41 20 63 65 72 74 69 mediate CA certi
6760: 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c ficate..This val
6770: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
6780: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
6790: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
67a0: 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 "variable">subje
67b0: 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c ctKeyIdentifier<
67c0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
67d0: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
67e0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 75 62 6a 65 63 t>.<dd><p>Subjec
67f0: 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 t Key Identifier
6800: 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66 20 74 (SKI) hash of t
6810: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69 6e he public key in
6820: 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66 69 side the certifi
6830: 63 61 74 65 20 61 73 20 61 0a 68 65 78 20 73 74 cate as a.hex st
6840: 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64 ring. Used to id
6850: 65 6e 74 69 66 79 20 63 65 72 74 69 66 69 63 61 entify certifica
6860: 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e tes that contain
6870: 20 61 20 70 61 72 74 69 63 75 6c 61 72 20 70 75 a particular pu
6880: 62 6c 69 63 20 6b 65 79 2e 0a 54 68 69 73 20 76 blic key..This v
6890: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
68a0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
68b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
68c0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 s="variable">sub
68d0: 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 jectAltName</b>
68e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c <i class="arg">l
68f0: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ist</i></dt>.<dd
6900: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 ><p>List of all
6910: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 of the Subject A
6920: 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 lternative Names
6930: 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 (SAN) including
6940: 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 domain names, s
6950: 75 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 ub.domains, and
6960: 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68 61 IP addresses tha
6970: 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62 79 t are secured by
6980: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
6990: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
69a0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
69b0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
69c0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
69d0: 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e 20 3c 69 ble">ocsp</b> <i
69e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 class="arg">lis
69f0: 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c t</i></dt>.<dd><
6a00: 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e p>List of all On
6a10: 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 74 65 line Certificate
6a20: 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c Status Protocol
6a30: 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74 68 61 (OCSP) URLs tha
6a40: 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f t can be used to
6a50: 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c 69 64 .check the valid
6a60: 69 74 79 20 6f 66 20 74 68 69 73 20 63 65 72 74 ity of this cert
6a70: 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 ificate..This va
6a80: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
6a90: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
6aa0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
6ab0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 65 72 74 ="variable">cert
6ac0: 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c 69 20 63 ificate</b> <i c
6ad0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74 3c lass="arg">cert<
6ae0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
6af0: 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 The PEM encoded
6b00: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e certificate.</p>
6b10: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
6b20: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 ss="variable">si
6b30: 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d gnatureAlgorithm
6b40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6b50: 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 rg">algorithm</i
6b60: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 ></dt>.<dd><p>Ci
6b70: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 pher algorithm u
6b80: 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72 74 sed for the cert
6b90: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
6ba0: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 e..This value is
6bb0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
6bc0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
6bd0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
6be0: 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 56 able">signatureV
6bf0: 61 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 alue</b> <i clas
6c00: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f s="arg">string</
6c10: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 i></dt>.<dd><p>C
6c20: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
6c30: 74 75 72 65 20 61 73 20 61 20 68 65 78 20 73 74 ture as a hex st
6c40: 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 ring..This value
6c50: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
6c60: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
6c70: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
6c80: 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 ariable">signatu
6c90: 72 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 reDigest</b> <i
6ca0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 class="arg">vers
6cb0: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ion</i></dt>.<dd
6cc0: 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 ><p>Certificate
6cd0: 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20 61 signing digest a
6ce0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 0a s a hex string..
6cf0: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
6d00: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
6d10: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6d20: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6d30: 65 22 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f e">publicKeyAlgo
6d40: 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 rithm</b> <i cla
6d50: 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 ss="arg">algorit
6d60: 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e hm</i></dt>.<dd>
6d70: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 <p>Certificate s
6d80: 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 ignature public
6d90: 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 0a 54 key algorithm..T
6da0: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
6db0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
6dc0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
6dd0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
6de0: 22 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 62 3e 20 ">publicKey</b>
6df0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
6e00: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
6e10: 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 dd><p>Certificat
6e20: 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c e signature publ
6e30: 69 63 20 6b 65 79 20 61 73 20 61 20 68 65 78 20 ic key as a hex
6e40: 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c string..This val
6e50: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
6e60: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
6e70: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6e80: 22 76 61 72 69 61 62 6c 65 22 3e 62 69 74 73 3c "variable">bits<
6e90: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6ea0: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 g">n</i></dt>.<d
6eb0: 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 62 d><p>Number of b
6ec0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 72 its used for cer
6ed0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
6ee0: 72 65 20 6b 65 79 2e 0a 54 68 69 73 20 76 61 6c re key..This val
6ef0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
6f00: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
6f10: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6f20: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 6c 66 5f "variable">self_
6f30: 73 69 67 6e 65 64 3c 2f 62 3e 20 3c 69 20 63 6c signed</b> <i cl
6f40: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 ass="arg">boolea
6f50: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
6f60: 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 65 p>Whether the ce
6f70: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
6f80: 75 72 65 20 69 73 20 73 65 6c 66 20 73 69 67 6e ure is self sign
6f90: 65 64 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 ed..This value i
6fa0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
6fb0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
6fc0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
6fd0: 69 61 62 6c 65 22 3e 73 68 61 31 5f 68 61 73 68 iable">sha1_hash
6fe0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6ff0: 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 rg">hash</i></dt
7000: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 53 48 41 >.<dd><p>The SHA
7010: 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 1 hash of the ce
7020: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
7030: 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 ex string..This
7040: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
7050: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
7060: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
7070: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 68 ss="variable">sh
7080: 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 a256_hash</b> <i
7090: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61 73 class="arg">has
70a0: 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c h</i></dt>.<dd><
70b0: 70 3e 54 68 65 20 53 48 41 32 35 36 20 68 61 73 p>The SHA256 has
70c0: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 h of the certifi
70d0: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 cate as a hex st
70e0: 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 ring..This value
70f0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
7100: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
7110: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e .</dl></dd>.<dt>
7120: 3c 61 20 6e 61 6d 65 3d 22 31 31 22 3e 3c 62 20 <a name="11"><b
7130: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
7140: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 :connection</b>
7150: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
7160: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f hannel</i></a></
7170: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 dt>.<dd><p>Retur
7180: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 ns the current c
7190: 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 onnection status
71a0: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e of an SSL chann
71b0: 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 el. The result i
71c0: 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d s a list.of key-
71d0: 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 value pairs desc
71e0: 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 ribing the conne
71f0: 63 74 69 6f 6e 2e 0a 54 68 69 73 20 63 6f 6d 6d ction..This comm
7200: 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54 and is new for T
7210: 63 6c 54 4c 53 20 31 2e 38 2e 20 52 65 74 75 72 clTLS 1.8. Retur
7220: 6e 65 64 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 ned values inclu
7230: 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 de:</p>.<p>SSL S
7240: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c tatus</p>.<dl cl
7250: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 ass="doctools_de
7260: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e finitions">.<dt>
7270: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
7280: 6c 65 22 3e 73 74 61 74 65 3c 2f 62 3e 20 3c 69 le">state</b> <i
7290: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 class="arg">sta
72a0: 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e te</i></dt>.<dd>
72b0: 3c 70 3e 53 74 61 74 65 20 6f 66 20 74 68 65 20 <p>State of the
72c0: 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c connection.</p><
72d0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
72e0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 72 s="variable">ser
72f0: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 vername</b> <i c
7300: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c lass="arg">name<
7310: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
7320: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 The name of the
7330: 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 connected to ser
7340: 76 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ver.</p></dd>.<d
7350: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
7360: 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f able">protocol</
7370: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
7380: 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 ">version</i></d
7390: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 t>.<dd><p>The pr
73a0: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 otocol version u
73b0: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e sed for the conn
73c0: 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 ection: SSL2, SS
73d0: 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 L3, TLS1, TLS1.1
73e0: 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 , TLS1.2, TLS1.3
73f0: 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 , or unknown.</p
7400: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
7410: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 72 ass="variable">r
7420: 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c enegotiation_all
7430: 6f 77 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 owed</b> <i clas
7440: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c s="arg">boolean<
7450: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
7460: 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c Whether protocol
7470: 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 renegotiation i
7480: 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e s supported or n
7490: 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ot.</p></dd>.<dt
74a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
74b0: 62 6c 65 22 3e 73 65 63 75 72 69 74 79 5f 6c 65 ble">security_le
74c0: 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 vel</b> <i class
74d0: 3d 22 61 72 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e ="arg">level</i>
74e0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
74f0: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 security level
7500: 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 used for selecti
7510: 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b on of ciphers, k
7520: 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 70 ey size, etc.</p
7530: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
7540: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 ass="variable">s
7550: 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 62 ession_reused</b
7560: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
7570: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 >boolean</i></dt
7580: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 >.<dd><p>Whether
7590: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73 the session has
75a0: 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20 been reused or
75b0: 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 not.</p></dd>.<d
75c0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
75d0: 61 62 6c 65 22 3e 69 73 5f 73 65 72 76 65 72 3c able">is_server<
75e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
75f0: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f g">boolean</i></
7600: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 dt>.<dd><p>Wheth
7610: 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f er the connectio
7620: 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20 n is configured
7630: 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29 20 as a server (1)
7640: 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f or client (0).</
7650: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
7660: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7670: 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 62 3e 20 compression</b>
7680: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d <i class="arg">m
7690: 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ode</i></dt>.<dd
76a0: 3e 3c 70 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 ><p>Compression
76b0: 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e method.</p></dd>
76c0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
76d0: 61 72 69 61 62 6c 65 22 3e 65 78 70 61 6e 73 69 ariable">expansi
76e0: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d on</b> <i class=
76f0: 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f "arg">mode</i></
7700: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 78 70 61 6e dt>.<dd><p>Expan
7710: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e sion method.</p>
7720: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
7730: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61 ss="variable">ca
7740: 4c 69 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 List</b> <i clas
7750: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e s="arg">list</i>
7760: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 </dt>.<dd><p>Lis
7770: 74 20 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 t of Certificate
7780: 20 41 75 74 68 6f 72 69 74 69 65 73 20 28 43 41 Authorities (CA
7790: 29 20 66 6f 72 20 58 2e 35 30 39 20 63 65 72 74 ) for X.509 cert
77a0: 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 ificate.</p></dd
77b0: 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 69 70 68 65 >.</dl>.<p>Ciphe
77c0: 72 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 r Info</p>.<dl c
77d0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 lass="doctools_d
77e0: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 efinitions">.<dt
77f0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7800: 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20 ble">cipher</b>
7810: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
7820: 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c ipher</i></dt>.<
7830: 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 6e dd><p>The curren
7840: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
7850: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
7860: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 on.</p></dd>.<dt
7870: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7880: 62 6c 65 22 3e 73 74 61 6e 64 61 72 64 5f 6e 61 ble">standard_na
7890: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d me</b> <i class=
78a0: 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f "arg">name</i></
78b0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 dt>.<dd><p>The s
78c0: 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 tandard RFC name
78d0: 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c of cipher.</p><
78e0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
78f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 67 s="variable">alg
7900: 6f 72 69 74 68 6d 5f 62 69 74 73 3c 2f 62 3e 20 orithm_bits</b>
7910: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e <i class="arg">n
7920: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7930: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 >The number of p
7940: 72 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 rocessed bits us
7950: 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f ed for cipher.</
7960: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
7970: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7980: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 62 3e 20 secret_bits</b>
7990: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e <i class="arg">n
79a0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
79b0: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 >The number of s
79c0: 65 63 72 65 74 20 62 69 74 73 20 75 73 65 64 20 ecret bits used
79d0: 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c for cipher.</p><
79e0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
79f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 69 6e s="variable">min
7a00: 5f 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 _version</b> <i
7a10: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 class="arg">vers
7a20: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ion</i></dt>.<dd
7a30: 3e 3c 70 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20 ><p>The minimum
7a40: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
7a50: 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e for cipher.</p>
7a60: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
7a70: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69 ss="variable">ci
7a80: 70 68 65 72 5f 69 73 5f 61 65 61 64 3c 2f 62 3e pher_is_aead</b>
7a90: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
7aa0: 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e boolean</i></dt>
7ab0: 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 .<dd><p>Whether
7ac0: 74 68 65 20 63 69 70 68 65 72 20 69 73 20 41 75 the cipher is Au
7ad0: 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72 thenticated Encr
7ae0: 79 70 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f yption with Asso
7af0: 63 69 61 74 65 64 20 44 61 74 61 20 28 41 45 41 ciated Data (AEA
7b00: 44 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 D).</p></dd>.<dt
7b10: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7b20: 62 6c 65 22 3e 63 69 70 68 65 72 5f 69 64 3c 2f ble">cipher_id</
7b30: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
7b40: 22 3e 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ">id</i></dt>.<d
7b50: 64 3e 3c 70 3e 54 68 65 20 4f 70 65 6e 53 53 4c d><p>The OpenSSL
7b60: 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 70 3e 3c cipher id.</p><
7b70: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7b80: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 64 65 73 s="variable">des
7b90: 63 72 69 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 cription</b> <i
7ba0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 class="arg">stri
7bb0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ng</i></dt>.<dd>
7bc0: 3c 70 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 <p>A text descri
7bd0: 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 ption of the cip
7be0: 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 her.</p></dd>.<d
7bf0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
7c00: 61 62 6c 65 22 3e 68 61 6e 64 73 68 61 6b 65 5f able">handshake_
7c10: 64 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c digest</b> <i cl
7c20: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 ass="arg">boolea
7c30: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
7c40: 70 3e 44 69 67 65 73 74 20 75 73 65 64 20 64 75 p>Digest used du
7c50: 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 2e 3c ring handshake.<
7c60: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c /p></dd>.</dl>.<
7c70: 70 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f p>Session Info</
7c80: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f p>.<dl class="do
7c90: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f ctools_definitio
7ca0: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 ns">.<dt><b clas
7cb0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 s="variable">alp
7cc0: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 n</b> <i class="
7cd0: 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 arg">protocol</i
7ce0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
7cf0: 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 e protocol selec
7d00: 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 ted after Applic
7d10: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 ation-Layer Prot
7d20: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e ocol Negotiation
7d30: 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 (ALPN).</p></dd
7d40: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
7d50: 76 61 72 69 61 62 6c 65 22 3e 72 65 73 75 6d 61 variable">resuma
7d60: 62 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ble</b> <i class
7d70: 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f ="arg">boolean</
7d80: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 i></dt>.<dd><p>W
7d90: 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 69 hether the sessi
7da0: 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 75 6d 65 on can be resume
7db0: 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 d or not.</p></d
7dc0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7dd0: 22 76 61 72 69 61 62 6c 65 22 3e 73 74 61 72 74 "variable">start
7de0: 5f 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 _time</b> <i cla
7df0: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 ss="arg">seconds
7e00: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7e10: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 >Time since sess
7e20: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 ion started in s
7e30: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f econds since epo
7e40: 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ch.</p></dd>.<dt
7e50: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7e60: 62 6c 65 22 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e ble">timeout</b>
7e70: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
7e80: 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e seconds</i></dt>
7e90: 0a 3c 64 64 3e 3c 70 3e 4d 61 78 20 64 75 72 61 .<dd><p>Max dura
7ea0: 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 tion of session
7eb0: 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 in seconds befor
7ec0: 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c e time-out.</p><
7ed0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7ee0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6c 69 66 s="variable">lif
7ef0: 65 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 etime</b> <i cla
7f00: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 ss="arg">seconds
7f10: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7f20: 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 >Session ticket
7f30: 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 20 69 6e lifetime hint in
7f40: 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 seconds.</p></d
7f50: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7f60: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 "variable">sessi
7f70: 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 on_id</b> <i cla
7f80: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f ss="arg">binary_
7f90: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a string</i></dt>.
7fa0: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 <dd><p>Unique se
7fb0: 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 ssion id for use
7fc0: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
7fd0: 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 session.</p></d
7fe0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7ff0: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 "variable">sessi
8000: 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62 3e 20 3c 69 on_ticket</b> <i
8010: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e class="arg">bin
8020: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f ary_string</i></
8030: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 dt>.<dd><p>Uniqu
8040: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
8050: 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 for use in resu
8060: 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e ming the session
8070: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
8080: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
8090: 65 22 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 e">ticket_app_da
80a0: 74 61 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ta</b> <i class=
80b0: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 "arg">binary_str
80c0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ing</i></dt>.<dd
80d0: 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 ><p>Unique sessi
80e0: 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69 63 on ticket applic
80f0: 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c ation data.</p><
8100: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
8110: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 61 73 s="variable">mas
8120: 74 65 72 5f 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 ter_key</b> <i c
8130: 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 lass="arg">binar
8140: 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 y_string</i></dt
8150: 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 >.<dd><p>Unique
8160: 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b session master k
8170: 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ey.</p></dd>.<dt
8180: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
8190: 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 63 61 63 ble">session_cac
81a0: 68 65 5f 6d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 he_mode</b> <i c
81b0: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c lass="arg">mode<
81c0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
81d0: 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64 Server cache mod
81e0: 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 e (client, serve
81f0: 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 70 3e r, or both).</p>
8200: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e </dd>.</dl></dd>
8210: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 32 .<dt><a name="12
8220: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 "><b class="cmd"
8230: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 >tls::ciphers</b
8240: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
8250: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
8260: 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e rg">protocol</i>
8270: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 ?</span> <span c
8280: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 lass="opt">?<i c
8290: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f lass="arg">verbo
82a0: 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c se</i>?</span> <
82b0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
82c0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
82d0: 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c >supported</i>?<
82e0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a /span></a></dt>.
82f0: 3c 64 64 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61 <dd><p>Without a
8300: 6e 79 20 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72 ny options, it r
8310: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 eturns a list of
8320: 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63 20 63 all symmetric c
8330: 69 70 68 65 72 73 20 66 6f 72 20 75 73 65 20 77 iphers for use w
8340: 69 74 68 20 74 68 65 0a 3c 69 20 63 6c 61 73 73 ith the.<i class
8350: 3d 22 61 72 67 22 3e 2d 63 69 70 68 65 72 3c 2f ="arg">-cipher</
8360: 69 3e 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20 i> option. With
8370: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 <i class="arg">p
8380: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c rotocol</i>, onl
8390: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 y the ciphers su
83a0: 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 pported for that
83b0: 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 .protocol are re
83c0: 74 75 72 6e 65 64 2e 20 53 65 65 20 74 68 65 20 turned. See the
83d0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
83e0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 ls::protocols</b
83f0: 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 > command for th
8400: 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 e supported.prot
8410: 6f 63 6f 6c 73 2e 20 49 66 20 3c 69 20 63 6c 61 ocols. If <i cla
8420: 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 ss="arg">verbose
8430: 3c 2f 69 3e 20 69 73 20 73 70 65 63 69 66 69 65 </i> is specifie
8440: 64 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 d as true then a
8450: 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 verbose, human
8460: 72 65 61 64 61 62 6c 65 0a 6c 69 73 74 20 69 73 readable.list is
8470: 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 61 returned with a
8480: 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d dditional inform
8490: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 ation on the cip
84a0: 68 65 72 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 her. If <i class
84b0: 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 ="arg">supported
84c0: 3c 2f 69 3e 0a 69 73 20 73 70 65 63 69 66 69 65 </i>.is specifie
84d0: 64 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 d as true, then
84e0: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 only the ciphers
84f0: 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 supported for p
8500: 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 rotocol will be
8510: 6c 69 73 74 65 64 2e 0a 54 68 65 20 3c 69 20 63 listed..The <i c
8520: 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f lass="arg">suppo
8530: 72 74 65 64 3c 2f 69 3e 20 61 72 67 20 69 73 20 rted</i> arg is
8540: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
8550: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
8560: 3e 3c 61 20 6e 61 6d 65 3d 22 31 33 22 3e 3c 62 ><a name="13"><b
8570: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
8580: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c ::protocols</b><
8590: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /a></dt>.<dd><p>
85a0: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f Returns a list o
85b0: 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 f the supported
85c0: 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c SSL/TLS protocol
85d0: 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 20 s. Valid values
85e0: 61 72 65 3a 0a 3c 62 20 63 6c 61 73 73 3d 22 63 are:.<b class="c
85f0: 6f 6e 73 74 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20 onst">ssl2</b>,
8600: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
8610: 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c >ssl3</b>, <b cl
8620: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 ass="const">tls1
8630: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 </b>, <b class="
8640: 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 31 3c 2f 62 const">tls1.1</b
8650: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e >, <b class="con
8660: 73 74 22 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20 st">tls1.2</b>,
8670: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f and.<b class="co
8680: 6e 73 74 22 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e nst">tls1.3</b>.
8690: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65 Exact list depe
86a0: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 nds on OpenSSL v
86b0: 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 ersion and compi
86c0: 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 0a 54 le time flags..T
86d0: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e his command is n
86e0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
86f0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</p></dd>.<dt>
8700: 3c 61 20 6e 61 6d 65 3d 22 31 34 22 3e 3c 62 20 <a name="14"><b
8710: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
8720: 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e :version</b></a>
8730: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 </dt>.<dd><p>Ret
8740: 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c urns the OpenSSL
8750: 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e version string.
8760: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a </p></dd>.</dl>.
8770: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
8780: 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d section4" class=
8790: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
87a0: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h2><a name="
87b0: 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 section4">Certif
87c0: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
87d0: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 69 </a></h2>.<div i
87e0: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 31 22 20 d="subsection1"
87f0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
8800: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e subsection"><h3>
8810: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 <a name="subsect
8820: 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65 ion1">PKI and Ce
8830: 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f rtificates</a></
8840: 68 33 3e 0a 3c 70 3e 55 73 69 6e 67 20 74 68 65 h3>.<p>Using the
8850: 20 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 Public Key Infr
8860: 61 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29 astructure (PKI)
8870: 2c 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61 , each user crea
8880: 74 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65 tes a private ke
8890: 79 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79 y that.only they
88a0: 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20 know about and
88b0: 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65 a public key the
88c0: 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77 y can exchange w
88d0: 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75 ith others for u
88e0: 73 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67 se in.encrypting
88f0: 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 20 and decrypting
8900: 64 61 74 61 2e 20 54 68 65 20 70 72 6f 63 65 73 data. The proces
8910: 73 20 69 73 20 74 68 65 20 73 65 6e 64 65 72 20 s is the sender
8920: 65 6e 63 72 79 70 74 73 20 74 68 65 69 72 20 64 encrypts their d
8930: 61 74 61 0a 75 73 69 6e 67 20 74 68 65 69 72 20 ata.using their
8940: 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 20 private key and
8950: 74 68 65 20 72 65 63 65 69 76 65 72 27 73 20 70 the receiver's p
8960: 75 62 6c 69 63 20 6b 65 79 2e 20 54 68 65 20 64 ublic key. The d
8970: 61 74 61 20 69 73 20 74 68 65 6e 20 73 65 6e 74 ata is then sent
8980: 0a 74 6f 20 74 68 65 20 72 65 63 65 69 76 65 72 .to the receiver
8990: 2e 20 49 6e 20 61 20 73 69 6d 69 6c 61 72 20 6d . In a similar m
89a0: 61 6e 6e 65 72 2c 20 74 68 65 20 72 65 63 65 69 anner, the recei
89b0: 76 65 72 20 75 73 65 73 20 74 68 65 69 72 20 70 ver uses their p
89c0: 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 0a 74 rivate key and.t
89d0: 68 65 20 73 65 6e 64 65 72 27 73 20 70 75 62 6c he sender's publ
89e0: 69 63 20 6b 65 79 20 74 6f 20 64 65 63 72 79 70 ic key to decryp
89f0: 74 20 74 68 65 20 64 61 74 61 2e 20 54 68 69 73 t the data. This
8a00: 20 70 72 6f 76 69 64 65 73 20 64 61 74 61 20 69 provides data i
8a10: 6e 74 65 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73 ntegrity, to.ens
8a20: 75 72 65 20 74 68 65 20 64 61 74 61 20 63 61 6e ure the data can
8a30: 27 74 20 62 65 20 76 69 65 77 65 64 20 6f 72 20 't be viewed or
8a40: 61 6c 74 65 72 65 64 20 64 75 72 69 6e 67 20 74 altered during t
8a50: 72 61 6e 73 70 6f 72 74 2e 20 53 65 65 20 74 68 ransport. See th
8a60: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e.<b class="opti
8a70: 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 61 6e 64 on">-key</b> and
8a80: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f <b class="optio
8a90: 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 n">-keyfile</b>
8aa0: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 options for how
8ab0: 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 20 70 to specify the p
8ac0: 72 69 76 61 74 65 20 6b 65 79 2e 0a 41 6c 73 6f rivate key..Also
8ad0: 20 73 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 see the <b clas
8ae0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 s="option">-pass
8af0: 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 word</b> option
8b00: 66 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f 76 69 for how to provi
8b10: 64 65 20 74 68 65 20 70 61 73 73 77 6f 72 64 2e de the password.
8b20: 3c 2f 70 3e 0a 3c 70 3e 49 6e 20 6f 72 64 65 72 </p>.<p>In order
8b30: 20 74 6f 20 70 72 6f 76 69 64 65 20 61 75 74 68 to provide auth
8b40: 65 6e 74 69 63 61 74 69 6f 6e 2c 20 69 2e 65 2e entication, i.e.
8b50: 20 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e ensuring someon
8b60: 65 20 69 73 20 77 68 6f 20 74 68 65 79 20 73 61 e is who they sa
8b70: 79 20 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20 y they.are, the
8b80: 70 75 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 public key and u
8b90: 73 65 72 20 69 64 65 6e 74 69 66 69 63 61 74 69 ser identificati
8ba0: 6f 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 on info is store
8bb0: 64 20 69 6e 20 61 20 58 2e 35 30 39 0a 63 65 72 d in a X.509.cer
8bc0: 74 69 66 69 63 61 74 65 20 61 6e 64 20 74 68 61 tificate and tha
8bd0: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 t certificate is
8be0: 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 20 28 authenticated (
8bf0: 69 2e 65 2e 20 73 69 67 6e 65 64 29 20 62 79 20 i.e. signed) by
8c00: 61 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 a Certificate.Au
8c10: 74 68 6f 72 69 74 79 20 28 43 41 29 2e 20 55 73 thority (CA). Us
8c20: 65 72 73 20 63 61 6e 20 74 68 65 6e 20 65 78 63 ers can then exc
8c30: 68 61 6e 67 65 20 74 68 65 73 65 20 63 65 72 74 hange these cert
8c40: 69 66 69 63 61 74 65 73 20 64 75 72 69 6e 67 20 ificates during
8c50: 74 68 65 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69 the TLS.initiali
8c60: 7a 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 20 61 zation process a
8c70: 6e 64 20 63 68 65 63 6b 20 74 68 65 6d 20 61 67 nd check them ag
8c80: 61 69 6e 73 74 20 74 68 65 20 72 6f 6f 74 20 43 ainst the root C
8c90: 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 A certificates t
8ca0: 6f 20 65 6e 73 75 72 65 0a 74 68 65 79 20 61 72 o ensure.they ar
8cb0: 65 20 76 61 6c 69 64 2e 20 54 68 69 73 20 69 73 e valid. This is
8cc0: 20 68 61 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e handled by Open
8cd0: 53 53 4c 20 76 69 61 20 74 68 65 20 3c 62 20 63 SSL via the <b c
8ce0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 lass="option">-r
8cf0: 65 71 75 65 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c equest</b> and.<
8d00: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8d10: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70 >-require</b> op
8d20: 74 69 6f 6e 73 2e 20 53 65 65 20 74 68 65 20 3c tions. See the <
8d30: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8d40: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 >-cadir</b>, <b
8d50: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
8d60: 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c cadir</b>, and.<
8d70: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8d80: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 >-castore</b> op
8d90: 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f tions for how to
8da0: 20 73 70 65 63 69 66 79 20 77 68 65 72 65 20 74 specify where t
8db0: 6f 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 65 o find the CA ce
8dc0: 72 74 69 66 69 63 61 74 65 73 2e 0a 4f 70 74 69 rtificates..Opti
8dd0: 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74 onally, in a fut
8de0: 75 72 65 20 72 65 6c 65 61 73 65 2c 20 74 68 65 ure release, the
8df0: 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 68 y can also be ch
8e00: 65 63 6b 65 64 20 61 67 61 69 6e 73 74 20 74 68 ecked against th
8e10: 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 52 65 e Certificate.Re
8e20: 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20 28 43 vocation List (C
8e30: 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64 20 63 RL) of revoked c
8e40: 65 72 74 69 66 69 63 61 74 65 73 2e 20 43 65 72 ertificates. Cer
8e50: 74 69 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c tificates can al
8e60: 73 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 so be.self-signe
8e70: 64 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20 d, but they are
8e80: 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 by default not t
8e90: 72 75 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f rusted unless yo
8ea0: 75 20 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f u add them to yo
8eb0: 75 72 0a 63 65 72 74 69 66 69 63 61 74 65 20 73 ur.certificate s
8ec0: 74 6f 72 65 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70 tore.</p>.<p>Typ
8ed0: 69 63 61 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 ically when visi
8ee0: 74 69 6e 67 20 77 65 62 20 73 69 74 65 73 2c 20 ting web sites,
8ef0: 6f 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e 74 20 only the client
8f00: 6e 65 65 64 73 20 74 6f 20 63 68 65 63 6b 20 74 needs to check t
8f10: 68 65 20 73 65 72 76 65 72 27 73 0a 63 65 72 74 he server's.cert
8f20: 69 66 69 63 61 74 65 20 74 6f 20 65 6e 73 75 72 ificate to ensur
8f30: 65 20 69 74 20 69 73 20 76 61 6c 69 64 2e 20 54 e it is valid. T
8f40: 68 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e 27 he server doesn'
8f50: 74 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 20 t need to check
8f60: 74 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 69 the client.certi
8f70: 66 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 6f ficate unless yo
8f80: 75 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 6e u need to authen
8f90: 74 69 63 61 74 65 20 77 69 74 68 20 74 68 65 6d ticate with them
8fa0: 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 2e 20 to login, etc.
8fb0: 53 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 See the.<b class
8fc0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c ="option">-cert<
8fd0: 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 /b> and <b class
8fe0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 ="option">-certf
8ff0: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 ile</b> options
9000: 69 66 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 70 if you need to p
9010: 72 6f 76 69 64 65 20 61 20 63 65 72 74 69 66 69 rovide a certifi
9020: 63 61 74 65 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e cate.</p>.</div>
9030: 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 .<div id="subsec
9040: 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f tion2" class="do
9050: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f ctools_subsectio
9060: 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h3><a name="
9070: 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d subsection2">Sum
9080: 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 mary of command
9090: 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e line options</a>
90a0: 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c </h3>.<p>The fol
90b0: 6c 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61 lowing options a
90c0: 72 65 20 75 73 65 64 20 66 6f 72 20 70 65 65 72 re used for peer
90d0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
90e0: 69 64 61 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c idation:</p>.<dl
90f0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
9100: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c _options">.<dt><
9110: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
9120: 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 >-cadir</b> <i c
9130: 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63 lass="arg">direc
9140: 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 tory</i></dt>.<d
9150: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 d><p>Specifies t
9160: 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 he directory whe
9170: 72 65 20 74 68 65 20 43 65 72 74 69 66 69 63 61 re the Certifica
9180: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 te Authority (CA
9190: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61 ) certificates a
91a0: 72 65 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 re.stored. The d
91b0: 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f efault is platfo
91c0: 72 6d 20 73 70 65 63 69 66 69 63 2c 20 62 75 74 rm specific, but
91d0: 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f is usually &quo
91e0: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 t;<b class="file
91f0: 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 ">/etc/ssl/certs
9200: 3c 2f 62 3e 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 </b>" on.Li
9210: 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 nux/Unix systems
9220: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f . The default lo
9230: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 cation can be ov
9240: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 0a erridden by the.
9250: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
9260: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 le">SSL_CERT_DIR
9270: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 </b> environment
9280: 20 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f variable.</p></
9290: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
92a0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c ="option">-cafil
92b0: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
92c0: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 arg">filename</i
92d0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
92e0: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 ecifies the file
92f0: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 with the Certif
9300: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 icate Authority
9310: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 (CA) certificate
9320: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 s to use in.<b c
9330: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d lass="const">PEM
9340: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 </b> file format
9350: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
9360: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d "<b class=
9370: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c "file">cert.pem<
9380: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 /b>", in th
9390: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 e OpenSSL.direct
93a0: 6f 72 79 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e ory. On Linux/Un
93b0: 69 78 20 73 79 73 74 65 6d 73 2c 20 74 68 69 73 ix systems, this
93c0: 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f is usually &quo
93d0: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 t;<b class="file
93e0: 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 61 2d 62 75 ">/etc/ssl/ca-bu
93f0: 6e 64 6c 65 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f ndle.pem</b>&quo
9400: 74 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 t;..The default
9410: 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72 file can be over
9420: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62 ridden by the <b
9430: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
9440: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c ">SSL_CERT_FILE<
9450: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a /b> environment.
9460: 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 variable.</p></d
9470: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
9480: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 "option">-castor
9490: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
94a0: 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 arg">URI</i></dt
94b0: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 >.<dd><p>Specifi
94c0: 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 es the Uniform R
94d0: 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 esource Identifi
94e0: 65 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 er (URI) for the
94f0: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
9500: 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 hority.(CA) stor
9510: 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 e, which may be
9520: 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e a single contain
9530: 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 er or a catalog
9540: 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 of containers..S
9550: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 tarting with Ope
9560: 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 nSSL 3.2 on MS W
9570: 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 indows, set to &
9580: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 quot;<b class="c
9590: 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 onst">org.openss
95a0: 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 l.winstore://</b
95b0: 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74 >".to use t
95c0: 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 he built-in MS W
95d0: 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 indows Certifica
95e0: 74 65 20 53 74 6f 72 65 2e 20 53 74 61 72 74 69 te Store. Starti
95f0: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 ng in TclTLS 2.0
9600: 2c 20 74 68 69 73 0a 69 73 20 74 68 65 20 64 65 , this.is the de
9610: 66 61 75 6c 74 20 69 66 20 3c 62 20 63 6c 61 73 fault if <b clas
9620: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
9630: 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d r</b>, <b class=
9640: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c "option">-cadir<
9650: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 /b>, and <b clas
9660: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 s="option">-cast
9670: 6f 72 65 3c 2f 62 3e 20 61 72 65 0a 6e 6f 74 20 ore</b> are.not
9680: 73 70 65 63 69 66 69 65 64 2e 20 54 68 69 73 20 specified. This
9690: 73 74 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f store only suppo
96a0: 72 74 73 20 72 6f 6f 74 20 63 65 72 74 69 66 69 rts root certifi
96b0: 63 61 74 65 20 73 74 6f 72 65 73 2e 3c 2f 70 3e cate stores.</p>
96c0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
96d0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 ss="option">-req
96e0: 75 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 uest</b> <i clas
96f0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
9700: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 </dt>.<dd><p>Req
9710: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 uest a certifica
9720: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 te from the peer
9730: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 during the SSL
9740: 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73 20 handshake. This
9750: 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 is needed.to do
9760: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 Certificate Vali
9770: 64 61 74 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 dation. Starting
9780: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 in TclTLS 1.8,
9790: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 3c the default is.<
97a0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
97b0: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 true</b> for cli
97c0: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e ent connections.
97d0: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
97e0: 54 4c 53 20 32 2e 30 2c 20 69 66 20 73 65 74 20 TLS 2.0, if set
97f0: 74 6f 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e to.<b class="con
9800: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e st">false</b> an
9810: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
9820: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e on">-require</b>
9830: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
9840: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 nst">true</b>, t
9850: 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65 hen this will be
9860: 0a 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 3c .overridden to <
9870: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
9880: 74 72 75 65 3c 2f 62 3e 2e 20 49 6e 20 61 64 64 true</b>. In add
9890: 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 6e ition, the clien
98a0: 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 t can manually i
98b0: 6e 73 70 65 63 74 20 61 6e 64 0a 61 63 63 65 70 nspect and.accep
98c0: 74 20 6f 72 20 72 65 6a 65 63 74 20 65 61 63 68 t or reject each
98d0: 20 63 65 72 74 69 66 69 63 61 74 65 20 75 73 69 certificate usi
98e0: 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d ng the <b class=
98f0: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 "option">-valida
9900: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 tecommand</b> op
9910: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c tion.</p></dd>.<
9920: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
9930: 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 ion">-require</b
9940: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
9950: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
9960: 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 dd><p>Require a
9970: 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 valid certificat
9980: 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 e from the peer
9990: 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 during the SSL h
99a0: 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 andshake. If thi
99b0: 73 20 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 s is.set to true
99c0: 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d , then <b class=
99d0: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 "option">-reques
99e0: 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 t</b> must also
99f0: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 be set to true a
9a00: 6e 64 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 nd a either.<b c
9a10: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
9a20: 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 adir</b>, <b cla
9a30: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 ss="option">-caf
9a40: 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 ile</b>, <b clas
9a50: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 s="option">-cast
9a60: 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c ore</b>, or a pl
9a70: 61 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d atform default.m
9a80: 75 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 ust be provided
9a90: 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 in order to vali
9aa0: 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 date against. Th
9ab0: 65 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c e default in Tcl
9ac0: 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c TLS 1.8 and.earl
9ad0: 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 ier versions is
9ae0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
9af0: 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 >false</b> since
9b00: 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 not all platfor
9b10: 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 ms have certific
9b20: 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 ates to.validate
9b30: 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f against in a fo
9b40: 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 rm compatible wi
9b50: 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72 th OpenSSL. Star
9b60: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
9b70: 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 .0,.the default
9b80: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
9b90: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72 st">true</b> for
9ba0: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 client connecti
9bb0: 6f 6e 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f ons.</p></dd>.</
9bc0: 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 dl>.</div>.<div
9bd0: 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 22 id="subsection3"
9be0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
9bf0: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 _subsection"><h3
9c00: 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 ><a name="subsec
9c10: 74 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 tion3">When are
9c20: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 command line opt
9c30: 69 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e ions needed?</a>
9c40: 3c 2f 68 33 3e 0a 3c 70 3e 49 6e 20 54 63 6c 54 </h3>.<p>In TclT
9c50: 4c 53 20 31 2e 38 20 61 6e 64 20 65 61 72 6c 69 LS 1.8 and earli
9c60: 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 er versions, cer
9c70: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 tificate validat
9c80: 69 6f 6e 20 69 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f ion is.<em>NOT</
9c90: 65 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79 20 64 em> enabled by d
9ca0: 65 66 61 75 6c 74 2e 20 54 68 69 73 20 6c 69 6d efault. This lim
9cb0: 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 itation is due t
9cc0: 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 o the lack of a
9cd0: 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 common.cross pla
9ce0: 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f tform database o
9cf0: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 f Certificate Au
9d00: 74 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f thority (CA) pro
9d10: 76 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74 vided certificat
9d20: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 es to.validate a
9d30: 67 61 69 6e 73 74 2e 20 4d 61 6e 79 20 4c 69 6e gainst. Many Lin
9d40: 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 ux systems nativ
9d50: 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e ely support Open
9d60: 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 SSL and thus hav
9d70: 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 63 e.these certific
9d80: 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 ates installed a
9d90: 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 s part of the OS
9da0: 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 , but MacOS and
9db0: 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f MS Windows do no
9dc0: 74 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20 54 63 t..Staring in Tc
9dd0: 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 lTLS 2.0, the de
9de0: 66 61 75 6c 74 20 66 6f 72 20 63 6c 69 65 6e 74 fault for client
9df0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 68 61 73 connections has
9e00: 20 62 65 65 6e 20 63 68 61 6e 67 65 64 20 74 6f been changed to
9e10: 0a 72 65 71 75 69 72 65 20 63 65 72 74 69 66 69 .require certifi
9e20: 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 cate validation
9e30: 62 79 20 64 65 66 61 75 6c 74 2e 20 49 6e 20 6f by default. In o
9e40: 72 64 65 72 20 74 6f 20 75 73 65 20 74 68 65 20 rder to use the
9e50: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
9e60: 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 0a 6f ">-require</b>.o
9e70: 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 ption, one of th
9e80: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 75 73 74 e following must
9e90: 20 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75 be true:</p>.<u
9ea0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
9eb0: 73 5f 69 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69 s_itemized">.<li
9ec0: 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 ><p>On Linux and
9ed0: 20 55 6e 69 78 20 73 79 73 74 65 6d 73 20 77 69 Unix systems wi
9ee0: 74 68 20 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61 th OpenSSL alrea
9ef0: 64 79 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 dy installed or
9f00: 69 66 20 74 68 65 20 43 41 0a 63 65 72 74 69 66 if the CA.certif
9f10: 69 63 61 74 65 73 20 61 72 65 20 61 76 61 69 6c icates are avail
9f20: 61 62 6c 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d able in PEM form
9f30: 61 74 2c 20 61 6e 64 20 69 66 20 74 68 65 79 20 at, and if they
9f40: 61 72 65 20 73 74 6f 72 65 64 20 69 6e 20 74 68 are stored in th
9f50: 65 0a 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 e.standard locat
9f60: 69 6f 6e 73 2c 20 6f 72 20 69 66 20 74 68 65 20 ions, or if the
9f70: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
9f80: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 le">SSL_CERT_DIR
9f90: 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 </b> or <b class
9fa0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f ="variable">SSL_
9fb0: 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e CERT_FILE</b>.en
9fc0: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 vironment variab
9fd0: 6c 65 73 20 61 72 65 20 73 65 74 2c 20 74 68 65 les are set, the
9fe0: 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 n <b class="opti
9ff0: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 on">-cadir</b>,
a000: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
a010: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e ">-cadir</b>,.an
a020: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
a030: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e on">-castore</b>
a040: 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c aren't needed.<
a050: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e /p></li>.<li><p>
a060: 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f If OpenSSL is no
a070: 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 t installed in t
a080: 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 he default locat
a090: 69 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 ion, or when usi
a0a0: 6e 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 ng Mac OS.or MS
a0b0: 57 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e Windows and Open
a0c0: 53 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 SSL is installed
a0d0: 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 , the <b class="
a0e0: 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 variable">SSL_CE
a0f0: 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f RT_DIR</b> and/o
a100: 72 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 r.<b class="vari
a110: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 able">SSL_CERT_F
a120: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d ILE</b> environm
a130: 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 ent variables or
a140: 20 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 the one of the
a150: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
a160: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 ">-cadir</b>,.<b
a170: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
a180: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c -cadir</b>, or <
a190: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
a1a0: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 >-castore</b> op
a1b0: 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64 65 tions must be de
a1c0: 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a fined.</p></li>.
a1d0: 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e <li><p>On MS Win
a1e0: 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67 20 69 dows, starting i
a1f0: 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c 20 69 n OpenSSL 3.2, i
a200: 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c t is now possibl
a210: 65 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 0a e to access the.
a220: 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73 built-in Windows
a230: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f Certificate Sto
a240: 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e re from OpenSSL.
a250: 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 74 69 This can be uti
a260: 6c 69 7a 65 64 20 62 79 0a 73 65 74 74 69 6e 67 lized by.setting
a270: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f the <b class="o
a280: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c ption">-castore<
a290: 2f 62 3e 20 6f 70 74 69 6f 6e 20 74 6f 20 26 71 /b> option to &q
a2a0: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f uot;<b class="co
a2b0: 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c nst">org.openssl
a2c0: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e .winstore://</b>
a2d0: 26 71 75 6f 74 3b 2e 0a 49 6e 20 54 63 6c 54 4c "..In TclTL
a2e0: 53 20 32 2e 30 2c 20 74 68 69 73 20 69 73 20 74 S 2.0, this is t
a2f0: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 he default value
a300: 20 69 66 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 if <b class="op
a310: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e tion">-cadir</b>
a320: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 ,.<b class="opti
a330: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 on">-cadir</b>,
a340: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 and <b class="op
a350: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f tion">-castore</
a360: 62 3e 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 b> are not speci
a370: 66 69 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c fied.</p></li>.<
a380: 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c li><p>If OpenSSL
a390: 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 is not installe
a3a0: 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 74 d or the CA cert
a3b0: 69 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74 ificates are not
a3c0: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 available in PE
a3d0: 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41 M.format, the CA
a3e0: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75 certificates mu
a3f0: 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 st be downloaded
a400: 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77 and installed w
a410: 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66 ith the user.sof
a420: 74 77 61 72 65 2e 20 54 68 65 20 43 55 52 4c 20 tware. The CURL
a430: 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20 team makes them
a440: 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20 available at.<a
a450: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75 href="https://cu
a460: 72 6c 2e 73 65 2f 64 6f 63 73 2f 63 61 65 78 74 rl.se/docs/caext
a470: 72 61 63 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65 ract.html">CA ce
a480: 72 74 69 66 69 63 61 74 65 73 20 65 78 74 72 61 rtificates extra
a490: 63 74 65 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c cted.from Mozill
a4a0: 61 3c 2f 61 3e 20 69 6e 20 74 68 65 20 26 71 75 a</a> in the &qu
a4b0: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c ot;<b class="fil
a4c0: 65 22 3e 63 61 63 65 72 74 2e 70 65 6d 3c 2f 62 e">cacert.pem</b
a4d0: 3e 26 71 75 6f 74 3b 20 66 69 6c 65 2e 20 59 6f >" file. Yo
a4e0: 75 20 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68 u must then eith
a4f0: 65 72 20 73 65 74 20 74 68 65 0a 3c 62 20 63 6c er set the.<b cl
a500: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 ass="variable">S
a510: 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 SL_CERT_DIR</b>
a520: 61 6e 64 2f 6f 72 20 3c 62 20 63 6c 61 73 73 3d and/or <b class=
a530: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 "variable">SSL_C
a540: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 ERT_FILE</b> env
a550: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c ironment variabl
a560: 65 73 20 6f 72 20 74 68 65 0a 3c 62 20 63 6c 61 es or the.<b cla
a570: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 ss="option">-cad
a580: 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 ir</b> or <b cla
a590: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 ss="option">-caf
a5a0: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 ile</b> options
a5b0: 74 6f 20 74 68 65 20 43 41 20 63 65 72 74 20 66 to the CA cert f
a5c0: 69 6c 65 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f ile's install.lo
a5d0: 63 61 74 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f cation. It is yo
a5e0: 75 72 20 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 ur responsibilit
a5f0: 79 20 74 6f 20 6b 65 65 70 20 74 68 69 73 20 66 y to keep this f
a600: 69 6c 65 20 75 70 20 74 6f 20 64 61 74 65 2e 3c ile up to date.<
a610: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c /p></li>.</ul>.<
a620: 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 /div>.</div>.<di
a630: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 35 22 20 v id="section5"
a640: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
a650: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
a660: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 35 22 3e name="section5">
a670: 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 Callback Options
a680: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20 </a></h2>.<p>As
a690: 70 72 65 76 69 6f 75 73 6c 79 20 64 65 73 63 72 previously descr
a6a0: 69 62 65 64 2c 20 65 61 63 68 20 63 68 61 6e 6e ibed, each chann
a6b0: 65 6c 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 el can be given
a6c0: 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 their own callba
a6d0: 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e cks.to handle in
a6e0: 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 termediate proce
a6f0: 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 ssing by the Ope
a700: 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 nSSL library, us
a710: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 ing the.<b class
a720: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 ="option">-comma
a730: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 nd</b>, <b class
a740: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 ="option">-passw
a750: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 ord</b>, and <b
a760: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
a770: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
a780: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 0a 70 61 73 </b> options.pas
a790: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 sed to either of
a7a0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
a7b0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 tls::socket</b>
a7c0: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 or <b class="cmd
a7d0: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 ">tls::import</b
a7e0: 3e 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f >..Unlike previo
a7f0: 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 54 us versions of T
a800: 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74 clTLS, only if t
a810: 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 he callback gene
a820: 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a rates an error,.
a830: 77 69 6c 6c 20 74 68 65 20 3c 62 20 63 6c 61 73 will the <b clas
a840: 73 3d 22 73 79 73 63 6d 64 22 3e 62 67 65 72 72 s="syscmd">bgerr
a850: 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 62 or</b> command b
a860: 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74 e invoked with t
a870: 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61 he error informa
a880: 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69 tion.</p>.<div i
a890: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 34 22 20 d="subsection4"
a8a0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
a8b0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e subsection"><h3>
a8c0: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 <a name="subsect
a8d0: 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66 6f 72 ion4">Values for
a8e0: 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 Command Callbac
a8f0: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 k</a></h3>.<p>Th
a900: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 e callback for t
a910: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
a920: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 ion">-command</b
a930: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f > option is invo
a940: 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 ked at several p
a950: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 oints during the
a960: 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 .OpenSSL handsha
a970: 6b 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f ke and during ro
a980: 75 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 utine operations
a990: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 . See below for
a9a0: 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 the possible.arg
a9b0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
a9c0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
a9d0: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74 ript. Values ret
a9e0: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 63 urned from the c
a9f0: 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f allback are.igno
aa00: 72 65 64 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 red.</p>.<dl cla
aa10: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 ss="doctools_opt
aa20: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c ions">.<dt><b cl
aa30: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72 ass="option">err
aa40: 6f 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d or</b> <i class=
aa50: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 "arg">channelId
aa60: 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e message</i></dt>
aa70: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 .<dd><p>This for
aa80: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
aa90: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65 invoked wheneve
aaa0: 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 r an error occur
aab0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 s during the ini
aac0: 74 69 61 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c tial.connection,
aad0: 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 handshake, or I
aae0: 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 /O operations. T
aaf0: 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 he <i class="arg
ab00: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 20 61 72 ">message</i> ar
ab10: 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 gument can be.fr
ab20: 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f om the Tcl_Errno
ab30: 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e Msg, OpenSSL fun
ab40: 63 74 69 6f 6e 20 3c 62 20 63 6c 61 73 73 3d 22 ction <b class="
ab50: 66 75 6e 63 74 69 6f 6e 22 3e 45 52 52 5f 72 65 function">ERR_re
ab60: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e ason_error_strin
ab70: 67 28 29 3c 2f 62 3e 2c 0a 6f 72 20 61 20 63 75 g()</b>,.or a cu
ab80: 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e 20 54 68 stom message. Th
ab90: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e is callback is n
aba0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
abb0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</p></dd>.<dt>
abc0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
abd0: 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c ">info</b> <i cl
abe0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
abf0: 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 lId major minor
ac00: 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f 69 3e message type</i>
ac10: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 </dt>.<dd><p>Thi
ac20: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
ac30: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 ck is invoked by
ac40: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
ac50: 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 ction.<b class="
ac60: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 function">SSL_se
ac70: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 t_info_callback(
ac80: 29 3c 2f 62 3e 20 64 75 72 69 6e 67 20 74 68 65 )</b> during the
ac90: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 initial connect
aca0: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b ion and handshak
acb0: 65 0a 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 e.operations. Th
acc0: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a e arguments are:
acd0: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 </p>.<dl class="
ace0: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 doctools_definit
acf0: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c ions">.<dt><i cl
ad00: 61 73 73 3d 22 61 72 67 22 3e 6d 61 6a 6f 72 3c ass="arg">major<
ad10: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
ad20: 4d 61 6a 6f 72 20 63 61 74 65 67 6f 72 79 20 66 Major category f
ad30: 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20 or error. Valid
ad40: 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c enums are: <b cl
ad50: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 61 6e 64 ass="const">hand
ad60: 73 68 61 6b 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c shake</b>, <b cl
ad70: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61 6c 65 72 ass="const">aler
ad80: 74 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d t</b>,.<b class=
ad90: 22 63 6f 6e 73 74 22 3e 63 6f 6e 6e 65 63 74 3c "const">connect<
ada0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 /b>, <b class="c
adb0: 6f 6e 73 74 22 3e 61 63 63 65 70 74 3c 2f 62 3e onst">accept</b>
adc0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
add0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 69 i class="arg">mi
ade0: 6e 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 nor</i></dt>.<dd
adf0: 3e 3c 70 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f ><p>Minor catego
ae00: 72 79 20 66 6f 72 20 65 72 72 6f 72 2e 20 56 61 ry for error. Va
ae10: 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c lid enums are: <
ae20: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
ae30: 73 74 61 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c start</b>, <b cl
ae40: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 ass="const">done
ae50: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 </b>, <b class="
ae60: 63 6f 6e 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c const">read</b>,
ae70: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 .<b class="const
ae80: 22 3e 77 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 ">write</b>, <b
ae90: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f class="const">lo
aea0: 6f 70 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 op</b>, <b class
aeb0: 3d 22 63 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62 ="const">exit</b
aec0: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e >.</p></dd>.<dt>
aed0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d <i class="arg">m
aee0: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a essage</i></dt>.
aef0: 3c 64 64 3e 3c 70 3e 44 65 73 63 72 69 70 74 69 <dd><p>Descripti
af00: 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 69 6e ve message strin
af10: 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 67 g which may be g
af20: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20 enerated either
af30: 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e by.<b class="fun
af40: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 74 61 74 65 ction">SSL_state
af50: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
af60: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 b> or <b class="
af70: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c function">SSL_al
af80: 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f ert_desc_string_
af90: 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0a 64 65 70 65 long()</b>,.depe
afa0: 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e nding on the con
afb0: 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c text.</p></dd>.<
afc0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
afd0: 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a ">type</i></dt>.
afe0: 3c 64 64 3e 3c 70 3e 46 6f 72 20 61 6c 65 72 74 <dd><p>For alert
aff0: 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 s, the possible
b000: 76 61 6c 75 65 73 20 61 72 65 3a 20 3c 62 20 63 values are: <b c
b010: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 61 72 lass="const">war
b020: 6e 69 6e 67 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 ning</b>,.<b cla
b030: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 74 61 6c ss="const">fatal
b040: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 </b>, and <b cla
b050: 73 73 3d 22 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f ss="const">unkno
b060: 77 6e 3c 2f 62 3e 2e 20 46 6f 72 20 6f 74 68 65 wn</b>. For othe
b070: 72 73 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f rs, <b class="co
b080: 6e 73 74 22 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73 nst">info</b> is
b090: 20 75 73 65 64 2e 0a 54 68 69 73 20 61 72 67 75 used..This argu
b0a0: 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 ment is new for
b0b0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
b0c0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a /dd>.</dl></dd>.
b0d0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
b0e0: 74 69 6f 6e 22 3e 6d 65 73 73 61 67 65 3c 2f 62 tion">message</b
b0f0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
b100: 3e 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 >channelId direc
b110: 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e tion version con
b120: 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67 tent_type messag
b130: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
b140: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 p>This form of c
b150: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
b160: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ed by the OpenSS
b170: 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c L function.<b cl
b180: 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 ass="function">S
b190: 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 SL_set_msg_callb
b1a0: 61 63 6b 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 ack()</b> whenev
b1b0: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 er a message is
b1c0: 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64 sent or received
b1d0: 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 during the.init
b1e0: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 ial connection,
b1f0: 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f handshake, or I/
b200: 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 49 74 O operations. It
b210: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
b220: 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 le when.OpenSSL
b230: 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 74 68 is complied with
b240: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 the <b class="c
b250: 6f 6e 73 74 22 3e 65 6e 61 62 6c 65 2d 73 73 6c onst">enable-ssl
b260: 2d 74 72 61 63 65 3c 2f 62 3e 20 6f 70 74 69 6f -trace</b> optio
b270: 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b n. This callback
b280: 20 69 73 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54 is.new for TclT
b290: 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 LS 1.8. The argu
b2a0: 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c ments are:</p>.<
b2b0: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f dl class="doctoo
b2c0: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e ls_definitions">
b2d0: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
b2e0: 72 67 22 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69 rg">direction</i
b2f0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 ></dt>.<dd><p>Di
b300: 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65 rection is eithe
b310: 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 r <b class="cons
b320: 74 22 3e 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c t">Sent</b> or <
b330: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
b340: 52 65 63 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70 Received</b>.</p
b350: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c ></dd>.<dt><i cl
b360: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f ass="arg">versio
b370: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
b380: 70 3e 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65 p>Version is the
b390: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
b3a0: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e n.</p></dd>.<dt>
b3b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
b3c0: 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c ontent_type</i><
b3d0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74 /dt>.<dd><p>Cont
b3e0: 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 20 ent type is the
b3f0: 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 message content
b400: 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c type.</p></dd>.<
b410: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
b420: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 ">message</i></d
b430: 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 65 73 73 61 67 t>.<dd><p>Messag
b440: 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 e is more info f
b450: 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73 rom the <b class
b460: 3d 22 63 6f 6e 73 74 22 3e 53 53 4c 5f 74 72 61 ="const">SSL_tra
b470: 63 65 3c 2f 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c ce</b> API.</p><
b480: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a /dd>.</dl></dd>.
b490: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
b4a0: 74 69 6f 6e 22 3e 73 65 73 73 69 6f 6e 3c 2f 62 tion">session</b
b4b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
b4c0: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 >channelId sessi
b4d0: 6f 6e 5f 69 64 20 73 65 73 73 69 6f 6e 5f 74 69 on_id session_ti
b4e0: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 69 cket lifetime</i
b4f0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
b500: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
b510: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ack is invoked b
b520: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 y the OpenSSL fu
b530: 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d nction.<b class=
b540: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 43 "function">SSL_C
b550: 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f TX_sess_set_new_
b560: 63 62 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 cb()</b> wheneve
b570: 72 20 61 20 6e 65 77 20 73 65 73 73 69 6f 6e 20 r a new session
b580: 69 64 20 69 73 20 73 65 6e 74 20 62 79 20 74 68 id is sent by th
b590: 65 0a 73 65 72 76 65 72 20 64 75 72 69 6e 67 20 e.server during
b5a0: 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e the initial conn
b5b0: 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 ection and hands
b5c0: 68 61 6b 65 20 61 6e 64 20 61 6c 73 6f 20 64 75 hake and also du
b5d0: 72 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e ring the session
b5e0: 0a 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73 .if the <b class
b5f0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f ="option">-post_
b600: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 handshake</b> op
b610: 74 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 74 tion is set to t
b620: 72 75 65 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 rue. This callba
b630: 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 0a 54 63 ck is new for.Tc
b640: 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 lTLS 1.8. The ar
b650: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e guments are:</p>
b660: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
b670: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 ools_definitions
b680: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d ">.<dt><i class=
b690: 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64 "arg">session_id
b6a0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
b6b0: 3e 53 65 73 73 69 6f 6e 20 49 64 20 69 73 20 74 >Session Id is t
b6c0: 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73 69 he current sessi
b6d0: 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 3c 2f 70 on identifier</p
b6e0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c ></dd>.<dt><i cl
b6f0: 61 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69 6f ass="arg">sessio
b700: 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74 n_ticket</i></dt
b710: 3e 0a 3c 64 64 3e 3c 70 3e 54 69 63 6b 65 74 20 >.<dd><p>Ticket
b720: 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74 is the session t
b730: 69 63 6b 65 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f icket info</p></
b740: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 dd>.<dt><i class
b750: 3d 22 61 72 67 22 3e 6c 69 66 65 74 69 6d 65 3c ="arg">lifetime<
b760: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
b770: 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 20 Lifetime is the
b780: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 ticket lifetime
b790: 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c in seconds.</p><
b7a0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a /dd>.</dl></dd>.
b7b0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
b7c0: 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e tion">verify</b>
b7d0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
b7e0: 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 channelId depth
b7f0: 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f cert status erro
b800: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c r</i></dt>.<dd><
b810: 70 3e 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 p>This callback
b820: 77 61 73 20 6d 6f 76 65 64 20 74 6f 20 3c 62 20 was moved to <b
b830: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
b840: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c validatecommand<
b850: 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e /b> in TclTLS 1.
b860: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 8.</p></dd>.</dl
b870: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 >.</div>.<div id
b880: 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22 20 63 ="subsection5" c
b890: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
b8a0: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c ubsection"><h3><
b8b0: 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 a name="subsecti
b8c0: 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 on5">Values for
b8d0: 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 63 Password Callbac
b8e0: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 k</a></h3>.<p>Th
b8f0: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 e callback for t
b900: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
b910: 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f ion">-password</
b920: 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 b> option is inv
b930: 6f 6b 65 64 20 62 79 20 54 63 6c 54 4c 53 20 77 oked by TclTLS w
b940: 68 65 6e 65 76 65 72 20 4f 70 65 6e 53 53 4c 20 henever OpenSSL
b950: 6e 65 65 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20 needs.to obtain
b960: 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20 a password. See
b970: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f below for the po
b980: 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 ssible arguments
b990: 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0a 63 passed to the.c
b9a0: 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 allback script.
b9b0: 54 68 65 20 75 73 65 72 20 70 72 6f 76 69 64 65 The user provide
b9c0: 64 20 70 61 73 73 77 6f 72 64 20 69 73 20 65 78 d password is ex
b9d0: 70 65 63 74 65 64 20 74 6f 20 62 65 20 72 65 74 pected to be ret
b9e0: 75 72 6e 65 64 20 62 79 20 74 68 65 0a 63 61 6c urned by the.cal
b9f0: 6c 62 61 63 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 lback.</p>.<dl c
ba00: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f lass="doctools_o
ba10: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 ptions">.<dt><b
ba20: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70 class="option">p
ba30: 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 assword</b> <i c
ba40: 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 lass="arg">rwfla
ba50: 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a g size</i></dt>.
ba60: 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20 77 <dd><p>Invoked w
ba70: 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73 hen loading or s
ba80: 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 79 70 toring an encryp
ba90: 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 69 63 ted PEM certific
baa0: 61 74 65 2e 20 54 68 65 20 61 72 67 75 6d 65 6e ate. The argumen
bab0: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 ts are:</p>.<dl
bac0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
bad0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 definitions">.<d
bae0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 t><i class="arg"
baf0: 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e >rwflag</i></dt>
bb00: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 72 65 61 64 .<dd><p>The read
bb10: 2f 77 72 69 74 65 20 66 6c 61 67 20 69 73 20 30 /write flag is 0
bb20: 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63 for reading/dec
bb30: 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 ryption or 1 for
bb40: 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70 74 writing/encrypt
bb50: 69 6f 6e 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 ion..The latter
bb60: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 64 can be used to d
bb70: 65 74 65 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f etermine when to
bb80: 20 70 72 6f 6d 70 74 20 74 68 65 20 75 73 65 72 prompt the user
bb90: 20 74 6f 20 63 6f 6e 66 69 72 6d 2e 0a 54 68 69 to confirm..Thi
bba0: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 s argument is ne
bbb0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
bbc0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
bbd0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 69 i class="arg">si
bbe0: 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ze</i></dt>.<dd>
bbf0: 3c 70 3e 54 68 65 20 73 69 7a 65 20 69 73 20 74 <p>The size is t
bc00: 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 he maximum lengt
bc10: 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72 h of the passwor
bc20: 64 20 69 6e 20 62 79 74 65 73 2e 0a 54 68 69 73 d in bytes..This
bc30: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 argument is new
bc40: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
bc50: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c </p></dd>.</dl><
bc60: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 /dd>.</dl>.</div
bc70: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 >.<div id="subse
bc80: 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 ction6" class="d
bc90: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
bca0: 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d on"><h3><a name=
bcb0: 22 73 75 62 73 65 63 74 69 6f 6e 36 22 3e 56 61 "subsection6">Va
bcc0: 6c 75 65 73 20 66 6f 72 20 56 61 6c 69 64 61 74 lues for Validat
bcd0: 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 e Command Callba
bce0: 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 ck</a></h3>.<p>T
bcf0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 he callback for
bd00: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 the <b class="op
bd10: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 tion">-validatec
bd20: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f ommand</b> optio
bd30: 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 n is invoked dur
bd40: 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b ing the handshak
bd50: 65 0a 70 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 e.process in ord
bd60: 65 72 20 66 6f 72 20 74 68 65 20 61 70 70 6c 69 er for the appli
bd70: 63 61 74 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 cation to valida
bd80: 74 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 te the provided
bd90: 76 61 6c 75 65 28 73 29 2e 20 53 65 65 0a 62 65 value(s). See.be
bda0: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 low for the poss
bdb0: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 ible arguments p
bdc0: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c assed to the cal
bdd0: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 49 66 lback script. If
bde0: 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20 not.specified,
bdf0: 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 OpenSSL will acc
be00: 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 ept all valid ce
be10: 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 65 rtificates and e
be20: 78 74 65 6e 73 69 6f 6e 73 2e 20 54 6f 20 72 65 xtensions. To re
be30: 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 61 ject.the value a
be40: 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f 6e nd abort the con
be50: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c nection, the cal
be60: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 lback should ret
be70: 75 72 6e 20 30 2e 20 54 6f 20 61 63 63 65 70 74 urn 0. To accept
be80: 20 74 68 65 0a 76 61 6c 75 65 20 61 6e 64 20 63 the.value and c
be90: 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e ontinue the conn
bea0: 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c ection, it shoul
beb0: 64 20 72 65 74 75 72 6e 20 31 2e 20 54 6f 20 72 d return 1. To r
bec0: 65 6a 65 63 74 20 74 68 65 20 76 61 6c 75 65 2c eject the value,
bed0: 20 62 75 74 0a 63 6f 6e 74 69 6e 75 65 20 74 68 but.continue th
bee0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 e connection, it
bef0: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 32 should return 2
bf00: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 . This callback
bf10: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
bf20: 53 20 31 2e 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 S 1.8.</p>.<dl c
bf30: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f lass="doctools_o
bf40: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 ptions">.<dt><b
bf50: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 class="option">a
bf60: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 lpn</b> <i class
bf70: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 ="arg">channelId
bf80: 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c protocol match<
bf90: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
bfa0: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
bfb0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
bfc0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
bfd0: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c en the client AL
bfe0: 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a PN extension is.
bff0: 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c 69 20 received. If <i
c000: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 61 74 63 class="arg">matc
c010: 68 3c 2f 69 3e 20 69 73 20 74 72 75 65 2c 20 74 h</i> is true, t
c020: 68 65 6e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 hen <i class="ar
c030: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20 g">protocol</i>
c040: 69 73 20 74 68 65 20 66 69 72 73 74 0a 3c 62 20 is the first.<b
c050: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
c060: 61 6c 70 6e 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f alpn</b> protoco
c070: 6c 20 6f 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d l option in comm
c080: 6f 6e 20 74 6f 20 62 6f 74 68 20 74 68 65 20 63 on to both the c
c090: 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72 lient and server
c0a0: 2e 0a 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 ..If not, the fi
c0b0: 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 69 rst client speci
c0c0: 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 fied protocol is
c0d0: 20 75 73 65 64 2e 20 54 68 69 73 20 63 61 6c 6c used. This call
c0e0: 62 61 63 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 back is called.a
c0f0: 66 74 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 fter the Hello a
c100: 6e 64 20 53 4e 49 20 63 61 6c 6c 62 61 63 6b 73 nd SNI callbacks
c110: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
c120: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
c130: 3e 68 65 6c 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c >hello</b> <i cl
c140: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
c150: 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 20 73 lId servername s
c160: 65 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 ession_id</i></d
c170: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 t>.<dd><p>For se
c180: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d rvers, this form
c190: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
c1a0: 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 invoked during c
c1b0: 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 lient hello mess
c1c0: 61 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 age.processing.
c1d0: 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 The purpose is s
c1e0: 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 6e o the server can
c1f0: 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 72 select the appr
c200: 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 63 opriate certific
c210: 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 ate.to present t
c220: 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e o the client, an
c230: 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 d to make other
c240: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 configuration ad
c250: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 justments releva
c260: 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65 nt.to that serve
c270: 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63 r name and its c
c280: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 onfiguration. It
c290: 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 is called befor
c2a0: 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c e the SNI and AL
c2b0: 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 PN.callbacks.</p
c2c0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
c2d0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 ass="option">sni
c2e0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
c2f0: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 rg">channelId se
c300: 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 rvername</i></dt
c310: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 >.<dd><p>For ser
c320: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
c330: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
c340: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 nvoked when the
c350: 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 Server Name Indi
c360: 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 cation.(SNI) ext
c370: 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69 76 ension is receiv
c380: 65 64 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73 ed. The <i class
c390: 3d 22 61 72 67 22 3e 73 65 72 76 65 72 6e 61 6d ="arg">servernam
c3a0: 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 69 e</i> argument i
c3b0: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f s the client.pro
c3c0: 76 69 64 65 64 20 73 65 72 76 65 72 20 6e 61 6d vided server nam
c3d0: 65 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 e specified in t
c3e0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
c3f0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 ion">-servername
c400: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 65 </b> option. The
c410: 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 77 .purpose is so w
c420: 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 hen a server sup
c430: 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e ports multiple n
c440: 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 74 20 ames, the right
c450: 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 6e 20 certificate.can
c460: 62 65 20 75 73 65 64 2e 20 49 74 20 69 73 20 63 be used. It is c
c470: 61 6c 6c 65 64 20 61 66 74 65 72 20 74 68 65 20 alled after the
c480: 48 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62 Hello callback b
c490: 75 74 20 62 65 66 6f 72 65 20 74 68 65 20 41 4c ut before the AL
c4a0: 50 4e 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e PN.callback.</p>
c4b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
c4c0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69 ss="option">veri
c4d0: 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d fy</b> <i class=
c4e0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 "arg">channelId
c4f0: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 depth cert statu
c500: 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e s error</i></dt>
c510: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 .<dd><p>This for
c520: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
c530: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e invoked by Open
c540: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63 SSL when a new c
c550: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 72 65 ertificate is re
c560: 63 65 69 76 65 64 0a 66 72 6f 6d 20 74 68 65 20 ceived.from the
c570: 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 peer. It allows
c580: 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 the client to ch
c590: 65 63 6b 20 74 68 65 20 63 65 72 74 69 66 69 63 eck the certific
c5a0: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
c5b0: 0a 72 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f .results and cho
c5c0: 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 ose whether to c
c5d0: 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 ontinue or not.
c5e0: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 It is called for
c5f0: 20 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74 each.certificat
c600: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 e in the certifi
c610: 63 61 74 65 20 63 68 61 69 6e 2e 20 54 68 69 73 cate chain. This
c620: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f callback was mo
c630: 76 65 64 20 66 72 6f 6d 0a 3c 62 20 63 6c 61 73 ved from.<b clas
c640: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d s="option">-comm
c650: 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c and</b> in TclTL
c660: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d S 1.8. The argum
c670: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 ents are:</p>.<d
c680: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
c690: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a s_definitions">.
c6a0: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 <dt><i class="ar
c6b0: 67 22 3e 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74 g">depth</i></dt
c6c0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 65 70 >.<dd><p>The dep
c6d0: 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 67 65 th is the intege
c6e0: 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 20 63 r depth of the c
c6f0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 ertificate in th
c700: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 e certificate ch
c710: 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 69 73 20 ain,.where 0 is
c720: 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69 the peer certifi
c730: 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 72 20 cate and higher
c740: 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 70 20 values going up
c750: 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 61 to the Certifica
c760: 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41 te.Authority (CA
c770: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e ).</p></dd>.<dt>
c780: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
c790: 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ert</i></dt>.<dd
c7a0: 3e 3c 70 3e 54 68 65 20 63 65 72 74 20 61 72 67 ><p>The cert arg
c7b0: 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 ument is a list
c7c0: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 of key-value pai
c7d0: 72 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 rs similar to th
c7e0: 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a ose returned by.
c7f0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
c800: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 2e 3c ls::status</b>.<
c810: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 /p></dd>.<dt><i
c820: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 74 class="arg">stat
c830: 75 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e us</i></dt>.<dd>
c840: 3c 70 3e 54 68 65 20 73 74 61 74 75 73 20 61 72 <p>The status ar
c850: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 62 6f gument is the bo
c860: 6f 6c 65 61 6e 20 76 61 6c 69 64 69 74 79 20 6f olean validity o
c870: 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 65 f the current ce
c880: 72 74 69 66 69 63 61 74 65 20 77 68 65 72 65 20 rtificate where
c890: 30 0a 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 0.is invalid and
c8a0: 20 31 20 69 73 20 76 61 6c 69 64 2e 3c 2f 70 3e 1 is valid.</p>
c8b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 </dd>.<dt><i cla
c8c0: 73 73 3d 22 61 72 67 22 3e 65 72 72 6f 72 3c 2f ss="arg">error</
c8d0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
c8e0: 68 65 20 65 72 72 6f 72 20 61 72 67 75 6d 65 6e he error argumen
c8f0: 74 20 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d t is the error m
c900: 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 essage, if any,
c910: 67 65 6e 65 72 61 74 65 64 20 62 79 0a 3c 62 20 generated by.<b
c920: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 class="function"
c930: 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f >X509_STORE_CTX_
c940: 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 62 3e 2e get_error()</b>.
c950: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c </p></dd>.</dl><
c960: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65 /dd>.</dl>.<p>Re
c970: 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e ference implemen
c980: 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 tations of these
c990: 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 callbacks are p
c9a0: 72 6f 76 69 64 65 64 20 69 6e 20 26 71 75 6f 74 rovided in "
c9b0: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 ;<b class="file"
c9c0: 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f >tls.tcl</b>&quo
c9d0: 74 3b 0a 61 73 20 3c 62 20 63 6c 61 73 73 3d 22 t;.as <b class="
c9e0: 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 cmd">tls::callba
c9f0: 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 ck</b>, <b class
ca00: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 ="cmd">tls::pass
ca10: 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 word</b>, and <b
ca20: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
ca30: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 ::validate_comma
ca40: 6e 64 3c 2f 62 3e 0a 72 65 73 70 65 63 74 69 76 nd</b>.respectiv
ca50: 65 6c 79 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 ely. Note that t
ca60: 68 65 73 65 20 61 72 65 20 6f 6e 6c 79 20 3c 65 hese are only <e
ca70: 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d m>sample</em> im
ca80: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 49 plementations. I
ca90: 6e 20 61 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74 n a more.realist
caa0: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f ic deployment yo
cab0: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 u would specify
cac0: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 your own callbac
cad0: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 k scripts on eac
cae0: 68 20 54 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73 h TLS.channel us
caf0: 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 ing the <b class
cb00: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 ="option">-comma
cb10: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 nd</b>, <b class
cb20: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 ="option">-passw
cb30: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 ord</b>, and.<b
cb40: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
cb50: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
cb60: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70 </b> options.</p
cb70: 3e 0a 3c 70 3e 54 68 65 20 64 65 66 61 75 6c 74 >.<p>The default
cb80: 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 behavior when t
cb90: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
cba0: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 ion">-command</b
cbb0: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 > and <b class="
cbc0: 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 option">-validat
cbd0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 e_command</b>.op
cbe0: 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 tions are not sp
cbf0: 65 63 69 66 69 65 64 2c 20 69 73 20 66 6f 72 20 ecified, is for
cc00: 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 TclTLS to proces
cc10: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 s the associated
cc20: 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c 62 61 63 library.callbac
cc30: 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 ks internally. T
cc40: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 he default behav
cc50: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 62 20 ior when the <b
cc60: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
cc70: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 password</b> opt
cc80: 69 6f 6e 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 ion.is not speci
cc90: 66 69 65 64 20 69 73 20 66 6f 72 20 54 63 6c 54 fied is for TclT
cca0: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 LS to process th
ccb0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 e associated lib
ccc0: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 rary callbacks b
ccd0: 79 0a 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 y.attempting to
cce0: 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 call <b class="c
ccf0: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 md">tls::passwor
cd00: 64 3c 2f 62 3e 2e 20 54 68 65 20 64 69 66 66 65 d</b>. The diffe
cd10: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 rence between th
cd20: 65 73 65 20 74 77 6f 0a 62 65 68 61 76 69 6f 72 ese two.behavior
cd30: 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e s is a consequen
cd40: 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e ce of maintainin
cd50: 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 g compatibility
cd60: 77 69 74 68 20 65 61 72 6c 69 65 72 0a 69 6d 70 with earlier.imp
cd70: 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70 lementations.</p
cd80: 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 >.<p><em>The use
cd90: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 of the referenc
cda0: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 62 20 63 e callbacks <b c
cdb0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
cdc0: 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 callback</b>, <b
cdd0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
cde0: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a ::password</b>,.
cdf0: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d and <b class="cm
ce00: 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 d">tls::validate
ce10: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 _command</b> is
ce20: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e not recommended.
ce30: 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d They may be rem
ce40: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
ce50: 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c releases.</em><
ce60: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 /p>.</div>.</div
ce70: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 >.<div id="secti
ce80: 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 on6" class="doct
ce90: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 ools_section"><h
cea0: 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 2><a name="secti
ceb0: 6f 6e 36 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f on6">Debug</a></
cec0: 68 32 3e 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74 20 h2>.<p>For most
ced0: 64 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c debugging needs,
cee0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f the <b class="o
cef0: 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b ption">-callback
cf00: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 63 61 6e 20 </b> option can
cf10: 62 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69 be used to provi
cf20: 64 65 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e de.sufficient in
cf30: 73 69 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d sight and inform
cf40: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 ation on the TLS
cf50: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 handshake and p
cf60: 72 6f 67 72 65 73 73 2e 20 49 66 0a 66 75 72 74 rogress. If.furt
cf70: 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74 her troubleshoot
cf80: 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 6e ing insight is n
cf90: 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 69 eeded, the compi
cfa0: 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c le time option.<
cfb0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
cfc0: 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 67 3c >--enable-debug<
cfd0: 2f 62 3e 20 63 61 6e 20 62 65 20 75 73 65 64 20 /b> can be used
cfe0: 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 20 to get detailed
cff0: 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73 execution flow s
d000: 74 61 74 75 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c tatus.</p>.<p>TL
d010: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 S key logging ca
d020: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 n be enabled by
d030: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 setting the envi
d040: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
d050: 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 .<b class="varia
d060: 62 6c 65 22 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 ble">SSLKEYLOGFI
d070: 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 LE</b> to the na
d080: 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74 me of the file t
d090: 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 o log to. Then w
d0a0: 68 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a henever TLS key.
d0b0: 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 material is gene
d0c0: 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 rated or receive
d0d0: 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 d it will be log
d0e0: 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 2e ged to the file.
d0f0: 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 0a This is useful.
d100: 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 for logging key
d110: 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b data for network
d120: 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 logging tools t
d130: 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 70 74 o use to decrypt
d140: 20 74 68 65 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c the data.</p>.<
d150: 70 3e 54 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 p>The <b class="
d160: 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 variable">tls::d
d170: 65 62 75 67 3c 2f 62 3e 20 76 61 72 69 61 62 6c ebug</b> variabl
d180: 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 e provides some
d190: 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 additional contr
d1a0: 6f 6c 20 6f 76 65 72 20 74 68 65 0a 64 65 62 75 ol over the.debu
d1b0: 67 20 6c 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 g logging in the
d1c0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
d1d0: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 tls::callback</b
d1e0: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 >, <b class="cmd
d1f0: 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c ">tls::password<
d200: 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 /b>, and.<b clas
d210: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c s="cmd">tls::val
d220: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 idate_command</b
d230: 3e 20 64 65 66 61 75 6c 74 20 68 61 6e 64 6c 65 > default handle
d240: 72 73 20 69 6e 20 26 71 75 6f 74 3b 3c 62 20 63 rs in "<b c
d250: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c 73 2e lass="file">tls.
d260: 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 tcl</b>"..T
d270: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 he default value
d280: 20 69 73 20 30 20 77 69 74 68 20 68 69 67 68 65 is 0 with highe
d290: 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63 69 r values produci
d2a0: 6e 67 20 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74 ng more diagnost
d2b0: 69 63 20 6f 75 74 70 75 74 2c 0a 61 6e 64 20 77 ic output,.and w
d2c0: 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 ill also force t
d2d0: 68 65 20 76 65 72 69 66 79 20 6d 65 74 68 6f 64 he verify method
d2e0: 20 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d in <b class="cm
d2f0: 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b d">tls::callback
d300: 3c 2f 62 3e 20 74 6f 20 61 63 63 65 70 74 20 74 </b> to accept t
d310: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20 he.certificate,
d320: 65 76 65 6e 20 69 66 20 69 74 20 69 73 20 69 6e even if it is in
d330: 76 61 6c 69 64 20 77 68 65 6e 20 74 68 65 20 3c valid when the <
d340: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
d350: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e >-validatecomman
d360: 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 20 69 73 20 d</b>.option is
d370: 73 65 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d set to <b class=
d380: 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 "cmd">tls::valid
d390: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e ate_command</b>.
d3a0: 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 </p>.<p><em>The
d3b0: 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 use of the varia
d3c0: 62 6c 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 ble <b class="va
d3d0: 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 riable">tls::deb
d3e0: 75 67 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65 ug</b> is not re
d3f0: 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 commended..It ma
d400: 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f y be removed fro
d410: 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 m future release
d420: 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 s.</em></p>.</di
d430: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 v>.<div id="sect
d440: 69 6f 6e 37 22 20 63 6c 61 73 73 3d 22 64 6f 63 ion7" class="doc
d450: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
d460: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 h2><a name="sect
d470: 69 6f 6e 37 22 3e 45 78 61 6d 70 6c 65 73 3c 2f ion7">Examples</
d480: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 66 a></h2>.<p>The f
d490: 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 78 61 ollowing are exa
d4a0: 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 6f 20 mple scripts to
d4b0: 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 70 61 download a webpa
d4c0: 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 69 6e ge and file usin
d4d0: 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 6b 61 g the.http packa
d4e0: 67 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c ge. See <span cl
d4f0: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 ass="sectref"><a
d500: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 href="#section4
d510: 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 ">Certificate Va
d520: 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 lidation</a></sp
d530: 61 6e 3e 20 66 6f 72 20 77 68 65 6e 20 74 68 65 an> for when the
d540: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f .<b class="optio
d550: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c n">-cadir</b>, <
d560: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
d570: 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 61 6e >-cafile</b>, an
d580: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
d590: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e on">-castore</b>
d5a0: 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 61 6c 73 options are als
d5b0: 6f 0a 6e 65 65 64 65 64 2e 20 53 65 65 20 74 68 o.needed. See th
d5c0: 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 e "<b class
d5d0: 3d 22 66 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 ="file">demos</b
d5e0: 3e 26 71 75 6f 74 3b 20 64 69 72 65 63 74 6f 72 >" director
d5f0: 79 20 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 y for more examp
d600: 6c 65 20 73 63 72 69 70 74 73 2e 3c 2f 70 3e 0a le scripts.</p>.
d610: 3c 70 3e 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 <p>Example #1: D
d620: 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 20 70 61 ownload a web pa
d630: 67 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 ge</p>.<pre clas
d640: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d s="doctools_exam
d650: 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 ple">.package re
d660: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 quire http.packa
d670: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 ge require tls.s
d680: 65 74 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 et url "htt
d690: 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f ps://www.tcl.tk/
d6a0: 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 ".http::reg
d6b0: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 ister https 443
d6c0: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 [list ::tls::soc
d6d0: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e ket -autoservern
d6e0: 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31 ame 1 -require 1
d6f0: 5d 0a 23 20 47 65 74 20 55 52 4c 0a 73 65 74 20 ].# Get URL.set
d700: 74 6f 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 token [http::get
d710: 75 72 6c 20 24 75 72 6c 5d 0a 23 20 43 68 65 63 url $url].# Chec
d720: 6b 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b k for error.if {
d730: 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 [http::status $t
d740: 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b 6f oken] ne "o
d750: 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 k"} {. p
d760: 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71 75 6f uts [format &quo
d770: 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f 74 3b t;Error %s"
d780: 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 [http::status $
d790: 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 53 61 76 65 token]].}.# Save
d7a0: 20 77 65 62 20 70 61 67 65 20 74 6f 20 66 69 6c web page to fil
d7b0: 65 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 65 e.set ch [open e
d7c0: 78 61 6d 70 6c 65 2e 68 74 6d 6c 20 77 62 5d 0a xample.html wb].
d7d0: 70 75 74 73 20 24 63 68 20 5b 68 74 74 70 3a 3a puts $ch [http::
d7e0: 64 61 74 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f data $token].clo
d7f0: 73 65 20 24 63 68 0a 23 20 43 6c 65 61 6e 75 70 se $ch.# Cleanup
d800: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 .::http::cleanup
d810: 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c $token.</pre>.<
d820: 70 3e 45 78 61 6d 70 6c 65 20 23 32 3a 20 44 6f p>Example #2: Do
d830: 77 6e 6c 6f 61 64 20 61 20 66 69 6c 65 3c 2f 70 wnload a file</p
d840: 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22 64 6f >.<pre class="do
d850: 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e ctools_example">
d860: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 .package require
d870: 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 http.package re
d880: 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72 quire tls.set ur
d890: 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f l "https://
d8a0: 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 wiki.tcl-lang.or
d8b0: 67 2f 73 69 74 65 6d 61 70 2e 78 6d 6c 26 71 75 g/sitemap.xml&qu
d8c0: 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 ot;.http::regist
d8d0: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 er https 443 [li
d8e0: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 st ::tls::socket
d8f0: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 -autoservername
d900: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 23 1 -require 1].#
d910: 20 4f 70 65 6e 20 6f 75 74 70 75 74 20 66 69 6c Open output fil
d920: 65 0a 73 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b e.set filename [
d930: 66 69 6c 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a file tail $url].
d940: 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 24 66 69 set ch [open $fi
d950: 6c 65 6e 61 6d 65 20 77 62 5d 0a 23 20 47 65 74 lename wb].# Get
d960: 20 66 69 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20 file.set token
d970: 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 [::http::geturl
d980: 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 $url -blocksize
d990: 36 35 35 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24 65536 -channel $
d9a0: 63 68 5d 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 ch].# Check for
d9b0: 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a error.if {[http:
d9c0: 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 :status $token]
d9d0: 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 ne "ok"
d9e0: 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 ;} {. puts [f
d9f0: 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72 72 6f ormat "Erro
da00: 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74 74 70 r %s" [http
da10: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d ::status $token]
da20: 5d 0a 7d 0a 23 20 43 6c 65 61 6e 75 70 0a 63 6c ].}.# Cleanup.cl
da30: 6f 73 65 20 24 63 68 0a 3a 3a 68 74 74 70 3a 3a ose $ch.::http::
da40: 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c cleanup $token.<
da50: 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 /pre>.</div>.<di
da60: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 38 22 20 v id="section8"
da70: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
da80: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
da90: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 38 22 3e name="section8">
daa0: 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 Special Consider
dab0: 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a ations</a></h2>.
dac0: 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 <p>The capabilit
dad0: 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b ies of this pack
dae0: 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f age can vary eno
daf0: 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70 rmously based up
db00: 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 on how the.linke
db10: 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69 62 d to OpenSSL lib
db20: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 rary was configu
db30: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e red and built. N
db40: 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 ew versions may
db50: 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65 72 20 70 obsolete.older p
db60: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
db70: 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 , add or remove
db80: 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20 ciphers, change
db90: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 default values,
dba0: 65 74 63 2e 0a 55 73 65 20 74 68 65 20 3c 62 20 etc..Use the <b
dbb0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
dbc0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 :protocols</b> c
dbd0: 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e ommand to obtain
dbe0: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 the supported.p
dbf0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
dc00: 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 .</p>.</div>.<di
dc10: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 39 22 20 v id="section9"
dc20: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
dc30: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
dc40: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 39 22 3e name="section9">
dc50: 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f Error Messages</
dc60: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 53 6f 6d 65 20 a></h2>.<p>Some
dc70: 4f 70 73 6e 53 53 6c 20 65 72 72 6f 72 20 6d 65 OpsnSSl error me
dc80: 73 73 61 67 65 73 20 68 61 76 65 20 63 72 79 70 ssages have cryp
dc90: 74 69 63 20 6d 65 61 6e 69 6e 67 73 2e 20 54 68 tic meanings. Th
dca0: 69 73 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 is is a list of
dcb0: 6d 65 73 73 61 67 65 73 0a 61 6c 6f 6e 67 20 77 messages.along w
dcc0: 69 74 68 20 74 68 65 69 72 20 74 72 75 65 20 6d ith their true m
dcd0: 65 61 6e 69 6e 67 2e 3c 2f 70 3e 0a 3c 64 6c 20 eaning.</p>.<dl
dce0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
dcf0: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 definitions">.<d
dd00: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 t><i class="arg"
dd10: 3e 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 >handshake faile
dd20: 64 3a 20 63 65 72 74 69 66 69 63 61 74 65 20 76 d: certificate v
dd30: 65 72 69 66 79 20 66 61 69 6c 65 64 20 64 75 65 erify failed due
dd40: 20 74 6f 20 26 71 75 6f 74 3b 75 6e 61 62 6c 65 to "unable
dd50: 20 74 6f 20 67 65 74 20 6c 6f 63 61 6c 20 69 73 to get local is
dd60: 73 75 65 72 20 63 65 72 74 69 66 69 63 61 74 65 suer certificate
dd70: 26 71 75 6f 74 3b 3c 2f 69 3e 3c 2f 64 74 3e 0a "</i></dt>.
dd80: 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 <dd><p>The certi
dd90: 66 69 63 61 74 65 73 20 69 6e 20 74 68 65 20 43 ficates in the C
dda0: 41 20 66 69 6c 65 20 6f 72 20 63 65 72 74 69 66 A file or certif
ddb0: 69 63 61 74 65 20 73 74 6f 72 65 20 65 69 74 68 icate store eith
ddc0: 65 72 20 64 6f 20 6e 6f 74 20 68 61 76 65 20 6f er do not have o
ddd0: 6e 65 20 6f 72 0a 6d 6f 72 65 20 69 73 73 75 65 ne or.more issue
dde0: 72 73 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 rs of the certif
ddf0: 69 63 61 74 65 73 20 79 6f 75 20 61 72 65 20 76 icates you are v
de00: 61 6c 69 64 61 74 69 6e 67 20 6f 72 20 74 68 65 alidating or the
de10: 79 20 68 61 76 65 20 65 78 70 69 72 65 64 2e 0a y have expired..
de20: 55 73 75 61 6c 6c 79 20 74 68 69 73 20 6d 65 61 Usually this mea
de30: 6e 73 20 79 6f 75 20 6e 65 65 64 20 61 6e 20 75 ns you need an u
de40: 70 64 61 74 65 64 20 43 41 63 65 72 74 20 66 69 pdated CAcert fi
de50: 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 le.</p></dd>.<dt
de60: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ><i class="arg">
de70: 70 61 63 6b 65 74 20 6c 65 6e 67 74 68 20 74 6f packet length to
de80: 6f 20 6c 6f 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a o long</i></dt>.
de90: 3c 64 64 3e 3c 70 3e 43 6c 69 65 6e 74 20 68 61 <dd><p>Client ha
dea0: 73 20 74 72 69 65 64 20 74 6f 20 63 6f 6e 6e 65 s tried to conne
deb0: 63 74 20 74 6f 20 61 20 48 54 54 50 20 73 65 72 ct to a HTTP ser
dec0: 76 65 72 20 6f 6e 20 74 68 65 20 70 6c 61 69 6e ver on the plain
ded0: 2d 74 65 78 74 20 70 6f 72 74 20 69 6e 73 74 65 -text port inste
dee0: 61 64 20 6f 66 0a 74 68 65 20 53 53 4c 2f 54 4c ad of.the SSL/TL
def0: 53 20 70 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e S port.</p></dd>
df00: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
df10: 72 67 22 3e 75 6e 65 78 70 65 63 74 65 64 20 65 rg">unexpected e
df20: 6f 66 20 77 68 69 6c 65 20 72 65 61 64 69 6e 67 of while reading
df30: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
df40: 3e 54 68 65 20 70 65 65 72 20 68 61 73 20 63 6c >The peer has cl
df50: 6f 73 65 64 20 74 68 65 20 63 6f 6e 6e 65 63 74 osed the connect
df60: 69 6f 6e 20 77 69 74 68 6f 75 74 20 73 65 6e 64 ion without send
df70: 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63 6c ing the "cl
df80: 6f 73 65 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b ose notify"
df90: 20 73 68 75 74 64 6f 77 6e 0a 61 6c 65 72 74 2e shutdown.alert.
dfa0: 20 53 6f 6d 65 20 73 65 72 76 65 72 73 20 77 69 Some servers wi
dfb0: 6c 6c 20 74 65 72 6d 69 6e 61 74 65 20 74 68 65 ll terminate the
dfc0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 66 74 65 connection afte
dfd0: 72 20 74 68 65 20 66 69 6c 65 20 6f 72 20 77 65 r the file or we
dfe0: 62 70 61 67 65 20 68 61 73 0a 62 65 65 6e 20 73 bpage has.been s
dff0: 65 6e 74 20 77 69 74 68 6f 75 74 20 73 65 6e 64 ent without send
e000: 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63 6c ing the "cl
e010: 6f 73 65 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b ose notify"
e020: 20 6d 65 73 73 61 67 65 2e 20 49 6e 20 74 68 69 message. In thi
e030: 73 20 63 61 73 65 2c 20 69 74 20 73 68 6f 75 6c s case, it shoul
e040: 64 0a 6e 6f 74 20 72 65 73 75 6c 74 20 69 6e 20 d.not result in
e050: 61 20 6c 6f 73 73 20 6f 66 20 64 61 74 61 2e 3c a loss of data.<
e060: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 /p></dd>.<dt><i
e070: 63 6c 61 73 73 3d 22 61 72 67 22 3e 77 72 6f 6e class="arg">wron
e080: 67 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 g version number
e090: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
e0a0: 3e 43 6c 69 65 6e 74 20 68 61 73 20 74 72 69 65 >Client has trie
e0b0: 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 20 d to connect to
e0c0: 61 20 6e 6f 6e 2d 48 54 54 50 20 73 65 72 76 65 a non-HTTP serve
e0d0: 72 20 6f 6e 20 61 20 6e 6f 6e 2d 54 4c 53 20 28 r on a non-TLS (
e0e0: 69 2e 65 2e 20 70 6c 61 69 6e 20 74 65 78 74 29 i.e. plain text)
e0f0: 20 70 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a port.</p></dd>.
e100: 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 </dl>.</div>.<di
e110: 76 20 69 64 3d 22 73 65 65 2d 61 6c 73 6f 22 20 v id="see-also"
e120: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
e130: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
e140: 6e 61 6d 65 3d 22 73 65 65 2d 61 6c 73 6f 22 3e name="see-also">
e150: 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 See Also</a></h2
e160: 3e 0a 3c 70 3e 3c 61 20 68 72 65 66 3d 22 68 74 >.<p><a href="ht
e170: 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 tps://www.openss
e180: 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c l.org/">OpenSSL<
e190: 2f 61 3e 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 /a>, http, socke
e1a0: 74 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 t</p>.</div>.<di
e1b0: 76 20 69 64 3d 22 6b 65 79 77 6f 72 64 73 22 20 v id="keywords"
e1c0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
e1d0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
e1e0: 6e 61 6d 65 3d 22 6b 65 79 77 6f 72 64 73 22 3e name="keywords">
e1f0: 4b 65 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 68 32 Keywords</a></h2
e200: 3e 0a 3c 70 3e 49 2f 4f 2c 20 49 50 20 41 64 64 >.<p>I/O, IP Add
e210: 72 65 73 73 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 ress, OpenSSL, S
e220: 53 4c 2c 20 54 43 50 2c 20 54 4c 53 2c 20 54 63 SL, TCP, TLS, Tc
e230: 6c 54 4c 53 2c 20 61 73 79 6e 63 68 72 6f 6e 6f lTLS, asynchrono
e240: 75 73 20 49 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 us I/O, bind, ce
e250: 72 74 69 66 69 63 61 74 65 2c 20 63 68 61 6e 6e rtificate, chann
e260: 65 6c 2c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 el, connection,
e270: 64 6f 6d 61 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 domain name, hos
e280: 74 2c 20 68 74 74 70 73 2c 20 6e 65 74 77 6f 72 t, https, networ
e290: 6b 2c 20 6e 65 74 77 6f 72 6b 20 61 64 64 72 65 k, network addre
e2a0: 73 73 2c 20 73 6f 63 6b 65 74 2c 20 74 6c 73 3c ss, socket, tls<
e2b0: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 /p>.</div>.<div
e2c0: 69 64 3d 22 63 61 74 65 67 6f 72 79 22 20 63 6c id="category" cl
e2d0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 ass="doctools_se
e2e0: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 ction"><h2><a na
e2f0: 6d 65 3d 22 63 61 74 65 67 6f 72 79 22 3e 43 61 me="category">Ca
e300: 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 68 32 3e 0a tegory</a></h2>.
e310: 3c 70 3e 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 <p>tls</p>.</div
e320: 3e 0a 3c 64 69 76 20 69 64 3d 22 63 6f 70 79 72 >.<div id="copyr
e330: 69 67 68 74 22 20 63 6c 61 73 73 3d 22 64 6f 63 ight" class="doc
e340: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
e350: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 6f 70 79 h2><a name="copy
e360: 72 69 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 right">Copyright
e370: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 43 6f 70 </a></h2>.<p>Cop
e380: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 yright © 19
e390: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 3c 62 99 Matt Newman<b
e3a0: 72 3e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f r>.Copyright &co
e3b0: 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73 py; 2004 Starfis
e3c0: 68 20 53 79 73 74 65 6d 73 3c 62 72 3e 0a 43 6f h Systems<br>.Co
e3d0: 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 pyright © 2
e3e0: 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61 024 Brian O'Haga
e3f0: 6e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 n</p>.</div>.</d
e400: 69 76 3e 3c 2f 62 6f 64 79 3e 3c 2f 68 74 6d 6c iv></body></html
e410: 3e 0a >.