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 20 74 6c e">tls(n) 2.0 tl
0880: 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c 53 20 s "Tcl TLS
0890: 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74 3b 3c extension"<
08a0: 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22 6e 61 /h1>.<div id="na
08b0: 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f me" class="docto
08c0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 ols_section"><h2
08d0: 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65 22 3e ><a name="name">
08e0: 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 Name</a></h2>.<p
08f0: 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67 20 74 >tls - binding t
0900: 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 o the OpenSSL li
0910: 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72 79 70 brary for encryp
0920: 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64 20 49 ted socket and I
0930: 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 /O channel commu
0940: 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a 3c 2f nications</p>.</
0950: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 74 6f div>.<div id="to
0960: 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f c" class="doctoo
0970: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e ls_section"><h2>
0980: 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e 54 61 <a name="toc">Ta
0990: 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 73 3c ble Of Contents<
09a0: 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63 6c 61 /a></h2>.<ul cla
09b0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 6f 63 ss="doctools_toc
09c0: 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f ">.<li class="do
09d0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
09e0: 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22 3e 54 <a href="#toc">T
09f0: 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 73 able Of Contents
0a00: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c </a></li>.<li cl
0a10: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 ass="doctools_se
0a20: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 ction"><a href="
0a30: 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e 6f 70 #synopsis">Synop
0a40: 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 sis</a></li>.<li
0a50: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
0a60: 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 _section"><a hre
0a70: 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e 44 65 f="#section1">De
0a80: 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c 2f 6c scription</a></l
0a90: 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f i>.<li class="do
0aa0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
0ab0: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f <a href="#sectio
0ac0: 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69 6c 69 74 n2">Compatibilit
0ad0: 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 y</a></li>.<li c
0ae0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
0af0: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d ection"><a href=
0b00: 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 6f 6d 6d "#section3">Comm
0b10: 61 6e 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c ands</a></li>.<l
0b20: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c i class="doctool
0b30: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 s_section"><a hr
0b40: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 ef="#section4">C
0b50: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
0b60: 61 74 69 6f 6e 3c 2f 61 3e 0a 3c 75 6c 3e 0a 3c ation</a>.<ul>.<
0b70: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0b80: 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c ls_subsection"><
0b90: 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 a href="#subsect
0ba0: 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65 ion1">PKI and Ce
0bb0: 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f rtificates</a></
0bc0: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 li>.<li class="d
0bd0: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
0be0: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 on"><a href="#su
0bf0: 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d 6d 61 bsection2">Summa
0c00: 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 ry of command li
0c10: 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f ne options</a></
0c20: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 li>.<li class="d
0c30: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
0c40: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 on"><a href="#su
0c50: 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 65 6e 20 bsection3">When
0c60: 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 are command line
0c70: 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 65 64 3f options needed?
0c80: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a </a></li>.</ul>.
0c90: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d </li>.<li class=
0ca0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
0cb0: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 n"><a href="#sec
0cc0: 74 69 6f 6e 35 22 3e 43 61 6c 6c 62 61 63 6b 20 tion5">Callback
0cd0: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 0a 3c 75 6c 3e Options</a>.<ul>
0ce0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<li class="doct
0cf0: 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 ools_subsection"
0d00: 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 62 73 65 ><a href="#subse
0d10: 63 74 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66 ction4">Values f
0d20: 6f 72 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 or Command Callb
0d30: 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 ack</a></li>.<li
0d40: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
0d50: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 _subsection"><a
0d60: 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f href="#subsectio
0d70: 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 50 n5">Values for P
0d80: 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 63 6b assword Callback
0d90: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c </a></li>.<li cl
0da0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 ass="doctools_su
0db0: 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 bsection"><a hre
0dc0: 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 36 22 f="#subsection6"
0dd0: 3e 56 61 6c 75 65 73 20 66 6f 72 20 56 61 6c 69 >Values for Vali
0de0: 64 61 74 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c date Command Cal
0df0: 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c lback</a></li>.<
0e00: 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 /ul>.</li>.<li c
0e10: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
0e20: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d ection"><a href=
0e30: 22 23 73 65 63 74 69 6f 6e 36 22 3e 44 65 62 75 "#section6">Debu
0e40: 67 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 g</a></li>.<li c
0e50: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
0e60: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d ection"><a href=
0e70: 22 23 73 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d "#section7">Exam
0e80: 70 6c 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c ples</a></li>.<l
0e90: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c i class="doctool
0ea0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 s_section"><a hr
0eb0: 65 66 3d 22 23 73 65 63 74 69 6f 6e 38 22 3e 53 ef="#section8">S
0ec0: 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 61 pecial Considera
0ed0: 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c tions</a></li>.<
0ee0: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0ef0: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 ls_section"><a h
0f00: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 39 22 3e ref="#section9">
0f10: 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f Error Messages</
0f20: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 a></li>.<li clas
0f30: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 s="doctools_sect
0f40: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 ion"><a href="#s
0f50: 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73 ee-also">See Als
0f60: 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 o</a></li>.<li c
0f70: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
0f80: 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d ection"><a href=
0f90: 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77 "#keywords">Keyw
0fa0: 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c ords</a></li>.<l
0fb0: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c i class="doctool
0fc0: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 s_section"><a hr
0fd0: 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22 3e 43 ef="#category">C
0fe0: 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c 69 3e ategory</a></li>
0ff0: 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<li class="doct
1000: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 ools_section"><a
1010: 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69 67 68 href="#copyrigh
1020: 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e t">Copyright</a>
1030: 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 </li>.</ul>.</di
1040: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79 6e 6f v>.<div id="syno
1050: 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64 6f 63 psis" class="doc
1060: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
1070: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 6e 6f h2><a name="syno
1080: 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f psis">Synopsis</
1090: 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 6c 61 a></h2>.<div cla
10a0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e ss="doctools_syn
10b0: 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c 61 73 opsis">.<ul clas
10c0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75 s="doctools_requ
10d0: 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 3e 70 irements">.<li>p
10e0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 3c ackage require <
10f0: 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d 65 b class="pkgname
1100: 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e 3c 2f ">Tcl 8.5-</b></
1110: 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20 li>.<li>package
1120: 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73 require <b class
1130: 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 20 32 ="pkgname">tls 2
1140: 2e 30 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c .0</b></li>.</ul
1150: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 >.<ul class="doc
1160: 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 22 3e 0a 3c tools_syntax">.<
1170: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 22 3e li><a href="#1">
1180: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
1190: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 ls::init</b> <sp
11a0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
11b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d <i class="arg">-
11c0: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 option</i>?</spa
11d0: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 n> <span class="
11e0: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 opt">?<i class="
11f0: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c arg">value</i>?<
1200: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
1210: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
1220: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
1230: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c value ...</i>?<
1240: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a /span></a></li>.
1250: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 32 22 <li><a href="#2"
1260: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e ><b class="cmd">
1270: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 tls::socket</b>
1280: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
1290: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
12a0: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f ">-option</i>?</
12b0: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
12c0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
12d0: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 s="arg">value</i
12e0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
12f0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
1300: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 class="arg">-opt
1310: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 ion value ...</i
1320: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 >?</span> <i cla
1330: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69 ss="arg">host</i
1340: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
1350: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c >port</i></a></l
1360: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 i>.<li><a href="
1370: 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d #3"><b class="cm
1380: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
1390: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 b> <b class="opt
13a0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e ion">-server</b>
13b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
13c0: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 command</i> <spa
13d0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
13e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
13f0: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e ption</i>?</span
1400: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1410: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1420: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f rg">value</i>?</
1430: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
1440: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1450: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 s="arg">-option
1460: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f value ...</i>?</
1470: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 span> <i class="
1480: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 arg">port</i></a
1490: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 ></li>.<li><a hr
14a0: 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c 61 73 73 ef="#4"><b class
14b0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f ="cmd">tls::impo
14c0: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d rt</b> <i class=
14d0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
14e0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
14f0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1500: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f rg">-option</i>?
1510: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c </span> <span cl
1520: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c ass="opt">?<i cl
1530: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c ass="arg">value<
1540: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
1550: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1560: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
1570: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c ption value ...<
1580: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c /i>?</span></a><
1590: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 /li>.<li><a href
15a0: 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22 ="#5"><b class="
15b0: 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 72 74 74 cmd">tls::startt
15c0: 6c 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ls</b> <i class=
15d0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
15e0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
15f0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1600: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f rg">-option</i>?
1610: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c </span> <span cl
1620: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c ass="opt">?<i cl
1630: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c ass="arg">value<
1640: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
1650: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1660: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
1670: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c ption value ...<
1680: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c /i>?</span></a><
1690: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 /li>.<li><a href
16a0: 3d 22 23 36 22 3e 3c 62 20 63 6c 61 73 73 3d 22 ="#6"><b class="
16b0: 63 6d 64 22 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 cmd">tls::handsh
16c0: 61 6b 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ake</b> <i class
16d0: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f ="arg">channel</
16e0: 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e i></a></li>.<li>
16f0: 3c 61 20 68 72 65 66 3d 22 23 37 22 3e 3c 62 20 <a href="#7"><b
1700: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
1710: 3a 73 68 75 74 64 6f 77 6e 3c 2f 62 3e 20 3c 69 :shutdown</b> <i
1720: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 class="arg">cha
1730: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 nnel</i></a></li
1740: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 >.<li><a href="#
1750: 38 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 8"><b class="cmd
1760: 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c ">tls::unimport<
1770: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
1780: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f g">channel</i></
1790: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 a></li>.<li><a h
17a0: 72 65 66 3d 22 23 39 22 3e 3c 62 20 63 6c 61 73 ref="#9"><b clas
17b0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 73 s="cmd">tls::uns
17c0: 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 tack</b> <i clas
17d0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c s="arg">channel<
17e0: 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 /i></a></li>.<li
17f0: 3e 3c 61 20 68 72 65 66 3d 22 23 31 30 22 3e 3c ><a href="#10"><
1800: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
1810: 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73 s::status</b> <s
1820: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
1830: 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f ?<b class="optio
1840: 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f n">-local</b>?</
1850: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 span> <i class="
1860: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e arg">channel</i>
1870: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 </a></li>.<li><a
1880: 20 68 72 65 66 3d 22 23 31 31 22 3e 3c 62 20 63 href="#11"><b c
1890: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
18a0: 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c connection</b> <
18b0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 i class="arg">ch
18c0: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c annel</i></a></l
18d0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 i>.<li><a href="
18e0: 23 31 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 #12"><b class="c
18f0: 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 md">tls::ciphers
1900: 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 </b> <span class
1910: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 ="opt">?<i class
1920: 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c ="arg">protocol<
1930: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
1940: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1950: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 i class="arg">ve
1960: 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e rbose</i>?</span
1970: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1980: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1990: 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 rg">supported</i
19a0: 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c >?</span></a></l
19b0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 i>.<li><a href="
19c0: 23 31 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 #13"><b class="c
19d0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f md">tls::protoco
19e0: 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a ls</b></a></li>.
19f0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 34 <li><a href="#14
1a00: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 "><b class="cmd"
1a10: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 >tls::version</b
1a20: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e ></a></li>.</ul>
1a30: 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c .</div>.</div>.<
1a40: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 31 div id="section1
1a50: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c " class="doctool
1a60: 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c s_section"><h2><
1a70: 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 31 a name="section1
1a80: 22 3e 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 ">Description</a
1a90: 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 69 73 20 65 ></h2>.<p>This e
1aa0: 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65 xtension provide
1ab0: 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 63 63 s TCL script acc
1ac0: 65 73 73 20 74 6f 20 53 65 63 75 72 65 20 53 6f ess to Secure So
1ad0: 63 6b 65 74 20 4c 61 79 65 72 20 28 53 53 4c 29 cket Layer (SSL)
1ae0: 0a 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 20 .communications
1af0: 75 73 69 6e 67 20 74 68 65 20 54 72 61 6e 73 70 using the Transp
1b00: 6f 72 74 20 4c 61 79 65 72 20 53 65 63 75 72 69 ort Layer Securi
1b10: 74 79 20 28 54 4c 53 29 20 70 72 6f 74 6f 63 6f ty (TLS) protoco
1b20: 6c 2e 20 49 74 20 70 72 6f 76 69 64 65 73 20 61 l. It provides a
1b30: 0a 67 65 6e 65 72 69 63 20 62 69 6e 64 69 6e 67 .generic binding
1b40: 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 74 74 to <a href="htt
1b50: 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c ps://www.openssl
1b60: 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f .org/">OpenSSL</
1b70: 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 20 74 68 a>, utilizing th
1b80: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 e.<b class="sysc
1b90: 6d 64 22 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 md">Tcl_StackCha
1ba0: 6e 6e 65 6c 3c 2f 62 3e 20 41 50 49 20 69 6e 20 nnel</b> API in
1bb0: 54 43 4c 20 38 2e 34 20 6f 72 20 6c 61 74 65 72 TCL 8.4 or later
1bc0: 2e 20 54 68 65 73 65 20 73 6f 63 6b 65 74 73 20 . These sockets
1bd0: 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 0a 74 behave exactly.t
1be0: 68 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e 6e he same as chann
1bf0: 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 6e els created usin
1c00: 67 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 3c g the built-in <
1c10: 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d 64 22 b class="syscmd"
1c20: 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d >socket</b> comm
1c30: 61 6e 64 2c 20 62 75 74 0a 70 72 6f 76 69 64 65 and, but.provide
1c40: 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 additional opti
1c50: 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c ons for controll
1c60: 69 6e 67 20 74 68 65 20 53 53 4c 2f 54 4c 53 20 ing the SSL/TLS
1c70: 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 0a 3c 2f 64 session.</p>.</d
1c80: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 iv>.<div id="sec
1c90: 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f tion2" class="do
1ca0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
1cb0: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 <h2><a name="sec
1cc0: 74 69 6f 6e 32 22 3e 43 6f 6d 70 61 74 69 62 69 tion2">Compatibi
1cd0: 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 lity</a></h2>.<p
1ce0: 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 >This extension
1cf0: 69 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 is compatible wi
1d00: 74 68 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e 31 th OpenSSL 1.1.1
1d10: 20 6f 72 20 6c 61 74 65 72 2e 20 49 74 20 72 65 or later. It re
1d20: 71 75 69 72 65 73 20 54 63 6c 0a 76 65 72 73 69 quires Tcl.versi
1d30: 6f 6e 20 38 2e 35 20 6f 72 20 6c 61 74 65 72 20 on 8.5 or later
1d40: 61 6e 64 20 77 69 6c 6c 20 77 6f 72 6b 20 77 69 and will work wi
1d50: 74 68 20 54 63 6c 20 39 2e 30 2e 3c 2f 70 3e 0a th Tcl 9.0.</p>.
1d60: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
1d70: 73 65 63 74 69 6f 6e 33 22 20 63 6c 61 73 73 3d section3" class=
1d80: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
1d90: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h2><a name="
1da0: 73 65 63 74 69 6f 6e 33 22 3e 43 6f 6d 6d 61 6e section3">Comman
1db0: 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 ds</a></h2>.<p>T
1dc0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 he following are
1dd0: 20 74 68 65 20 63 6f 6d 6d 61 6e 64 73 20 70 72 the commands pr
1de0: 6f 76 69 64 65 64 20 62 79 20 74 68 65 20 54 63 ovided by the Tc
1df0: 4c 54 4c 53 20 70 61 63 6b 61 67 65 2e 20 53 65 LTLS package. Se
1e00: 65 0a 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 e.<span class="s
1e10: 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d ectref"><a href=
1e20: 22 23 73 65 63 74 69 6f 6e 37 22 3e 45 78 61 6d "#section7">Exam
1e30: 70 6c 65 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 ples</a></span>
1e40: 66 6f 72 20 65 78 61 6d 70 6c 65 20 75 73 61 67 for example usag
1e50: 65 20 61 6e 64 20 74 68 65 20 26 71 75 6f 74 3b e and the "
1e60: 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e <b class="file">
1e70: 64 65 6d 6f 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 demos</b>"
1e80: 64 69 72 65 63 74 6f 72 79 20 66 6f 72 0a 6d 6f directory for.mo
1e90: 72 65 20 65 78 61 6d 70 6c 65 20 75 73 61 67 65 re example usage
1ea0: 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d .</p>.<dl class=
1eb0: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 "doctools_defini
1ec0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 61 20 6e tions">.<dt><a n
1ed0: 61 6d 65 3d 22 31 22 3e 3c 62 20 63 6c 61 73 73 ame="1"><b class
1ee0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 ="cmd">tls::init
1ef0: 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 </b> <span class
1f00: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 ="opt">?<i class
1f10: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f ="arg">-option</
1f20: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e i>?</span> <span
1f30: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 class="opt">?<i
1f40: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c class="arg">val
1f50: 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c ue</i>?</span> <
1f60: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
1f70: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
1f80: 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e >-option value .
1f90: 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f ..</i>?</span></
1fa0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4f a></dt>.<dd><p>O
1fb0: 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e ptional function
1fc0: 20 74 6f 20 73 65 74 20 74 68 65 20 64 65 66 61 to set the defa
1fd0: 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 ult options used
1fe0: 20 62 79 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d by <b class="cm
1ff0: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
2000: 62 3e 2e 20 49 66 20 79 6f 75 0a 63 61 6c 6c 20 b>. If you.call
2010: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
2020: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 64 ls::import</b> d
2030: 69 72 65 63 74 6c 79 2c 20 74 68 65 20 76 61 6c irectly, the val
2040: 75 65 73 20 73 65 74 20 62 79 20 74 68 69 73 20 ues set by this
2050: 63 6f 6d 6d 61 6e 64 20 68 61 76 65 20 6e 6f 20 command have no
2060: 65 66 66 65 63 74 2e 0a 54 68 69 73 20 63 6f 6d effect..This com
2070: 6d 61 6e 64 20 73 75 70 70 6f 72 74 73 20 61 6c mand supports al
2080: 6c 20 6f 66 20 74 68 65 20 73 61 6d 65 20 6f 70 l of the same op
2090: 74 69 6f 6e 73 20 61 73 20 74 68 65 20 3c 62 20 tions as the <b
20a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
20b0: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d :socket</b> comm
20c0: 61 6e 64 2c 0a 74 68 6f 75 67 68 20 79 6f 75 20 and,.though you
20d0: 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 should limit you
20e0: 72 20 6f 70 74 69 6f 6e 73 20 74 6f 20 6f 6e 6c r options to onl
20f0: 79 20 74 68 65 20 54 4c 53 20 72 65 6c 61 74 65 y the TLS relate
2100: 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e d ones.</p></dd>
2110: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 32 22 .<dt><a name="2"
2120: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e ><b class="cmd">
2130: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 tls::socket</b>
2140: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
2150: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
2160: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f ">-option</i>?</
2170: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
2180: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
2190: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 s="arg">value</i
21a0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
21b0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
21c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 class="arg">-opt
21d0: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 ion value ...</i
21e0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 >?</span> <i cla
21f0: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69 ss="arg">host</i
2200: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
2210: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 >port</i></a></d
2220: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 69 t>.<dd><p>This i
2230: 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74 s a helper funct
2240: 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65 ion that utilize
2250: 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 s the underlying
2260: 20 63 6f 6d 6d 61 6e 64 73 20 3c 62 20 63 6c 61 commands <b cla
2270: 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b ss="syscmd">sock
2280: 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c 62 20 63 6c et</b>.and <b cl
2290: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 ass="cmd">tls::i
22a0: 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f 20 63 72 65 mport</b> to cre
22b0: 61 74 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 ate the connecti
22c0: 6f 6e 2e 20 49 74 20 62 65 68 61 76 65 73 20 74 on. It behaves t
22d0: 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a 6e he same as the.n
22e0: 61 74 69 76 65 20 54 43 4c 20 3c 62 20 63 6c 61 ative TCL <b cla
22f0: 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b ss="syscmd">sock
2300: 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c 20 et</b> command,
2310: 62 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 but also support
2320: 73 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 s the <b class="
2330: 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 cmd">tls::import
2340: 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64 20 6f 70 74 </b>.command opt
2350: 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64 ions with one ad
2360: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 2e ditional option.
2370: 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 It returns the
2380: 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69 channel handle i
2390: 64 0a 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f d.for the new so
23a0: 63 6b 65 74 2e 20 41 64 64 69 74 69 6f 6e 61 6c cket. Additional
23b0: 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 3c 2f 70 options are:</p
23c0: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 >.<dl class="doc
23d0: 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a tools_options">.
23e0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
23f0: 74 69 6f 6e 22 3e 2d 61 75 74 6f 73 65 72 76 65 tion">-autoserve
2400: 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 rname</b> <i cla
2410: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 ss="arg">bool</i
2420: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 66 ></dt>.<dd><p>If
2430: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
2440: 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 61 75 74 6f ">true</b>, auto
2450: 6d 61 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 matically set th
2460: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e <b class="opti
2470: 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c on">-servername<
2480: 2f 62 3e 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 /b> argument to
2490: 74 68 65 0a 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d the.<em>host</em
24a0: 3e 20 61 72 67 75 6d 65 6e 74 2e 20 50 72 69 6f > argument. Prio
24b0: 72 20 74 6f 20 54 63 6c 54 4c 53 20 32 2e 30 2c r to TclTLS 2.0,
24c0: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 the default is
24d0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
24e0: 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 53 74 61 72 >false</b>..Star
24f0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
2500: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 .0, the default
2510: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
2520: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 75 6e 6c st">true</b> unl
2530: 65 73 73 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 ess <b class="op
2540: 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d tion">-servernam
2550: 65 3c 2f 62 3e 0a 69 73 20 61 6c 73 6f 20 73 70 e</b>.is also sp
2560: 65 63 69 66 69 65 64 2e 3c 2f 70 3e 3c 2f 64 64 ecified.</p></dd
2570: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 >.</dl></dd>.<dt
2580: 3e 3c 61 20 6e 61 6d 65 3d 22 33 22 3e 3c 62 20 ><a name="3"><b
2590: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
25a0: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 62 20 63 :socket</b> <b c
25b0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 lass="option">-s
25c0: 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 erver</b> <i cla
25d0: 73 73 3d 22 61 72 67 22 3e 63 6f 6d 6d 61 6e 64 ss="arg">command
25e0: 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 </i> <span class
25f0: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 ="opt">?<i class
2600: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f ="arg">-option</
2610: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e i>?</span> <span
2620: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 class="opt">?<i
2630: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c class="arg">val
2640: 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c ue</i>?</span> <
2650: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
2660: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
2670: 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e >-option value .
2680: 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c ..</i>?</span> <
2690: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 6f i class="arg">po
26a0: 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a rt</i></a></dt>.
26b0: 3c 64 64 3e 3c 70 3e 53 61 6d 65 20 61 73 20 70 <dd><p>Same as p
26c0: 72 65 76 69 6f 75 73 20 63 6f 6d 6d 61 6e 64 2c revious command,
26d0: 20 62 75 74 20 69 6e 73 74 65 61 64 20 63 72 65 but instead cre
26e0: 61 74 65 73 20 61 20 73 65 72 76 65 72 20 73 6f ates a server so
26f0: 63 6b 65 74 20 66 6f 72 20 63 6c 69 65 6e 74 73 cket for clients
2700: 20 74 6f 0a 63 6f 6e 6e 65 63 74 20 74 6f 20 6a to.connect to j
2710: 75 73 74 20 6c 69 6b 65 20 74 68 65 20 54 63 6c ust like the Tcl
2720: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d <b class="syscm
2730: 64 22 3e 73 6f 63 6b 65 74 20 2d 73 65 72 76 65 d">socket -serve
2740: 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 20 49 r</b> command. I
2750: 74 20 72 65 74 75 72 6e 73 20 74 68 65 0a 63 68 t returns the.ch
2760: 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69 64 20 annel handle id
2770: 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b for the new sock
2780: 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 et.</p></dd>.<dt
2790: 3e 3c 61 20 6e 61 6d 65 3d 22 34 22 3e 3c 62 20 ><a name="4"><b
27a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
27b0: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 :import</b> <i c
27c0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
27d0: 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 el</i> <span cla
27e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
27f0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
2800: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 </i>?</span> <sp
2810: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
2820: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 <i class="arg">v
2830: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e alue</i>?</span>
2840: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
2850: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
2860: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 g">-option value
2870: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e ...</i>?</span>
2880: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 2f </a></dt>.<dd></
2890: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d dd>.<dt><a name=
28a0: 22 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d "5"><b class="cm
28b0: 64 22 3e 74 6c 73 3a 3a 73 74 61 72 74 74 6c 73 d">tls::starttls
28c0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
28d0: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 rg">channel</i>
28e0: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
28f0: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
2900: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f ">-option</i>?</
2910: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
2920: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
2930: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 s="arg">value</i
2940: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
2950: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
2960: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 class="arg">-opt
2970: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 ion value ...</i
2980: 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 >?</span></a></d
2990: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74 61 72 74 20 t>.<dd><p>Start
29a0: 54 4c 53 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f TLS encryption o
29b0: 6e 20 54 43 4c 20 63 68 61 6e 6e 65 6c 20 3c 69 n TCL channel <i
29c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 class="arg">cha
29d0: 6e 6e 65 6c 3c 2f 69 3e 20 76 69 61 20 61 20 73 nnel</i> via a s
29e0: 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 2e 20 tacked channel.
29f0: 49 74 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 It.need not be a
2a00: 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 socket, but mus
2a10: 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 t provide bi-dir
2a20: 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 ectional flow. A
2a30: 6c 73 6f 20 73 65 74 73 20 73 65 73 73 69 6f 6e lso sets session
2a40: 0a 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 .parameters for
2a50: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 56 SSL handshake. V
2a60: 61 6c 69 64 20 6f 70 74 69 6f 6e 73 20 61 72 65 alid options are
2a70: 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d :</p>.<dl class=
2a80: 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e "doctools_option
2a90: 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 s">.<dt><b class
2aa0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c ="option">-alpn<
2ab0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
2ac0: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e g">list</i></dt>
2ad0: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 .<dd><p>List of
2ae0: 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 protocols to off
2af0: 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 er during Applic
2b00: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 ation-Layer Prot
2b10: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e ocol Negotiation
2b20: 0a 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 .(ALPN). For exa
2b30: 6d 70 6c 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 mple: <b class="
2b40: 63 6f 6e 73 74 22 3e 68 32 3c 2f 62 3e 20 61 6e const">h2</b> an
2b50: 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 d <b class="cons
2b60: 74 22 3e 68 74 74 70 2f 31 2e 31 3c 2f 62 3e 2c t">http/1.1</b>,
2b70: 20 62 75 74 20 6e 6f 74 20 3c 62 20 63 6c 61 73 but not <b clas
2b80: 73 3d 22 63 6f 6e 73 74 22 3e 68 33 3c 2f 62 3e s="const">h3</b>
2b90: 20 6f 72 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f or.<b class="co
2ba0: 6e 73 74 22 3e 71 75 69 63 3c 2f 62 3e 2e 20 54 nst">quic</b>. T
2bb0: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 his option is ne
2bc0: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
2bd0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
2be0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
2bf0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 >-cadir</b> <i c
2c00: 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63 lass="arg">direc
2c10: 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 tory</i></dt>.<d
2c20: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 d><p>Specifies t
2c30: 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 he directory whe
2c40: 72 65 20 74 68 65 20 43 65 72 74 69 66 69 63 61 re the Certifica
2c50: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 te Authority (CA
2c60: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61 ) certificates a
2c70: 72 65 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 re.stored. The d
2c80: 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f efault is platfo
2c90: 72 6d 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 rm specific and
2ca0: 63 61 6e 20 62 65 20 73 65 74 20 61 74 20 63 6f can be set at co
2cb0: 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54 68 65 0a mpile time. The.
2cc0: 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e default location
2cd0: 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 can be overridd
2ce0: 65 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 en by the <b cla
2cf0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 ss="variable">SS
2d00: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 L_CERT_DIR</b> e
2d10: 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 nvironment.varia
2d20: 62 6c 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 ble. See <span c
2d30: 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c lass="sectref"><
2d40: 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e a href="#section
2d50: 34 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 4">Certificate V
2d60: 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 alidation</a></s
2d70: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 pan> for more de
2d80: 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a tails.</p></dd>.
2d90: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
2da0: 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 tion">-cafile</b
2db0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
2dc0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 >filename</i></d
2dd0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 t>.<dd><p>Specif
2de0: 69 65 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 ies the file wit
2df0: 68 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 h the Certificat
2e00: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 e Authority (CA)
2e10: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f certificates to
2e20: 20 75 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73 use in.<b class
2e30: 3d 22 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e ="const">PEM</b>
2e40: 20 66 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68 file format. Th
2e50: 65 20 64 65 66 61 75 6c 74 20 69 73 20 26 71 75 e default is &qu
2e60: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c ot;<b class="fil
2e70: 65 22 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 e">cert.pem</b>&
2e80: 71 75 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70 quot;, in the Op
2e90: 65 6e 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 2e enSSL.directory.
2ea0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c The default fil
2eb0: 65 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 e can be overrid
2ec0: 64 65 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c den by the <b cl
2ed0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 ass="variable">S
2ee0: 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e SL_CERT_FILE</b>
2ef0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 environment.var
2f00: 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70 61 6e iable. See <span
2f10: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 class="sectref"
2f20: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 ><a href="#secti
2f30: 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 74 65 on4">Certificate
2f40: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c Validation</a><
2f50: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
2f60: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 details.</p></dd
2f70: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
2f80: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 option">-castore
2f90: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
2fa0: 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e rg">URI</i></dt>
2fb0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 .<dd><p>Specifie
2fc0: 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 s the Uniform Re
2fd0: 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 65 source Identifie
2fe0: 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 20 r (URI) for the
2ff0: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
3000: 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65 ority.(CA) store
3010: 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 , which may be a
3020: 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 single containe
3030: 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f r or a catalog o
3040: 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 f containers..St
3050: 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e arting with Open
3060: 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 SSL 3.2 on MS Wi
3070: 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 71 ndows, set to &q
3080: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f uot;<b class="co
3090: 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c nst">org.openssl
30a0: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e .winstore://</b>
30b0: 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68 ".to use th
30c0: 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 e built-in MS Wi
30d0: 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 ndows Certificat
30e0: 65 20 53 74 6f 72 65 2e 0a 53 65 65 20 3c 73 70 e Store..See <sp
30f0: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 an class="sectre
3100: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 f"><a href="#sec
3110: 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 69 63 61 tion4">Certifica
3120: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 te Validation</a
3130: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 ></span> for mor
3140: 65 20 64 65 74 61 69 6c 73 2e 0a 54 68 69 73 20 e details..This
3150: 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f option is new fo
3160: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 r TclTLS 1.8.</p
3170: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
3180: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 ass="option">-ce
3190: 72 74 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c rtfile</b> <i cl
31a0: 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 ass="arg">filena
31b0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e me</i></dt>.<dd>
31c0: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 <p>Specifies the
31d0: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c name of the fil
31e0: 65 20 77 69 74 68 20 74 68 65 20 63 65 72 74 69 e with the certi
31f0: 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 69 6e ficate to use in
3200: 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61 73 20 74 PEM format.as t
3210: 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74 he local (client
3220: 20 6f 72 20 73 65 72 76 65 72 29 20 63 65 72 74 or server) cert
3230: 69 66 69 63 61 74 65 2e 20 49 74 20 61 6c 73 6f ificate. It also
3240: 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 75 contains the pu
3250: 62 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 blic key.</p></d
3260: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
3270: 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f "option">-cert</
3280: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
3290: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 ">string</i></dt
32a0: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 >.<dd><p>Specifi
32b0: 65 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61 es the certifica
32c0: 74 65 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 te to use as a D
32d0: 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e ER encoded strin
32e0: 67 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f g (X.509 DER).</
32f0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
3300: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
3310: 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 ipher</b> <i cla
3320: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c ss="arg">string<
3330: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
3340: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 Specifies the li
3350: 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f st of ciphers to
3360: 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e 32 use for TLS 1.2
3370: 20 61 6e 64 20 65 61 72 6c 69 65 72 20 63 6f 6e and earlier con
3380: 6e 65 63 74 69 6f 6e 73 2e 0a 53 74 72 69 6e 67 nections..String
3390: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 26 71 75 6f is a colon &quo
33a0: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 t;<b class="cons
33b0: 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 73 t">:</b>" s
33c0: 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66 eparated list of
33d0: 20 63 69 70 68 65 72 73 2e 0a 43 69 70 68 65 72 ciphers..Cipher
33e0: 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 s can be combine
33f0: 64 20 75 73 69 6e 67 20 74 68 65 20 26 71 75 6f d using the &quo
3400: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 t;<b class="cons
3410: 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 63 t">+</b>" c
3420: 68 61 72 61 63 74 65 72 2e 0a 50 72 65 66 69 78 haracter..Prefix
3430: 65 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 es can be used t
3440: 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 o permanently re
3450: 6d 6f 76 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c move "<b cl
3460: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f 62 ass="const">!</b
3470: 3e 26 71 75 6f 74 3b 2c 20 64 65 6c 65 74 65 20 >", delete
3480: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 "<b class="
3490: 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f const">-</b>&quo
34a0: 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 t;, or.move to t
34b0: 68 65 20 65 6e 64 20 26 71 75 6f 74 3b 3c 62 20 he end "<b
34c0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c class="const">+<
34d0: 2f 62 3e 26 71 75 6f 74 3b 20 61 20 73 70 65 63 /b>" a spec
34e0: 69 66 69 65 64 20 63 69 70 68 65 72 2e 0a 4b 65 ified cipher..Ke
34f0: 79 77 6f 72 64 73 20 3c 62 20 63 6c 61 73 73 3d ywords <b class=
3500: 22 63 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47 54 "const">@STRENGT
3510: 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 H</b> (sort by a
3520: 6c 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e lgorithm key len
3530: 67 74 68 29 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 gth),.<b class="
3540: 63 6f 6e 73 74 22 3e 40 53 45 43 4c 45 56 45 4c const">@SECLEVEL
3550: 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20 =</b><em>n</em>
3560: 28 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 (set security le
3570: 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 3c vel to n), and.<
3580: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
3590: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 DEFAULT</b> (use
35a0: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 default cipher
35b0: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f list, at start o
35c0: 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 65 nly) can also be
35d0: 20 73 70 65 63 69 66 69 65 64 2e 0a 53 65 65 20 specified..See
35e0: 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74 the <a href="htt
35f0: 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 ps://docs.openss
3600: 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e l.org/master/man
3610: 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 1/openssl-cipher
3620: 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e s/#options">Open
3630: 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 SSL</a>.document
3640: 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 ation for the fu
3650: 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 ll list of valid
3660: 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 values.</p></dd
3670: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
3680: 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72 73 option">-ciphers
3690: 75 69 74 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 uites</b> <i cla
36a0: 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c ss="arg">string<
36b0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
36c0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 Specifies the li
36d0: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 st of cipher sui
36e0: 74 65 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 tes to use for T
36f0: 4c 53 20 31 2e 33 20 61 73 20 61 20 63 6f 6c 6f LS 1.3 as a colo
3700: 6e 0a 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 n."<b class
3710: 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 ="const">:</b>&q
3720: 75 6f 74 3b 20 73 65 70 61 72 61 74 65 64 20 6c uot; separated l
3730: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 ist of cipher su
3740: 69 74 65 20 6e 61 6d 65 73 2e 20 53 65 65 20 74 ite names. See t
3750: 68 65 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70 he.<a href="http
3760: 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c s://docs.openssl
3770: 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 .org/master/man1
3780: 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 /openssl-ciphers
3790: 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 /#options">OpenS
37a0: 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 SL</a>.documenta
37b0: 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c tion for the ful
37c0: 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 l list of valid
37d0: 76 61 6c 75 65 73 2e 0a 54 68 69 73 20 6f 70 74 values..This opt
37e0: 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ion is new for T
37f0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
3800: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
3810: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 ="option">-comma
3820: 6e 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d nd</b> <i class=
3830: 22 61 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f "arg">callback</
3840: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 i></dt>.<dd><p>S
3850: 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c pecifies the cal
3860: 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f lback command to
3870: 20 62 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 be invoked at s
3880: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 everal points du
3890: 72 69 6e 67 20 74 68 65 0a 68 61 6e 64 73 68 61 ring the.handsha
38a0: 6b 65 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 ke to pass error
38b0: 73 2c 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 s, tracing infor
38c0: 6d 61 74 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 mation, and prot
38d0: 6f 63 6f 6c 20 6d 65 73 73 61 67 65 73 2e 0a 53 ocol messages..S
38e0: 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 ee <span class="
38f0: 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 sectref"><a href
3900: 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c ="#section5">Cal
3910: 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 lback Options</a
3920: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 ></span> for mor
3930: 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e e info.</p></dd>
3940: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
3950: 70 74 69 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 ption">-dhparams
3960: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
3970: 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e rg">filename</i>
3980: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 </dt>.<dd><p>Spe
3990: 63 69 66 69 65 73 20 74 68 65 20 44 69 66 66 69 cifies the Diffi
39a0: 65 2d 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 e-Hellman (DH) p
39b0: 61 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c arameters file.<
39c0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
39d0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
39e0: 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 keyfile</b> <i c
39f0: 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e lass="arg">filen
3a00: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ame</i></dt>.<dd
3a10: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 ><p>Specifies th
3a20: 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 e private key fi
3a30: 6c 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 le. The default
3a40: 69 73 20 74 6f 20 75 73 65 20 74 68 65 20 66 69 is to use the fi
3a50: 6c 65 0a 73 70 65 63 69 66 69 65 64 20 62 79 20 le.specified by
3a60: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 the <b class="op
3a70: 74 69 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65 3c tion">-certfile<
3a80: 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c /b> option.</p><
3a90: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
3aa0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c s="option">-key<
3ab0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
3ac0: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
3ad0: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 t>.<dd><p>Specif
3ae0: 69 65 73 20 74 68 65 20 70 72 69 76 61 74 65 20 ies the private
3af0: 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 key to use as a
3b00: 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 DER encoded stri
3b10: 6e 67 20 28 50 4b 43 53 23 31 20 44 45 52 29 2e ng (PKCS#1 DER).
3b20: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
3b30: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
3b40: 2d 6d 6f 64 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c -model</b> <i cl
3b50: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
3b60: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c l</i></dt>.<dd><
3b70: 70 3e 46 6f 72 63 65 20 74 68 69 73 20 63 68 61 p>Force this cha
3b80: 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74 68 nnel to share th
3b90: 65 20 73 61 6d 65 20 3c 69 20 63 6c 61 73 73 3d e same <i class=
3ba0: 22 74 65 72 6d 22 3e 53 53 4c 5f 43 54 58 3c 2f "term">SSL_CTX</
3bb0: 69 3e 20 73 74 72 75 63 74 75 72 65 20 61 73 20 i> structure as
3bc0: 74 68 65 0a 73 70 65 63 69 66 69 65 64 20 3c 69 the.specified <i
3bd0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 class="arg">cha
3be0: 6e 6e 65 6c 3c 2f 69 3e 2c 20 61 6e 64 20 74 68 nnel</i>, and th
3bf0: 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 6f erefore share co
3c00: 6e 66 69 67 2c 20 63 61 6c 6c 62 61 63 6b 73 2c nfig, callbacks,
3c10: 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c etc.</p></dd>.<
3c20: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
3c30: 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f ion">-password</
3c40: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
3c50: 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f ">callback</i></
3c60: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 dt>.<dd><p>Speci
3c70: 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 fies the callbac
3c80: 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 k command to inv
3c90: 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c oke when OpenSSL
3ca0: 20 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 69 6e needs to obtain
3cb0: 20 61 0a 70 61 73 73 77 6f 72 64 2e 20 54 68 69 a.password. Thi
3cc0: 73 20 69 73 20 74 79 70 69 63 61 6c 6c 79 20 75 s is typically u
3cd0: 73 65 64 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 sed to unlock th
3ce0: 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 6f 66 e private key of
3cf0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a a certificate..
3d00: 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f The callback sho
3d10: 75 6c 64 20 72 65 74 75 72 6e 20 61 20 70 61 73 uld return a pas
3d20: 73 77 6f 72 64 20 73 74 72 69 6e 67 2e 20 54 68 sword string. Th
3d30: 69 73 20 6f 70 74 69 6f 6e 20 68 61 73 20 63 68 is option has ch
3d40: 61 6e 67 65 64 20 66 6f 72 0a 54 63 6c 54 4c 53 anged for.TclTLS
3d50: 20 31 2e 38 2e 20 53 65 65 20 3c 73 70 61 6e 20 1.8. See <span
3d60: 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e class="sectref">
3d70: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f <a href="#sectio
3d80: 6e 35 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 n5">Callback Opt
3d90: 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 ions</a></span>
3da0: 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f for more info.</
3db0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
3dc0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 lass="option">-p
3dd0: 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 62 ost_handshake</b
3de0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
3df0: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
3e00: 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20 70 6f 73 74 dd><p>Allow post
3e10: 2d 68 61 6e 64 73 68 61 6b 65 20 73 65 73 73 69 -handshake sessi
3e20: 6f 6e 20 74 69 63 6b 65 74 20 75 70 64 61 74 65 on ticket update
3e30: 73 2e 20 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 s. This option i
3e40: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
3e50: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
3e60: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
3e70: 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 ion">-request</b
3e80: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
3e90: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
3ea0: 64 64 3e 3c 70 3e 52 65 71 75 65 73 74 20 61 20 dd><p>Request a
3eb0: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d certificate from
3ec0: 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 the peer during
3ed0: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 the SSL handsha
3ee0: 6b 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 ke. This is need
3ef0: 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69 ed.to do Certifi
3f00: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e cate Validation.
3f10: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
3f20: 54 4c 53 20 31 2e 38 2c 20 74 68 65 20 64 65 66 TLS 1.8, the def
3f30: 61 75 6c 74 20 69 73 0a 3c 62 20 63 6c 61 73 73 ault is.<b class
3f40: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 ="const">true</b
3f50: 3e 20 66 6f 72 20 63 6c 69 65 6e 74 20 63 6f 6e > for client con
3f60: 6e 65 63 74 69 6f 6e 73 2e 20 53 74 61 72 74 69 nections. Starti
3f70: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 ng in TclTLS 2.0
3f80: 2c 20 69 66 20 73 65 74 20 74 6f 0a 3c 62 20 63 , if set to.<b c
3f90: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c lass="const">fal
3fa0: 73 65 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c se</b> and <b cl
3fb0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 ass="option">-re
3fc0: 71 75 69 72 65 3c 2f 62 3e 20 69 73 20 3c 62 20 quire</b> is <b
3fd0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 class="const">tr
3fe0: 75 65 3c 2f 62 3e 2c 20 74 68 65 6e 20 74 68 69 ue</b>, then thi
3ff0: 73 20 77 69 6c 6c 20 62 65 0a 6f 76 65 72 72 69 s will be.overri
4000: 64 64 65 6e 20 74 6f 20 3c 62 20 63 6c 61 73 73 dden to <b class
4010: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 ="const">true</b
4020: 3e 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 >..See <span cla
4030: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 ss="sectref"><a
4040: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 href="#section4"
4050: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c >Certificate Val
4060: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 idation</a></spa
4070: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 n> for more deta
4080: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ils.</p></dd>.<d
4090: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
40a0: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e on">-require</b>
40b0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
40c0: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 bool</i></dt>.<d
40d0: 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 76 d><p>Require a v
40e0: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 alid certificate
40f0: 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 from the peer d
4100: 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 uring the SSL ha
4110: 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73 ndshake. If this
4120: 20 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c is.set to true,
4130: 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 then <b class="
4140: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 option">-request
4150: 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62 </b> must also b
4160: 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e e set to true an
4170: 64 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 6c d a either.<b cl
4180: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
4190: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 dir</b>, <b clas
41a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 s="option">-cafi
41b0: 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 le</b>, <b class
41c0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f ="option">-casto
41d0: 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61 re</b>, or a pla
41e0: 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 tform default.mu
41f0: 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 st be provided i
4200: 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 n order to valid
4210: 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65 ate against. The
4220: 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 default in TclT
4230: 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69 LS 1.8 and.earli
4240: 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 3c er versions is <
4250: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
4260: 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 false</b> since
4270: 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d not all platform
4280: 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61 s have certifica
4290: 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 tes to.validate
42a0: 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 against in a for
42b0: 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 m compatible wit
42c0: 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72 74 h OpenSSL. Start
42d0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e ing in TclTLS 2.
42e0: 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69 0,.the default i
42f0: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 s <b class="cons
4300: 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 t">true</b> for
4310: 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f client connectio
4320: 6e 73 2e 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c ns..See <span cl
4330: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 ass="sectref"><a
4340: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 href="#section4
4350: 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 ">Certificate Va
4360: 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 lidation</a></sp
4370: 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 an> for more det
4380: 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c ails.</p></dd>.<
4390: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
43a0: 69 6f 6e 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c ion">-security_l
43b0: 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 evel</b> <i clas
43c0: 73 3d 22 61 72 67 22 3e 69 6e 74 65 67 65 72 3c s="arg">integer<
43d0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
43e0: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 73 65 Specifies the se
43f0: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 28 76 61 curity level (va
4400: 6c 75 65 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 lue from 0 to 5)
4410: 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 20 6c . The security l
4420: 65 76 65 6c 20 61 66 66 65 63 74 73 0a 74 68 65 evel affects.the
4430: 20 61 6c 6c 6f 77 65 64 20 63 69 70 68 65 72 20 allowed cipher
4440: 73 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e suite encryption
4450: 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 algorithms, sup
4460: 70 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 ported ECC curve
4470: 73 2c 0a 73 75 70 70 6f 72 74 65 64 20 73 69 67 s,.supported sig
4480: 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d nature algorithm
4490: 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 s, DH parameter
44a0: 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 sizes, certifica
44b0: 74 65 20 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 te key sizes.and
44c0: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
44d0: 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 61 75 ithms. The defau
44e0: 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 74 6f lt is 1 prior to
44f0: 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 61 6e 64 OpenSSL 3.2 and
4500: 20 32 0a 74 68 65 72 65 61 66 74 65 72 2e 20 4c 2.thereafter. L
4510: 65 76 65 6c 20 33 20 61 6e 64 20 68 69 67 68 65 evel 3 and highe
4520: 72 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 r disable suppor
4530: 74 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 t for session ti
4540: 63 6b 65 74 73 20 61 6e 64 0a 6f 6e 6c 79 20 61 ckets and.only a
4550: 63 63 65 70 74 20 63 69 70 68 65 72 20 73 75 69 ccept cipher sui
4560: 74 65 73 20 74 68 61 74 20 70 72 6f 76 69 64 65 tes that provide
4570: 20 66 6f 72 77 61 72 64 20 73 65 63 72 65 63 79 forward secrecy
4580: 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 ..This option is
4590: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
45a0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
45b0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
45c0: 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 on">-server</b>
45d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 <i class="arg">b
45e0: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ool</i></dt>.<dd
45f0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 77 68 ><p>Specifies wh
4600: 65 74 68 65 72 20 74 6f 20 61 63 74 20 61 73 20 ether to act as
4610: 61 20 73 65 72 76 65 72 20 61 6e 64 20 72 65 73 a server and res
4620: 70 6f 6e 64 20 77 69 74 68 20 61 20 73 65 72 76 pond with a serv
4630: 65 72 20 68 61 6e 64 73 68 61 6b 65 20 77 68 65 er handshake whe
4640: 6e 20 61 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 n a.client conne
4650: 63 74 73 20 61 6e 64 20 70 72 6f 76 69 64 65 73 cts and provides
4660: 20 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 a client handsh
4670: 61 6b 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 ake. The default
4680: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
4690: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c nst">false</b>.<
46a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
46b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
46c0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c servername</b> <
46d0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f i class="arg">ho
46e0: 73 74 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a stname</i></dt>.
46f0: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 79 20 74 <dd><p>Specify t
4700: 68 65 20 70 65 65 72 27 73 20 68 6f 73 74 6e 61 he peer's hostna
4710: 6d 65 2e 20 54 68 69 73 20 69 73 20 75 73 65 64 me. This is used
4720: 20 74 6f 20 73 65 74 20 74 68 65 20 54 4c 53 20 to set the TLS
4730: 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 Server Name Indi
4740: 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 cation.(SNI) ext
4750: 65 6e 73 69 6f 6e 2e 20 53 65 74 20 74 68 69 73 ension. Set this
4760: 20 74 6f 20 74 68 65 20 65 78 70 65 63 74 65 64 to the expected
4770: 20 73 65 72 76 65 72 6e 61 6d 65 20 69 6e 20 74 servername in t
4780: 68 65 20 73 65 72 76 65 72 27 73 20 63 65 72 74 he server's cert
4790: 69 66 69 63 61 74 65 0a 6f 72 20 6f 6e 65 20 6f ificate.or one o
47a0: 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c f the Subject Al
47b0: 74 65 72 6e 61 74 65 20 4e 61 6d 65 73 20 28 53 ternate Names (S
47c0: 41 4e 29 2e 20 53 74 61 72 74 69 6e 67 20 69 6e AN). Starting in
47d0: 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 TclTLS 2.0, thi
47e0: 73 20 77 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 s will.default t
47f0: 6f 20 74 68 65 20 68 6f 73 74 20 66 72 6f 6d 20 o the host from
4800: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d the <b class="cm
4810: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
4820: 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c b> command.</p><
4830: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
4840: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 73 73 s="option">-sess
4850: 69 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c ion_id</b> <i cl
4860: 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 ass="arg">binary
4870: 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e _string</i></dt>
4880: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 .<dd><p>Specifie
4890: 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 69 64 s the session id
48a0: 20 74 6f 20 72 65 73 75 6d 65 20 61 20 73 65 73 to resume a ses
48b0: 73 69 6f 6e 2e 20 4e 6f 74 20 73 75 70 70 6f 72 sion. Not suppor
48c0: 74 65 64 20 79 65 74 2e 0a 54 68 69 73 20 6f 70 ted yet..This op
48d0: 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 tion is new for
48e0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
48f0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
4900: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c 32 s="option">-ssl2
4910: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
4920: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 rg">bool</i></dt
4930: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 >.<dd><p>Enable
4940: 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 54 68 use of SSL v2.Th
4950: 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 e default is <b
4960: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 class="const">fa
4970: 6c 73 65 3c 2f 62 3e 2e 0a 4f 70 65 6e 53 53 4c lse</b>..OpenSSL
4980: 20 31 2e 31 2b 20 6e 6f 20 6c 6f 6e 67 65 72 20 1.1+ no longer
4990: 73 75 70 70 6f 72 74 73 20 53 53 4c 20 76 32 2c supports SSL v2,
49a0: 20 73 6f 20 74 68 69 73 20 6d 61 79 20 6e 6f 74 so this may not
49b0: 20 68 61 76 65 20 61 6e 79 20 65 66 66 65 63 74 have any effect
49c0: 2e 0a 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61 ..See the <b cla
49d0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 ss="cmd">tls::pr
49e0: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d otocols</b> comm
49f0: 61 6e 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65 and for supporte
4a00: 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e d protocols.</p>
4a10: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
4a20: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c ss="option">-ssl
4a30: 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 3</b> <i class="
4a40: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 arg">bool</i></d
4a50: 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 t>.<dd><p>Enable
4a60: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 use of SSL v3.
4a70: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c The default is <
4a80: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
4a90: 66 61 6c 73 65 3c 2f 62 3e 2e 20 53 74 61 72 74 false</b>. Start
4aa0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e ing in TclTLS 1.
4ab0: 38 2c 0a 75 73 65 20 6f 66 20 53 53 4c 20 76 33 8,.use of SSL v3
4ac0: 20 69 66 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 if only availab
4ad0: 6c 65 20 76 69 61 20 61 20 63 6f 6d 70 69 6c 65 le via a compile
4ae0: 20 74 69 6d 65 20 6f 70 74 69 6f 6e 2e 0a 53 65 time option..Se
4af0: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 e the <b class="
4b00: 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 cmd">tls::protoc
4b10: 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 ols</b> command
4b20: 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 for supported pr
4b30: 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 otocols.</p></dd
4b40: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
4b50: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 3c 2f 62 option">-tls1</b
4b60: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
4b70: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
4b80: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 dd><p>Enable use
4b90: 20 6f 66 20 54 4c 53 20 76 31 2e 20 53 74 61 72 of TLS v1. Star
4ba0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
4bb0: 2e 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 .0, the default
4bc0: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
4bd0: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e st">false</b>..N
4be0: 6f 74 65 3a 20 54 4c 53 20 31 2e 30 20 6e 65 65 ote: TLS 1.0 nee
4bf0: 64 73 20 53 48 41 31 20 74 6f 20 6f 70 65 72 61 ds SHA1 to opera
4c00: 74 65 2c 20 77 68 69 63 68 20 69 73 20 6f 6e 6c te, which is onl
4c10: 79 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 y available in s
4c20: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 ecurity level.0
4c30: 66 6f 72 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30 for Open SSL 3.0
4c40: 2b 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c +. See the <b cl
4c50: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 ass="option">-se
4c60: 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 62 3e curity_level</b>
4c70: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 option.</p></dd
4c80: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
4c90: 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 31 3c option">-tls1.1<
4ca0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
4cb0: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e g">bool</i></dt>
4cc0: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 .<dd><p>Enable u
4cd0: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 31 2e 20 se of TLS v1.1.
4ce0: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 Starting in TclT
4cf0: 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 61 LS 2.0, the defa
4d00: 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d ult is <b class=
4d10: 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 "const">false</b
4d20: 3e 2e 0a 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 31 >..Note: TLS 1.1
4d30: 20 6e 65 65 64 73 20 53 48 41 31 20 74 6f 20 6f needs SHA1 to o
4d40: 70 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 perate, which is
4d50: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 only available
4d60: 69 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 in security leve
4d70: 6c 0a 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c l.0 for Open SSL
4d80: 20 33 2e 30 2b 2e 20 53 65 65 20 74 68 65 20 3c 3.0+. See the <
4d90: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4da0: 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c >-security_level
4db0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e </b> option.</p>
4dc0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
4dd0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 ss="option">-tls
4de0: 31 2e 32 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 1.2</b> <i class
4df0: 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c ="arg">bool</i><
4e00: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 /dt>.<dd><p>Enab
4e10: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
4e20: 2e 32 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 .2. The default
4e30: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
4e40: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 st">true</b>.</p
4e50: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
4e60: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c ass="option">-tl
4e70: 73 31 2e 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 s1.3</b> <i clas
4e80: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
4e90: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 </dt>.<dd><p>Ena
4ea0: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 ble use of TLS v
4eb0: 31 2e 33 2e 20 54 68 65 20 64 65 66 61 75 6c 74 1.3. The default
4ec0: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
4ed0: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 54 nst">true</b>. T
4ee0: 68 69 73 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 his is only avai
4ef0: 6c 61 62 6c 65 0a 73 74 61 72 74 69 6e 67 20 77 lable.starting w
4f00: 69 74 68 20 4f 70 65 6e 53 53 4c 20 31 2e 31 2e ith OpenSSL 1.1.
4f10: 31 20 61 6e 64 20 54 63 6c 54 4c 53 20 31 2e 37 1 and TclTLS 1.7
4f20: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
4f30: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4f40: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e >-validatecomman
4f50: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 d</b> <i class="
4f60: 61 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 arg">callback</i
4f70: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
4f80: 65 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c ecifies the call
4f90: 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 back command to
4fa0: 69 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69 64 61 invoke to valida
4fb0: 74 65 20 74 68 65 20 70 65 65 72 20 63 65 72 74 te the peer cert
4fc0: 69 66 69 63 61 74 65 73 0a 61 6e 64 20 6f 74 68 ificates.and oth
4fd0: 65 72 20 63 6f 6e 66 69 67 20 69 6e 66 6f 20 64 er config info d
4fe0: 75 72 69 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 uring the protoc
4ff0: 6f 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 ol negotiation p
5000: 68 61 73 65 2e 20 54 68 69 73 20 63 61 6e 20 62 hase. This can b
5010: 65 20 75 73 65 64 0a 62 79 20 54 43 4c 20 73 63 e used.by TCL sc
5020: 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d ripts to perform
5030: 20 74 68 65 69 72 20 6f 77 6e 20 43 65 72 74 69 their own Certi
5040: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f ficate Validatio
5050: 6e 20 74 6f 20 73 75 70 70 6c 65 6d 65 6e 74 20 n to supplement
5060: 74 68 65 0a 64 65 66 61 75 6c 74 20 76 61 6c 69 the.default vali
5070: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 dation provided
5080: 62 79 20 4f 70 65 6e 53 53 4c 2e 20 54 68 65 20 by OpenSSL. The
5090: 73 63 72 69 70 74 20 6d 75 73 74 20 72 65 74 75 script must retu
50a0: 72 6e 20 61 20 62 6f 6f 6c 65 61 6e 20 74 72 75 rn a boolean tru
50b0: 65 0a 74 6f 20 63 6f 6e 74 69 6e 75 65 20 74 68 e.to continue th
50c0: 65 20 6e 65 67 6f 74 69 61 74 69 6f 6e 2e 20 53 e negotiation. S
50d0: 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 ee <span class="
50e0: 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 sectref"><a href
50f0: 3d 22 23 73 65 63 74 69 6f 6e 35 22 3e 43 61 6c ="#section5">Cal
5100: 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 lback Options</a
5110: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 ></span> for mor
5120: 65 20 69 6e 66 6f 2e 0a 54 68 69 73 20 6f 70 74 e info..This opt
5130: 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ion is new for T
5140: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
5150: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c dd>.</dl></dd>.<
5160: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 36 22 3e 3c dt><a name="6"><
5170: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
5180: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
5190: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
51a0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c channel</i></a><
51b0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 /dt>.<dd><p>Forc
51c0: 65 73 20 74 68 65 20 54 4c 53 20 6e 65 67 6f 74 es the TLS negot
51d0: 69 61 74 69 6f 6e 20 68 61 6e 64 73 68 61 6b 65 iation handshake
51e0: 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 65 20 69 to take place i
51f0: 6d 6d 65 64 69 61 74 65 6c 79 2c 20 61 6e 64 20 mmediately, and
5200: 72 65 74 75 72 6e 73 20 30 0a 69 66 20 68 61 6e returns 0.if han
5210: 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 dshake is still
5220: 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e in progress (non
5230: 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 -blocking), or 1
5240: 20 69 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b if the handshak
5250: 65 20 77 61 73 0a 73 75 63 63 65 73 73 66 75 6c e was.successful
5260: 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 . If the handsha
5270: 6b 65 20 66 61 69 6c 65 64 2c 20 61 6e 20 65 72 ke failed, an er
5280: 72 6f 72 20 77 69 6c 6c 20 62 65 20 72 65 74 75 ror will be retu
5290: 72 6e 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c rned.</p></dd>.<
52a0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 37 22 3e 3c dt><a name="7"><
52b0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
52c0: 73 3a 3a 73 68 75 74 64 6f 77 6e 3c 2f 62 3e 20 s::shutdown</b>
52d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
52e0: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f hannel</i></a></
52f0: 64 74 3e 0a 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 dt>.<dd></dd>.<d
5300: 74 3e 3c 61 20 6e 61 6d 65 3d 22 38 22 3e 3c 62 t><a name="8"><b
5310: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
5320: 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c ::unimport</b> <
5330: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 i class="arg">ch
5340: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 annel</i></a></d
5350: 74 3e 0a 3c 64 64 3e 3c 2f 64 64 3e 0a 3c 64 74 t>.<dd></dd>.<dt
5360: 3e 3c 61 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 ><a name="9"><b
5370: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
5380: 3a 75 6e 73 74 61 63 6b 3c 2f 62 3e 20 3c 69 20 :unstack</b> <i
5390: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e class="arg">chan
53a0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e nel</i></a></dt>
53b0: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 74 65 72 .<dd><p>This ter
53c0: 6d 69 6e 61 74 65 73 20 74 68 65 20 53 53 4c 2f minates the SSL/
53d0: 54 4c 53 20 73 65 73 73 69 6f 6e 20 62 79 20 73 TLS session by s
53e0: 65 6e 64 69 6e 67 20 74 68 65 20 26 71 75 6f 74 ending the "
53f0: 3b 63 6c 6f 73 65 5f 6e 6f 74 69 66 79 26 71 75 ;close_notify&qu
5400: 6f 74 3b 20 6d 65 73 73 61 67 65 20 61 6e 64 0a ot; message and.
5410: 72 65 6d 6f 76 65 73 20 74 68 65 20 74 6f 70 20 removes the top
5420: 6c 65 76 65 6c 20 73 74 61 63 6b 65 64 20 63 68 level stacked ch
5430: 61 6e 6e 65 6c 20 66 72 6f 6d 20 3c 69 20 63 6c annel from <i cl
5440: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
5450: 6c 3c 2f 69 3e 2c 20 62 75 74 20 69 74 20 64 6f l</i>, but it do
5460: 65 73 20 6e 6f 74 20 63 6c 6f 73 65 0a 74 68 65 es not close.the
5470: 20 73 6f 63 6b 65 74 2e 20 49 74 20 69 73 20 74 socket. It is t
5480: 68 65 20 63 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f he compliment to
5490: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
54a0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 tls::import</b>
54b0: 62 79 20 65 6e 64 69 6e 67 20 65 6e 63 72 79 70 by ending encryp
54c0: 74 69 6f 6e 20 6f 66 0a 61 20 54 43 4c 20 63 68 tion of.a TCL ch
54d0: 61 6e 6e 65 6c 2e 20 41 6e 20 65 72 72 6f 72 20 annel. An error
54e0: 69 73 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 is thrown if TLS
54f0: 20 69 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 is not the top
5500: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 stacked channel
5510: 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c type.</p></dd>.<
5520: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 30 22 3e dt><a name="10">
5530: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
5540: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c ls::status</b> <
5550: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
5560: 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 >?<b class="opti
5570: 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c on">-local</b>?<
5580: 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d /span> <i class=
5590: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
55a0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c ></a></dt>.<dd><
55b0: 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 p>Returns the cu
55c0: 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 20 rrent status of
55d0: 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 an SSL channel.
55e0: 54 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 The result is a
55f0: 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 list of key-valu
5600: 65 0a 70 61 69 72 73 20 64 65 73 63 72 69 62 69 e.pairs describi
5610: 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65 72 74 ng the SSL, cert
5620: 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63 65 72 ificate, and cer
5630: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 tificate verific
5640: 61 74 69 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 ation status. If
5650: 0a 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 .the SSL handsha
5660: 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 ke has not yet c
5670: 6f 6d 70 6c 65 74 65 64 2c 20 61 6e 20 65 6d 70 ompleted, an emp
5680: 74 79 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 ty list is retur
5690: 6e 65 64 2e 20 49 66 20 74 68 65 0a 3c 62 20 63 ned. If the.<b c
56a0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c lass="option">-l
56b0: 6f 63 61 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 ocal</b> option
56c0: 69 73 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 is specified, th
56d0: 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 en the local cer
56e0: 74 69 66 69 63 61 74 65 20 69 73 20 75 73 65 64 tificate is used
56f0: 2e 0a 52 65 74 75 72 6e 65 64 20 76 61 6c 75 65 ..Returned value
5700: 73 20 69 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c s include:</p>.<
5710: 70 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 70 3e p>SSL Status</p>
5720: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
5730: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 ools_definitions
5740: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d ">.<dt><b class=
5750: 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c "variable">alpn<
5760: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
5770: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c g">protocol</i><
5780: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
5790: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 protocol selecte
57a0: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 d after Applicat
57b0: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
57c0: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 ol Negotiation (
57d0: 41 4c 50 4e 29 2e 0a 54 68 69 73 20 76 61 6c 75 ALPN)..This valu
57e0: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
57f0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5800: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5810: 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 variable">cipher
5820: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
5830: 72 67 22 3e 63 69 70 68 65 72 3c 2f 69 3e 3c 2f rg">cipher</i></
5840: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 63 dt>.<dd><p>The c
5850: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e urrent cipher in
5860: 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 65 73 use for the ses
5870: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c sion.</p></dd>.<
5880: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5890: 69 61 62 6c 65 22 3e 70 65 65 72 6e 61 6d 65 3c iable">peername<
58a0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
58b0: 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e g">name</i></dt>
58c0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 65 65 72 .<dd><p>The peer
58d0: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 name from the ce
58e0: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 rtificate..This
58f0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5900: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
5910: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
5920: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 72 ss="variable">pr
5930: 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c otocol</b> <i cl
5940: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f ass="arg">versio
5950: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
5960: 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 p>The protocol v
5970: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 ersion used for
5980: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 the connection:
5990: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 SSL2, SSL3, TLS1
59a0: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 , TLS1.1, TLS1.2
59b0: 2c 0a 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b ,.TLS1.3, or unk
59c0: 6e 6f 77 6e 2e 20 54 68 69 73 20 76 61 6c 75 65 nown. This value
59d0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
59e0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
59f0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
5a00: 61 72 69 61 62 6c 65 22 3e 73 62 69 74 73 3c 2f ariable">sbits</
5a10: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
5a20: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ">n</i></dt>.<dd
5a30: 3e 3c 70 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f ><p>The number o
5a40: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 f bits used for
5a50: 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e the session key.
5a60: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
5a70: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
5a80: 22 3e 73 69 67 6e 61 74 75 72 65 48 61 73 68 41 ">signatureHashA
5a90: 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 lgorithm</b> <i
5aa0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f class="arg">algo
5ab0: 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c rithm</i></dt>.<
5ac0: 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 6e 61 74 dd><p>The signat
5ad0: 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 ure hash algorit
5ae0: 68 6d 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 hm..This value i
5af0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
5b00: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
5b10: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5b20: 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 iable">signature
5b30: 54 79 70 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 Type</b> <i clas
5b40: 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f 69 3e s="arg">type</i>
5b50: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
5b60: 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65 20 signature type
5b70: 76 61 6c 75 65 2e 0a 54 68 69 73 20 76 61 6c 75 value..This valu
5b80: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5b90: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5ba0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5bb0: 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 79 variable">verify
5bc0: 44 65 70 74 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 Depth</b> <i cla
5bd0: 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f ss="arg">n</i></
5be0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d dt>.<dd><p>Maxim
5bf0: 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 um depth for the
5c00: 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 certificate cha
5c10: 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e in verification.
5c20: 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 Default is -1,
5c30: 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 0a 54 68 to check all..Th
5c40: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
5c50: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c for TclTLS 1.8.<
5c60: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
5c70: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
5c80: 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 >verifyMode</b>
5c90: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c <i class="arg">l
5ca0: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ist</i></dt>.<dd
5cb0: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 ><p>List of cert
5cc0: 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 ificate verifica
5cd0: 74 69 6f 6e 20 6d 6f 64 65 73 2e 0a 54 68 69 73 tion modes..This
5ce0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
5cf0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 r TclTLS 1.8.</p
5d00: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
5d10: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 ass="variable">v
5d20: 65 72 69 66 79 52 65 73 75 6c 74 3c 2f 62 3e 20 erifyResult</b>
5d30: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 <i class="arg">r
5d40: 65 73 75 6c 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c esult</i></dt>.<
5d50: 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 dd><p>Certificat
5d60: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 e verification r
5d70: 65 73 75 6c 74 2e 0a 54 68 69 73 20 76 61 6c 75 esult..This valu
5d80: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5d90: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5da0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5db0: 76 61 72 69 61 62 6c 65 22 3e 63 61 5f 6e 61 6d variable">ca_nam
5dc0: 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d es</b> <i class=
5dd0: 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f "arg">list</i></
5de0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 dt>.<dd><p>List
5df0: 6f 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61 of the Certifica
5e00: 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75 te Authorities u
5e10: 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68 sed to create th
5e20: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 e certificate..T
5e30: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
5e40: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
5e50: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a </p></dd>.</dl>.
5e60: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 53 <p>Certificate S
5e70: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c tatus</p>.<dl cl
5e80: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 ass="doctools_de
5e90: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e finitions">.<dt>
5ea0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
5eb0: 6c 65 22 3e 61 6c 6c 3c 2f 62 3e 20 3c 69 20 63 le">all</b> <i c
5ec0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e lass="arg">strin
5ed0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
5ee0: 70 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 p>Dump of all ce
5ef0: 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 2e 0a rtificate info..
5f00: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
5f10: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
5f20: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
5f30: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
5f40: 65 22 3e 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c e">version</b> <
5f50: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 i class="arg">va
5f60: 6c 75 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 lue</i></dt>.<dd
5f70: 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 66 69 63 ><p>The certific
5f80: 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e ate version.</p>
5f90: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
5fa0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 ss="variable">se
5fb0: 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 62 3e 20 3c rialNumber</b> <
5fc0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
5fd0: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
5fe0: 64 3e 3c 70 3e 54 68 65 20 73 65 72 69 61 6c 20 d><p>The serial
5ff0: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
6000: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
6010: 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 ex string..This
6020: 76 61 6c 75 65 20 77 61 73 20 63 68 61 6e 67 65 value was change
6030: 64 20 66 72 6f 6d 20 73 65 72 69 61 6c 20 69 6e d from serial in
6040: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
6050: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
6060: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 ss="variable">si
6070: 67 6e 61 74 75 72 65 3c 2f 62 3e 20 3c 69 20 63 gnature</b> <i c
6080: 6c 61 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 lass="arg">algor
6090: 69 74 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ithm</i></dt>.<d
60a0: 64 3e 3c 70 3e 43 69 70 68 65 72 20 61 6c 67 6f d><p>Cipher algo
60b0: 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 rithm used for c
60c0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
60d0: 74 75 72 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 ture..This value
60e0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
60f0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
6100: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
6110: 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72 3c ariable">issuer<
6120: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6130: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
6140: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69 t>.<dd><p>The di
6150: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
6160: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
6170: 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72 2e tificate issuer.
6180: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
6190: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
61a0: 22 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 62 3e 20 ">notBefore</b>
61b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 <i class="arg">d
61c0: 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ate</i></dt>.<dd
61d0: 3e 3c 70 3e 54 68 65 20 62 65 67 69 6e 6e 69 6e ><p>The beginnin
61e0: 67 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65 g date of the ce
61f0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69 rtificate validi
6200: 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ty.</p></dd>.<dt
6210: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
6220: 62 6c 65 22 3e 6e 6f 74 41 66 74 65 72 3c 2f 62 ble">notAfter</b
6230: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
6240: 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >date</i></dt>.<
6250: 64 64 3e 3c 70 3e 54 68 65 20 65 78 70 69 72 61 dd><p>The expira
6260: 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 65 tion date of the
6270: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
6280: 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a idity.</p></dd>.
6290: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
62a0: 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 3c riable">subject<
62b0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
62c0: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
62d0: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 69 t>.<dd><p>The di
62e0: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
62f0: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
6300: 74 69 66 69 63 61 74 65 20 73 75 62 6a 65 63 74 tificate subject
6310: 2e 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 . Fields include
6320: 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 : Common.Name (C
6330: 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e N), Organization
6340: 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 20 6f (O), Locality o
6350: 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74 r City (L), Stat
6360: 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53 e or Province (S
6370: 29 2c 20 61 6e 64 0a 43 6f 75 6e 74 72 79 20 4e ), and.Country N
6380: 61 6d 65 20 28 43 29 2e 3c 2f 70 3e 3c 2f 64 64 ame (C).</p></dd
6390: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
63a0: 76 61 72 69 61 62 6c 65 22 3e 69 73 73 75 65 72 variable">issuer
63b0: 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20 UniqueID</b> <i
63c0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 class="arg">stri
63d0: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ng</i></dt>.<dd>
63e0: 3c 70 3e 54 68 65 20 69 73 73 75 65 72 20 75 6e <p>The issuer un
63f0: 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20 76 61 ique id..This va
6400: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
6410: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
6420: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
6430: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a ="variable">subj
6440: 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 62 3e 20 ectUniqueID</b>
6450: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
6460: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
6470: 64 64 3e 3c 70 3e 54 68 65 20 73 75 62 6a 65 63 dd><p>The subjec
6480: 74 20 75 6e 69 71 75 65 20 69 64 2e 0a 54 68 69 t unique id..Thi
6490: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
64a0: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f or TclTLS 1.8.</
64b0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
64c0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
64d0: 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f num_extensions</
64e0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
64f0: 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ">n</i></dt>.<dd
6500: 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 ><p>Number of ce
6510: 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 rtificate extens
6520: 69 6f 6e 73 2e 0a 54 68 69 73 20 76 61 6c 75 65 ions..This value
6530: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
6540: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
6550: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
6560: 61 72 69 61 62 6c 65 22 3e 65 78 74 65 6e 73 69 ariable">extensi
6570: 6f 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ons</b> <i class
6580: 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c ="arg">list</i><
6590: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 /dt>.<dd><p>List
65a0: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 of certificate
65b0: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e extension names.
65c0: 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e .This value is n
65d0: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
65e0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</p></dd>.<dt>
65f0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
6600: 6c 65 22 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 le">authorityKey
6610: 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c Identifier</b> <
6620: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
6630: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
6640: 64 3e 3c 70 3e 41 75 74 68 6f 72 69 74 79 20 4b d><p>Authority K
6650: 65 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 41 ey Identifier (A
6660: 4b 49 29 20 6f 66 20 74 68 65 20 49 73 73 75 69 KI) of the Issui
6670: 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 61 74 ng CA certificat
6680: 65 20 74 68 61 74 20 73 69 67 6e 65 64 20 74 68 e that signed th
6690: 65 0a 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 e.SSL certificat
66a0: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e e as a hex strin
66b0: 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d 61 g. This value ma
66c0: 74 63 68 65 73 20 74 68 65 20 53 4b 49 20 76 61 tches the SKI va
66d0: 6c 75 65 20 6f 66 20 74 68 65 0a 49 6e 74 65 72 lue of the.Inter
66e0: 6d 65 64 69 61 74 65 20 43 41 20 63 65 72 74 69 mediate CA certi
66f0: 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c ficate..This val
6700: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
6710: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
6720: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6730: 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 "variable">subje
6740: 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c ctKeyIdentifier<
6750: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6760: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
6770: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 75 62 6a 65 63 t>.<dd><p>Subjec
6780: 74 20 4b 65 79 20 49 64 65 6e 74 69 66 69 65 72 t Key Identifier
6790: 20 28 53 4b 49 29 20 68 61 73 68 20 6f 66 20 74 (SKI) hash of t
67a0: 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69 6e he public key in
67b0: 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66 69 side the certifi
67c0: 63 61 74 65 20 61 73 20 61 0a 68 65 78 20 73 74 cate as a.hex st
67d0: 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64 ring. Used to id
67e0: 65 6e 74 69 66 79 20 63 65 72 74 69 66 69 63 61 entify certifica
67f0: 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e tes that contain
6800: 20 61 20 70 61 72 74 69 63 75 6c 61 72 20 70 75 a particular pu
6810: 62 6c 69 63 20 6b 65 79 2e 0a 54 68 69 73 20 76 blic key..This v
6820: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
6830: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
6840: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
6850: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 s="variable">sub
6860: 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 jectAltName</b>
6870: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c <i class="arg">l
6880: 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ist</i></dt>.<dd
6890: 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 ><p>List of all
68a0: 6f 66 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 of the Subject A
68b0: 6c 74 65 72 6e 61 74 69 76 65 20 4e 61 6d 65 73 lternative Names
68c0: 20 28 53 41 4e 29 20 69 6e 63 6c 75 64 69 6e 67 (SAN) including
68d0: 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 domain names, s
68e0: 75 62 0a 64 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 ub.domains, and
68f0: 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68 61 IP addresses tha
6900: 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62 79 t are secured by
6910: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
6920: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
6930: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
6940: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
6950: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
6960: 62 6c 65 22 3e 6f 63 73 70 3c 2f 62 3e 20 3c 69 ble">ocsp</b> <i
6970: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 class="arg">lis
6980: 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c t</i></dt>.<dd><
6990: 70 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e p>List of all On
69a0: 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 74 65 line Certificate
69b0: 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c Status Protocol
69c0: 20 28 4f 43 53 50 29 20 55 52 4c 73 20 74 68 61 (OCSP) URLs tha
69d0: 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f t can be used to
69e0: 0a 63 68 65 63 6b 20 74 68 65 20 76 61 6c 69 64 .check the valid
69f0: 69 74 79 20 6f 66 20 74 68 69 73 20 63 65 72 74 ity of this cert
6a00: 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 ificate..This va
6a10: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
6a20: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
6a30: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
6a40: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 65 72 74 ="variable">cert
6a50: 69 66 69 63 61 74 65 3c 2f 62 3e 20 3c 69 20 63 ificate</b> <i c
6a60: 6c 61 73 73 3d 22 61 72 67 22 3e 63 65 72 74 3c lass="arg">cert<
6a70: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
6a80: 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 The PEM encoded
6a90: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e certificate.</p>
6aa0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
6ab0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 ss="variable">si
6ac0: 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d gnatureAlgorithm
6ad0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6ae0: 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 rg">algorithm</i
6af0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 ></dt>.<dd><p>Ci
6b00: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 pher algorithm u
6b10: 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72 74 sed for the cert
6b20: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
6b30: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 e..This value is
6b40: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
6b50: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
6b60: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
6b70: 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 56 able">signatureV
6b80: 61 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 alue</b> <i clas
6b90: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f s="arg">string</
6ba0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 i></dt>.<dd><p>C
6bb0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
6bc0: 74 75 72 65 20 61 73 20 61 20 68 65 78 20 73 74 ture as a hex st
6bd0: 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 ring..This value
6be0: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
6bf0: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
6c00: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
6c10: 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 ariable">signatu
6c20: 72 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 reDigest</b> <i
6c30: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 class="arg">vers
6c40: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ion</i></dt>.<dd
6c50: 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 ><p>Certificate
6c60: 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20 61 signing digest a
6c70: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 0a s a hex string..
6c80: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
6c90: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
6ca0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6cb0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6cc0: 65 22 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f e">publicKeyAlgo
6cd0: 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 rithm</b> <i cla
6ce0: 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 ss="arg">algorit
6cf0: 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e hm</i></dt>.<dd>
6d00: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 <p>Certificate s
6d10: 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 ignature public
6d20: 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 0a 54 key algorithm..T
6d30: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
6d40: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
6d50: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
6d60: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
6d70: 22 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 62 3e 20 ">publicKey</b>
6d80: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
6d90: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
6da0: 64 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 dd><p>Certificat
6db0: 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c e signature publ
6dc0: 69 63 20 6b 65 79 20 61 73 20 61 20 68 65 78 20 ic key as a hex
6dd0: 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c string..This val
6de0: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
6df0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
6e00: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6e10: 22 76 61 72 69 61 62 6c 65 22 3e 62 69 74 73 3c "variable">bits<
6e20: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6e30: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 g">n</i></dt>.<d
6e40: 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 62 d><p>Number of b
6e50: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 72 its used for cer
6e60: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
6e70: 72 65 20 6b 65 79 2e 0a 54 68 69 73 20 76 61 6c re key..This val
6e80: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
6e90: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
6ea0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6eb0: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 6c 66 5f "variable">self_
6ec0: 73 69 67 6e 65 64 3c 2f 62 3e 20 3c 69 20 63 6c signed</b> <i cl
6ed0: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 ass="arg">boolea
6ee0: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
6ef0: 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 65 p>Whether the ce
6f00: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
6f10: 75 72 65 20 69 73 20 73 65 6c 66 20 73 69 67 6e ure is self sign
6f20: 65 64 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 ed..This value i
6f30: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
6f40: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
6f50: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
6f60: 69 61 62 6c 65 22 3e 73 68 61 31 5f 68 61 73 68 iable">sha1_hash
6f70: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6f80: 72 67 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 rg">hash</i></dt
6f90: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 53 48 41 >.<dd><p>The SHA
6fa0: 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 1 hash of the ce
6fb0: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
6fc0: 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 20 ex string..This
6fd0: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
6fe0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
6ff0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
7000: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 68 ss="variable">sh
7010: 61 32 35 36 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 a256_hash</b> <i
7020: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 61 73 class="arg">has
7030: 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c h</i></dt>.<dd><
7040: 70 3e 54 68 65 20 53 48 41 32 35 36 20 68 61 73 p>The SHA256 has
7050: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 h of the certifi
7060: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 cate as a hex st
7070: 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 ring..This value
7080: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
7090: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
70a0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e .</dl></dd>.<dt>
70b0: 3c 61 20 6e 61 6d 65 3d 22 31 31 22 3e 3c 62 20 <a name="11"><b
70c0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
70d0: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 :connection</b>
70e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
70f0: 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f hannel</i></a></
7100: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 dt>.<dd><p>Retur
7110: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 ns the current c
7120: 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 onnection status
7130: 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e of an SSL chann
7140: 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20 69 el. The result i
7150: 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 79 2d s a list.of key-
7160: 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 value pairs desc
7170: 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 ribing the conne
7180: 63 74 69 6f 6e 2e 0a 54 68 69 73 20 63 6f 6d 6d ction..This comm
7190: 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 20 54 and is new for T
71a0: 63 6c 54 4c 53 20 31 2e 38 2e 20 52 65 74 75 72 clTLS 1.8. Retur
71b0: 6e 65 64 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 ned values inclu
71c0: 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 de:</p>.<p>SSL S
71d0: 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c tatus</p>.<dl cl
71e0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 ass="doctools_de
71f0: 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e finitions">.<dt>
7200: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
7210: 6c 65 22 3e 73 74 61 74 65 3c 2f 62 3e 20 3c 69 le">state</b> <i
7220: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 class="arg">sta
7230: 74 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e te</i></dt>.<dd>
7240: 3c 70 3e 53 74 61 74 65 20 6f 66 20 74 68 65 20 <p>State of the
7250: 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c connection.</p><
7260: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7270: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 72 s="variable">ser
7280: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 vername</b> <i c
7290: 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c lass="arg">name<
72a0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
72b0: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 The name of the
72c0: 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 connected to ser
72d0: 76 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ver.</p></dd>.<d
72e0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
72f0: 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f able">protocol</
7300: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
7310: 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 ">version</i></d
7320: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 t>.<dd><p>The pr
7330: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 otocol version u
7340: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e sed for the conn
7350: 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 ection: SSL2, SS
7360: 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 L3, TLS1, TLS1.1
7370: 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 , TLS1.2, TLS1.3
7380: 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 , or unknown.</p
7390: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
73a0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 72 ass="variable">r
73b0: 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c enegotiation_all
73c0: 6f 77 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 owed</b> <i clas
73d0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c s="arg">boolean<
73e0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
73f0: 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c Whether protocol
7400: 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 renegotiation i
7410: 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e s supported or n
7420: 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ot.</p></dd>.<dt
7430: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7440: 62 6c 65 22 3e 73 65 63 75 72 69 74 79 5f 6c 65 ble">security_le
7450: 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 vel</b> <i class
7460: 3d 22 61 72 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e ="arg">level</i>
7470: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
7480: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 security level
7490: 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 used for selecti
74a0: 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b on of ciphers, k
74b0: 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 70 ey size, etc.</p
74c0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
74d0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 ass="variable">s
74e0: 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 62 ession_reused</b
74f0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
7500: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 >boolean</i></dt
7510: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 >.<dd><p>Whether
7520: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73 the session has
7530: 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20 been reused or
7540: 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 not.</p></dd>.<d
7550: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
7560: 61 62 6c 65 22 3e 69 73 5f 73 65 72 76 65 72 3c able">is_server<
7570: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
7580: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f g">boolean</i></
7590: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 dt>.<dd><p>Wheth
75a0: 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f er the connectio
75b0: 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20 n is configured
75c0: 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29 20 as a server (1)
75d0: 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f or client (0).</
75e0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
75f0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7600: 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 62 3e 20 compression</b>
7610: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d <i class="arg">m
7620: 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ode</i></dt>.<dd
7630: 3e 3c 70 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 ><p>Compression
7640: 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e method.</p></dd>
7650: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
7660: 61 72 69 61 62 6c 65 22 3e 65 78 70 61 6e 73 69 ariable">expansi
7670: 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d on</b> <i class=
7680: 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f "arg">mode</i></
7690: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 78 70 61 6e dt>.<dd><p>Expan
76a0: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e sion method.</p>
76b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
76c0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61 ss="variable">ca
76d0: 4c 69 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 List</b> <i clas
76e0: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e s="arg">list</i>
76f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 </dt>.<dd><p>Lis
7700: 74 20 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 t of Certificate
7710: 20 41 75 74 68 6f 72 69 74 69 65 73 20 28 43 41 Authorities (CA
7720: 29 20 66 6f 72 20 58 2e 35 30 39 20 63 65 72 74 ) for X.509 cert
7730: 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 ificate.</p></dd
7740: 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 69 70 68 65 >.</dl>.<p>Ciphe
7750: 72 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 r Info</p>.<dl c
7760: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 lass="doctools_d
7770: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 efinitions">.<dt
7780: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7790: 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20 ble">cipher</b>
77a0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
77b0: 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c ipher</i></dt>.<
77c0: 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 6e dd><p>The curren
77d0: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
77e0: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
77f0: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 on.</p></dd>.<dt
7800: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7810: 62 6c 65 22 3e 73 74 61 6e 64 61 72 64 5f 6e 61 ble">standard_na
7820: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d me</b> <i class=
7830: 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f "arg">name</i></
7840: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 dt>.<dd><p>The s
7850: 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 tandard RFC name
7860: 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c of cipher.</p><
7870: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7880: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 67 s="variable">alg
7890: 6f 72 69 74 68 6d 5f 62 69 74 73 3c 2f 62 3e 20 orithm_bits</b>
78a0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e <i class="arg">n
78b0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
78c0: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 >The number of p
78d0: 72 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 rocessed bits us
78e0: 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f ed for cipher.</
78f0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
7900: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7910: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 62 3e 20 secret_bits</b>
7920: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e <i class="arg">n
7930: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7940: 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 >The number of s
7950: 65 63 72 65 74 20 62 69 74 73 20 75 73 65 64 20 ecret bits used
7960: 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c for cipher.</p><
7970: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7980: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 69 6e s="variable">min
7990: 5f 76 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 _version</b> <i
79a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 class="arg">vers
79b0: 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ion</i></dt>.<dd
79c0: 3e 3c 70 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20 ><p>The minimum
79d0: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
79e0: 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e for cipher.</p>
79f0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
7a00: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69 ss="variable">ci
7a10: 70 68 65 72 5f 69 73 5f 61 65 61 64 3c 2f 62 3e pher_is_aead</b>
7a20: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
7a30: 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e boolean</i></dt>
7a40: 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 .<dd><p>Whether
7a50: 74 68 65 20 63 69 70 68 65 72 20 69 73 20 41 75 the cipher is Au
7a60: 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72 thenticated Encr
7a70: 79 70 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f yption with Asso
7a80: 63 69 61 74 65 64 20 44 61 74 61 20 28 41 45 41 ciated Data (AEA
7a90: 44 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 D).</p></dd>.<dt
7aa0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7ab0: 62 6c 65 22 3e 63 69 70 68 65 72 5f 69 64 3c 2f ble">cipher_id</
7ac0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
7ad0: 22 3e 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ">id</i></dt>.<d
7ae0: 64 3e 3c 70 3e 54 68 65 20 4f 70 65 6e 53 53 4c d><p>The OpenSSL
7af0: 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 70 3e 3c cipher id.</p><
7b00: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7b10: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 64 65 73 s="variable">des
7b20: 63 72 69 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 cription</b> <i
7b30: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 class="arg">stri
7b40: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ng</i></dt>.<dd>
7b50: 3c 70 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 <p>A text descri
7b60: 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 ption of the cip
7b70: 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 her.</p></dd>.<d
7b80: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
7b90: 61 62 6c 65 22 3e 68 61 6e 64 73 68 61 6b 65 5f able">handshake_
7ba0: 64 69 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c digest</b> <i cl
7bb0: 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 ass="arg">boolea
7bc0: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
7bd0: 70 3e 44 69 67 65 73 74 20 75 73 65 64 20 64 75 p>Digest used du
7be0: 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 2e 3c ring handshake.<
7bf0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c /p></dd>.</dl>.<
7c00: 70 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f p>Session Info</
7c10: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f p>.<dl class="do
7c20: 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f ctools_definitio
7c30: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 ns">.<dt><b clas
7c40: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 s="variable">alp
7c50: 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 n</b> <i class="
7c60: 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 arg">protocol</i
7c70: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
7c80: 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 e protocol selec
7c90: 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 ted after Applic
7ca0: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 ation-Layer Prot
7cb0: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e ocol Negotiation
7cc0: 20 28 41 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 (ALPN).</p></dd
7cd0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
7ce0: 76 61 72 69 61 62 6c 65 22 3e 72 65 73 75 6d 61 variable">resuma
7cf0: 62 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ble</b> <i class
7d00: 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f ="arg">boolean</
7d10: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 i></dt>.<dd><p>W
7d20: 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 69 hether the sessi
7d30: 6f 6e 20 63 61 6e 20 62 65 20 72 65 73 75 6d 65 on can be resume
7d40: 64 20 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 d or not.</p></d
7d50: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7d60: 22 76 61 72 69 61 62 6c 65 22 3e 73 74 61 72 74 "variable">start
7d70: 5f 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 _time</b> <i cla
7d80: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 ss="arg">seconds
7d90: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7da0: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 >Time since sess
7db0: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 ion started in s
7dc0: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f econds since epo
7dd0: 63 68 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ch.</p></dd>.<dt
7de0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7df0: 62 6c 65 22 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e ble">timeout</b>
7e00: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
7e10: 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e seconds</i></dt>
7e20: 0a 3c 64 64 3e 3c 70 3e 4d 61 78 20 64 75 72 61 .<dd><p>Max dura
7e30: 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 tion of session
7e40: 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 in seconds befor
7e50: 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c e time-out.</p><
7e60: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
7e70: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6c 69 66 s="variable">lif
7e80: 65 74 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 etime</b> <i cla
7e90: 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 ss="arg">seconds
7ea0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7eb0: 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 >Session ticket
7ec0: 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 20 69 6e lifetime hint in
7ed0: 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 seconds.</p></d
7ee0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7ef0: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 "variable">sessi
7f00: 6f 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 on_id</b> <i cla
7f10: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f ss="arg">binary_
7f20: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a string</i></dt>.
7f30: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 <dd><p>Unique se
7f40: 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 ssion id for use
7f50: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
7f60: 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 session.</p></d
7f70: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7f80: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 "variable">sessi
7f90: 6f 6e 5f 74 69 63 6b 65 74 3c 2f 62 3e 20 3c 69 on_ticket</b> <i
7fa0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e class="arg">bin
7fb0: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f ary_string</i></
7fc0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 dt>.<dd><p>Uniqu
7fd0: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
7fe0: 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 for use in resu
7ff0: 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e ming the session
8000: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
8010: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
8020: 65 22 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 e">ticket_app_da
8030: 74 61 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ta</b> <i class=
8040: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 "arg">binary_str
8050: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ing</i></dt>.<dd
8060: 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 ><p>Unique sessi
8070: 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69 63 on ticket applic
8080: 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c ation data.</p><
8090: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
80a0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6d 61 73 s="variable">mas
80b0: 74 65 72 5f 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 ter_key</b> <i c
80c0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 lass="arg">binar
80d0: 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 y_string</i></dt
80e0: 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 >.<dd><p>Unique
80f0: 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b session master k
8100: 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ey.</p></dd>.<dt
8110: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
8120: 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 63 61 63 ble">session_cac
8130: 68 65 5f 6d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 he_mode</b> <i c
8140: 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c lass="arg">mode<
8150: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
8160: 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64 Server cache mod
8170: 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 e (client, serve
8180: 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 70 3e r, or both).</p>
8190: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e </dd>.</dl></dd>
81a0: 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 32 .<dt><a name="12
81b0: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 "><b class="cmd"
81c0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 >tls::ciphers</b
81d0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
81e0: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
81f0: 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e rg">protocol</i>
8200: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 ?</span> <span c
8210: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 lass="opt">?<i c
8220: 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f lass="arg">verbo
8230: 73 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c se</i>?</span> <
8240: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
8250: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
8260: 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c >supported</i>?<
8270: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a /span></a></dt>.
8280: 3c 64 64 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61 <dd><p>Without a
8290: 6e 79 20 6f 70 74 69 6f 6e 73 2c 20 69 74 20 72 ny options, it r
82a0: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 eturns a list of
82b0: 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63 20 63 all symmetric c
82c0: 69 70 68 65 72 73 20 66 6f 72 20 75 73 65 20 77 iphers for use w
82d0: 69 74 68 20 74 68 65 0a 3c 69 20 63 6c 61 73 73 ith the.<i class
82e0: 3d 22 61 72 67 22 3e 2d 63 69 70 68 65 72 3c 2f ="arg">-cipher</
82f0: 69 3e 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20 i> option. With
8300: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 <i class="arg">p
8310: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 2c 20 6f 6e 6c rotocol</i>, onl
8320: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 y the ciphers su
8330: 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 pported for that
8340: 0a 70 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 .protocol are re
8350: 74 75 72 6e 65 64 2e 20 53 65 65 20 74 68 65 20 turned. See the
8360: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
8370: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 ls::protocols</b
8380: 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 74 68 > command for th
8390: 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 e supported.prot
83a0: 6f 63 6f 6c 73 2e 20 49 66 20 3c 69 20 63 6c 61 ocols. If <i cla
83b0: 73 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 ss="arg">verbose
83c0: 3c 2f 69 3e 20 69 73 20 73 70 65 63 69 66 69 65 </i> is specifie
83d0: 64 20 61 73 20 74 72 75 65 20 74 68 65 6e 20 61 d as true then a
83e0: 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 verbose, human
83f0: 72 65 61 64 61 62 6c 65 0a 6c 69 73 74 20 69 73 readable.list is
8400: 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 61 returned with a
8410: 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d dditional inform
8420: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 ation on the cip
8430: 68 65 72 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 her. If <i class
8440: 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 ="arg">supported
8450: 3c 2f 69 3e 0a 69 73 20 73 70 65 63 69 66 69 65 </i>.is specifie
8460: 64 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 d as true, then
8470: 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 only the ciphers
8480: 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 supported for p
8490: 72 6f 74 6f 63 6f 6c 20 77 69 6c 6c 20 62 65 20 rotocol will be
84a0: 6c 69 73 74 65 64 2e 0a 54 68 65 20 3c 69 20 63 listed..The <i c
84b0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f lass="arg">suppo
84c0: 72 74 65 64 3c 2f 69 3e 20 61 72 67 20 69 73 20 rted</i> arg is
84d0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
84e0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
84f0: 3e 3c 61 20 6e 61 6d 65 3d 22 31 33 22 3e 3c 62 ><a name="13"><b
8500: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
8510: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c ::protocols</b><
8520: 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /a></dt>.<dd><p>
8530: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f Returns a list o
8540: 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 f the supported
8550: 53 53 4c 2f 54 4c 53 20 70 72 6f 74 6f 63 6f 6c SSL/TLS protocol
8560: 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 20 s. Valid values
8570: 61 72 65 3a 0a 3c 62 20 63 6c 61 73 73 3d 22 63 are:.<b class="c
8580: 6f 6e 73 74 22 3e 73 73 6c 32 3c 2f 62 3e 2c 20 onst">ssl2</b>,
8590: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
85a0: 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 20 63 6c >ssl3</b>, <b cl
85b0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c 73 31 ass="const">tls1
85c0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 </b>, <b class="
85d0: 63 6f 6e 73 74 22 3e 74 6c 73 31 2e 31 3c 2f 62 const">tls1.1</b
85e0: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e >, <b class="con
85f0: 73 74 22 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 20 st">tls1.2</b>,
8600: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f and.<b class="co
8610: 6e 73 74 22 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e nst">tls1.3</b>.
8620: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65 Exact list depe
8630: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 nds on OpenSSL v
8640: 65 72 73 69 6f 6e 20 61 6e 64 20 63 6f 6d 70 69 ersion and compi
8650: 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 0a 54 le time flags..T
8660: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e his command is n
8670: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
8680: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</p></dd>.<dt>
8690: 3c 61 20 6e 61 6d 65 3d 22 31 34 22 3e 3c 62 20 <a name="14"><b
86a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
86b0: 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e :version</b></a>
86c0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 </dt>.<dd><p>Ret
86d0: 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c urns the OpenSSL
86e0: 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e version string.
86f0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a </p></dd>.</dl>.
8700: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
8710: 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d section4" class=
8720: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
8730: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h2><a name="
8740: 73 65 63 74 69 6f 6e 34 22 3e 43 65 72 74 69 66 section4">Certif
8750: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
8760: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 69 </a></h2>.<div i
8770: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 31 22 20 d="subsection1"
8780: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
8790: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e subsection"><h3>
87a0: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 <a name="subsect
87b0: 69 6f 6e 31 22 3e 50 4b 49 20 61 6e 64 20 43 65 ion1">PKI and Ce
87c0: 72 74 69 66 69 63 61 74 65 73 3c 2f 61 3e 3c 2f rtificates</a></
87d0: 68 33 3e 0a 3c 70 3e 55 73 69 6e 67 20 74 68 65 h3>.<p>Using the
87e0: 20 50 75 62 6c 69 63 20 4b 65 79 20 49 6e 66 72 Public Key Infr
87f0: 61 73 74 72 75 63 74 75 72 65 20 28 50 4b 49 29 astructure (PKI)
8800: 2c 20 65 61 63 68 20 75 73 65 72 20 63 72 65 61 , each user crea
8810: 74 65 73 20 61 20 70 72 69 76 61 74 65 20 6b 65 tes a private ke
8820: 79 20 74 68 61 74 0a 6f 6e 6c 79 20 74 68 65 79 y that.only they
8830: 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e 64 20 know about and
8840: 61 20 70 75 62 6c 69 63 20 6b 65 79 20 74 68 65 a public key the
8850: 79 20 63 61 6e 20 65 78 63 68 61 6e 67 65 20 77 y can exchange w
8860: 69 74 68 20 6f 74 68 65 72 73 20 66 6f 72 20 75 ith others for u
8870: 73 65 20 69 6e 0a 65 6e 63 72 79 70 74 69 6e 67 se in.encrypting
8880: 20 61 6e 64 20 64 65 63 72 79 70 74 69 6e 67 20 and decrypting
8890: 64 61 74 61 2e 20 54 68 65 20 70 72 6f 63 65 73 data. The proces
88a0: 73 20 69 73 20 74 68 65 20 73 65 6e 64 65 72 20 s is the sender
88b0: 65 6e 63 72 79 70 74 73 20 74 68 65 69 72 20 64 encrypts their d
88c0: 61 74 61 0a 75 73 69 6e 67 20 74 68 65 69 72 20 ata.using their
88d0: 70 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 20 private key and
88e0: 74 68 65 20 72 65 63 65 69 76 65 72 27 73 20 70 the receiver's p
88f0: 75 62 6c 69 63 20 6b 65 79 2e 20 54 68 65 20 64 ublic key. The d
8900: 61 74 61 20 69 73 20 74 68 65 6e 20 73 65 6e 74 ata is then sent
8910: 0a 74 6f 20 74 68 65 20 72 65 63 65 69 76 65 72 .to the receiver
8920: 2e 20 49 6e 20 61 20 73 69 6d 69 6c 61 72 20 6d . In a similar m
8930: 61 6e 6e 65 72 2c 20 74 68 65 20 72 65 63 65 69 anner, the recei
8940: 76 65 72 20 75 73 65 73 20 74 68 65 69 72 20 70 ver uses their p
8950: 72 69 76 61 74 65 20 6b 65 79 20 61 6e 64 0a 74 rivate key and.t
8960: 68 65 20 73 65 6e 64 65 72 27 73 20 70 75 62 6c he sender's publ
8970: 69 63 20 6b 65 79 20 74 6f 20 64 65 63 72 79 70 ic key to decryp
8980: 74 20 74 68 65 20 64 61 74 61 2e 20 54 68 69 73 t the data. This
8990: 20 70 72 6f 76 69 64 65 73 20 64 61 74 61 20 69 provides data i
89a0: 6e 74 65 67 72 69 74 79 2c 20 74 6f 0a 65 6e 73 ntegrity, to.ens
89b0: 75 72 65 20 74 68 65 20 64 61 74 61 20 63 61 6e ure the data can
89c0: 27 74 20 62 65 20 76 69 65 77 65 64 20 6f 72 20 't be viewed or
89d0: 61 6c 74 65 72 65 64 20 64 75 72 69 6e 67 20 74 altered during t
89e0: 72 61 6e 73 70 6f 72 74 2e 20 53 65 65 20 74 68 ransport. See th
89f0: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e.<b class="opti
8a00: 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 61 6e 64 on">-key</b> and
8a10: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f <b class="optio
8a20: 6e 22 3e 2d 6b 65 79 66 69 6c 65 3c 2f 62 3e 20 n">-keyfile</b>
8a30: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 options for how
8a40: 74 6f 20 73 70 65 63 69 66 79 20 74 68 65 20 70 to specify the p
8a50: 72 69 76 61 74 65 20 6b 65 79 2e 0a 41 6c 73 6f rivate key..Also
8a60: 20 73 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 see the <b clas
8a70: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 s="option">-pass
8a80: 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 word</b> option
8a90: 66 6f 72 20 68 6f 77 20 74 6f 20 70 72 6f 76 69 for how to provi
8aa0: 64 65 20 74 68 65 20 70 61 73 73 77 6f 72 64 2e de the password.
8ab0: 3c 2f 70 3e 0a 3c 70 3e 49 6e 20 6f 72 64 65 72 </p>.<p>In order
8ac0: 20 74 6f 20 70 72 6f 76 69 64 65 20 61 75 74 68 to provide auth
8ad0: 65 6e 74 69 63 61 74 69 6f 6e 2c 20 69 2e 65 2e entication, i.e.
8ae0: 20 65 6e 73 75 72 69 6e 67 20 73 6f 6d 65 6f 6e ensuring someon
8af0: 65 20 69 73 20 77 68 6f 20 74 68 65 79 20 73 61 e is who they sa
8b00: 79 20 74 68 65 79 0a 61 72 65 2c 20 74 68 65 20 y they.are, the
8b10: 70 75 62 6c 69 63 20 6b 65 79 20 61 6e 64 20 75 public key and u
8b20: 73 65 72 20 69 64 65 6e 74 69 66 69 63 61 74 69 ser identificati
8b30: 6f 6e 20 69 6e 66 6f 20 69 73 20 73 74 6f 72 65 on info is store
8b40: 64 20 69 6e 20 61 20 58 2e 35 30 39 0a 63 65 72 d in a X.509.cer
8b50: 74 69 66 69 63 61 74 65 20 61 6e 64 20 74 68 61 tificate and tha
8b60: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 t certificate is
8b70: 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 20 28 authenticated (
8b80: 69 2e 65 2e 20 73 69 67 6e 65 64 29 20 62 79 20 i.e. signed) by
8b90: 61 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 a Certificate.Au
8ba0: 74 68 6f 72 69 74 79 20 28 43 41 29 2e 20 55 73 thority (CA). Us
8bb0: 65 72 73 20 63 61 6e 20 74 68 65 6e 20 65 78 63 ers can then exc
8bc0: 68 61 6e 67 65 20 74 68 65 73 65 20 63 65 72 74 hange these cert
8bd0: 69 66 69 63 61 74 65 73 20 64 75 72 69 6e 67 20 ificates during
8be0: 74 68 65 20 54 4c 53 0a 69 6e 69 74 69 61 6c 69 the TLS.initiali
8bf0: 7a 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 20 61 zation process a
8c00: 6e 64 20 63 68 65 63 6b 20 74 68 65 6d 20 61 67 nd check them ag
8c10: 61 69 6e 73 74 20 74 68 65 20 72 6f 6f 74 20 43 ainst the root C
8c20: 41 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 A certificates t
8c30: 6f 20 65 6e 73 75 72 65 0a 74 68 65 79 20 61 72 o ensure.they ar
8c40: 65 20 76 61 6c 69 64 2e 20 54 68 69 73 20 69 73 e valid. This is
8c50: 20 68 61 6e 64 6c 65 64 20 62 79 20 4f 70 65 6e handled by Open
8c60: 53 53 4c 20 76 69 61 20 74 68 65 20 3c 62 20 63 SSL via the <b c
8c70: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 lass="option">-r
8c80: 65 71 75 65 73 74 3c 2f 62 3e 20 61 6e 64 0a 3c equest</b> and.<
8c90: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8ca0: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70 >-require</b> op
8cb0: 74 69 6f 6e 73 2e 20 53 65 65 20 74 68 65 20 3c tions. See the <
8cc0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8cd0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 >-cadir</b>, <b
8ce0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
8cf0: 63 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 0a 3c cadir</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 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 >-castore</b> op
8d20: 74 69 6f 6e 73 20 66 6f 72 20 68 6f 77 20 74 6f tions for how to
8d30: 20 73 70 65 63 69 66 79 20 77 68 65 72 65 20 74 specify where t
8d40: 6f 20 66 69 6e 64 20 74 68 65 20 43 41 20 63 65 o find the CA ce
8d50: 72 74 69 66 69 63 61 74 65 73 2e 0a 4f 70 74 69 rtificates..Opti
8d60: 6f 6e 61 6c 6c 79 2c 20 69 6e 20 61 20 66 75 74 onally, in a fut
8d70: 75 72 65 20 72 65 6c 65 61 73 65 2c 20 74 68 65 ure release, the
8d80: 79 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 63 68 y can also be ch
8d90: 65 63 6b 65 64 20 61 67 61 69 6e 73 74 20 74 68 ecked against th
8da0: 65 20 43 65 72 74 69 66 69 63 61 74 65 0a 52 65 e Certificate.Re
8db0: 76 6f 63 61 74 69 6f 6e 20 4c 69 73 74 20 28 43 vocation List (C
8dc0: 52 4c 29 20 6f 66 20 72 65 76 6f 6b 65 64 20 63 RL) of revoked c
8dd0: 65 72 74 69 66 69 63 61 74 65 73 2e 20 43 65 72 ertificates. Cer
8de0: 74 69 66 69 63 61 74 65 73 20 63 61 6e 20 61 6c tificates can al
8df0: 73 6f 20 62 65 0a 73 65 6c 66 2d 73 69 67 6e 65 so be.self-signe
8e00: 64 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20 d, but they are
8e10: 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 74 20 74 by default not t
8e20: 72 75 73 74 65 64 20 75 6e 6c 65 73 73 20 79 6f rusted unless yo
8e30: 75 20 61 64 64 20 74 68 65 6d 20 74 6f 20 79 6f u add them to yo
8e40: 75 72 0a 63 65 72 74 69 66 69 63 61 74 65 20 73 ur.certificate s
8e50: 74 6f 72 65 2e 3c 2f 70 3e 0a 3c 70 3e 54 79 70 tore.</p>.<p>Typ
8e60: 69 63 61 6c 6c 79 20 77 68 65 6e 20 76 69 73 69 ically when visi
8e70: 74 69 6e 67 20 77 65 62 20 73 69 74 65 73 2c 20 ting web sites,
8e80: 6f 6e 6c 79 20 74 68 65 20 63 6c 69 65 6e 74 20 only the client
8e90: 6e 65 65 64 73 20 74 6f 20 63 68 65 63 6b 20 74 needs to check t
8ea0: 68 65 20 73 65 72 76 65 72 27 73 0a 63 65 72 74 he server's.cert
8eb0: 69 66 69 63 61 74 65 20 74 6f 20 65 6e 73 75 72 ificate to ensur
8ec0: 65 20 69 74 20 69 73 20 76 61 6c 69 64 2e 20 54 e it is valid. T
8ed0: 68 65 20 73 65 72 76 65 72 20 64 6f 65 73 6e 27 he server doesn'
8ee0: 74 20 6e 65 65 64 20 74 6f 20 63 68 65 63 6b 20 t need to check
8ef0: 74 68 65 20 63 6c 69 65 6e 74 0a 63 65 72 74 69 the client.certi
8f00: 66 69 63 61 74 65 20 75 6e 6c 65 73 73 20 79 6f ficate unless yo
8f10: 75 20 6e 65 65 64 20 74 6f 20 61 75 74 68 65 6e u need to authen
8f20: 74 69 63 61 74 65 20 77 69 74 68 20 74 68 65 6d ticate with them
8f30: 20 74 6f 20 6c 6f 67 69 6e 2c 20 65 74 63 2e 20 to login, etc.
8f40: 53 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 See the.<b class
8f50: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c ="option">-cert<
8f60: 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 /b> and <b class
8f70: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 66 ="option">-certf
8f80: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 ile</b> options
8f90: 69 66 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 70 if you need to p
8fa0: 72 6f 76 69 64 65 20 61 20 63 65 72 74 69 66 69 rovide a certifi
8fb0: 63 61 74 65 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e cate.</p>.</div>
8fc0: 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 .<div id="subsec
8fd0: 74 69 6f 6e 32 22 20 63 6c 61 73 73 3d 22 64 6f tion2" class="do
8fe0: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f ctools_subsectio
8ff0: 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h3><a name="
9000: 73 75 62 73 65 63 74 69 6f 6e 32 22 3e 53 75 6d subsection2">Sum
9010: 6d 61 72 79 20 6f 66 20 63 6f 6d 6d 61 6e 64 20 mary of command
9020: 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 3c 2f 61 3e line options</a>
9030: 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c </h3>.<p>The fol
9040: 6c 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73 20 61 lowing options a
9050: 72 65 20 75 73 65 64 20 66 6f 72 20 70 65 65 72 re used for peer
9060: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
9070: 69 64 61 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c 64 6c idation:</p>.<dl
9080: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
9090: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c _options">.<dt><
90a0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
90b0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 >-cadir</b> <i c
90c0: 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63 lass="arg">direc
90d0: 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 tory</i></dt>.<d
90e0: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 d><p>Specifies t
90f0: 68 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 he directory whe
9100: 72 65 20 74 68 65 20 43 65 72 74 69 66 69 63 61 re the Certifica
9110: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 te Authority (CA
9120: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 61 ) certificates a
9130: 72 65 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 re.stored. The d
9140: 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f efault is platfo
9150: 72 6d 20 73 70 65 63 69 66 69 63 2c 20 62 75 74 rm specific, but
9160: 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f is usually &quo
9170: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 t;<b class="file
9180: 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 ">/etc/ssl/certs
9190: 3c 2f 62 3e 26 71 75 6f 74 3b 20 6f 6e 0a 4c 69 </b>" on.Li
91a0: 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d 73 nux/Unix systems
91b0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f . The default lo
91c0: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 cation can be ov
91d0: 65 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 0a erridden by the.
91e0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
91f0: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 le">SSL_CERT_DIR
9200: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 </b> environment
9210: 20 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f variable.</p></
9220: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
9230: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c ="option">-cafil
9240: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
9250: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 arg">filename</i
9260: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
9270: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 ecifies the file
9280: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 with the Certif
9290: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 icate Authority
92a0: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 (CA) certificate
92b0: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 s to use in.<b c
92c0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d lass="const">PEM
92d0: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 </b> file format
92e0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
92f0: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d "<b class=
9300: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c "file">cert.pem<
9310: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 /b>", in th
9320: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 e OpenSSL.direct
9330: 6f 72 79 2e 20 4f 6e 20 4c 69 6e 75 78 2f 55 6e ory. On Linux/Un
9340: 69 78 20 73 79 73 74 65 6d 73 2c 20 74 68 69 73 ix systems, this
9350: 20 69 73 20 75 73 75 61 6c 6c 79 20 26 71 75 6f is usually &quo
9360: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 t;<b class="file
9370: 22 3e 2f 65 74 63 2f 73 73 6c 2f 63 61 2d 62 75 ">/etc/ssl/ca-bu
9380: 6e 64 6c 65 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f ndle.pem</b>&quo
9390: 74 3b 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 t;..The default
93a0: 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 72 file can be over
93b0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62 ridden by the <b
93c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
93d0: 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c ">SSL_CERT_FILE<
93e0: 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a /b> environment.
93f0: 76 61 72 69 61 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 variable.</p></d
9400: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
9410: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 "option">-castor
9420: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
9430: 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 arg">URI</i></dt
9440: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 >.<dd><p>Specifi
9450: 65 73 20 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 es the Uniform R
9460: 65 73 6f 75 72 63 65 20 49 64 65 6e 74 69 66 69 esource Identifi
9470: 65 72 20 28 55 52 49 29 20 66 6f 72 20 74 68 65 er (URI) for the
9480: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
9490: 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72 hority.(CA) stor
94a0: 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 e, which may be
94b0: 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e a single contain
94c0: 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 er or a catalog
94d0: 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 of containers..S
94e0: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65 tarting with Ope
94f0: 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 nSSL 3.2 on MS W
9500: 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 indows, set to &
9510: 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 quot;<b class="c
9520: 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 onst">org.openss
9530: 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 l.winstore://</b
9540: 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74 >".to use t
9550: 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 he built-in MS W
9560: 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61 indows Certifica
9570: 74 65 20 53 74 6f 72 65 2e 20 53 74 61 72 74 69 te Store. Starti
9580: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 ng in TclTLS 2.0
9590: 2c 20 74 68 69 73 0a 69 73 20 74 68 65 20 64 65 , this.is the de
95a0: 66 61 75 6c 74 20 69 66 20 3c 62 20 63 6c 61 73 fault if <b clas
95b0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
95c0: 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d r</b>, <b class=
95d0: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c "option">-cadir<
95e0: 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 /b>, and <b clas
95f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 s="option">-cast
9600: 6f 72 65 3c 2f 62 3e 20 61 72 65 0a 6e 6f 74 20 ore</b> are.not
9610: 73 70 65 63 69 66 69 65 64 2e 20 54 68 69 73 20 specified. This
9620: 73 74 6f 72 65 20 6f 6e 6c 79 20 73 75 70 70 6f store only suppo
9630: 72 74 73 20 72 6f 6f 74 20 63 65 72 74 69 66 69 rts root certifi
9640: 63 61 74 65 20 73 74 6f 72 65 73 2e 3c 2f 70 3e cate stores.</p>
9650: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
9660: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 ss="option">-req
9670: 75 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 uest</b> <i clas
9680: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
9690: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 </dt>.<dd><p>Req
96a0: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 uest a certifica
96b0: 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 te from the peer
96c0: 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 during the SSL
96d0: 68 61 6e 64 73 68 61 6b 65 2e 20 54 68 69 73 20 handshake. This
96e0: 69 73 20 6e 65 65 64 65 64 0a 74 6f 20 64 6f 20 is needed.to do
96f0: 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 Certificate Vali
9700: 64 61 74 69 6f 6e 2e 20 53 74 61 72 74 69 6e 67 dation. Starting
9710: 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 20 in TclTLS 1.8,
9720: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 0a 3c the default is.<
9730: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
9740: 74 72 75 65 3c 2f 62 3e 20 66 6f 72 20 63 6c 69 true</b> for cli
9750: 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e ent connections.
9760: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
9770: 54 4c 53 20 32 2e 30 2c 20 69 66 20 73 65 74 20 TLS 2.0, if set
9780: 74 6f 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e to.<b class="con
9790: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e st">false</b> an
97a0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
97b0: 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e on">-require</b>
97c0: 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f is <b class="co
97d0: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 nst">true</b>, t
97e0: 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 65 hen this will be
97f0: 0a 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 3c .overridden to <
9800: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
9810: 74 72 75 65 3c 2f 62 3e 2e 20 49 6e 20 61 64 64 true</b>. In add
9820: 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 6e ition, the clien
9830: 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 t can manually i
9840: 6e 73 70 65 63 74 20 61 6e 64 0a 61 63 63 65 70 nspect and.accep
9850: 74 20 6f 72 20 72 65 6a 65 63 74 20 65 61 63 68 t or reject each
9860: 20 63 65 72 74 69 66 69 63 61 74 65 20 75 73 69 certificate usi
9870: 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d ng the <b class=
9880: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 "option">-valida
9890: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 tecommand</b> op
98a0: 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c tion.</p></dd>.<
98b0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
98c0: 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 ion">-require</b
98d0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
98e0: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
98f0: 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 dd><p>Require a
9900: 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 valid certificat
9910: 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 e from the peer
9920: 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 during the SSL h
9930: 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 andshake. If thi
9940: 73 20 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 s is.set to true
9950: 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d , then <b class=
9960: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 "option">-reques
9970: 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 t</b> must also
9980: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 be set to true a
9990: 6e 64 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 nd a either.<b c
99a0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
99b0: 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 adir</b>, <b cla
99c0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 ss="option">-caf
99d0: 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 ile</b>, <b clas
99e0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 s="option">-cast
99f0: 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c ore</b>, or a pl
9a00: 61 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d atform default.m
9a10: 75 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 ust be provided
9a20: 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 in order to vali
9a30: 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 date against. Th
9a40: 65 20 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c e default in Tcl
9a50: 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c TLS 1.8 and.earl
9a60: 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 ier versions is
9a70: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
9a80: 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 >false</b> since
9a90: 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 not all platfor
9aa0: 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 69 63 ms have certific
9ab0: 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 ates to.validate
9ac0: 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f against in a fo
9ad0: 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 rm compatible wi
9ae0: 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72 th OpenSSL. Star
9af0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 ting in TclTLS 2
9b00: 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 .0,.the default
9b10: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
9b20: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 20 66 6f 72 st">true</b> for
9b30: 20 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 69 client connecti
9b40: 6f 6e 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f ons.</p></dd>.</
9b50: 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 dl>.</div>.<div
9b60: 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 22 id="subsection3"
9b70: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
9b80: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 _subsection"><h3
9b90: 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 ><a name="subsec
9ba0: 74 69 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 tion3">When are
9bb0: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 command line opt
9bc0: 69 6f 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e ions needed?</a>
9bd0: 3c 2f 68 33 3e 0a 3c 70 3e 49 6e 20 54 63 6c 54 </h3>.<p>In TclT
9be0: 4c 53 20 31 2e 38 20 61 6e 64 20 65 61 72 6c 69 LS 1.8 and earli
9bf0: 65 72 20 76 65 72 73 69 6f 6e 73 2c 20 63 65 72 er versions, cer
9c00: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 tificate validat
9c10: 69 6f 6e 20 69 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f ion is.<em>NOT</
9c20: 65 6d 3e 20 65 6e 61 62 6c 65 64 20 62 79 20 64 em> enabled by d
9c30: 65 66 61 75 6c 74 2e 20 54 68 69 73 20 6c 69 6d efault. This lim
9c40: 69 74 61 74 69 6f 6e 20 69 73 20 64 75 65 20 74 itation is due t
9c50: 6f 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 o the lack of a
9c60: 63 6f 6d 6d 6f 6e 0a 63 72 6f 73 73 20 70 6c 61 common.cross pla
9c70: 74 66 6f 72 6d 20 64 61 74 61 62 61 73 65 20 6f tform database o
9c80: 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 f Certificate Au
9c90: 74 68 6f 72 69 74 79 20 28 43 41 29 20 70 72 6f thority (CA) pro
9ca0: 76 69 64 65 64 20 63 65 72 74 69 66 69 63 61 74 vided certificat
9cb0: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 es to.validate a
9cc0: 67 61 69 6e 73 74 2e 20 4d 61 6e 79 20 4c 69 6e gainst. Many Lin
9cd0: 75 78 20 73 79 73 74 65 6d 73 20 6e 61 74 69 76 ux systems nativ
9ce0: 65 6c 79 20 73 75 70 70 6f 72 74 20 4f 70 65 6e ely support Open
9cf0: 53 53 4c 20 61 6e 64 20 74 68 75 73 20 68 61 76 SSL and thus hav
9d00: 65 0a 74 68 65 73 65 20 63 65 72 74 69 66 69 63 e.these certific
9d10: 61 74 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 61 ates installed a
9d20: 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 4f 53 s part of the OS
9d30: 2c 20 62 75 74 20 4d 61 63 4f 53 20 61 6e 64 20 , but MacOS and
9d40: 4d 53 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e 6f MS Windows do no
9d50: 74 2e 0a 53 74 61 72 69 6e 67 20 69 6e 20 54 63 t..Staring in Tc
9d60: 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 lTLS 2.0, the de
9d70: 66 61 75 6c 74 20 66 6f 72 20 63 6c 69 65 6e 74 fault for client
9d80: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 68 61 73 connections has
9d90: 20 62 65 65 6e 20 63 68 61 6e 67 65 64 20 74 6f been changed to
9da0: 0a 72 65 71 75 69 72 65 20 63 65 72 74 69 66 69 .require certifi
9db0: 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 cate validation
9dc0: 62 79 20 64 65 66 61 75 6c 74 2e 20 49 6e 20 6f by default. In o
9dd0: 72 64 65 72 20 74 6f 20 75 73 65 20 74 68 65 20 rder to use the
9de0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
9df0: 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 0a 6f ">-require</b>.o
9e00: 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 ption, one of th
9e10: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 75 73 74 e following must
9e20: 20 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75 be true:</p>.<u
9e30: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
9e40: 73 5f 69 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69 s_itemized">.<li
9e50: 3e 3c 70 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 ><p>On Linux and
9e60: 20 55 6e 69 78 20 73 79 73 74 65 6d 73 20 77 69 Unix systems wi
9e70: 74 68 20 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61 th OpenSSL alrea
9e80: 64 79 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 dy installed or
9e90: 69 66 20 74 68 65 20 43 41 0a 63 65 72 74 69 66 if the CA.certif
9ea0: 69 63 61 74 65 73 20 61 72 65 20 61 76 61 69 6c icates are avail
9eb0: 61 62 6c 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d able in PEM form
9ec0: 61 74 2c 20 61 6e 64 20 69 66 20 74 68 65 79 20 at, and if they
9ed0: 61 72 65 20 73 74 6f 72 65 64 20 69 6e 20 74 68 are stored in th
9ee0: 65 0a 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 e.standard locat
9ef0: 69 6f 6e 73 2c 20 6f 72 20 69 66 20 74 68 65 20 ions, or if the
9f00: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
9f10: 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 le">SSL_CERT_DIR
9f20: 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 </b> or <b class
9f30: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f ="variable">SSL_
9f40: 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e CERT_FILE</b>.en
9f50: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 vironment variab
9f60: 6c 65 73 20 61 72 65 20 73 65 74 2c 20 74 68 65 les are set, the
9f70: 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 n <b class="opti
9f80: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 on">-cadir</b>,
9f90: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
9fa0: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e ">-cadir</b>,.an
9fb0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
9fc0: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e on">-castore</b>
9fd0: 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c aren't needed.<
9fe0: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e /p></li>.<li><p>
9ff0: 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f If OpenSSL is no
a000: 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 t installed in t
a010: 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 he default locat
a020: 69 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 ion, or when usi
a030: 6e 67 20 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 ng Mac OS.or MS
a040: 57 69 6e 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e Windows and Open
a050: 53 53 4c 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 SSL is installed
a060: 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 , the <b class="
a070: 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 variable">SSL_CE
a080: 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f RT_DIR</b> and/o
a090: 72 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 r.<b class="vari
a0a0: 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 able">SSL_CERT_F
a0b0: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d ILE</b> environm
a0c0: 65 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 ent variables or
a0d0: 20 74 68 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 the one of the
a0e0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
a0f0: 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 ">-cadir</b>,.<b
a100: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
a110: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c -cadir</b>, or <
a120: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
a130: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 >-castore</b> op
a140: 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 64 65 tions must be de
a150: 66 69 6e 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a fined.</p></li>.
a160: 3c 6c 69 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e <li><p>On MS Win
a170: 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67 20 69 dows, starting i
a180: 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c 20 69 n OpenSSL 3.2, i
a190: 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c t is now possibl
a1a0: 65 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 0a e to access the.
a1b0: 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73 built-in Windows
a1c0: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f Certificate Sto
a1d0: 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e re from OpenSSL.
a1e0: 20 54 68 69 73 20 63 61 6e 20 62 65 20 75 74 69 This can be uti
a1f0: 6c 69 7a 65 64 20 62 79 0a 73 65 74 74 69 6e 67 lized by.setting
a200: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f the <b class="o
a210: 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c ption">-castore<
a220: 2f 62 3e 20 6f 70 74 69 6f 6e 20 74 6f 20 26 71 /b> option to &q
a230: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f uot;<b class="co
a240: 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c nst">org.openssl
a250: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e .winstore://</b>
a260: 26 71 75 6f 74 3b 2e 0a 49 6e 20 54 63 6c 54 4c "..In TclTL
a270: 53 20 32 2e 30 2c 20 74 68 69 73 20 69 73 20 74 S 2.0, this is t
a280: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 he default value
a290: 20 69 66 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 if <b class="op
a2a0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e tion">-cadir</b>
a2b0: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 ,.<b class="opti
a2c0: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 on">-cadir</b>,
a2d0: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 and <b class="op
a2e0: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f tion">-castore</
a2f0: 62 3e 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 b> are not speci
a300: 66 69 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c fied.</p></li>.<
a310: 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e 53 53 4c li><p>If OpenSSL
a320: 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 is not installe
a330: 64 20 6f 72 20 74 68 65 20 43 41 20 63 65 72 74 d or the CA cert
a340: 69 66 69 63 61 74 65 73 20 61 72 65 20 6e 6f 74 ificates are not
a350: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 50 45 available in PE
a360: 4d 0a 66 6f 72 6d 61 74 2c 20 74 68 65 20 43 41 M.format, the CA
a370: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75 certificates mu
a380: 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 st be downloaded
a390: 20 61 6e 64 20 69 6e 73 74 61 6c 6c 65 64 20 77 and installed w
a3a0: 69 74 68 20 74 68 65 20 75 73 65 72 0a 73 6f 66 ith the user.sof
a3b0: 74 77 61 72 65 2e 20 54 68 65 20 43 55 52 4c 20 tware. The CURL
a3c0: 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20 team makes them
a3d0: 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20 available at.<a
a3e0: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75 href="https://cu
a3f0: 72 6c 2e 73 65 2f 64 6f 63 73 2f 63 61 65 78 74 rl.se/docs/caext
a400: 72 61 63 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65 ract.html">CA ce
a410: 72 74 69 66 69 63 61 74 65 73 20 65 78 74 72 61 rtificates extra
a420: 63 74 65 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c cted.from Mozill
a430: 61 3c 2f 61 3e 20 69 6e 20 74 68 65 20 26 71 75 a</a> in the &qu
a440: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c ot;<b class="fil
a450: 65 22 3e 63 61 63 65 72 74 2e 70 65 6d 3c 2f 62 e">cacert.pem</b
a460: 3e 26 71 75 6f 74 3b 20 66 69 6c 65 2e 20 59 6f >" file. Yo
a470: 75 20 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68 u must then eith
a480: 65 72 20 73 65 74 20 74 68 65 0a 3c 62 20 63 6c er set the.<b cl
a490: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 ass="variable">S
a4a0: 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 SL_CERT_DIR</b>
a4b0: 61 6e 64 2f 6f 72 20 3c 62 20 63 6c 61 73 73 3d and/or <b class=
a4c0: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 "variable">SSL_C
a4d0: 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 ERT_FILE</b> env
a4e0: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c ironment variabl
a4f0: 65 73 20 6f 72 20 74 68 65 0a 3c 62 20 63 6c 61 es or the.<b cla
a500: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 ss="option">-cad
a510: 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 ir</b> or <b cla
a520: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 ss="option">-caf
a530: 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 ile</b> options
a540: 74 6f 20 74 68 65 20 43 41 20 63 65 72 74 20 66 to the CA cert f
a550: 69 6c 65 27 73 20 69 6e 73 74 61 6c 6c 0a 6c 6f ile's install.lo
a560: 63 61 74 69 6f 6e 2e 20 49 74 20 69 73 20 79 6f cation. It is yo
a570: 75 72 20 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 ur responsibilit
a580: 79 20 74 6f 20 6b 65 65 70 20 74 68 69 73 20 66 y to keep this f
a590: 69 6c 65 20 75 70 20 74 6f 20 64 61 74 65 2e 3c ile up to date.<
a5a0: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c /p></li>.</ul>.<
a5b0: 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 /div>.</div>.<di
a5c0: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 35 22 20 v id="section5"
a5d0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
a5e0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
a5f0: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 35 22 3e name="section5">
a600: 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 Callback Options
a610: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 41 73 20 </a></h2>.<p>As
a620: 70 72 65 76 69 6f 75 73 6c 79 20 64 65 73 63 72 previously descr
a630: 69 62 65 64 2c 20 65 61 63 68 20 63 68 61 6e 6e ibed, each chann
a640: 65 6c 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 el can be given
a650: 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 their own callba
a660: 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e cks.to handle in
a670: 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 termediate proce
a680: 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 ssing by the Ope
a690: 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 nSSL library, us
a6a0: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 ing the.<b class
a6b0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 ="option">-comma
a6c0: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 nd</b>, <b class
a6d0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 ="option">-passw
a6e0: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 ord</b>, and <b
a6f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
a700: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
a710: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 0a 70 61 73 </b> options.pas
a720: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 sed to either of
a730: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
a740: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 tls::socket</b>
a750: 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 or <b class="cmd
a760: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 ">tls::import</b
a770: 3e 2e 0a 55 6e 6c 69 6b 65 20 70 72 65 76 69 6f >..Unlike previo
a780: 75 73 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 54 us versions of T
a790: 63 6c 54 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74 clTLS, only if t
a7a0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 he callback gene
a7b0: 72 61 74 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a rates an error,.
a7c0: 77 69 6c 6c 20 74 68 65 20 3c 62 20 63 6c 61 73 will the <b clas
a7d0: 73 3d 22 73 79 73 63 6d 64 22 3e 62 67 65 72 72 s="syscmd">bgerr
a7e0: 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 62 or</b> command b
a7f0: 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74 e invoked with t
a800: 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61 he error informa
a810: 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64 69 76 20 69 tion.</p>.<div i
a820: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 34 22 20 d="subsection4"
a830: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
a840: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e subsection"><h3>
a850: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 <a name="subsect
a860: 69 6f 6e 34 22 3e 56 61 6c 75 65 73 20 66 6f 72 ion4">Values for
a870: 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 Command Callbac
a880: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 k</a></h3>.<p>Th
a890: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 e callback for t
a8a0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
a8b0: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 ion">-command</b
a8c0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 6f > option is invo
a8d0: 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 ked at several p
a8e0: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 oints during the
a8f0: 0a 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 .OpenSSL handsha
a900: 6b 65 20 61 6e 64 20 64 75 72 69 6e 67 20 72 6f ke and during ro
a910: 75 74 69 6e 65 20 6f 70 65 72 61 74 69 6f 6e 73 utine operations
a920: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 . See below for
a930: 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 61 72 67 the possible.arg
a940: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
a950: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
a960: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74 ript. Values ret
a970: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 63 urned from the c
a980: 61 6c 6c 62 61 63 6b 20 61 72 65 0a 69 67 6e 6f allback are.igno
a990: 72 65 64 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 red.</p>.<dl cla
a9a0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 ss="doctools_opt
a9b0: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c ions">.<dt><b cl
a9c0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 65 72 72 ass="option">err
a9d0: 6f 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d or</b> <i class=
a9e0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 "arg">channelId
a9f0: 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e message</i></dt>
aa00: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 .<dd><p>This for
aa10: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
aa20: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65 invoked wheneve
aa30: 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 r an error occur
aa40: 73 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 s during the ini
aa50: 74 69 61 6c 0a 63 6f 6e 6e 65 63 74 69 6f 6e 2c tial.connection,
aa60: 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 handshake, or I
aa70: 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 /O operations. T
aa80: 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 he <i class="arg
aa90: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 20 61 72 ">message</i> ar
aaa0: 67 75 6d 65 6e 74 20 63 61 6e 20 62 65 0a 66 72 gument can be.fr
aab0: 6f 6d 20 74 68 65 20 54 63 6c 5f 45 72 72 6e 6f om the Tcl_Errno
aac0: 4d 73 67 2c 20 4f 70 65 6e 53 53 4c 20 66 75 6e Msg, OpenSSL fun
aad0: 63 74 69 6f 6e 20 3c 62 20 63 6c 61 73 73 3d 22 ction <b class="
aae0: 66 75 6e 63 74 69 6f 6e 22 3e 45 52 52 5f 72 65 function">ERR_re
aaf0: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e ason_error_strin
ab00: 67 28 29 3c 2f 62 3e 2c 0a 6f 72 20 61 20 63 75 g()</b>,.or a cu
ab10: 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e 20 54 68 stom message. Th
ab20: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e is callback is n
ab30: 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e ew for TclTLS 1.
ab40: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 8.</p></dd>.<dt>
ab50: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
ab60: 22 3e 69 6e 66 6f 3c 2f 62 3e 20 3c 69 20 63 6c ">info</b> <i cl
ab70: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
ab80: 6c 49 64 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 lId major minor
ab90: 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f 69 3e message type</i>
aba0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 </dt>.<dd><p>Thi
abb0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
abc0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 ck is invoked by
abd0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
abe0: 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 ction.<b class="
abf0: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 function">SSL_se
ac00: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 t_info_callback(
ac10: 29 3c 2f 62 3e 20 64 75 72 69 6e 67 20 74 68 65 )</b> during the
ac20: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 initial connect
ac30: 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b ion and handshak
ac40: 65 0a 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 e.operations. Th
ac50: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a e arguments are:
ac60: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 </p>.<dl class="
ac70: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 doctools_definit
ac80: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c ions">.<dt><i cl
ac90: 61 73 73 3d 22 61 72 67 22 3e 6d 61 6a 6f 72 3c ass="arg">major<
aca0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
acb0: 4d 61 6a 6f 72 20 63 61 74 65 67 6f 72 79 20 66 Major category f
acc0: 6f 72 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20 or error. Valid
acd0: 65 6e 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c enums are: <b cl
ace0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 61 6e 64 ass="const">hand
acf0: 73 68 61 6b 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c shake</b>, <b cl
ad00: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61 6c 65 72 ass="const">aler
ad10: 74 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d t</b>,.<b class=
ad20: 22 63 6f 6e 73 74 22 3e 63 6f 6e 6e 65 63 74 3c "const">connect<
ad30: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 /b>, <b class="c
ad40: 6f 6e 73 74 22 3e 61 63 63 65 70 74 3c 2f 62 3e onst">accept</b>
ad50: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
ad60: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 69 i class="arg">mi
ad70: 6e 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 nor</i></dt>.<dd
ad80: 3e 3c 70 3e 4d 69 6e 6f 72 20 63 61 74 65 67 6f ><p>Minor catego
ad90: 72 79 20 66 6f 72 20 65 72 72 6f 72 2e 20 56 61 ry for error. Va
ada0: 6c 69 64 20 65 6e 75 6d 73 20 61 72 65 3a 20 3c lid enums are: <
adb0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
adc0: 73 74 61 72 74 3c 2f 62 3e 2c 20 3c 62 20 63 6c start</b>, <b cl
add0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 64 6f 6e 65 ass="const">done
ade0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 </b>, <b class="
adf0: 63 6f 6e 73 74 22 3e 72 65 61 64 3c 2f 62 3e 2c const">read</b>,
ae00: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 .<b class="const
ae10: 22 3e 77 72 69 74 65 3c 2f 62 3e 2c 20 3c 62 20 ">write</b>, <b
ae20: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6c 6f class="const">lo
ae30: 6f 70 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 op</b>, <b class
ae40: 3d 22 63 6f 6e 73 74 22 3e 65 78 69 74 3c 2f 62 ="const">exit</b
ae50: 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e >.</p></dd>.<dt>
ae60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d <i class="arg">m
ae70: 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a essage</i></dt>.
ae80: 3c 64 64 3e 3c 70 3e 44 65 73 63 72 69 70 74 69 <dd><p>Descripti
ae90: 76 65 20 6d 65 73 73 61 67 65 20 73 74 72 69 6e ve message strin
aea0: 67 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 67 g which may be g
aeb0: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20 enerated either
aec0: 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e by.<b class="fun
aed0: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 74 61 74 65 ction">SSL_state
aee0: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
aef0: 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 b> or <b class="
af00: 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 61 6c function">SSL_al
af10: 65 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f ert_desc_string_
af20: 6c 6f 6e 67 28 29 3c 2f 62 3e 2c 0a 64 65 70 65 long()</b>,.depe
af30: 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e nding on the con
af40: 74 65 78 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c text.</p></dd>.<
af50: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
af60: 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a ">type</i></dt>.
af70: 3c 64 64 3e 3c 70 3e 46 6f 72 20 61 6c 65 72 74 <dd><p>For alert
af80: 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 s, the possible
af90: 76 61 6c 75 65 73 20 61 72 65 3a 20 3c 62 20 63 values are: <b c
afa0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 61 72 lass="const">war
afb0: 6e 69 6e 67 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 ning</b>,.<b cla
afc0: 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 74 61 6c ss="const">fatal
afd0: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 </b>, and <b cla
afe0: 73 73 3d 22 63 6f 6e 73 74 22 3e 75 6e 6b 6e 6f ss="const">unkno
aff0: 77 6e 3c 2f 62 3e 2e 20 46 6f 72 20 6f 74 68 65 wn</b>. For othe
b000: 72 73 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f rs, <b class="co
b010: 6e 73 74 22 3e 69 6e 66 6f 3c 2f 62 3e 20 69 73 nst">info</b> is
b020: 20 75 73 65 64 2e 0a 54 68 69 73 20 61 72 67 75 used..This argu
b030: 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 ment is new for
b040: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
b050: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a /dd>.</dl></dd>.
b060: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
b070: 74 69 6f 6e 22 3e 6d 65 73 73 61 67 65 3c 2f 62 tion">message</b
b080: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
b090: 3e 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 65 63 >channelId direc
b0a0: 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 6f 6e tion version con
b0b0: 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 61 67 tent_type messag
b0c0: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
b0d0: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 p>This form of c
b0e0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
b0f0: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ed by the OpenSS
b100: 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c L function.<b cl
b110: 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 ass="function">S
b120: 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 SL_set_msg_callb
b130: 61 63 6b 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 ack()</b> whenev
b140: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 er a message is
b150: 73 65 6e 74 20 6f 72 20 72 65 63 65 69 76 65 64 sent or received
b160: 20 64 75 72 69 6e 67 20 74 68 65 0a 69 6e 69 74 during the.init
b170: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 ial connection,
b180: 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f handshake, or I/
b190: 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 49 74 O operations. It
b1a0: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
b1b0: 6c 65 20 77 68 65 6e 0a 4f 70 65 6e 53 53 4c 20 le when.OpenSSL
b1c0: 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69 74 68 is complied with
b1d0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 the <b class="c
b1e0: 6f 6e 73 74 22 3e 65 6e 61 62 6c 65 2d 73 73 6c onst">enable-ssl
b1f0: 2d 74 72 61 63 65 3c 2f 62 3e 20 6f 70 74 69 6f -trace</b> optio
b200: 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b n. This callback
b210: 20 69 73 0a 6e 65 77 20 66 6f 72 20 54 63 6c 54 is.new for TclT
b220: 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 LS 1.8. The argu
b230: 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c ments are:</p>.<
b240: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f dl class="doctoo
b250: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e ls_definitions">
b260: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
b270: 72 67 22 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 69 rg">direction</i
b280: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 ></dt>.<dd><p>Di
b290: 72 65 63 74 69 6f 6e 20 69 73 20 65 69 74 68 65 rection is eithe
b2a0: 72 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 r <b class="cons
b2b0: 74 22 3e 53 65 6e 74 3c 2f 62 3e 20 6f 72 20 3c t">Sent</b> or <
b2c0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
b2d0: 52 65 63 65 69 76 65 64 3c 2f 62 3e 2e 3c 2f 70 Received</b>.</p
b2e0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c ></dd>.<dt><i cl
b2f0: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f ass="arg">versio
b300: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
b310: 70 3e 56 65 72 73 69 6f 6e 20 69 73 20 74 68 65 p>Version is the
b320: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
b330: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e n.</p></dd>.<dt>
b340: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
b350: 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 69 3e 3c ontent_type</i><
b360: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 6f 6e 74 /dt>.<dd><p>Cont
b370: 65 6e 74 20 74 79 70 65 20 69 73 20 74 68 65 20 ent type is the
b380: 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 message content
b390: 74 79 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c type.</p></dd>.<
b3a0: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
b3b0: 22 3e 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 ">message</i></d
b3c0: 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 65 73 73 61 67 t>.<dd><p>Messag
b3d0: 65 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 e is more info f
b3e0: 72 6f 6d 20 74 68 65 20 3c 62 20 63 6c 61 73 73 rom the <b class
b3f0: 3d 22 63 6f 6e 73 74 22 3e 53 53 4c 5f 74 72 61 ="const">SSL_tra
b400: 63 65 3c 2f 62 3e 20 41 50 49 2e 3c 2f 70 3e 3c ce</b> API.</p><
b410: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a /dd>.</dl></dd>.
b420: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
b430: 74 69 6f 6e 22 3e 73 65 73 73 69 6f 6e 3c 2f 62 tion">session</b
b440: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
b450: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 >channelId sessi
b460: 6f 6e 5f 69 64 20 73 65 73 73 69 6f 6e 5f 74 69 on_id session_ti
b470: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 69 cket lifetime</i
b480: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
b490: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
b4a0: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ack is invoked b
b4b0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 y the OpenSSL fu
b4c0: 6e 63 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d nction.<b class=
b4d0: 22 66 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 43 "function">SSL_C
b4e0: 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f TX_sess_set_new_
b4f0: 63 62 28 29 3c 2f 62 3e 20 77 68 65 6e 65 76 65 cb()</b> wheneve
b500: 72 20 61 20 6e 65 77 20 73 65 73 73 69 6f 6e 20 r a new session
b510: 69 64 20 69 73 20 73 65 6e 74 20 62 79 20 74 68 id is sent by th
b520: 65 0a 73 65 72 76 65 72 20 64 75 72 69 6e 67 20 e.server during
b530: 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e the initial conn
b540: 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 ection and hands
b550: 68 61 6b 65 20 61 6e 64 20 61 6c 73 6f 20 64 75 hake and also du
b560: 72 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e ring the session
b570: 0a 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 73 .if the <b class
b580: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f ="option">-post_
b590: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 handshake</b> op
b5a0: 74 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 74 tion is set to t
b5b0: 72 75 65 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 rue. This callba
b5c0: 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 0a 54 63 ck is new for.Tc
b5d0: 6c 54 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 lTLS 1.8. The ar
b5e0: 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e guments are:</p>
b5f0: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
b600: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 ools_definitions
b610: 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d ">.<dt><i class=
b620: 22 61 72 67 22 3e 73 65 73 73 69 6f 6e 5f 69 64 "arg">session_id
b630: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
b640: 3e 53 65 73 73 69 6f 6e 20 49 64 20 69 73 20 74 >Session Id is t
b650: 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73 69 he current sessi
b660: 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 3c 2f 70 on identifier</p
b670: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c ></dd>.<dt><i cl
b680: 61 73 73 3d 22 61 72 67 22 3e 73 65 73 73 69 6f ass="arg">sessio
b690: 6e 5f 74 69 63 6b 65 74 3c 2f 69 3e 3c 2f 64 74 n_ticket</i></dt
b6a0: 3e 0a 3c 64 64 3e 3c 70 3e 54 69 63 6b 65 74 20 >.<dd><p>Ticket
b6b0: 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74 is the session t
b6c0: 69 63 6b 65 74 20 69 6e 66 6f 3c 2f 70 3e 3c 2f icket info</p></
b6d0: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 dd>.<dt><i class
b6e0: 3d 22 61 72 67 22 3e 6c 69 66 65 74 69 6d 65 3c ="arg">lifetime<
b6f0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
b700: 4c 69 66 65 74 69 6d 65 20 69 73 20 74 68 65 20 Lifetime is the
b710: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 ticket lifetime
b720: 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c in seconds.</p><
b730: 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a /dd>.</dl></dd>.
b740: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
b750: 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e tion">verify</b>
b760: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
b770: 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 channelId depth
b780: 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f cert status erro
b790: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c r</i></dt>.<dd><
b7a0: 70 3e 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 p>This callback
b7b0: 77 61 73 20 6d 6f 76 65 64 20 74 6f 20 3c 62 20 was moved to <b
b7c0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
b7d0: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c validatecommand<
b7e0: 2f 62 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e /b> in TclTLS 1.
b7f0: 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 8.</p></dd>.</dl
b800: 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 >.</div>.<div id
b810: 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22 20 63 ="subsection5" c
b820: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
b830: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c ubsection"><h3><
b840: 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 a name="subsecti
b850: 6f 6e 35 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 on5">Values for
b860: 50 61 73 73 77 6f 72 64 20 43 61 6c 6c 62 61 63 Password Callbac
b870: 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 68 k</a></h3>.<p>Th
b880: 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 74 e callback for t
b890: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
b8a0: 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f ion">-password</
b8b0: 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 b> option is inv
b8c0: 6f 6b 65 64 20 62 79 20 54 63 6c 54 4c 53 20 77 oked by TclTLS w
b8d0: 68 65 6e 65 76 65 72 20 4f 70 65 6e 53 53 4c 20 henever OpenSSL
b8e0: 6e 65 65 64 73 0a 74 6f 20 6f 62 74 61 69 6e 20 needs.to obtain
b8f0: 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20 a password. See
b900: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f below for the po
b910: 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 ssible arguments
b920: 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0a 63 passed to the.c
b930: 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 allback script.
b940: 54 68 65 20 75 73 65 72 20 70 72 6f 76 69 64 65 The user provide
b950: 64 20 70 61 73 73 77 6f 72 64 20 69 73 20 65 78 d password is ex
b960: 70 65 63 74 65 64 20 74 6f 20 62 65 20 72 65 74 pected to be ret
b970: 75 72 6e 65 64 20 62 79 20 74 68 65 0a 63 61 6c urned by the.cal
b980: 6c 62 61 63 6b 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 lback.</p>.<dl c
b990: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f lass="doctools_o
b9a0: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 ptions">.<dt><b
b9b0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 70 class="option">p
b9c0: 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 20 63 assword</b> <i c
b9d0: 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 lass="arg">rwfla
b9e0: 67 20 73 69 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a g size</i></dt>.
b9f0: 3c 64 64 3e 3c 70 3e 49 6e 76 6f 6b 65 64 20 77 <dd><p>Invoked w
ba00: 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73 hen loading or s
ba10: 74 6f 72 69 6e 67 20 61 6e 20 65 6e 63 72 79 70 toring an encryp
ba20: 74 65 64 20 50 45 4d 20 63 65 72 74 69 66 69 63 ted PEM certific
ba30: 61 74 65 2e 20 54 68 65 20 61 72 67 75 6d 65 6e ate. The argumen
ba40: 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 ts are:</p>.<dl
ba50: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
ba60: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 definitions">.<d
ba70: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 t><i class="arg"
ba80: 3e 72 77 66 6c 61 67 3c 2f 69 3e 3c 2f 64 74 3e >rwflag</i></dt>
ba90: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 72 65 61 64 .<dd><p>The read
baa0: 2f 77 72 69 74 65 20 66 6c 61 67 20 69 73 20 30 /write flag is 0
bab0: 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63 for reading/dec
bac0: 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 ryption or 1 for
bad0: 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70 74 writing/encrypt
bae0: 69 6f 6e 2e 0a 54 68 65 20 6c 61 74 74 65 72 20 ion..The latter
baf0: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 64 can be used to d
bb00: 65 74 65 72 6d 69 6e 65 20 77 68 65 6e 20 74 6f etermine when to
bb10: 20 70 72 6f 6d 70 74 20 74 68 65 20 75 73 65 72 prompt the user
bb20: 20 74 6f 20 63 6f 6e 66 69 72 6d 2e 0a 54 68 69 to confirm..Thi
bb30: 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 s argument is ne
bb40: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
bb50: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
bb60: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 69 i class="arg">si
bb70: 7a 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ze</i></dt>.<dd>
bb80: 3c 70 3e 54 68 65 20 73 69 7a 65 20 69 73 20 74 <p>The size is t
bb90: 68 65 20 6d 61 78 69 6d 75 6d 20 6c 65 6e 67 74 he maximum lengt
bba0: 68 20 6f 66 20 74 68 65 20 70 61 73 73 77 6f 72 h of the passwor
bbb0: 64 20 69 6e 20 62 79 74 65 73 2e 0a 54 68 69 73 d in bytes..This
bbc0: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 argument is new
bbd0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
bbe0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c </p></dd>.</dl><
bbf0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 /dd>.</dl>.</div
bc00: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 >.<div id="subse
bc10: 63 74 69 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 ction6" class="d
bc20: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
bc30: 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d on"><h3><a name=
bc40: 22 73 75 62 73 65 63 74 69 6f 6e 36 22 3e 56 61 "subsection6">Va
bc50: 6c 75 65 73 20 66 6f 72 20 56 61 6c 69 64 61 74 lues for Validat
bc60: 65 20 43 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 e Command Callba
bc70: 63 6b 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 54 ck</a></h3>.<p>T
bc80: 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 he callback for
bc90: 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 the <b class="op
bca0: 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 63 tion">-validatec
bcb0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f ommand</b> optio
bcc0: 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 n is invoked dur
bcd0: 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b ing the handshak
bce0: 65 0a 70 72 6f 63 65 73 73 20 69 6e 20 6f 72 64 e.process in ord
bcf0: 65 72 20 66 6f 72 20 74 68 65 20 61 70 70 6c 69 er for the appli
bd00: 63 61 74 69 6f 6e 20 74 6f 20 76 61 6c 69 64 61 cation to valida
bd10: 74 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 te the provided
bd20: 76 61 6c 75 65 28 73 29 2e 20 53 65 65 0a 62 65 value(s). See.be
bd30: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 low for the poss
bd40: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 ible arguments p
bd50: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c assed to the cal
bd60: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 49 66 lback script. If
bd70: 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 2c 20 not.specified,
bd80: 4f 70 65 6e 53 53 4c 20 77 69 6c 6c 20 61 63 63 OpenSSL will acc
bd90: 65 70 74 20 61 6c 6c 20 76 61 6c 69 64 20 63 65 ept all valid ce
bda0: 72 74 69 66 69 63 61 74 65 73 20 61 6e 64 20 65 rtificates and e
bdb0: 78 74 65 6e 73 69 6f 6e 73 2e 20 54 6f 20 72 65 xtensions. To re
bdc0: 6a 65 63 74 0a 74 68 65 20 76 61 6c 75 65 20 61 ject.the value a
bdd0: 6e 64 20 61 62 6f 72 74 20 74 68 65 20 63 6f 6e nd abort the con
bde0: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c nection, the cal
bdf0: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 lback should ret
be00: 75 72 6e 20 30 2e 20 54 6f 20 61 63 63 65 70 74 urn 0. To accept
be10: 20 74 68 65 0a 76 61 6c 75 65 20 61 6e 64 20 63 the.value and c
be20: 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e ontinue the conn
be30: 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c ection, it shoul
be40: 64 20 72 65 74 75 72 6e 20 31 2e 20 54 6f 20 72 d return 1. To r
be50: 65 6a 65 63 74 20 74 68 65 20 76 61 6c 75 65 2c eject the value,
be60: 20 62 75 74 0a 63 6f 6e 74 69 6e 75 65 20 74 68 but.continue th
be70: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 e connection, it
be80: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 32 should return 2
be90: 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 . This callback
bea0: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
beb0: 53 20 31 2e 38 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 S 1.8.</p>.<dl c
bec0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f lass="doctools_o
bed0: 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 ptions">.<dt><b
bee0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 61 class="option">a
bef0: 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 lpn</b> <i class
bf00: 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 ="arg">channelId
bf10: 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c protocol match<
bf20: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
bf30: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
bf40: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
bf50: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
bf60: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c en the client AL
bf70: 50 4e 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 0a PN extension is.
bf80: 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c 69 20 received. If <i
bf90: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 61 74 63 class="arg">matc
bfa0: 68 3c 2f 69 3e 20 69 73 20 74 72 75 65 2c 20 74 h</i> is true, t
bfb0: 68 65 6e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 hen <i class="ar
bfc0: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 20 g">protocol</i>
bfd0: 69 73 20 74 68 65 20 66 69 72 73 74 0a 3c 62 20 is the first.<b
bfe0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
bff0: 61 6c 70 6e 3c 2f 62 3e 20 70 72 6f 74 6f 63 6f alpn</b> protoco
c000: 6c 20 6f 70 74 69 6f 6e 20 69 6e 20 63 6f 6d 6d l option in comm
c010: 6f 6e 20 74 6f 20 62 6f 74 68 20 74 68 65 20 63 on to both the c
c020: 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72 lient and server
c030: 2e 0a 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 ..If not, the fi
c040: 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 69 rst client speci
c050: 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 fied protocol is
c060: 20 75 73 65 64 2e 20 54 68 69 73 20 63 61 6c 6c used. This call
c070: 62 61 63 6b 20 69 73 20 63 61 6c 6c 65 64 0a 61 back is called.a
c080: 66 74 65 72 20 74 68 65 20 48 65 6c 6c 6f 20 61 fter the Hello a
c090: 6e 64 20 53 4e 49 20 63 61 6c 6c 62 61 63 6b 73 nd SNI callbacks
c0a0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
c0b0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
c0c0: 3e 68 65 6c 6c 6f 3c 2f 62 3e 20 3c 69 20 63 6c >hello</b> <i cl
c0d0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
c0e0: 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 20 73 lId servername s
c0f0: 65 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 ession_id</i></d
c100: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 t>.<dd><p>For se
c110: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d rvers, this form
c120: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
c130: 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 invoked during c
c140: 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 lient hello mess
c150: 61 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 age.processing.
c160: 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 The purpose is s
c170: 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 6e o the server can
c180: 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 72 select the appr
c190: 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 63 opriate certific
c1a0: 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 ate.to present t
c1b0: 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e o the client, an
c1c0: 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 d to make other
c1d0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 configuration ad
c1e0: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 justments releva
c1f0: 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65 nt.to that serve
c200: 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63 r name and its c
c210: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 onfiguration. It
c220: 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 is called befor
c230: 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c e the SNI and AL
c240: 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 PN.callbacks.</p
c250: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
c260: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 ass="option">sni
c270: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
c280: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 rg">channelId se
c290: 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 rvername</i></dt
c2a0: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 >.<dd><p>For ser
c2b0: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
c2c0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
c2d0: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 nvoked when the
c2e0: 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 Server Name Indi
c2f0: 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 cation.(SNI) ext
c300: 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69 76 ension is receiv
c310: 65 64 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73 ed. The <i class
c320: 3d 22 61 72 67 22 3e 73 65 72 76 65 72 6e 61 6d ="arg">servernam
c330: 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 69 e</i> argument i
c340: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f s the client.pro
c350: 76 69 64 65 64 20 73 65 72 76 65 72 20 6e 61 6d vided server nam
c360: 65 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 e specified in t
c370: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
c380: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 ion">-servername
c390: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 65 </b> option. The
c3a0: 0a 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 77 .purpose is so w
c3b0: 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 hen a server sup
c3c0: 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e ports multiple n
c3d0: 61 6d 65 73 2c 20 74 68 65 20 72 69 67 68 74 20 ames, the right
c3e0: 63 65 72 74 69 66 69 63 61 74 65 0a 63 61 6e 20 certificate.can
c3f0: 62 65 20 75 73 65 64 2e 20 49 74 20 69 73 20 63 be used. It is c
c400: 61 6c 6c 65 64 20 61 66 74 65 72 20 74 68 65 20 alled after the
c410: 48 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62 Hello callback b
c420: 75 74 20 62 65 66 6f 72 65 20 74 68 65 20 41 4c ut before the AL
c430: 50 4e 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f 70 3e PN.callback.</p>
c440: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
c450: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 72 69 ss="option">veri
c460: 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d fy</b> <i class=
c470: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 "arg">channelId
c480: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 depth cert statu
c490: 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e s error</i></dt>
c4a0: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 .<dd><p>This for
c4b0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
c4c0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e invoked by Open
c4d0: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63 SSL when a new c
c4e0: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 72 65 ertificate is re
c4f0: 63 65 69 76 65 64 0a 66 72 6f 6d 20 74 68 65 20 ceived.from the
c500: 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 peer. It allows
c510: 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 the client to ch
c520: 65 63 6b 20 74 68 65 20 63 65 72 74 69 66 69 63 eck the certific
c530: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
c540: 0a 72 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f .results and cho
c550: 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 ose whether to c
c560: 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 20 ontinue or not.
c570: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 It is called for
c580: 20 65 61 63 68 0a 63 65 72 74 69 66 69 63 61 74 each.certificat
c590: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 e in the certifi
c5a0: 63 61 74 65 20 63 68 61 69 6e 2e 20 54 68 69 73 cate chain. This
c5b0: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f callback was mo
c5c0: 76 65 64 20 66 72 6f 6d 0a 3c 62 20 63 6c 61 73 ved from.<b clas
c5d0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d s="option">-comm
c5e0: 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 63 6c 54 4c and</b> in TclTL
c5f0: 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d S 1.8. The argum
c600: 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 ents are:</p>.<d
c610: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
c620: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a s_definitions">.
c630: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 <dt><i class="ar
c640: 67 22 3e 64 65 70 74 68 3c 2f 69 3e 3c 2f 64 74 g">depth</i></dt
c650: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 64 65 70 >.<dd><p>The dep
c660: 74 68 20 69 73 20 74 68 65 20 69 6e 74 65 67 65 th is the intege
c670: 72 20 64 65 70 74 68 20 6f 66 20 74 68 65 20 63 r depth of the c
c680: 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 ertificate in th
c690: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 e certificate ch
c6a0: 61 69 6e 2c 0a 77 68 65 72 65 20 30 20 69 73 20 ain,.where 0 is
c6b0: 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 69 the peer certifi
c6c0: 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 72 20 cate and higher
c6d0: 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 70 20 values going up
c6e0: 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 61 to the Certifica
c6f0: 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 43 41 te.Authority (CA
c700: 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e ).</p></dd>.<dt>
c710: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
c720: 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ert</i></dt>.<dd
c730: 3e 3c 70 3e 54 68 65 20 63 65 72 74 20 61 72 67 ><p>The cert arg
c740: 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 ument is a list
c750: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 of key-value pai
c760: 72 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 rs similar to th
c770: 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a ose returned by.
c780: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
c790: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 2e 3c ls::status</b>.<
c7a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 /p></dd>.<dt><i
c7b0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 74 class="arg">stat
c7c0: 75 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e us</i></dt>.<dd>
c7d0: 3c 70 3e 54 68 65 20 73 74 61 74 75 73 20 61 72 <p>The status ar
c7e0: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 62 6f gument is the bo
c7f0: 6f 6c 65 61 6e 20 76 61 6c 69 64 69 74 79 20 6f olean validity o
c800: 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 65 f the current ce
c810: 72 74 69 66 69 63 61 74 65 20 77 68 65 72 65 20 rtificate where
c820: 30 0a 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 0.is invalid and
c830: 20 31 20 69 73 20 76 61 6c 69 64 2e 3c 2f 70 3e 1 is valid.</p>
c840: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 </dd>.<dt><i cla
c850: 73 73 3d 22 61 72 67 22 3e 65 72 72 6f 72 3c 2f ss="arg">error</
c860: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
c870: 68 65 20 65 72 72 6f 72 20 61 72 67 75 6d 65 6e he error argumen
c880: 74 20 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d t is the error m
c890: 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 essage, if any,
c8a0: 67 65 6e 65 72 61 74 65 64 20 62 79 0a 3c 62 20 generated by.<b
c8b0: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 class="function"
c8c0: 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f >X509_STORE_CTX_
c8d0: 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 62 3e 2e get_error()</b>.
c8e0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c </p></dd>.</dl><
c8f0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 52 65 /dd>.</dl>.<p>Re
c900: 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e ference implemen
c910: 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 tations of these
c920: 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 callbacks are p
c930: 72 6f 76 69 64 65 64 20 69 6e 20 26 71 75 6f 74 rovided in "
c940: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 ;<b class="file"
c950: 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 71 75 6f >tls.tcl</b>&quo
c960: 74 3b 0a 61 73 20 3c 62 20 63 6c 61 73 73 3d 22 t;.as <b class="
c970: 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 cmd">tls::callba
c980: 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 ck</b>, <b class
c990: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 ="cmd">tls::pass
c9a0: 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 word</b>, and <b
c9b0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
c9c0: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 ::validate_comma
c9d0: 6e 64 3c 2f 62 3e 0a 72 65 73 70 65 63 74 69 76 nd</b>.respectiv
c9e0: 65 6c 79 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 ely. Note that t
c9f0: 68 65 73 65 20 61 72 65 20 6f 6e 6c 79 20 3c 65 hese are only <e
ca00: 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d m>sample</em> im
ca10: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 49 plementations. I
ca20: 6e 20 61 20 6d 6f 72 65 0a 72 65 61 6c 69 73 74 n a more.realist
ca30: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 20 79 6f ic deployment yo
ca40: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 u would specify
ca50: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 your own callbac
ca60: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 k scripts on eac
ca70: 68 20 54 4c 53 0a 63 68 61 6e 6e 65 6c 20 75 73 h TLS.channel us
ca80: 69 6e 67 20 74 68 65 20 3c 62 20 63 6c 61 73 73 ing the <b class
ca90: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 ="option">-comma
caa0: 6e 64 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 nd</b>, <b class
cab0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 ="option">-passw
cac0: 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 ord</b>, and.<b
cad0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
cae0: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
caf0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e 3c 2f 70 </b> options.</p
cb00: 3e 0a 3c 70 3e 54 68 65 20 64 65 66 61 75 6c 74 >.<p>The default
cb10: 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 behavior when t
cb20: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
cb30: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 ion">-command</b
cb40: 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 > and <b class="
cb50: 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 option">-validat
cb60: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 e_command</b>.op
cb70: 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 tions are not sp
cb80: 65 63 69 66 69 65 64 2c 20 69 73 20 66 6f 72 20 ecified, is for
cb90: 54 63 6c 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 TclTLS to proces
cba0: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 s the associated
cbb0: 20 6c 69 62 72 61 72 79 0a 63 61 6c 6c 62 61 63 library.callbac
cbc0: 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 ks internally. T
cbd0: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 he default behav
cbe0: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 62 20 ior when the <b
cbf0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
cc00: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 password</b> opt
cc10: 69 6f 6e 0a 69 73 20 6e 6f 74 20 73 70 65 63 69 ion.is not speci
cc20: 66 69 65 64 20 69 73 20 66 6f 72 20 54 63 6c 54 fied is for TclT
cc30: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 LS to process th
cc40: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 e associated lib
cc50: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 rary callbacks b
cc60: 79 0a 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 y.attempting to
cc70: 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 3d 22 63 call <b class="c
cc80: 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 md">tls::passwor
cc90: 64 3c 2f 62 3e 2e 20 54 68 65 20 64 69 66 66 65 d</b>. The diffe
cca0: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 rence between th
ccb0: 65 73 65 20 74 77 6f 0a 62 65 68 61 76 69 6f 72 ese two.behavior
ccc0: 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e s is a consequen
ccd0: 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e ce of maintainin
cce0: 67 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 g compatibility
ccf0: 77 69 74 68 20 65 61 72 6c 69 65 72 0a 69 6d 70 with earlier.imp
cd00: 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 3c 2f 70 lementations.</p
cd10: 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 >.<p><em>The use
cd20: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 of the referenc
cd30: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 62 20 63 e callbacks <b c
cd40: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
cd50: 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 callback</b>, <b
cd60: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
cd70: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 0a ::password</b>,.
cd80: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d and <b class="cm
cd90: 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 d">tls::validate
cda0: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 73 20 _command</b> is
cdb0: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e not recommended.
cdc0: 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d They may be rem
cdd0: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
cde0: 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c releases.</em><
cdf0: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 /p>.</div>.</div
ce00: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 >.<div id="secti
ce10: 6f 6e 36 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 on6" class="doct
ce20: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 ools_section"><h
ce30: 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 2><a name="secti
ce40: 6f 6e 36 22 3e 44 65 62 75 67 3c 2f 61 3e 3c 2f on6">Debug</a></
ce50: 68 32 3e 0a 3c 70 3e 46 6f 72 20 6d 6f 73 74 20 h2>.<p>For most
ce60: 64 65 62 75 67 67 69 6e 67 20 6e 65 65 64 73 2c debugging needs,
ce70: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f the <b class="o
ce80: 70 74 69 6f 6e 22 3e 2d 63 61 6c 6c 62 61 63 6b ption">-callback
ce90: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 63 61 6e 20 </b> option can
cea0: 62 65 20 75 73 65 64 20 74 6f 20 70 72 6f 76 69 be used to provi
ceb0: 64 65 0a 73 75 66 66 69 63 69 65 6e 74 20 69 6e de.sufficient in
cec0: 73 69 67 68 74 20 61 6e 64 20 69 6e 66 6f 72 6d sight and inform
ced0: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 54 4c 53 ation on the TLS
cee0: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 70 handshake and p
cef0: 72 6f 67 72 65 73 73 2e 20 49 66 0a 66 75 72 74 rogress. If.furt
cf00: 68 65 72 20 74 72 6f 75 62 6c 65 73 68 6f 6f 74 her troubleshoot
cf10: 69 6e 67 20 69 6e 73 69 67 68 74 20 69 73 20 6e ing insight is n
cf20: 65 65 64 65 64 2c 20 74 68 65 20 63 6f 6d 70 69 eeded, the compi
cf30: 6c 65 20 74 69 6d 65 20 6f 70 74 69 6f 6e 0a 3c le time option.<
cf40: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
cf50: 3e 2d 2d 65 6e 61 62 6c 65 2d 64 65 62 75 67 3c >--enable-debug<
cf60: 2f 62 3e 20 63 61 6e 20 62 65 20 75 73 65 64 20 /b> can be used
cf70: 74 6f 20 67 65 74 20 64 65 74 61 69 6c 65 64 20 to get detailed
cf80: 65 78 65 63 75 74 69 6f 6e 20 66 6c 6f 77 20 73 execution flow s
cf90: 74 61 74 75 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 4c tatus.</p>.<p>TL
cfa0: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 S key logging ca
cfb0: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 n be enabled by
cfc0: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 setting the envi
cfd0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
cfe0: 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 .<b class="varia
cff0: 62 6c 65 22 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 ble">SSLKEYLOGFI
d000: 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 LE</b> to the na
d010: 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74 me of the file t
d020: 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 o log to. Then w
d030: 68 65 6e 65 76 65 72 20 54 4c 53 20 6b 65 79 0a henever TLS key.
d040: 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 material is gene
d050: 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 rated or receive
d060: 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 d it will be log
d070: 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 2e ged to the file.
d080: 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 0a This is useful.
d090: 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 for logging key
d0a0: 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b data for network
d0b0: 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 logging tools t
d0c0: 6f 20 75 73 65 20 74 6f 20 64 65 63 72 79 70 74 o use to decrypt
d0d0: 20 74 68 65 20 64 61 74 61 2e 3c 2f 70 3e 0a 3c the data.</p>.<
d0e0: 70 3e 54 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 p>The <b class="
d0f0: 76 61 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 variable">tls::d
d100: 65 62 75 67 3c 2f 62 3e 20 76 61 72 69 61 62 6c ebug</b> variabl
d110: 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 e provides some
d120: 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 74 72 additional contr
d130: 6f 6c 20 6f 76 65 72 20 74 68 65 0a 64 65 62 75 ol over the.debu
d140: 67 20 6c 6f 67 67 69 6e 67 20 69 6e 20 74 68 65 g logging in the
d150: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
d160: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 tls::callback</b
d170: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 >, <b class="cmd
d180: 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c ">tls::password<
d190: 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 /b>, and.<b clas
d1a0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c s="cmd">tls::val
d1b0: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 idate_command</b
d1c0: 3e 20 64 65 66 61 75 6c 74 20 68 61 6e 64 6c 65 > default handle
d1d0: 72 73 20 69 6e 20 26 71 75 6f 74 3b 3c 62 20 63 rs in "<b c
d1e0: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c 73 2e lass="file">tls.
d1f0: 74 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 tcl</b>"..T
d200: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 he default value
d210: 20 69 73 20 30 20 77 69 74 68 20 68 69 67 68 65 is 0 with highe
d220: 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63 69 r values produci
d230: 6e 67 20 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74 ng more diagnost
d240: 69 63 20 6f 75 74 70 75 74 2c 0a 61 6e 64 20 77 ic output,.and w
d250: 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 ill also force t
d260: 68 65 20 76 65 72 69 66 79 20 6d 65 74 68 6f 64 he verify method
d270: 20 69 6e 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d in <b class="cm
d280: 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b d">tls::callback
d290: 3c 2f 62 3e 20 74 6f 20 61 63 63 65 70 74 20 74 </b> to accept t
d2a0: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20 he.certificate,
d2b0: 65 76 65 6e 20 69 66 20 69 74 20 69 73 20 69 6e even if it is in
d2c0: 76 61 6c 69 64 20 77 68 65 6e 20 74 68 65 20 3c valid when the <
d2d0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
d2e0: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e >-validatecomman
d2f0: 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 20 69 73 20 d</b>.option is
d300: 73 65 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d set to <b class=
d310: 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 "cmd">tls::valid
d320: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2e ate_command</b>.
d330: 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d 3e 54 68 65 20 </p>.<p><em>The
d340: 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 use of the varia
d350: 62 6c 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 ble <b class="va
d360: 72 69 61 62 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 riable">tls::deb
d370: 75 67 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65 ug</b> is not re
d380: 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 commended..It ma
d390: 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f y be removed fro
d3a0: 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 m future release
d3b0: 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 s.</em></p>.</di
d3c0: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 v>.<div id="sect
d3d0: 69 6f 6e 37 22 20 63 6c 61 73 73 3d 22 64 6f 63 ion7" class="doc
d3e0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
d3f0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 h2><a name="sect
d400: 69 6f 6e 37 22 3e 45 78 61 6d 70 6c 65 73 3c 2f ion7">Examples</
d410: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 66 a></h2>.<p>The f
d420: 6f 6c 6c 6f 77 69 6e 67 20 61 72 65 20 65 78 61 ollowing are exa
d430: 6d 70 6c 65 20 73 63 72 69 70 74 73 20 74 6f 20 mple scripts to
d440: 64 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 70 61 download a webpa
d450: 67 65 20 61 6e 64 20 66 69 6c 65 20 75 73 69 6e ge and file usin
d460: 67 20 74 68 65 0a 68 74 74 70 20 70 61 63 6b 61 g the.http packa
d470: 67 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c ge. See <span cl
d480: 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 ass="sectref"><a
d490: 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 href="#section4
d4a0: 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 ">Certificate Va
d4b0: 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 lidation</a></sp
d4c0: 61 6e 3e 20 66 6f 72 20 77 68 65 6e 20 74 68 65 an> for when the
d4d0: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f .<b class="optio
d4e0: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c n">-cadir</b>, <
d4f0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
d500: 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 61 6e >-cafile</b>, an
d510: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
d520: 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e on">-castore</b>
d530: 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 61 6c 73 options are als
d540: 6f 0a 6e 65 65 64 65 64 2e 20 53 65 65 20 74 68 o.needed. See th
d550: 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 e "<b class
d560: 3d 22 66 69 6c 65 22 3e 64 65 6d 6f 73 3c 2f 62 ="file">demos</b
d570: 3e 26 71 75 6f 74 3b 20 64 69 72 65 63 74 6f 72 >" director
d580: 79 20 66 6f 72 20 6d 6f 72 65 20 65 78 61 6d 70 y for more examp
d590: 6c 65 20 73 63 72 69 70 74 73 2e 3c 2f 70 3e 0a le scripts.</p>.
d5a0: 3c 70 3e 45 78 61 6d 70 6c 65 20 23 31 3a 20 44 <p>Example #1: D
d5b0: 6f 77 6e 6c 6f 61 64 20 61 20 77 65 62 20 70 61 ownload a web pa
d5c0: 67 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 6c 61 73 ge</p>.<pre clas
d5d0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 78 61 6d s="doctools_exam
d5e0: 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 20 72 65 ple">.package re
d5f0: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 quire http.packa
d600: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 ge require tls.s
d610: 65 74 20 75 72 6c 20 26 71 75 6f 74 3b 68 74 74 et url "htt
d620: 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f ps://www.tcl.tk/
d630: 26 71 75 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 ".http::reg
d640: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 ister https 443
d650: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 [list ::tls::soc
d660: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e ket -autoservern
d670: 61 6d 65 20 31 20 2d 72 65 71 75 69 72 65 20 31 ame 1 -require 1
d680: 5d 0a 23 20 47 65 74 20 55 52 4c 0a 73 65 74 20 ].# Get URL.set
d690: 74 6f 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 token [http::get
d6a0: 75 72 6c 20 24 75 72 6c 5d 0a 23 20 43 68 65 63 url $url].# Chec
d6b0: 6b 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 20 7b k for error.if {
d6c0: 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 [http::status $t
d6d0: 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 3b 6f oken] ne "o
d6e0: 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 20 20 20 70 k"} {. p
d6f0: 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71 75 6f uts [format &quo
d700: 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f 74 3b t;Error %s"
d710: 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 [http::status $
d720: 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 53 61 76 65 token]].}.# Save
d730: 20 77 65 62 20 70 61 67 65 20 74 6f 20 66 69 6c web page to fil
d740: 65 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 65 e.set ch [open e
d750: 78 61 6d 70 6c 65 2e 68 74 6d 6c 20 77 62 5d 0a xample.html wb].
d760: 70 75 74 73 20 24 63 68 20 5b 68 74 74 70 3a 3a puts $ch [http::
d770: 64 61 74 61 20 24 74 6f 6b 65 6e 5d 0a 63 6c 6f data $token].clo
d780: 73 65 20 24 63 68 0a 23 20 43 6c 65 61 6e 75 70 se $ch.# Cleanup
d790: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 .::http::cleanup
d7a0: 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c $token.</pre>.<
d7b0: 70 3e 45 78 61 6d 70 6c 65 20 23 32 3a 20 44 6f p>Example #2: Do
d7c0: 77 6e 6c 6f 61 64 20 61 20 66 69 6c 65 3c 2f 70 wnload a file</p
d7d0: 3e 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22 64 6f >.<pre class="do
d7e0: 63 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e ctools_example">
d7f0: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 .package require
d800: 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 http.package re
d810: 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72 quire tls.set ur
d820: 6c 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f l "https://
d830: 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 wiki.tcl-lang.or
d840: 67 2f 73 69 74 65 6d 61 70 2e 78 6d 6c 26 71 75 g/sitemap.xml&qu
d850: 6f 74 3b 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 ot;.http::regist
d860: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 er https 443 [li
d870: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 st ::tls::socket
d880: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 -autoservername
d890: 20 31 20 2d 72 65 71 75 69 72 65 20 31 5d 0a 23 1 -require 1].#
d8a0: 20 4f 70 65 6e 20 6f 75 74 70 75 74 20 66 69 6c Open output fil
d8b0: 65 0a 73 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b e.set filename [
d8c0: 66 69 6c 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a file tail $url].
d8d0: 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 24 66 69 set ch [open $fi
d8e0: 6c 65 6e 61 6d 65 20 77 62 5d 0a 23 20 47 65 74 lename wb].# Get
d8f0: 20 66 69 6c 65 0a 73 65 74 20 74 6f 6b 65 6e 20 file.set token
d900: 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 [::http::geturl
d910: 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 69 7a 65 20 $url -blocksize
d920: 36 35 35 33 36 20 2d 63 68 61 6e 6e 65 6c 20 24 65536 -channel $
d930: 63 68 5d 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 ch].# Check for
d940: 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a error.if {[http:
d950: 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 :status $token]
d960: 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 ne "ok"
d970: 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 ;} {. puts [f
d980: 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72 72 6f ormat "Erro
d990: 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74 74 70 r %s" [http
d9a0: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d ::status $token]
d9b0: 5d 0a 7d 0a 23 20 43 6c 65 61 6e 75 70 0a 63 6c ].}.# Cleanup.cl
d9c0: 6f 73 65 20 24 63 68 0a 3a 3a 68 74 74 70 3a 3a ose $ch.::http::
d9d0: 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c cleanup $token.<
d9e0: 2f 70 72 65 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 /pre>.</div>.<di
d9f0: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 38 22 20 v id="section8"
da00: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
da10: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
da20: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 38 22 3e name="section8">
da30: 53 70 65 63 69 61 6c 20 43 6f 6e 73 69 64 65 72 Special Consider
da40: 61 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a ations</a></h2>.
da50: 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 <p>The capabilit
da60: 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b ies of this pack
da70: 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f age can vary eno
da80: 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70 rmously based up
da90: 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 on how the.linke
daa0: 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69 62 d to OpenSSL lib
dab0: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 rary was configu
dac0: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e red and built. N
dad0: 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 ew versions may
dae0: 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65 72 20 70 obsolete.older p
daf0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
db00: 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 , add or remove
db10: 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20 ciphers, change
db20: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 default values,
db30: 65 74 63 2e 0a 55 73 65 20 74 68 65 20 3c 62 20 etc..Use the <b
db40: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
db50: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 :protocols</b> c
db60: 6f 6d 6d 61 6e 64 20 74 6f 20 6f 62 74 61 69 6e ommand to obtain
db70: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 0a 70 the supported.p
db80: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
db90: 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 .</p>.</div>.<di
dba0: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 39 22 20 v id="section9"
dbb0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
dbc0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
dbd0: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 39 22 3e name="section9">
dbe0: 45 72 72 6f 72 20 4d 65 73 73 61 67 65 73 3c 2f Error Messages</
dbf0: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 53 6f 6d 65 20 a></h2>.<p>Some
dc00: 4f 70 73 6e 53 53 6c 20 65 72 72 6f 72 20 6d 65 OpsnSSl error me
dc10: 73 73 61 67 65 73 20 68 61 76 65 20 63 72 79 70 ssages have cryp
dc20: 74 69 63 20 6d 65 61 6e 69 6e 67 73 2e 20 54 68 tic meanings. Th
dc30: 69 73 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 is is a list of
dc40: 6d 65 73 73 61 67 65 73 0a 61 6c 6f 6e 67 20 77 messages.along w
dc50: 69 74 68 20 74 68 65 69 72 20 74 72 75 65 20 6d ith their true m
dc60: 65 61 6e 69 6e 67 2e 3c 2f 70 3e 0a 3c 64 6c 20 eaning.</p>.<dl
dc70: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
dc80: 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 definitions">.<d
dc90: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 t><i class="arg"
dca0: 3e 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 >handshake faile
dcb0: 64 3a 20 63 65 72 74 69 66 69 63 61 74 65 20 76 d: certificate v
dcc0: 65 72 69 66 79 20 66 61 69 6c 65 64 20 64 75 65 erify failed due
dcd0: 20 74 6f 20 26 71 75 6f 74 3b 75 6e 61 62 6c 65 to "unable
dce0: 20 74 6f 20 67 65 74 20 6c 6f 63 61 6c 20 69 73 to get local is
dcf0: 73 75 65 72 20 63 65 72 74 69 66 69 63 61 74 65 suer certificate
dd00: 26 71 75 6f 74 3b 3c 2f 69 3e 3c 2f 64 74 3e 0a "</i></dt>.
dd10: 3c 64 64 3e 3c 70 3e 54 68 65 20 63 65 72 74 69 <dd><p>The certi
dd20: 66 69 63 61 74 65 73 20 69 6e 20 74 68 65 20 43 ficates in the C
dd30: 41 20 66 69 6c 65 20 6f 72 20 63 65 72 74 69 66 A file or certif
dd40: 69 63 61 74 65 20 73 74 6f 72 65 20 65 69 74 68 icate store eith
dd50: 65 72 20 64 6f 20 6e 6f 74 20 68 61 76 65 20 6f er do not have o
dd60: 6e 65 20 6f 72 0a 6d 6f 72 65 20 69 73 73 75 65 ne or.more issue
dd70: 72 73 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 rs of the certif
dd80: 69 63 61 74 65 73 20 79 6f 75 20 61 72 65 20 76 icates you are v
dd90: 61 6c 69 64 61 74 69 6e 67 20 6f 72 20 74 68 65 alidating or the
dda0: 79 20 68 61 76 65 20 65 78 70 69 72 65 64 2e 0a y have expired..
ddb0: 55 73 75 61 6c 6c 79 20 74 68 69 73 20 6d 65 61 Usually this mea
ddc0: 6e 73 20 79 6f 75 20 6e 65 65 64 20 61 6e 20 75 ns you need an u
ddd0: 70 64 61 74 65 64 20 43 41 63 65 72 74 20 66 69 pdated CAcert fi
dde0: 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 le.</p></dd>.<dt
ddf0: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ><i class="arg">
de00: 70 61 63 6b 65 74 20 6c 65 6e 67 74 68 20 74 6f packet length to
de10: 6f 20 6c 6f 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a o long</i></dt>.
de20: 3c 64 64 3e 3c 70 3e 43 6c 69 65 6e 74 20 68 61 <dd><p>Client ha
de30: 73 20 74 72 69 65 64 20 74 6f 20 63 6f 6e 6e 65 s tried to conne
de40: 63 74 20 74 6f 20 61 20 48 54 54 50 20 73 65 72 ct to a HTTP ser
de50: 76 65 72 20 6f 6e 20 74 68 65 20 70 6c 61 69 6e ver on the plain
de60: 2d 74 65 78 74 20 70 6f 72 74 20 69 6e 73 74 65 -text port inste
de70: 61 64 20 6f 66 0a 74 68 65 20 53 53 4c 2f 54 4c ad of.the SSL/TL
de80: 53 20 70 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e S port.</p></dd>
de90: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
dea0: 72 67 22 3e 75 6e 65 78 70 65 63 74 65 64 20 65 rg">unexpected e
deb0: 6f 66 20 77 68 69 6c 65 20 72 65 61 64 69 6e 67 of while reading
dec0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
ded0: 3e 54 68 65 20 70 65 65 72 20 68 61 73 20 63 6c >The peer has cl
dee0: 6f 73 65 64 20 74 68 65 20 63 6f 6e 6e 65 63 74 osed the connect
def0: 69 6f 6e 20 77 69 74 68 6f 75 74 20 73 65 6e 64 ion without send
df00: 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63 6c ing the "cl
df10: 6f 73 65 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b ose notify"
df20: 20 73 68 75 74 64 6f 77 6e 0a 61 6c 65 72 74 2e shutdown.alert.
df30: 20 53 6f 6d 65 20 73 65 72 76 65 72 73 20 77 69 Some servers wi
df40: 6c 6c 20 74 65 72 6d 69 6e 61 74 65 20 74 68 65 ll terminate the
df50: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 66 74 65 connection afte
df60: 72 20 74 68 65 20 66 69 6c 65 20 6f 72 20 77 65 r the file or we
df70: 62 70 61 67 65 20 68 61 73 0a 62 65 65 6e 20 73 bpage has.been s
df80: 65 6e 74 20 77 69 74 68 6f 75 74 20 73 65 6e 64 ent without send
df90: 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b 63 6c ing the "cl
dfa0: 6f 73 65 20 6e 6f 74 69 66 79 26 71 75 6f 74 3b ose notify"
dfb0: 20 6d 65 73 73 61 67 65 2e 20 49 6e 20 74 68 69 message. In thi
dfc0: 73 20 63 61 73 65 2c 20 69 74 20 73 68 6f 75 6c s case, it shoul
dfd0: 64 0a 6e 6f 74 20 72 65 73 75 6c 74 20 69 6e 20 d.not result in
dfe0: 61 20 6c 6f 73 73 20 6f 66 20 64 61 74 61 2e 3c a loss of data.<
dff0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 /p></dd>.<dt><i
e000: 63 6c 61 73 73 3d 22 61 72 67 22 3e 77 72 6f 6e class="arg">wron
e010: 67 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 g version number
e020: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
e030: 3e 43 6c 69 65 6e 74 20 68 61 73 20 74 72 69 65 >Client has trie
e040: 64 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 20 d to connect to
e050: 61 20 6e 6f 6e 2d 48 54 54 50 20 73 65 72 76 65 a non-HTTP serve
e060: 72 20 6f 6e 20 61 20 6e 6f 6e 2d 54 4c 53 20 28 r on a non-TLS (
e070: 69 2e 65 2e 20 70 6c 61 69 6e 20 74 65 78 74 29 i.e. plain text)
e080: 20 70 6f 72 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a port.</p></dd>.
e090: 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 </dl>.</div>.<di
e0a0: 76 20 69 64 3d 22 73 65 65 2d 61 6c 73 6f 22 20 v id="see-also"
e0b0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
e0c0: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
e0d0: 6e 61 6d 65 3d 22 73 65 65 2d 61 6c 73 6f 22 3e name="see-also">
e0e0: 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 See Also</a></h2
e0f0: 3e 0a 3c 70 3e 3c 61 20 68 72 65 66 3d 22 68 74 >.<p><a href="ht
e100: 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 tps://www.openss
e110: 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c l.org/">OpenSSL<
e120: 2f 61 3e 2c 20 68 74 74 70 2c 20 73 6f 63 6b 65 /a>, http, socke
e130: 74 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 t</p>.</div>.<di
e140: 76 20 69 64 3d 22 6b 65 79 77 6f 72 64 73 22 20 v id="keywords"
e150: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
e160: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
e170: 6e 61 6d 65 3d 22 6b 65 79 77 6f 72 64 73 22 3e name="keywords">
e180: 4b 65 79 77 6f 72 64 73 3c 2f 61 3e 3c 2f 68 32 Keywords</a></h2
e190: 3e 0a 3c 70 3e 49 2f 4f 2c 20 49 50 20 41 64 64 >.<p>I/O, IP Add
e1a0: 72 65 73 73 2c 20 4f 70 65 6e 53 53 4c 2c 20 53 ress, OpenSSL, S
e1b0: 53 4c 2c 20 54 43 50 2c 20 54 4c 53 2c 20 54 63 SL, TCP, TLS, Tc
e1c0: 6c 54 4c 53 2c 20 61 73 79 6e 63 68 72 6f 6e 6f lTLS, asynchrono
e1d0: 75 73 20 49 2f 4f 2c 20 62 69 6e 64 2c 20 63 65 us I/O, bind, ce
e1e0: 72 74 69 66 69 63 61 74 65 2c 20 63 68 61 6e 6e rtificate, chann
e1f0: 65 6c 2c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 el, connection,
e200: 64 6f 6d 61 69 6e 20 6e 61 6d 65 2c 20 68 6f 73 domain name, hos
e210: 74 2c 20 68 74 74 70 73 2c 20 6e 65 74 77 6f 72 t, https, networ
e220: 6b 2c 20 6e 65 74 77 6f 72 6b 20 61 64 64 72 65 k, network addre
e230: 73 73 2c 20 73 6f 63 6b 65 74 2c 20 74 6c 73 3c ss, socket, tls<
e240: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 /p>.</div>.<div
e250: 69 64 3d 22 63 61 74 65 67 6f 72 79 22 20 63 6c id="category" cl
e260: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 ass="doctools_se
e270: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 ction"><h2><a na
e280: 6d 65 3d 22 63 61 74 65 67 6f 72 79 22 3e 43 61 me="category">Ca
e290: 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 68 32 3e 0a tegory</a></h2>.
e2a0: 3c 70 3e 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 69 76 <p>tls</p>.</div
e2b0: 3e 0a 3c 64 69 76 20 69 64 3d 22 63 6f 70 79 72 >.<div id="copyr
e2c0: 69 67 68 74 22 20 63 6c 61 73 73 3d 22 64 6f 63 ight" class="doc
e2d0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
e2e0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 6f 70 79 h2><a name="copy
e2f0: 72 69 67 68 74 22 3e 43 6f 70 79 72 69 67 68 74 right">Copyright
e300: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 43 6f 70 </a></h2>.<p>Cop
e310: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 yright © 19
e320: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 3c 62 99 Matt Newman<b
e330: 72 3e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f r>.Copyright &co
e340: 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73 py; 2004 Starfis
e350: 68 20 53 79 73 74 65 6d 73 3c 62 72 3e 0a 43 6f h Systems<br>.Co
e360: 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 pyright © 2
e370: 30 32 34 20 42 72 69 61 6e 20 4f 27 48 61 67 61 024 Brian O'Haga
e380: 6e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 n</p>.</div>.</d
e390: 69 76 3e 3c 2f 62 6f 64 79 3e 3c 2f 68 74 6d 6c iv></body></html
e3a0: 3e 0a >.