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 62 31 20 e">tls(n) 2.0b1
0880: 74 6c 73 20 26 71 75 6f 74 3b 54 63 6c 20 54 4c tls "Tcl TL
0890: 53 20 65 78 74 65 6e 73 69 6f 6e 26 71 75 6f 74 S extension"
08a0: 3b 3c 2f 68 31 3e 0a 3c 64 69 76 20 69 64 3d 22 ;</h1>.<div id="
08b0: 6e 61 6d 65 22 20 63 6c 61 73 73 3d 22 64 6f 63 name" class="doc
08c0: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
08d0: 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6e 61 6d 65 h2><a name="name
08e0: 22 3e 4e 61 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a ">Name</a></h2>.
08f0: 3c 70 3e 74 6c 73 20 2d 20 62 69 6e 64 69 6e 67 <p>tls - binding
0900: 20 74 6f 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 to the OpenSSL
0910: 6c 69 62 72 61 72 79 20 66 6f 72 20 65 6e 63 72 library for encr
0920: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64 ypted socket and
0930: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d I/O channel com
0940: 6d 75 6e 69 63 61 74 69 6f 6e 73 3c 2f 70 3e 0a munications</p>.
0950: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
0960: 74 6f 63 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 toc" class="doct
0970: 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 ools_section"><h
0980: 32 3e 3c 61 20 6e 61 6d 65 3d 22 74 6f 63 22 3e 2><a name="toc">
0990: 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e 74 Table Of Content
09a0: 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 75 6c 20 63 s</a></h2>.<ul c
09b0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 74 lass="doctools_t
09c0: 6f 63 22 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 oc">.<li class="
09d0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
09e0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 74 6f 63 22 "><a href="#toc"
09f0: 3e 54 61 62 6c 65 20 4f 66 20 43 6f 6e 74 65 6e >Table Of Conten
0a00: 74 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 ts</a></li>.<li
0a10: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
0a20: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 section"><a href
0a30: 3d 22 23 73 79 6e 6f 70 73 69 73 22 3e 53 79 6e ="#synopsis">Syn
0a40: 6f 70 73 69 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c opsis</a></li>.<
0a50: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0a60: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 ls_section"><a h
0a70: 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 31 22 3e ref="#section1">
0a80: 44 65 73 63 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c Description</a><
0a90: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 /li>.<li class="
0aa0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
0ab0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 "><a href="#sect
0ac0: 69 6f 6e 32 22 3e 43 6f 6d 6d 61 6e 64 73 3c 2f ion2">Commands</
0ad0: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 a></li>.<li clas
0ae0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 s="doctools_sect
0af0: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 ion"><a href="#s
0b00: 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 ection3">Certifi
0b10: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c cate Validation<
0b20: 2f 61 3e 0a 3c 75 6c 3e 0a 3c 6c 69 20 63 6c 61 /a>.<ul>.<li cla
0b30: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 ss="doctools_sub
0b40: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 section"><a href
0b50: 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 31 22 3e ="#subsection1">
0b60: 50 4b 49 20 61 6e 64 20 43 65 72 74 69 66 69 63 PKI and Certific
0b70: 61 74 65 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c ates</a></li>.<l
0b80: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c i class="doctool
0b90: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 s_subsection"><a
0ba0: 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 href="#subsecti
0bb0: 6f 6e 32 22 3e 53 75 6d 6d 61 72 79 20 6f 66 20 on2">Summary of
0bc0: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 command line opt
0bd0: 69 6f 6e 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c ions</a></li>.<l
0be0: 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c i class="doctool
0bf0: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 s_subsection"><a
0c00: 20 68 72 65 66 3d 22 23 73 75 62 73 65 63 74 69 href="#subsecti
0c10: 6f 6e 33 22 3e 57 68 65 6e 20 61 72 65 20 63 6f on3">When are co
0c20: 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f mmand line optio
0c30: 6e 73 20 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f ns needed?</a></
0c40: 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 6c 69 3e 0a li>.</ul>.</li>.
0c50: 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f <li class="docto
0c60: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 ols_section"><a
0c70: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 href="#section4"
0c80: 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e >Callback Option
0c90: 73 3c 2f 61 3e 0a 3c 75 6c 3e 0a 3c 6c 69 20 63 s</a>.<ul>.<li c
0ca0: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
0cb0: 75 62 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 ubsection"><a hr
0cc0: 65 66 3d 22 23 73 75 62 73 65 63 74 69 6f 6e 34 ef="#subsection4
0cd0: 22 3e 56 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d ">Values for Com
0ce0: 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 mand Callback</a
0cf0: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 ></li>.<li class
0d00: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 ="doctools_subse
0d10: 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 ction"><a href="
0d20: 23 73 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 61 #subsection5">Va
0d30: 6c 75 65 73 20 66 6f 72 20 50 61 73 73 77 6f 72 lues for Passwor
0d40: 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f d Callback</a></
0d50: 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 li>.<li class="d
0d60: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
0d70: 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 75 on"><a href="#su
0d80: 62 73 65 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65 bsection6">Value
0d90: 73 20 66 6f 72 20 56 61 6c 69 64 61 74 65 20 43 s for Validate C
0da0: 6f 6d 6d 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c ommand Callback<
0db0: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c /a></li>.</ul>.<
0dc0: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 /li>.<li class="
0dd0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
0de0: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 "><a href="#sect
0df0: 69 6f 6e 35 22 3e 44 65 62 75 67 3c 2f 61 3e 3c ion5">Debug</a><
0e00: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 /li>.<li class="
0e10: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
0e20: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 "><a href="#sect
0e30: 69 6f 6e 36 22 3e 45 78 61 6d 70 6c 65 73 3c 2f ion6">Examples</
0e40: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 a></li>.<li clas
0e50: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 s="doctools_sect
0e60: 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 ion"><a href="#s
0e70: 65 63 74 69 6f 6e 37 22 3e 53 70 65 63 69 61 6c ection7">Special
0e80: 20 43 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c Considerations<
0e90: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 /a></li>.<li cla
0ea0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 ss="doctools_sec
0eb0: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 tion"><a href="#
0ec0: 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c see-also">See Al
0ed0: 73 6f 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 so</a></li>.<li
0ee0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
0ef0: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 section"><a href
0f00: 3d 22 23 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 ="#keywords">Key
0f10: 77 6f 72 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c words</a></li>.<
0f20: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0f30: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 ls_section"><a h
0f40: 72 65 66 3d 22 23 63 61 74 65 67 6f 72 79 22 3e ref="#category">
0f50: 43 61 74 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c 69 Category</a></li
0f60: 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 >.<li class="doc
0f70: 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c tools_section"><
0f80: 61 20 68 72 65 66 3d 22 23 63 6f 70 79 72 69 67 a href="#copyrig
0f90: 68 74 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 ht">Copyright</a
0fa0: 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 ></li>.</ul>.</d
0fb0: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 79 6e iv>.<div id="syn
0fc0: 6f 70 73 69 73 22 20 63 6c 61 73 73 3d 22 64 6f opsis" class="do
0fd0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
0fe0: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 6e <h2><a name="syn
0ff0: 6f 70 73 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c opsis">Synopsis<
1000: 2f 61 3e 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 6c /a></h2>.<div cl
1010: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 ass="doctools_sy
1020: 6e 6f 70 73 69 73 22 3e 0a 3c 75 6c 20 63 6c 61 nopsis">.<ul cla
1030: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 ss="doctools_req
1040: 75 69 72 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 3e uirements">.<li>
1050: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 package require
1060: 3c 62 20 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d <b class="pkgnam
1070: 65 22 3e 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e 3c e">Tcl 8.5-</b><
1080: 2f 6c 69 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 /li>.<li>package
1090: 20 72 65 71 75 69 72 65 20 3c 62 20 63 6c 61 73 require <b clas
10a0: 73 3d 22 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 20 s="pkgname">tls
10b0: 32 2e 30 62 31 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 2.0b1</b></li>.<
10c0: 2f 75 6c 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 /ul>.<ul class="
10d0: 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 22 doctools_syntax"
10e0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 >.<li><a href="#
10f0: 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 1"><b class="cmd
1100: 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 ">tls::init</b>
1110: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
1120: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
1130: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f ">-option</i>?</
1140: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
1150: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1160: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 s="arg">value</i
1170: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
1180: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
1190: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 class="arg">-opt
11a0: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 ion value ...</i
11b0: 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c >?</span></a></l
11c0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 i>.<li><a href="
11d0: 23 32 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d #2"><b class="cm
11e0: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
11f0: 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 b> <span class="
1200: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 opt">?<i class="
1210: 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e arg">-option</i>
1220: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 ?</span> <span c
1230: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 lass="opt">?<i c
1240: 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 lass="arg">value
1250: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 </i>?</span> <sp
1260: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
1270: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d <i class="arg">-
1280: 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e option value ...
1290: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 </i>?</span> <i
12a0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 class="arg">host
12b0: 3c 2f 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </i> <i class="a
12c0: 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e rg">port</i></a>
12d0: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 </li>.<li><a hre
12e0: 66 3d 22 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d f="#3"><b class=
12f0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 "cmd">tls::socke
1300: 74 3c 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 t</b> <b class="
1310: 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c option">-server<
1320: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
1330: 67 22 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c g">command</i> <
1340: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
1350: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
1360: 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 >-option</i>?</s
1370: 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 pan> <span class
1380: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 ="opt">?<i class
1390: 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e ="arg">value</i>
13a0: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 ?</span> <span c
13b0: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 lass="opt">?<i c
13c0: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 lass="arg">-opti
13d0: 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e on value ...</i>
13e0: 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 ?</span> <i clas
13f0: 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e s="arg">port</i>
1400: 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 </a></li>.<li><a
1410: 20 68 72 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c href="#4"><b cl
1420: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 ass="cmd">tls::i
1430: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 mport</b> <i cla
1440: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c ss="arg">channel
1450: 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 </i> <span class
1460: 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 ="opt">?<i class
1470: 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f ="arg">-option</
1480: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e i>?</span> <span
1490: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 class="opt">?<i
14a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c class="arg">val
14b0: 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c ue</i>?</span> <
14c0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
14d0: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
14e0: 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e >-option value .
14f0: 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f ..</i>?</span></
1500: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 a></li>.<li><a h
1510: 72 65 66 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73 ref="#5"><b clas
1520: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 s="cmd">tls::uni
1530: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 mport</b> <i cla
1540: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c ss="arg">channel
1550: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c </i></a></li>.<l
1560: 69 3e 3c 61 20 68 72 65 66 3d 22 23 36 22 3e 3c i><a href="#6"><
1570: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
1580: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
1590: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
15a0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c channel</i></a><
15b0: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 /li>.<li><a href
15c0: 3d 22 23 37 22 3e 3c 62 20 63 6c 61 73 73 3d 22 ="#7"><b class="
15d0: 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 cmd">tls::status
15e0: 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 </b> <span class
15f0: 3d 22 6f 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 ="opt">?<b class
1600: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c ="option">-local
1610: 3c 2f 62 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 </b>?</span> <i
1620: 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e class="arg">chan
1630: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e nel</i></a></li>
1640: 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 38 .<li><a href="#8
1650: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 "><b class="cmd"
1660: 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e >tls::connection
1670: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
1680: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c rg">channel</i><
1690: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 /a></li>.<li><a
16a0: 68 72 65 66 3d 22 23 39 22 3e 3c 62 20 63 6c 61 href="#9"><b cla
16b0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 ss="cmd">tls::ci
16c0: 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 phers</b> <span
16d0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
16e0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 class="arg">prot
16f0: 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e ocol</i>?</span>
1700: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
1710: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
1720: 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c g">verbose</i>?<
1730: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
1740: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
1750: 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f 72 74 ss="arg">support
1760: 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f ed</i>?</span></
1770: 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 a></li>.<li><a h
1780: 72 65 66 3d 22 23 31 30 22 3e 3c 62 20 63 6c 61 ref="#10"><b cla
1790: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 ss="cmd">tls::pr
17a0: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c otocols</b></a><
17b0: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 /li>.<li><a href
17c0: 3d 22 23 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d ="#11"><b class=
17d0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 "cmd">tls::versi
17e0: 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a on</b></a></li>.
17f0: 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 </ul>.</div>.</d
1800: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 iv>.<div id="sec
1810: 74 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f tion1" class="do
1820: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
1830: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 <h2><a name="sec
1840: 74 69 6f 6e 31 22 3e 44 65 73 63 72 69 70 74 69 tion1">Descripti
1850: 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 on</a></h2>.<p>T
1860: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 his extension pr
1870: 6f 76 69 64 65 73 20 54 43 4c 20 73 63 72 69 70 ovides TCL scrip
1880: 74 20 61 63 63 65 73 73 20 74 6f 20 73 65 63 75 t access to secu
1890: 72 65 20 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e re socket commun
18a0: 69 63 61 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 ications.using t
18b0: 68 65 20 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 he Transport Lay
18c0: 65 72 20 53 65 63 75 72 69 74 79 20 28 54 4c 53 er Security (TLS
18d0: 29 20 70 72 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 ) protocol. It p
18e0: 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 rovides a generi
18f0: 63 0a 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 20 c.binding to <a
1900: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 href="https://ww
1910: 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e w.openssl.org/">
1920: 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 OpenSSL</a>, uti
1930: 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c lizing the.<b cl
1940: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 54 63 6c ass="syscmd">Tcl
1950: 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 62 _StackChannel</b
1960: 3e 20 41 50 49 20 69 6e 20 54 43 4c 20 38 2e 34 > API in TCL 8.4
1970: 20 61 6e 64 20 68 69 67 68 65 72 2e 0a 54 68 65 and higher..The
1980: 73 65 20 73 6f 63 6b 65 74 73 20 62 65 68 61 76 se sockets behav
1990: 65 20 65 78 61 63 74 6c 79 20 74 68 65 20 73 61 e exactly the sa
19a0: 6d 65 20 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 me as channels c
19b0: 72 65 61 74 65 64 20 75 73 69 6e 67 20 74 68 65 reated using the
19c0: 20 62 75 69 6c 74 2d 69 6e 0a 3c 62 20 63 6c 61 built-in.<b cla
19d0: 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b ss="syscmd">sock
19e0: 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c 20 et</b> command,
19f0: 62 75 74 20 70 72 6f 76 69 64 65 20 61 64 64 69 but provide addi
1a00: 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 tional options f
1a10: 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 or controlling.t
1a20: 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 73 69 he SSL/TLS sessi
1a30: 6f 6e 2e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c on.</p>.</div>.<
1a40: 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 32 div id="section2
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 32 a name="section2
1a80: 22 3e 43 6f 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f ">Commands</a></
1a90: 68 32 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f h2>.<p>The follo
1aa0: 77 69 6e 67 20 61 72 65 20 74 68 65 20 63 6f 6d wing are the com
1ab0: 6d 61 6e 64 73 20 70 72 6f 76 69 64 65 64 20 62 mands provided b
1ac0: 79 20 74 68 65 20 54 63 4c 54 4c 53 20 70 61 63 y the TcLTLS pac
1ad0: 6b 61 67 65 2e 20 53 65 65 20 74 68 65 0a 3c 73 kage. See the.<s
1ae0: 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 pan class="sectr
1af0: 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 ef"><a href="#se
1b00: 63 74 69 6f 6e 36 22 3e 45 78 61 6d 70 6c 65 73 ction6">Examples
1b10: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 </a></span> for
1b20: 65 78 61 6d 70 6c 65 20 75 73 61 67 65 20 61 6e example usage an
1b30: 64 20 74 68 65 20 26 71 75 6f 74 3b 3c 62 20 63 d the "<b c
1b40: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 64 65 6d 6f lass="file">demo
1b50: 73 3c 2f 62 3e 26 71 75 6f 74 3b 20 64 69 72 65 s</b>" dire
1b60: 63 74 6f 72 79 20 66 6f 72 0a 6d 6f 72 65 20 65 ctory for.more e
1b70: 78 61 6d 70 6c 65 20 75 73 61 67 65 2e 3c 2f 70 xample usage.</p
1b80: 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 >.<dl class="doc
1b90: 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e tools_definition
1ba0: 73 22 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d s">.<dt><a name=
1bb0: 22 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d "1"><b class="cm
1bc0: 64 22 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e d">tls::init</b>
1bd0: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
1be0: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
1bf0: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c g">-option</i>?<
1c00: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
1c10: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
1c20: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f ss="arg">value</
1c30: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e i>?</span> <span
1c40: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 class="opt">?<i
1c50: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 class="arg">-op
1c60: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f tion value ...</
1c70: 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f i>?</span></a></
1c80: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4f 70 74 69 6f dt>.<dd><p>Optio
1c90: 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 nal function to
1ca0: 73 65 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 set the default
1cb0: 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 options used by
1cc0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
1cd0: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 2e 20 ls::socket</b>.
1ce0: 49 66 20 79 6f 75 0a 63 61 6c 6c 20 3c 62 20 63 If you.call <b c
1cf0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
1d00: 69 6d 70 6f 72 74 3c 2f 62 3e 20 64 69 72 65 63 import</b> direc
1d10: 74 6c 79 2c 20 74 68 65 20 76 61 6c 75 65 73 20 tly, the values
1d20: 73 65 74 20 62 79 20 74 68 69 73 20 63 6f 6d 6d set by this comm
1d30: 61 6e 64 20 68 61 76 65 20 6e 6f 20 65 66 66 65 and have no effe
1d40: 63 74 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 ct..This command
1d50: 20 73 75 70 70 6f 72 74 73 20 61 6c 6c 20 6f 66 supports all of
1d60: 20 74 68 65 20 73 61 6d 65 20 6f 70 74 69 6f 6e the same option
1d70: 73 20 61 73 20 74 68 65 20 3c 62 20 63 6c 61 73 s as the <b clas
1d80: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 s="cmd">tls::soc
1d90: 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c ket</b> command,
1da0: 0a 74 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 .though you shou
1db0: 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 ld limit your op
1dc0: 74 69 6f 6e 73 20 74 6f 20 6f 6e 6c 79 20 54 4c tions to only TL
1dd0: 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c S related ones.<
1de0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 /p></dd>.<dt><a
1df0: 6e 61 6d 65 3d 22 32 22 3e 3c 62 20 63 6c 61 73 name="2"><b clas
1e00: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 s="cmd">tls::soc
1e10: 6b 65 74 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c ket</b> <span cl
1e20: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c ass="opt">?<i cl
1e30: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f ass="arg">-optio
1e40: 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 n</i>?</span> <s
1e50: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
1e60: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ?<i class="arg">
1e70: 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e value</i>?</span
1e80: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1e90: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1ea0: 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 rg">-option valu
1eb0: 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e e ...</i>?</span
1ec0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
1ed0: 3e 68 6f 73 74 3c 2f 69 3e 20 3c 69 20 63 6c 61 >host</i> <i cla
1ee0: 73 73 3d 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 ss="arg">port</i
1ef0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c ></a></dt>.<dd><
1f00: 70 3e 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 p>This is a help
1f10: 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 er function that
1f20: 20 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e utilizes the un
1f30: 64 65 72 6c 79 69 6e 67 20 63 6f 6d 6d 61 6e 64 derlying command
1f40: 73 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 s <b class="sysc
1f50: 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 0a 61 md">socket</b>.a
1f60: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 nd <b class="cmd
1f70: 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 ">tls::import</b
1f80: 3e 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 > to create the
1f90: 63 6f 6e 6e 65 63 74 69 6f 6e 2e 20 49 74 20 62 connection. It b
1fa0: 65 68 61 76 65 73 20 74 68 65 20 73 61 6d 65 20 ehaves the same
1fb0: 61 73 20 74 68 65 0a 6e 61 74 69 76 65 20 54 43 as the.native TC
1fc0: 4c 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 L <b class="sysc
1fd0: 6d 64 22 3e 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 md">socket</b> c
1fe0: 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f ommand, but also
1ff0: 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 3c 62 supports the <b
2000: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
2010: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 0a 63 6f 6d 6d :import</b>.comm
2020: 61 6e 64 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 and options with
2030: 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 one additional
2040: 6f 70 74 69 6f 6e 2e 20 49 74 20 72 65 74 75 72 option. It retur
2050: 6e 73 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 68 ns the channel h
2060: 61 6e 64 6c 65 20 69 64 0a 66 6f 72 20 74 68 65 andle id.for the
2070: 20 6e 65 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e new socket.</p>
2080: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
2090: 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c ools_options">.<
20a0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
20b0: 69 6f 6e 22 3e 2d 61 75 74 6f 73 65 72 76 65 72 ion">-autoserver
20c0: 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 name</b> <i clas
20d0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e s="arg">bool</i>
20e0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 66 20 </dt>.<dd><p>If
20f0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
2100: 3e 74 72 75 65 3c 2f 62 3e 2c 20 61 75 74 6f 6d >true</b>, autom
2110: 61 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 atically set the
2120: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f <b class="optio
2130: 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f n">-servername</
2140: 62 3e 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 74 b> argument to t
2150: 68 65 0a 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e he.<em>host</em>
2160: 20 61 72 67 75 6d 65 6e 74 2e 20 50 72 69 6f 72 argument. Prior
2170: 20 74 6f 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 to TclTLS 2.0,
2180: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c the default is <
2190: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
21a0: 66 61 6c 73 65 3c 2f 62 3e 2e 0a 53 74 61 72 74 false</b>..Start
21b0: 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e ing in TclTLS 2.
21c0: 30 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 0, the default i
21d0: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 s <b class="cons
21e0: 74 22 3e 74 72 75 65 3c 2f 62 3e 20 75 6e 6c 65 t">true</b> unle
21f0: 73 73 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 ss <b class="opt
2200: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 ion">-servername
2210: 3c 2f 62 3e 0a 69 73 20 61 6c 73 6f 20 73 70 65 </b>.is also spe
2220: 63 69 66 69 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e cified.</p></dd>
2230: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e .</dl></dd>.<dt>
2240: 3c 61 20 6e 61 6d 65 3d 22 33 22 3e 3c 62 20 63 <a name="3"><b c
2250: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
2260: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 62 20 63 6c socket</b> <b cl
2270: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 ass="option">-se
2280: 72 76 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 rver</b> <i clas
2290: 73 3d 22 61 72 67 22 3e 63 6f 6d 6d 61 6e 64 3c s="arg">command<
22a0: 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d /i> <span class=
22b0: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d "opt">?<i class=
22c0: 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 "arg">-option</i
22d0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
22e0: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
22f0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 class="arg">valu
2300: 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 e</i>?</span> <s
2310: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
2320: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ?<i class="arg">
2330: 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e -option value ..
2340: 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 .</i>?</span> <i
2350: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 6f 72 class="arg">por
2360: 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c t</i></a></dt>.<
2370: 64 64 3e 3c 70 3e 53 61 6d 65 20 61 73 20 70 72 dd><p>Same as pr
2380: 65 76 69 6f 75 73 2c 20 62 75 74 20 69 6e 73 74 evious, but inst
2390: 65 61 64 20 63 72 65 61 74 65 73 20 61 20 73 65 ead creates a se
23a0: 72 76 65 72 20 73 6f 63 6b 65 74 20 66 6f 72 20 rver socket for
23b0: 63 6c 69 65 6e 74 73 20 74 6f 20 63 6f 6e 6e 65 clients to conne
23c0: 63 74 20 74 6f 0a 6a 75 73 74 20 6c 69 6b 65 20 ct to.just like
23d0: 74 68 65 20 54 63 6c 20 3c 62 20 63 6c 61 73 73 the Tcl <b class
23e0: 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 ="syscmd">socket
23f0: 20 2d 73 65 72 76 65 72 3c 2f 62 3e 20 63 6f 6d -server</b> com
2400: 6d 61 6e 64 2e 20 49 74 20 72 65 74 75 72 6e 73 mand. It returns
2410: 20 74 68 65 20 63 68 61 6e 6e 65 6c 0a 68 61 6e the channel.han
2420: 64 6c 65 20 69 64 20 66 6f 72 20 74 68 65 20 6e dle id for the n
2430: 65 77 20 73 6f 63 6b 65 74 2e 3c 2f 70 3e 3c 2f ew socket.</p></
2440: 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d dd>.<dt><a name=
2450: 22 34 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d "4"><b class="cm
2460: 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f d">tls::import</
2470: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
2480: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 3c 73 ">channel</i> <s
2490: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
24a0: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ?<i class="arg">
24b0: 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 -option</i>?</sp
24c0: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d an> <span class=
24d0: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d "opt">?<i class=
24e0: 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f "arg">value</i>?
24f0: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c </span> <span cl
2500: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c ass="opt">?<i cl
2510: 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f ass="arg">-optio
2520: 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f n value ...</i>?
2530: 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e </span></a></dt>
2540: 0a 3c 64 64 3e 3c 70 3e 53 74 61 72 74 20 54 4c .<dd><p>Start TL
2550: 53 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f 6e 20 S encryption on
2560: 54 43 4c 20 63 68 61 6e 6e 65 6c 20 3c 69 20 63 TCL channel <i c
2570: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
2580: 65 6c 3c 2f 69 3e 20 76 69 61 20 61 20 73 74 61 el</i> via a sta
2590: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 2e 20 49 74 cked channel. It
25a0: 0a 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 20 73 .need not be a s
25b0: 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 ocket, but must
25c0: 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 provide bi-direc
25d0: 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 tional flow. Als
25e0: 6f 20 73 65 74 73 20 73 65 73 73 69 6f 6e 0a 70 o sets session.p
25f0: 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 arameters for SS
2600: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 56 61 6c L handshake. Val
2610: 69 64 20 6f 70 74 69 6f 6e 73 20 61 72 65 3a 3c id options are:<
2620: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 /p>.<dl class="d
2630: 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 octools_options"
2640: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
2650: 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62 option">-alpn</b
2660: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
2670: 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >list</i></dt>.<
2680: 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 70 72 dd><p>List of pr
2690: 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 otocols to offer
26a0: 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 during Applicat
26b0: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
26c0: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 0a 28 ol Negotiation.(
26d0: 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d 70 ALPN). For examp
26e0: 6c 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f le: <b class="co
26f0: 6e 73 74 22 3e 68 32 3c 2f 62 3e 20 61 6e 64 20 nst">h2</b> and
2700: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
2710: 3e 68 74 74 70 2f 31 2e 31 3c 2f 62 3e 2c 20 62 >http/1.1</b>, b
2720: 75 74 20 6e 6f 74 20 3c 62 20 63 6c 61 73 73 3d ut not <b class=
2730: 22 63 6f 6e 73 74 22 3e 68 33 3c 2f 62 3e 20 6f "const">h3</b> o
2740: 72 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 r.<b class="cons
2750: 74 22 3e 71 75 69 63 3c 2f 62 3e 2e 20 54 68 69 t">quic</b>. Thi
2760: 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 20 s option is new
2770: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c for TclTLS 1.8.<
2780: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
2790: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
27a0: 63 61 64 69 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 cadir</b> <i cla
27b0: 73 73 3d 22 61 72 67 22 3e 64 69 72 65 63 74 6f ss="arg">directo
27c0: 72 79 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ry</i></dt>.<dd>
27d0: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 <p>Specifies the
27e0: 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 directory where
27f0: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 the Certificate
2800: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 Authority (CA)
2810: 63 65 72 74 69 66 69 63 61 74 65 73 20 61 72 65 certificates are
2820: 0a 73 74 6f 72 65 64 2e 20 54 68 65 20 64 65 66 .stored. The def
2830: 61 75 6c 74 20 69 73 20 70 6c 61 74 66 6f 72 6d ault is platform
2840: 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 specific and ca
2850: 6e 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 n be set at comp
2860: 69 6c 65 20 74 69 6d 65 2e 20 54 68 65 0a 64 65 ile time. The.de
2870: 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 fault location c
2880: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e an be overridden
2890: 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73 by the <b class
28a0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f ="variable">SSL_
28b0: 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 CERT_DIR</b> env
28c0: 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c ironment.variabl
28d0: 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 e. See <span cla
28e0: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 ss="sectref"><a
28f0: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 href="#section3"
2900: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c >Certificate Val
2910: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 idation</a></spa
2920: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 n> for more deta
2930: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ils.</p></dd>.<d
2940: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
2950: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 on">-cafile</b>
2960: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 <i class="arg">f
2970: 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e ilename</i></dt>
2980: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 .<dd><p>Specifie
2990: 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 s the file with
29a0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
29b0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 Authority (CA) c
29c0: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 75 ertificates to u
29d0: 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 se in.<b class="
29e0: 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e 20 66 const">PEM</b> f
29f0: 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68 65 20 ile format. The
2a00: 64 65 66 61 75 6c 74 20 69 73 20 26 71 75 6f 74 default is "
2a10: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 ;<b class="file"
2a20: 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 >cert.pem</b>&qu
2a30: 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e ot;, in the Open
2a40: 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 2e 20 54 SSL.directory. T
2a50: 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20 he default file
2a60: 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 can be overridde
2a70: 6e 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 n by the <b clas
2a80: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c s="variable">SSL
2a90: 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 _CERT_FILE</b> e
2aa0: 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 nvironment.varia
2ab0: 62 6c 65 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 ble. See <span c
2ac0: 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c lass="sectref"><
2ad0: 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e a href="#section
2ae0: 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 3">Certificate V
2af0: 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 alidation</a></s
2b00: 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 pan> for more de
2b10: 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a tails.</p></dd>.
2b20: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
2b30: 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f tion">-castore</
2b40: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
2b50: 22 3e 55 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c ">URI</i></dt>.<
2b60: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 dd><p>Specifies
2b70: 74 68 65 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f the Uniform Reso
2b80: 75 72 63 65 20 49 64 65 6e 74 69 66 69 65 72 20 urce Identifier
2b90: 28 55 52 49 29 20 66 6f 72 20 74 68 65 20 43 65 (URI) for the Ce
2ba0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
2bb0: 69 74 79 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 ity.(CA) store,
2bc0: 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 which may be a s
2bd0: 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 ingle container
2be0: 6f 72 20 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 or a catalog of
2bf0: 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 containers..Star
2c00: 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 ting with OpenSS
2c10: 4c 20 33 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 L 3.2 on MS Wind
2c20: 6f 77 73 2c 20 73 65 74 20 74 6f 20 26 71 75 6f ows, set to &quo
2c30: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 t;<b class="cons
2c40: 74 22 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 t">org.openssl.w
2c50: 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 instore://</b>&q
2c60: 75 6f 74 3b 0a 74 6f 20 75 73 65 20 74 68 65 20 uot;.to use the
2c70: 62 75 69 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 built-in MS Wind
2c80: 6f 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 ows Certificate
2c90: 53 74 6f 72 65 2e 0a 53 65 65 20 3c 73 70 61 6e Store..See <span
2ca0: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 class="sectref"
2cb0: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 ><a href="#secti
2cc0: 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 on3">Certificate
2cd0: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c Validation</a><
2ce0: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
2cf0: 64 65 74 61 69 6c 73 2e 0a 54 68 69 73 20 6f 70 details..This op
2d00: 74 69 6f 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 tion is new for
2d10: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
2d20: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
2d30: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 s="option">-cert
2d40: 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 file</b> <i clas
2d50: 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 s="arg">filename
2d60: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
2d70: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6e >Specifies the n
2d80: 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 ame of the file
2d90: 77 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69 with the certifi
2da0: 63 61 74 65 20 74 6f 20 75 73 65 20 69 6e 20 50 cate to use in P
2db0: 45 4d 20 66 6f 72 6d 61 74 0a 61 73 20 74 68 65 EM format.as the
2dc0: 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e 74 20 6f local (client o
2dd0: 72 20 73 65 72 76 65 72 29 20 63 65 72 74 69 66 r server) certif
2de0: 69 63 61 74 65 2e 20 49 74 20 61 6c 73 6f 20 63 icate. It also c
2df0: 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 75 62 6c ontains the publ
2e00: 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e ic key.</p></dd>
2e10: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
2e20: 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e ption">-cert</b>
2e30: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
2e40: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a string</i></dt>.
2e50: 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 <dd><p>Specifies
2e60: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
2e70: 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 to use as a DER
2e80: 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 encoded string
2e90: 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 70 3e (X.509 DER).</p>
2ea0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
2eb0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 ss="option">-cip
2ec0: 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 her</b> <i class
2ed0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 ="arg">string</i
2ee0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
2ef0: 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 ecifies the list
2f00: 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 of ciphers to u
2f10: 73 65 20 66 6f 72 20 54 4c 53 20 31 2e 32 20 61 se for TLS 1.2 a
2f20: 6e 64 20 65 61 72 6c 69 65 72 20 63 6f 6e 6e 65 nd earlier conne
2f30: 63 74 69 6f 6e 73 2e 0a 53 74 72 69 6e 67 20 69 ctions..String i
2f40: 73 20 61 20 63 6f 6c 6f 6e 20 26 71 75 6f 74 3b s a colon "
2f50: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
2f60: 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 73 65 70 >:</b>" sep
2f70: 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 arated list of c
2f80: 69 70 68 65 72 73 2e 0a 43 69 70 68 65 72 73 20 iphers..Ciphers
2f90: 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 can be combined
2fa0: 75 73 69 6e 67 20 74 68 65 20 26 71 75 6f 74 3b using the "
2fb0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
2fc0: 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 63 68 61 >+</b>" cha
2fd0: 72 61 63 74 65 72 2e 0a 50 72 65 66 69 78 65 73 racter..Prefixes
2fe0: 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 can be used to
2ff0: 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 65 6d 6f permanently remo
3000: 76 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 ve "<b clas
3010: 73 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f 62 3e 26 s="const">!</b>&
3020: 71 75 6f 74 3b 2c 20 64 65 6c 65 74 65 20 26 71 quot;, delete &q
3030: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f uot;<b class="co
3040: 6e 73 74 22 3e 2d 3c 2f 62 3e 26 71 75 6f 74 3b nst">-</b>"
3050: 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 74 68 65 , or.move to the
3060: 20 65 6e 64 20 26 71 75 6f 74 3b 3c 62 20 63 6c end "<b cl
3070: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b 3c 2f 62 ass="const">+</b
3080: 3e 26 71 75 6f 74 3b 20 61 20 73 70 65 63 69 66 >" a specif
3090: 69 65 64 20 63 69 70 68 65 72 2e 0a 4b 65 79 77 ied cipher..Keyw
30a0: 6f 72 64 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 ords <b class="c
30b0: 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47 54 48 3c onst">@STRENGTH<
30c0: 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67 /b> (sort by alg
30d0: 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 74 orithm key lengt
30e0: 68 29 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f h),.<b class="co
30f0: 6e 73 74 22 3e 40 53 45 43 4c 45 56 45 4c 3d 3c nst">@SECLEVEL=<
3100: 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e 20 28 73 /b><em>n</em> (s
3110: 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 et security leve
3120: 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a 3c 62 20 l to n), and.<b
3130: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 44 45 class="const">DE
3140: 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 FAULT</b> (use d
3150: 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 efault cipher li
3160: 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c st, at start onl
3170: 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 y) can also be s
3180: 70 65 63 69 66 69 65 64 2e 0a 53 65 65 20 74 68 pecified..See th
3190: 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 e <a href="https
31a0: 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e ://docs.openssl.
31b0: 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f org/master/man1/
31c0: 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f openssl-ciphers/
31d0: 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53 #options">OpenSS
31e0: 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74 L</a>.documentat
31f0: 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c ion for the full
3200: 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 list of valid v
3210: 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a alues.</p></dd>.
3220: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
3230: 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72 73 75 69 tion">-ciphersui
3240: 74 65 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 tes</b> <i class
3250: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 ="arg">string</i
3260: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
3270: 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 ecifies the list
3280: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 of cipher suite
3290: 73 20 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 s to use for TLS
32a0: 20 31 2e 33 20 61 73 20 61 20 63 6f 6c 6f 6e 0a 1.3 as a colon.
32b0: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 "<b class="
32c0: 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f const">:</b>&quo
32d0: 74 3b 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 t; separated lis
32e0: 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 t of cipher suit
32f0: 65 20 6e 61 6d 65 73 2e 20 53 65 65 20 74 68 65 e names. See the
3300: 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a .<a href="https:
3310: 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 6c 2e 6f //docs.openssl.o
3320: 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e 31 2f 6f rg/master/man1/o
3330: 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 73 2f 23 penssl-ciphers/#
3340: 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e 53 53 4c options">OpenSSL
3350: 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 61 74 69 </a>.documentati
3360: 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 20 on for the full
3370: 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76 61 list of valid va
3380: 6c 75 65 73 2e 0a 54 68 69 73 20 6f 70 74 69 6f lues..This optio
3390: 6e 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c n is new for Tcl
33a0: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
33b0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
33c0: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 option">-command
33d0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
33e0: 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e rg">callback</i>
33f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 </dt>.<dd><p>Spe
3400: 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 cifies the callb
3410: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 ack command to b
3420: 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 e invoked at sev
3430: 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 eral points duri
3440: 6e 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 ng the.handshake
3450: 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c to pass errors,
3460: 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 tracing informa
3470: 74 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 tion, and protoc
3480: 6f 6c 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65 ol messages..See
3490: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 <span class="se
34a0: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 ctref"><a href="
34b0: 23 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 #section4">Callb
34c0: 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c ack Options</a><
34d0: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
34e0: 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c info.</p></dd>.<
34f0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
3500: 69 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f ion">-dhparams</
3510: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
3520: 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f ">filename</i></
3530: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 dt>.<dd><p>Speci
3540: 66 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d fies the Diffie-
3550: 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 Hellman (DH) par
3560: 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70 ameters file.</p
3570: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
3580: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 ass="option">-ke
3590: 79 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 yfile</b> <i cla
35a0: 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d ss="arg">filenam
35b0: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
35c0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 p>Specifies the
35d0: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 private key file
35e0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
35f0: 20 74 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65 to use the file
3600: 0a 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 .specified by th
3610: 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 e <i class="arg"
3620: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 69 3e 20 6f >-certfile</i> o
3630: 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a ption.</p></dd>.
3640: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
3650: 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 3c tion">-key</b> <
3660: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
3670: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
3680: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 d><p>Specifies t
3690: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 he private key t
36a0: 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65 o use as a DER e
36b0: 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 50 ncoded string (P
36c0: 4b 43 53 23 31 20 44 45 52 29 2e 3c 2f 70 3e 3c KCS#1 DER).</p><
36d0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
36e0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6d 6f 64 65 s="option">-mode
36f0: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 l</b> <i class="
3700: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e arg">channel</i>
3710: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 </dt>.<dd><p>For
3720: 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 ce this channel
3730: 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d to share the sam
3740: 65 20 3c 69 20 63 6c 61 73 73 3d 22 74 65 72 6d e <i class="term
3750: 22 3e 53 53 4c 5f 43 54 58 3c 2f 69 3e 20 73 74 ">SSL_CTX</i> st
3760: 72 75 63 74 75 72 65 20 61 73 20 74 68 65 0a 73 ructure as the.s
3770: 70 65 63 69 66 69 65 64 20 3c 69 20 63 6c 61 73 pecified <i clas
3780: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c s="arg">channel<
3790: 2f 69 3e 2c 20 61 6e 64 20 74 68 65 72 65 66 6f /i>, and therefo
37a0: 72 65 20 73 68 61 72 65 20 63 6f 6e 66 69 67 2c re share config,
37b0: 20 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 63 2e callbacks, etc.
37c0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
37d0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
37e0: 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 -password</b> <i
37f0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c class="arg">cal
3800: 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c lback</i></dt>.<
3810: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 dd><p>Specifies
3820: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d the callback com
3830: 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77 mand to invoke w
3840: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 hen OpenSSL need
3850: 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a 70 61 s to obtain a.pa
3860: 73 73 77 6f 72 64 2e 20 54 68 69 73 20 69 73 20 ssword. This is
3870: 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 typically used t
3880: 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 o unlock the pri
3890: 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 vate key of a ce
38a0: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 65 20 63 rtificate..The c
38b0: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 allback should r
38c0: 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 eturn a password
38d0: 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20 6f 70 string. This op
38e0: 74 69 6f 6e 20 68 61 73 20 63 68 61 6e 67 65 64 tion has changed
38f0: 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 2e 38 2e for.TclTLS 1.8.
3900: 20 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 See <span class
3910: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 ="sectref"><a hr
3920: 65 66 3d 22 23 73 65 63 74 69 6f 6e 34 22 3e 43 ef="#section4">C
3930: 61 6c 6c 62 61 63 6b 20 4f 70 74 69 6f 6e 73 3c allback Options<
3940: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d /a></span> for m
3950: 6f 72 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 ore info.</p></d
3960: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
3970: 22 6f 70 74 69 6f 6e 22 3e 2d 70 6f 73 74 5f 68 "option">-post_h
3980: 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 20 andshake</b> <i
3990: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
39a0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
39b0: 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 >Allow post-hand
39c0: 73 68 61 6b 65 20 73 65 73 73 69 6f 6e 20 74 69 shake session ti
39d0: 63 6b 65 74 20 75 70 64 61 74 65 73 2e 20 54 68 cket updates. Th
39e0: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 is option is new
39f0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
3a00: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
3a10: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
3a20: 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 3c 69 20 -request</b> <i
3a30: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
3a40: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
3a50: 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69 >Request a certi
3a60: 66 69 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 ficate from the
3a70: 70 65 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 peer during the
3a80: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 54 SSL handshake. T
3a90: 68 69 73 20 69 73 20 6e 65 65 64 65 64 0a 74 6f his is needed.to
3aa0: 20 64 6f 20 43 65 72 74 69 66 69 63 61 74 65 20 do Certificate
3ab0: 56 61 6c 69 64 61 74 69 6f 6e 2e 20 53 74 61 72 Validation. Star
3ac0: 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 31 ting in TclTLS 1
3ad0: 2e 38 2c 20 74 68 65 20 64 65 66 61 75 6c 74 20 .8, the default
3ae0: 69 73 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is.<b class="con
3af0: 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 20 53 74 st">true</b>. St
3b00: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
3b10: 20 32 2e 30 2c 20 49 66 20 73 65 74 20 74 6f 20 2.0, If set to
3b20: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
3b30: 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 6e 64 0a 3c >false</b> and.<
3b40: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
3b50: 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 69 73 >-require</b> is
3b60: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
3b70: 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 74 68 65 6e ">true</b>, then
3b80: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 6f 76 this will be ov
3b90: 65 72 72 69 64 64 65 6e 20 74 6f 20 3c 62 20 63 erridden to <b c
3ba0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 lass="const">tru
3bb0: 65 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e e</b>..See <span
3bc0: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 class="sectref"
3bd0: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 ><a href="#secti
3be0: 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 on3">Certificate
3bf0: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c Validation</a><
3c00: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
3c10: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 details.</p></dd
3c20: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
3c30: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 option">-require
3c40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
3c50: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 rg">bool</i></dt
3c60: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 >.<dd><p>Require
3c70: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 a valid certifi
3c80: 63 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 cate from the pe
3c90: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 er during the SS
3ca0: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 L handshake. If
3cb0: 74 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74 this is.set to t
3cc0: 72 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 rue, then <b cla
3cd0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 ss="option">-req
3ce0: 75 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c uest</b> must al
3cf0: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 so be set to tru
3d00: 65 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 3c e and a either.<
3d10: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
3d20: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 >-cadir</b>, <b
3d30: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
3d40: 63 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 cafile</b>, <b c
3d50: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
3d60: 61 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 astore</b>, or a
3d70: 20 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c platform defaul
3d80: 74 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 t.must be provid
3d90: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 ed in order to v
3da0: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e alidate against.
3db0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e 20 The default in
3dc0: 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65 TclTLS 1.8 and.e
3dd0: 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20 arlier versions
3de0: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
3df0: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69 st">false</b> si
3e00: 6e 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 nce not all plat
3e10: 66 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69 forms have certi
3e20: 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 ficates to.valid
3e30: 61 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61 ate against in a
3e40: 20 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 form compatible
3e50: 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53 with OpenSSL. S
3e60: 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c tarting in TclTL
3e70: 53 20 32 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 S 2.0,.the defau
3e80: 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 lt is <b class="
3e90: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e const">true</b>.
3ea0: 0a 53 65 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 .See <span class
3eb0: 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 68 72 ="sectref"><a hr
3ec0: 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 ef="#section3">C
3ed0: 65 72 74 69 66 69 63 61 74 65 20 56 61 6c 69 64 ertificate Valid
3ee0: 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e ation</a></span>
3ef0: 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c for more detail
3f00: 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e s.</p></dd>.<dt>
3f10: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
3f20: 22 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 ">-security_leve
3f30: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 l</b> <i class="
3f40: 61 72 67 22 3e 69 6e 74 65 67 65 72 3c 2f 69 3e arg">integer</i>
3f50: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 </dt>.<dd><p>Spe
3f60: 63 69 66 69 65 73 20 74 68 65 20 73 65 63 75 72 cifies the secur
3f70: 69 74 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 65 ity level (value
3f80: 20 66 72 6f 6d 20 30 20 74 6f 20 35 29 2e 20 54 from 0 to 5). T
3f90: 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 he security leve
3fa0: 6c 20 61 66 66 65 63 74 73 0a 74 68 65 20 61 6c l affects.the al
3fb0: 6c 6f 77 65 64 20 63 69 70 68 65 72 20 73 75 69 lowed cipher sui
3fc0: 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c te encryption al
3fd0: 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 gorithms, suppor
3fe0: 74 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a ted ECC curves,.
3ff0: 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 supported signat
4000: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 ure algorithms,
4010: 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a DH parameter siz
4020: 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 es, certificate
4030: 6b 65 79 20 73 69 7a 65 73 0a 61 6e 64 20 73 69 key sizes.and si
4040: 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 gnature algorith
4050: 6d 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 ms. The default
4060: 69 73 20 31 20 70 72 69 6f 72 20 74 6f 20 4f 70 is 1 prior to Op
4070: 65 6e 53 53 4c 20 33 2e 32 20 61 6e 64 20 32 0a enSSL 3.2 and 2.
4080: 74 68 65 72 65 61 66 74 65 72 2e 20 4c 65 76 65 thereafter. Leve
4090: 6c 20 33 20 61 6e 64 20 68 69 67 68 65 72 20 64 l 3 and higher d
40a0: 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 66 isable support f
40b0: 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 or session ticke
40c0: 74 73 20 61 6e 64 0a 6f 6e 6c 79 20 61 63 63 65 ts and.only acce
40d0: 70 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73 pt cipher suites
40e0: 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f that provide fo
40f0: 72 77 61 72 64 20 73 65 63 72 65 63 79 2e 0a 54 rward secrecy..T
4100: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 his option is ne
4110: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
4120: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
4130: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4140: 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c 69 20 >-server</b> <i
4150: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
4160: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
4170: 3e 53 70 65 63 69 66 69 65 73 20 77 68 65 74 68 >Specifies wheth
4180: 65 72 20 74 6f 20 61 63 74 20 61 73 20 61 20 73 er to act as a s
4190: 65 72 76 65 72 20 61 6e 64 20 72 65 73 70 6f 6e erver and respon
41a0: 64 20 77 69 74 68 20 61 20 73 65 72 76 65 72 20 d with a server
41b0: 68 61 6e 64 73 68 61 6b 65 20 77 68 65 6e 20 61 handshake when a
41c0: 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 74 73 .client connects
41d0: 20 61 6e 64 20 70 72 6f 76 69 64 65 73 20 61 20 and provides a
41e0: 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 61 6b 65 client handshake
41f0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
4200: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
4210: 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c 2f 70 3e ">false</b>.</p>
4220: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
4230: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 ss="option">-ser
4240: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 vername</b> <i c
4250: 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 6e lass="arg">hostn
4260: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ame</i></dt>.<dd
4270: 3e 3c 70 3e 53 70 65 63 69 66 79 20 74 68 65 20 ><p>Specify the
4280: 70 65 65 72 27 73 20 68 6f 73 74 6e 61 6d 65 2e peer's hostname.
4290: 20 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f This is used to
42a0: 20 73 65 74 20 74 68 65 20 54 4c 53 20 53 65 72 set the TLS Ser
42b0: 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 ver Name Indicat
42c0: 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e 73 ion.(SNI) extens
42d0: 69 6f 6e 2e 20 53 65 74 20 74 68 69 73 20 74 6f ion. Set this to
42e0: 20 74 68 65 20 65 78 70 65 63 74 65 64 20 73 65 the expected se
42f0: 72 76 65 72 6e 61 6d 65 20 69 6e 20 74 68 65 20 rvername in the
4300: 73 65 72 76 65 72 27 73 20 63 65 72 74 69 66 69 server's certifi
4310: 63 61 74 65 0a 6f 72 20 6f 6e 65 20 6f 66 20 74 cate.or one of t
4320: 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72 he Subject Alter
4330: 6e 61 74 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 nate Names (SAN)
4340: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
4350: 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 20 77 lTLS 2.0, this w
4360: 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f 20 74 ill.default to t
4370: 68 65 20 68 6f 73 74 20 66 6f 72 20 74 68 65 20 he host for the
4380: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
4390: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 ls::socket</b> c
43a0: 6f 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c 2f 64 64 3e ommand.</p></dd>
43b0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
43c0: 70 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f 6e 5f ption">-session_
43d0: 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d id</b> <i class=
43e0: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 "arg">binary_str
43f0: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ing</i></dt>.<dd
4400: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 ><p>Specifies th
4410: 65 20 73 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 e session id to
4420: 72 65 73 75 6d 65 20 61 20 73 65 73 73 69 6f 6e resume a session
4430: 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 . Not supported
4440: 79 65 74 2e 0a 54 68 69 73 20 6f 70 74 69 6f 6e yet..This option
4450: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
4460: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
4470: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
4480: 70 74 69 6f 6e 22 3e 2d 73 73 6c 32 3c 2f 62 3e ption">-ssl2</b>
4490: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
44a0: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 bool</i></dt>.<d
44b0: 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 d><p>Enable use
44c0: 6f 66 20 53 53 4c 20 76 32 2e 54 68 65 20 64 65 of SSL v2.The de
44d0: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 fault is <b clas
44e0: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c s="const">false<
44f0: 2f 62 3e 2e 0a 4f 70 65 6e 53 53 4c 20 31 2e 31 /b>..OpenSSL 1.1
4500: 2b 20 6e 6f 20 6c 6f 6e 67 65 72 20 73 75 70 70 + no longer supp
4510: 6f 72 74 73 20 53 53 4c 20 76 32 2c 20 73 6f 20 orts SSL v2, so
4520: 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 61 76 this may not hav
4530: 65 20 61 6e 79 20 65 66 66 65 63 74 2e 0a 53 65 e any effect..Se
4540: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 e the <b class="
4550: 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 cmd">tls::protoc
4560: 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 ols</b> command
4570: 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 70 72 for supported pr
4580: 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 otocols.</p></dd
4590: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
45a0: 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c 2f 62 option">-ssl3</b
45b0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
45c0: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
45d0: 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 dd><p>Enable use
45e0: 20 6f 66 20 53 53 4c 20 76 33 2e 20 54 68 65 20 of SSL v3. The
45f0: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c default is <b cl
4600: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 ass="const">fals
4610: 65 3c 2f 62 3e 2e 20 53 74 61 72 74 69 6e 67 20 e</b>. Starting
4620: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2c 0a 75 in TclTLS 1.8,.u
4630: 73 65 20 6f 66 20 53 53 4c 20 76 33 20 69 66 20 se of SSL v3 if
4640: 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 76 only available v
4650: 69 61 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 6d ia a compile tim
4660: 65 20 6f 70 74 69 6f 6e 2e 0a 53 65 65 20 74 68 e option..See th
4670: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 e <b class="cmd"
4680: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c >tls::protocols<
4690: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72 20 /b> command for
46a0: 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 supported protoc
46b0: 6f 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ols.</p></dd>.<d
46c0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
46d0: 6f 6e 22 3e 2d 74 6c 73 31 3c 2f 62 3e 20 3c 69 on">-tls1</b> <i
46e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f class="arg">boo
46f0: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c l</i></dt>.<dd><
4700: 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 p>Enable use of
4710: 54 4c 53 20 76 31 2e 20 53 74 61 72 74 69 6e 67 TLS v1. Starting
4720: 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 in TclTLS 2.0,
4730: 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c the default is <
4740: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
4750: 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 3a false</b>..Note:
4760: 20 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 20 53 TLS 1.0 needs S
4770: 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 HA1 to operate,
4780: 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 which is only av
4790: 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 ailable in secur
47a0: 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 20 ity level.0 for
47b0: 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 53 Open SSL 3.0+. S
47c0: 65 65 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d ee the <i class=
47d0: 22 61 72 67 22 3e 2d 73 65 63 75 72 69 74 79 5f "arg">-security_
47e0: 6c 65 76 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e level</i> option
47f0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
4800: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4810: 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e 20 3c 69 20 >-tls1.1</b> <i
4820: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
4830: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
4840: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 >Enable use of T
4850: 4c 53 20 76 31 2e 31 2e 20 53 74 61 72 74 69 6e LS v1.1. Startin
4860: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c g in TclTLS 2.0,
4870: 20 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 the default is
4880: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
4890: 3e 66 61 6c 73 65 3c 2f 62 3e 2e 0a 4e 6f 74 65 >false</b>..Note
48a0: 3a 20 54 4c 53 20 31 2e 31 20 6e 65 65 64 73 20 : TLS 1.1 needs
48b0: 53 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c SHA1 to operate,
48c0: 20 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 which is only a
48d0: 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 vailable in secu
48e0: 72 69 74 79 20 6c 65 76 65 6c 0a 30 20 66 6f 72 rity level.0 for
48f0: 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 20 Open SSL 3.0+.
4900: 53 65 65 20 74 68 65 20 3c 69 20 63 6c 61 73 73 See the <i class
4910: 3d 22 61 72 67 22 3e 2d 73 65 63 75 72 69 74 79 ="arg">-security
4920: 5f 6c 65 76 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f _level</i> optio
4930: 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e n.</p></dd>.<dt>
4940: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
4950: 22 3e 2d 74 6c 73 31 2e 32 3c 2f 62 3e 20 3c 69 ">-tls1.2</b> <i
4960: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f class="arg">boo
4970: 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c l</i></dt>.<dd><
4980: 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 p>Enable use of
4990: 54 4c 53 20 76 31 2e 32 2e 20 54 68 65 20 64 65 TLS v1.2. The de
49a0: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 fault is <b clas
49b0: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f s="const">true</
49c0: 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 b>.</p></dd>.<dt
49d0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f ><b class="optio
49e0: 6e 22 3e 2d 74 6c 73 31 2e 33 3c 2f 62 3e 20 3c n">-tls1.3</b> <
49f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f i class="arg">bo
4a00: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ol</i></dt>.<dd>
4a10: 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 <p>Enable use of
4a20: 20 54 4c 53 20 76 31 2e 33 2e 20 54 68 65 20 64 TLS v1.3. The d
4a30: 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 efault is <b cla
4a40: 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c ss="const">true<
4a50: 2f 62 3e 2e 20 54 68 69 73 20 69 73 20 6f 6e 6c /b>. This is onl
4a60: 79 20 61 76 61 69 6c 61 62 6c 65 0a 73 74 61 72 y available.star
4a70: 74 69 6e 67 20 77 69 74 68 20 4f 70 65 6e 53 53 ting with OpenSS
4a80: 4c 20 31 2e 31 2e 31 20 61 6e 64 20 54 63 6c 54 L 1.1.1 and TclT
4a90: 4c 53 20 31 2e 37 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.7.</p></dd>
4aa0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
4ab0: 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 ption">-validate
4ac0: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 3c 69 20 63 command</b> <i c
4ad0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c 6c 62 lass="arg">callb
4ae0: 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ack</i></dt>.<dd
4af0: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 ><p>Specifies th
4b00: 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 e callback comma
4b10: 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 nd to invoke to
4b20: 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 65 65 validate the pee
4b30: 72 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 r certificates.a
4b40: 6e 64 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 20 nd other config
4b50: 69 6e 66 6f 20 64 75 72 69 6e 67 20 74 68 65 20 info during the
4b60: 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 protocol negotia
4b70: 74 69 6f 6e 20 70 68 61 73 65 2e 20 54 68 69 73 tion phase. This
4b80: 20 63 61 6e 20 62 65 20 75 73 65 64 0a 62 79 20 can be used.by
4b90: 54 43 4c 20 73 63 72 69 70 74 73 20 74 6f 20 70 TCL scripts to p
4ba0: 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 6e erform their own
4bb0: 20 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c Certificate Val
4bc0: 69 64 61 74 69 6f 6e 20 74 6f 20 73 75 70 70 6c idation to suppl
4bd0: 65 6d 65 6e 74 20 74 68 65 0a 64 65 66 61 75 6c ement the.defaul
4be0: 74 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f t validation pro
4bf0: 76 69 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c vided by OpenSSL
4c00: 2e 20 54 68 65 20 73 63 72 69 70 74 20 6d 75 73 . The script mus
4c10: 74 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 t return a boole
4c20: 61 6e 20 74 72 75 65 0a 74 6f 20 63 6f 6e 74 69 an true.to conti
4c30: 6e 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74 nue the negotiat
4c40: 69 6f 6e 2e 20 53 65 65 20 3c 73 70 61 6e 20 63 ion. See <span c
4c50: 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c lass="sectref"><
4c60: 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e a href="#section
4c70: 34 22 3e 43 61 6c 6c 62 61 63 6b 20 4f 70 74 69 4">Callback Opti
4c80: 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 ons</a></span> f
4c90: 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 0a 54 68 or more info..Th
4ca0: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 6e 65 77 is option is new
4cb0: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
4cc0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c </p></dd>.</dl><
4cd0: 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 /dd>.<dt><a name
4ce0: 3d 22 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 ="5"><b class="c
4cf0: 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 md">tls::unimpor
4d00: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 t</b> <i class="
4d10: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e arg">channel</i>
4d20: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </a></dt>.<dd><p
4d30: 3e 43 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 3c >Compliment to <
4d40: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
4d50: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 20 55 s::import</b>. U
4d60: 73 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 74 68 sed to remove th
4d70: 65 20 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 63 e top level stac
4d80: 6b 65 64 20 63 68 61 6e 6e 65 6c 0a 66 72 6f 6d ked channel.from
4d90: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
4da0: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2e 20 54 68 69 channel</i>. Thi
4db0: 73 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20 65 s unstacks the e
4dc0: 6e 63 72 79 70 74 69 6f 6e 20 6f 66 20 61 20 72 ncryption of a r
4dd0: 65 67 75 6c 61 72 20 54 43 4c 20 63 68 61 6e 6e egular TCL chann
4de0: 65 6c 2e 20 41 6e 0a 65 72 72 6f 72 20 69 73 20 el. An.error is
4df0: 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 thrown if TLS is
4e00: 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 not the top sta
4e10: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 cked channel typ
4e20: 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e e.</p></dd>.<dt>
4e30: 3c 61 20 6e 61 6d 65 3d 22 36 22 3e 3c 62 20 63 <a name="6"><b c
4e40: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
4e50: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 handshake</b> <i
4e60: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 class="arg">cha
4e70: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 nnel</i></a></dt
4e80: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 73 20 >.<dd><p>Forces
4e90: 74 68 65 20 54 4c 53 20 6e 65 67 6f 74 69 61 74 the TLS negotiat
4ea0: 69 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20 74 6f ion handshake to
4eb0: 20 74 61 6b 65 20 70 6c 61 63 65 20 69 6d 6d 65 take place imme
4ec0: 64 69 61 74 65 6c 79 2c 20 61 6e 64 20 72 65 74 diately, and ret
4ed0: 75 72 6e 73 20 30 0a 69 66 20 68 61 6e 64 73 68 urns 0.if handsh
4ee0: 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 ake is still in
4ef0: 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c progress (non-bl
4f00: 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 ocking), or 1 if
4f10: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 the handshake w
4f20: 61 73 0a 73 75 63 63 65 73 73 66 75 6c 2e 20 49 as.successful. I
4f30: 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 f the handshake
4f40: 66 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f 72 failed, an error
4f50: 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 will be returne
4f60: 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e d.</p></dd>.<dt>
4f70: 3c 61 20 6e 61 6d 65 3d 22 37 22 3e 3c 62 20 63 <a name="7"><b c
4f80: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
4f90: 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70 61 6e status</b> <span
4fa0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 62 class="opt">?<b
4fb0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
4fc0: 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 61 -local</b>?</spa
4fd0: 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 n> <i class="arg
4fe0: 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 ">channel</i></a
4ff0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 ></dt>.<dd><p>Re
5000: 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e turns the curren
5010: 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 t status of an S
5020: 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 SL channel. The
5030: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 result is a list
5040: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 0a 70 61 of key-value.pa
5050: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 irs describing t
5060: 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69 63 he SSL, certific
5070: 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66 69 ate, and certifi
5080: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f cate verificatio
5090: 6e 20 73 74 61 74 75 73 2e 20 49 66 0a 74 68 65 n status. If.the
50a0: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 68 SSL handshake h
50b0: 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 6c as not yet compl
50c0: 65 74 65 64 2c 20 61 6e 20 65 6d 70 74 79 20 6c eted, an empty l
50d0: 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 2e ist is returned.
50e0: 20 49 66 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 If the.<b class
50f0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c ="option">-local
5100: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 73 </b> option is s
5110: 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74 pecified, then t
5120: 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 he local certifi
5130: 63 61 74 65 20 69 73 20 75 73 65 64 2e 20 52 65 cate is used. Re
5140: 74 75 72 6e 65 64 0a 76 61 6c 75 65 73 20 69 6e turned.values in
5150: 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 clude:</p>.<p>SS
5160: 4c 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 6c L Status</p>.<dl
5170: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
5180: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c _definitions">.<
5190: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
51a0: 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e 20 iable">alpn</b>
51b0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 <i class="arg">p
51c0: 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e rotocol</i></dt>
51d0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 .<dd><p>The prot
51e0: 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 ocol selected af
51f0: 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d ter Application-
5200: 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e Layer Protocol N
5210: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e egotiation (ALPN
5220: 29 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 )..This value is
5230: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
5240: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
5250: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
5260: 61 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e able">cipher</b>
5270: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
5280: 63 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a cipher</i></dt>.
5290: 3c 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 <dd><p>The curre
52a0: 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 nt cipher in use
52b0: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e for the session
52c0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
52d0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
52e0: 65 22 3e 70 65 65 72 6e 61 6d 65 3c 2f 62 3e 20 e">peername</b>
52f0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e <i class="arg">n
5300: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ame</i></dt>.<dd
5310: 3e 3c 70 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 ><p>The peername
5320: 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 69 66 from the certif
5330: 69 63 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 icate..This valu
5340: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
5350: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5360: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5370: 76 61 72 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63 variable">protoc
5380: 6f 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ol</b> <i class=
5390: 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 "arg">version</i
53a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
53b0: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 e protocol versi
53c0: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 on used for the
53d0: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 connection: SSL2
53e0: 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c , SSL3, TLS1, TL
53f0: 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 0a 54 4c S1.1, TLS1.2,.TL
5400: 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e S1.3, or unknown
5410: 2e 20 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 . This value is
5420: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
5430: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
5440: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
5450: 62 6c 65 22 3e 73 62 69 74 73 3c 2f 62 3e 20 3c ble">sbits</b> <
5460: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c i class="arg">n<
5470: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
5480: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 62 69 The number of bi
5490: 74 73 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 ts used for the
54a0: 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c 2f 70 3e session key.</p>
54b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
54c0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 ss="variable">si
54d0: 67 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f 72 gnatureHashAlgor
54e0: 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 ithm</b> <i clas
54f0: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 s="arg">algorith
5500: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c m</i></dt>.<dd><
5510: 70 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 p>The signature
5520: 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e 0a hash algorithm..
5530: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
5540: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
5550: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
5560: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
5570: 65 22 3e 73 69 67 6e 61 74 75 72 65 54 79 70 65 e">signatureType
5580: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
5590: 72 67 22 3e 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 rg">type</i></dt
55a0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 69 67 >.<dd><p>The sig
55b0: 6e 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 nature type valu
55c0: 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 e..This value is
55d0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
55e0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
55f0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
5600: 61 62 6c 65 22 3e 76 65 72 69 66 79 44 65 70 74 able">verifyDept
5610: 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 h</b> <i class="
5620: 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a arg">n</i></dt>.
5630: 3c 64 64 3e 3c 70 3e 4d 61 78 69 6d 75 6d 20 64 <dd><p>Maximum d
5640: 65 70 74 68 20 66 6f 72 20 74 68 65 20 63 65 72 epth for the cer
5650: 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 20 76 tificate chain v
5660: 65 72 69 66 69 63 61 74 69 6f 6e 2e 20 44 65 66 erification. Def
5670: 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f 20 63 ault is -1, to c
5680: 68 65 63 6b 20 61 6c 6c 2e 0a 54 68 69 73 20 76 heck all..This v
5690: 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 alue is new for
56a0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
56b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
56c0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 s="variable">ver
56d0: 69 66 79 4d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 ifyMode</b> <i c
56e0: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c lass="arg">list<
56f0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
5700: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 List of certific
5710: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
5720: 20 6d 6f 64 65 73 2e 0a 54 68 69 73 20 76 61 6c modes..This val
5730: 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 ue is new for Tc
5740: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
5750: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
5760: 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 69 66 "variable">verif
5770: 79 52 65 73 75 6c 74 3c 2f 62 3e 20 3c 69 20 63 yResult</b> <i c
5780: 6c 61 73 73 3d 22 61 72 67 22 3e 72 65 73 75 6c lass="arg">resul
5790: 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c t</i></dt>.<dd><
57a0: 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 76 65 p>Certificate ve
57b0: 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c rification resul
57c0: 74 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 t..This value is
57d0: 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 new for TclTLS
57e0: 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 1.8.</p></dd>.<d
57f0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
5800: 61 62 6c 65 22 3e 63 61 5f 6e 61 6d 65 73 3c 2f able">ca_names</
5810: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
5820: 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a ">list</i></dt>.
5830: 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 74 <dd><p>List of t
5840: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
5850: 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 uthorities used
5860: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 to create the ce
5870: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 69 73 20 rtificate..This
5880: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
5890: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
58a0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 </dd>.</dl>.<p>C
58b0: 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75 ertificate Statu
58c0: 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d s</p>.<dl class=
58d0: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 "doctools_defini
58e0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 tions">.<dt><b c
58f0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
5900: 61 6c 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 all</b> <i class
5910: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 ="arg">string</i
5920: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 75 ></dt>.<dd><p>Du
5930: 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 mp of all certif
5940: 69 63 61 74 65 20 69 6e 66 6f 2e 0a 54 68 69 73 icate info..This
5950: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
5960: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 r TclTLS 1.8.</p
5970: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
5980: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 ass="variable">v
5990: 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c ersion</b> <i cl
59a0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c ass="arg">value<
59b0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
59c0: 54 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 The certificate
59d0: 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 version.</p></dd
59e0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
59f0: 76 61 72 69 61 62 6c 65 22 3e 73 65 72 69 61 6c variable">serial
5a00: 4e 75 6d 62 65 72 3c 2f 62 3e 20 3c 69 20 63 6c Number</b> <i cl
5a10: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 ass="arg">string
5a20: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
5a30: 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 >The serial numb
5a40: 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 er of the certif
5a50: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 icate as a hex s
5a60: 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 tring..This valu
5a70: 65 20 77 61 73 20 63 68 61 6e 67 65 64 20 66 72 e was changed fr
5a80: 6f 6d 20 73 65 72 69 61 6c 20 69 6e 20 54 63 6c om serial in Tcl
5a90: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
5aa0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
5ab0: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 variable">signat
5ac0: 75 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ure</b> <i class
5ad0: 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d ="arg">algorithm
5ae0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
5af0: 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 >Cipher algorith
5b00: 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 m used for certi
5b10: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
5b20: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
5b30: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
5b40: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
5b50: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
5b60: 62 6c 65 22 3e 69 73 73 75 65 72 3c 2f 62 3e 20 ble">issuer</b>
5b70: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
5b80: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
5b90: 64 64 3e 3c 70 3e 54 68 65 20 64 69 73 74 69 6e dd><p>The distin
5ba0: 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e guished name (DN
5bb0: 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 ) of the certifi
5bc0: 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 70 3e cate issuer.</p>
5bd0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
5be0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 6f ss="variable">no
5bf0: 74 42 65 66 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 tBefore</b> <i c
5c00: 6c 61 73 73 3d 22 61 72 67 22 3e 64 61 74 65 3c lass="arg">date<
5c10: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
5c20: 54 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 64 61 The beginning da
5c30: 74 65 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 te of the certif
5c40: 69 63 61 74 65 20 76 61 6c 69 64 69 74 79 2e 3c icate validity.<
5c50: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
5c60: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
5c70: 3e 6e 6f 74 41 66 74 65 72 3c 2f 62 3e 20 3c 69 >notAfter</b> <i
5c80: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 61 74 class="arg">dat
5c90: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
5ca0: 70 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e p>The expiration
5cb0: 20 64 61 74 65 20 6f 66 20 74 68 65 20 63 65 72 date of the cer
5cc0: 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 69 74 tificate validit
5cd0: 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e y.</p></dd>.<dt>
5ce0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
5cf0: 6c 65 22 3e 73 75 62 6a 65 63 74 3c 2f 62 3e 20 le">subject</b>
5d00: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
5d10: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
5d20: 64 64 3e 3c 70 3e 54 68 65 20 64 69 73 74 69 6e dd><p>The distin
5d30: 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e guished name (DN
5d40: 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 ) of the certifi
5d50: 63 61 74 65 20 73 75 62 6a 65 63 74 2e 20 46 69 cate subject. Fi
5d60: 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f elds include: Co
5d70: 6d 6d 6f 6e 0a 4e 61 6d 65 20 28 43 4e 29 2c 20 mmon.Name (CN),
5d80: 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 Organization (O)
5d90: 2c 20 4c 6f 63 61 6c 69 74 79 20 6f 72 20 43 69 , Locality or Ci
5da0: 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f 72 ty (L), State or
5db0: 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20 61 Province (S), a
5dc0: 6e 64 0a 43 6f 75 6e 74 72 79 20 4e 61 6d 65 20 nd.Country Name
5dd0: 28 43 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 (C).</p></dd>.<d
5de0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
5df0: 61 62 6c 65 22 3e 69 73 73 75 65 72 55 6e 69 71 able">issuerUniq
5e00: 75 65 49 44 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 ueID</b> <i clas
5e10: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f s="arg">string</
5e20: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
5e30: 68 65 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 he issuer unique
5e40: 20 69 64 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 id..This value
5e50: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
5e60: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a S 1.8.</p></dd>.
5e70: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
5e80: 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 55 riable">subjectU
5e90: 6e 69 71 75 65 49 44 3c 2f 62 3e 20 3c 69 20 63 niqueID</b> <i c
5ea0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e lass="arg">strin
5eb0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
5ec0: 70 3e 54 68 65 20 73 75 62 6a 65 63 74 20 75 6e p>The subject un
5ed0: 69 71 75 65 20 69 64 2e 0a 54 68 69 73 20 76 61 ique id..This va
5ee0: 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 lue is new for T
5ef0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
5f00: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
5f10: 3d 22 76 61 72 69 61 62 6c 65 22 3e 6e 75 6d 5f ="variable">num_
5f20: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 62 3e 20 3c extensions</b> <
5f30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c i class="arg">n<
5f40: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
5f50: 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 Number of certif
5f60: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 icate extensions
5f70: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
5f80: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
5f90: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
5fa0: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
5fb0: 62 6c 65 22 3e 65 78 74 65 6e 73 69 6f 6e 73 3c ble">extensions<
5fc0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
5fd0: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e g">list</i></dt>
5fe0: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 .<dd><p>List of
5ff0: 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 certificate exte
6000: 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e 0a 54 68 69 nsion names..Thi
6010: 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 s value is new f
6020: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f or TclTLS 1.8.</
6030: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
6040: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
6050: 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65 6e authorityKeyIden
6060: 74 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63 6c tifier</b> <i cl
6070: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 ass="arg">string
6080: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
6090: 3e 41 75 74 68 6f 72 69 74 79 20 4b 65 79 20 49 >Authority Key I
60a0: 64 65 6e 74 69 66 69 65 72 20 28 41 4b 49 29 20 dentifier (AKI)
60b0: 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67 20 43 of the Issuing C
60c0: 41 20 63 65 72 74 69 66 69 63 61 74 65 20 74 68 A certificate th
60d0: 61 74 20 73 69 67 6e 65 64 20 74 68 65 0a 53 53 at signed the.SS
60e0: 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 L certificate as
60f0: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 a hex string. T
6100: 68 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65 his value matche
6110: 73 20 74 68 65 20 53 4b 49 20 76 61 6c 75 65 20 s the SKI value
6120: 6f 66 20 74 68 65 0a 49 6e 74 65 72 6d 65 64 69 of the.Intermedi
6130: 61 74 65 20 43 41 20 63 65 72 74 69 66 69 63 61 ate CA certifica
6140: 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 te..This value i
6150: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
6160: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
6170: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
6180: 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 4b 65 iable">subjectKe
6190: 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20 yIdentifier</b>
61a0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 <i class="arg">s
61b0: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
61c0: 64 64 3e 3c 70 3e 53 75 62 6a 65 63 74 20 4b 65 dd><p>Subject Ke
61d0: 79 20 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b y Identifier (SK
61e0: 49 29 20 68 61 73 68 20 6f 66 20 74 68 65 20 70 I) hash of the p
61f0: 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 ublic key inside
6200: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
6210: 20 61 73 20 61 0a 68 65 78 20 73 74 72 69 6e 67 as a.hex string
6220: 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 69 . Used to identi
6230: 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73 20 fy certificates
6240: 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 that contain a p
6250: 61 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69 63 articular public
6260: 20 6b 65 79 2e 0a 54 68 69 73 20 76 61 6c 75 65 key..This value
6270: 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 is new for TclT
6280: 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e LS 1.8.</p></dd>
6290: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
62a0: 61 72 69 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 ariable">subject
62b0: 41 6c 74 4e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 AltName</b> <i c
62c0: 6c 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c lass="arg">list<
62d0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
62e0: 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 List of all of t
62f0: 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 65 72 he Subject Alter
6300: 6e 61 74 69 76 65 20 4e 61 6d 65 73 20 28 53 41 native Names (SA
6310: 4e 29 20 69 6e 63 6c 75 64 69 6e 67 20 64 6f 6d N) including dom
6320: 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 0a 64 ain names, sub.d
6330: 6f 6d 61 69 6e 73 2c 20 61 6e 64 20 49 50 20 61 omains, and IP a
6340: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72 ddresses that ar
6350: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65 e secured by the
6360: 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 54 68 certificate..Th
6370: 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 is value is new
6380: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c for TclTLS 1.8.<
6390: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
63a0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
63b0: 3e 6f 63 73 70 3c 2f 62 3e 20 3c 69 20 63 6c 61 >ocsp</b> <i cla
63c0: 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 ss="arg">list</i
63d0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 ></dt>.<dd><p>Li
63e0: 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 st of all Online
63f0: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 Certificate Sta
6400: 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 tus Protocol (OC
6410: 53 50 29 20 55 52 4c 73 20 74 68 61 74 20 63 61 SP) URLs that ca
6420: 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 63 68 65 n be used to.che
6430: 63 6b 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 ck the validity
6440: 6f 66 20 74 68 69 73 20 63 65 72 74 69 66 69 63 of this certific
6450: 61 74 65 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 ate..This value
6460: 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c is new for TclTL
6470: 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a S 1.8.</p></dd>.
6480: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
6490: 72 69 61 62 6c 65 22 3e 63 65 72 74 69 66 69 63 riable">certific
64a0: 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ate</b> <i class
64b0: 3d 22 61 72 67 22 3e 63 65 72 74 3c 2f 69 3e 3c ="arg">cert</i><
64c0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
64d0: 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 74 PEM encoded cert
64e0: 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 ificate.</p></dd
64f0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
6500: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 variable">signat
6510: 75 72 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 62 3e ureAlgorithm</b>
6520: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
6530: 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c 2f 64 algorithm</i></d
6540: 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 65 72 t>.<dd><p>Cipher
6550: 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 algorithm used
6560: 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 for the certific
6570: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 0a 54 ate signature..T
6580: 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 77 his value is new
6590: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
65a0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
65b0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
65c0: 22 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 ">signatureValue
65d0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
65e0: 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f rg">string</i></
65f0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 65 72 74 69 dt>.<dd><p>Certi
6600: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
6610: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
6620: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
6630: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
6640: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 .8.</p></dd>.<dt
6650: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
6660: 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 44 69 ble">signatureDi
6670: 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 gest</b> <i clas
6680: 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c s="arg">version<
6690: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
66a0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
66b0: 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61 20 ing digest as a
66c0: 68 65 78 20 73 74 72 69 6e 67 2e 0a 54 68 69 73 hex string..This
66d0: 20 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f value is new fo
66e0: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 r TclTLS 1.8.</p
66f0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
6700: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 ass="variable">p
6710: 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 ublicKeyAlgorith
6720: 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 m</b> <i class="
6730: 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f arg">algorithm</
6740: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 i></dt>.<dd><p>C
6750: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
6760: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 ture public key
6770: 61 6c 67 6f 72 69 74 68 6d 2e 0a 54 68 69 73 20 algorithm..This
6780: 76 61 6c 75 65 20 69 73 20 6e 65 77 20 66 6f 72 value is new for
6790: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
67a0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
67b0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 75 ss="variable">pu
67c0: 62 6c 69 63 4b 65 79 3c 2f 62 3e 20 3c 69 20 63 blicKey</b> <i c
67d0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e lass="arg">strin
67e0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
67f0: 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 p>Certificate si
6800: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
6810: 65 79 20 61 73 20 61 20 68 65 78 20 73 74 72 69 ey as a hex stri
6820: 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 ng..This value i
6830: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
6840: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
6850: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
6860: 69 61 62 6c 65 22 3e 62 69 74 73 3c 2f 62 3e 20 iable">bits</b>
6870: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e <i class="arg">n
6880: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
6890: 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 >Number of bits
68a0: 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 used for certifi
68b0: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b cate signature k
68c0: 65 79 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 ey..This value i
68d0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
68e0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
68f0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
6900: 69 61 62 6c 65 22 3e 73 65 6c 66 5f 73 69 67 6e iable">self_sign
6910: 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ed</b> <i class=
6920: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 "arg">boolean</i
6930: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 ></dt>.<dd><p>Wh
6940: 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 66 ether the certif
6950: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
6960: 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 0a is self signed..
6970: 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 6e 65 This value is ne
6980: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
6990: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
69a0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
69b0: 65 22 3e 73 68 61 31 5f 68 61 73 68 3c 2f 62 3e e">sha1_hash</b>
69c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
69d0: 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 hash</i></dt>.<d
69e0: 64 3e 3c 70 3e 54 68 65 20 53 48 41 31 20 68 61 d><p>The SHA1 ha
69f0: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 sh of the certif
6a00: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 icate as a hex s
6a10: 74 72 69 6e 67 2e 0a 54 68 69 73 20 76 61 6c 75 tring..This valu
6a20: 65 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c e is new for Tcl
6a30: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
6a40: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
6a50: 76 61 72 69 61 62 6c 65 22 3e 73 68 61 32 35 36 variable">sha256
6a60: 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 20 63 6c 61 _hash</b> <i cla
6a70: 73 73 3d 22 61 72 67 22 3e 68 61 73 68 3c 2f 69 ss="arg">hash</i
6a80: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
6a90: 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f 66 e SHA256 hash of
6aa0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
6ab0: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
6ac0: 2e 0a 54 68 69 73 20 76 61 6c 75 65 20 69 73 20 ..This value is
6ad0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
6ae0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 .8.</p></dd>.</d
6af0: 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e l></dd>.<dt><a n
6b00: 61 6d 65 3d 22 38 22 3e 3c 62 20 63 6c 61 73 73 ame="8"><b class
6b10: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 6f 6e 6e ="cmd">tls::conn
6b20: 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c ection</b> <i cl
6b30: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
6b40: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c l</i></a></dt>.<
6b50: 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74 68 dd><p>Returns th
6b60: 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 e current connec
6b70: 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 61 tion status of a
6b80: 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 n SSL channel. T
6b90: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c he result is a l
6ba0: 69 73 74 0a 6f 66 20 6b 65 79 2d 76 61 6c 75 65 ist.of key-value
6bb0: 20 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e pairs describin
6bc0: 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e g the connection
6bd0: 2e 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 ..This command i
6be0: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
6bf0: 20 31 2e 38 2e 20 52 65 74 75 72 6e 65 64 20 76 1.8. Returned v
6c00: 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 3a 3c 2f alues include:</
6c10: 70 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 74 75 73 p>.<p>SSL Status
6c20: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 </p>.<dl class="
6c30: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 doctools_definit
6c40: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c ions">.<dt><b cl
6c50: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 ass="variable">s
6c60: 74 61 74 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 tate</b> <i clas
6c70: 73 3d 22 61 72 67 22 3e 73 74 61 74 65 3c 2f 69 s="arg">state</i
6c80: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 74 ></dt>.<dd><p>St
6c90: 61 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 ate of the conne
6ca0: 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a ction.</p></dd>.
6cb0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
6cc0: 72 69 61 62 6c 65 22 3e 73 65 72 76 65 72 6e 61 riable">serverna
6cd0: 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d me</b> <i class=
6ce0: 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f "arg">name</i></
6cf0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e dt>.<dd><p>The n
6d00: 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 ame of the conne
6d10: 63 74 65 64 20 74 6f 20 73 65 72 76 65 72 2e 3c cted to server.<
6d20: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
6d30: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
6d40: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e 20 3c 69 >protocol</b> <i
6d50: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 class="arg">ver
6d60: 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 sion</i></dt>.<d
6d70: 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 6f 63 6f d><p>The protoco
6d80: 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 l version used f
6d90: 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f or the connectio
6da0: 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 n: SSL2, SSL3, T
6db0: 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 LS1, TLS1.1, TLS
6dc0: 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 1.2, TLS1.3, or
6dd0: 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c 2f 64 64 unknown.</p></dd
6de0: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
6df0: 76 61 72 69 61 62 6c 65 22 3e 72 65 6e 65 67 6f variable">renego
6e00: 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 65 64 3c tiation_allowed<
6e10: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6e20: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f g">boolean</i></
6e30: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 dt>.<dd><p>Wheth
6e40: 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 er protocol rene
6e50: 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 gotiation is sup
6e60: 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f ported or not.</
6e70: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
6e80: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
6e90: 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f security_level</
6ea0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
6eb0: 22 3e 6c 65 76 65 6c 3c 2f 69 3e 3c 2f 64 74 3e ">level</i></dt>
6ec0: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 65 63 75 .<dd><p>The secu
6ed0: 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64 20 rity level used
6ee0: 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 for selection of
6ef0: 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73 69 ciphers, key si
6f00: 7a 65 2c 20 65 74 63 2e 3c 2f 70 3e 3c 2f 64 64 ze, etc.</p></dd
6f10: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
6f20: 76 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f variable">sessio
6f30: 6e 5f 72 65 75 73 65 64 3c 2f 62 3e 20 3c 69 20 n_reused</b> <i
6f40: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
6f50: 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ean</i></dt>.<dd
6f60: 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 ><p>Whether the
6f70: 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e session has been
6f80: 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c reused or not.<
6f90: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
6fa0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
6fb0: 3e 69 73 5f 73 65 72 76 65 72 3c 2f 62 3e 20 3c >is_server</b> <
6fc0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f i class="arg">bo
6fd0: 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c olean</i></dt>.<
6fe0: 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 dd><p>Whether th
6ff0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 e connection is
7000: 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61 20 configured as a
7010: 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63 6c server (1) or cl
7020: 69 65 6e 74 20 28 30 29 2e 3c 2f 70 3e 3c 2f 64 ient (0).</p></d
7030: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7040: 22 76 61 72 69 61 62 6c 65 22 3e 63 6f 6d 70 72 "variable">compr
7050: 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c ession</b> <i cl
7060: 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f ass="arg">mode</
7070: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 i></dt>.<dd><p>C
7080: 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f ompression metho
7090: 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e d.</p></dd>.<dt>
70a0: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
70b0: 6c 65 22 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 62 le">expansion</b
70c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
70d0: 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >mode</i></dt>.<
70e0: 64 64 3e 3c 70 3e 45 78 70 61 6e 73 69 6f 6e 20 dd><p>Expansion
70f0: 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e method.</p></dd>
7100: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
7110: 61 72 69 61 62 6c 65 22 3e 63 61 4c 69 73 74 3c ariable">caList<
7120: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
7130: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e g">list</i></dt>
7140: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 .<dd><p>List of
7150: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 Certificate Auth
7160: 6f 72 69 74 69 65 73 20 28 43 41 29 20 66 6f 72 orities (CA) for
7170: 20 58 2e 35 30 39 20 63 65 72 74 69 66 69 63 61 X.509 certifica
7180: 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 te.</p></dd>.</d
7190: 6c 3e 0a 3c 70 3e 43 69 70 68 65 72 20 49 6e 66 l>.<p>Cipher Inf
71a0: 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d o</p>.<dl class=
71b0: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 "doctools_defini
71c0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 tions">.<dt><b c
71d0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
71e0: 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c cipher</b> <i cl
71f0: 61 73 73 3d 22 61 72 67 22 3e 63 69 70 68 65 72 ass="arg">cipher
7200: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7210: 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 >The current cip
7220: 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 her in use for t
7230: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f he connection.</
7240: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
7250: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7260: 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 62 standard_name</b
7270: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
7280: 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >name</i></dt>.<
7290: 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 6e 64 61 dd><p>The standa
72a0: 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 rd RFC name of c
72b0: 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a ipher.</p></dd>.
72c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
72d0: 72 69 61 62 6c 65 22 3e 61 6c 67 6f 72 69 74 68 riable">algorith
72e0: 6d 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c m_bits</b> <i cl
72f0: 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c ass="arg">n</i><
7300: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
7310: 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 number of proces
7320: 73 65 64 20 62 69 74 73 20 75 73 65 64 20 66 6f sed bits used fo
7330: 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 r cipher.</p></d
7340: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7350: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 63 72 65 "variable">secre
7360: 74 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c t_bits</b> <i cl
7370: 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c ass="arg">n</i><
7380: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
7390: 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 number of secret
73a0: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
73b0: 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a ipher.</p></dd>.
73c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
73d0: 72 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 65 72 73 riable">min_vers
73e0: 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ion</b> <i class
73f0: 3d 22 61 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f ="arg">version</
7400: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
7410: 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f he minimum proto
7420: 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 col version for
7430: 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e cipher.</p></dd>
7440: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
7450: 61 72 69 61 62 6c 65 22 3e 63 69 70 68 65 72 5f ariable">cipher_
7460: 69 73 5f 61 65 61 64 3c 2f 62 3e 20 3c 69 20 63 is_aead</b> <i c
7470: 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 lass="arg">boole
7480: 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e an</i></dt>.<dd>
7490: 3c 70 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 <p>Whether the c
74a0: 69 70 68 65 72 20 69 73 20 41 75 74 68 65 6e 74 ipher is Authent
74b0: 69 63 61 74 65 64 20 45 6e 63 72 79 70 74 69 6f icated Encryptio
74c0: 6e 20 77 69 74 68 20 41 73 73 6f 63 69 61 74 65 n with Associate
74d0: 64 20 44 61 74 61 20 28 41 45 41 44 29 2e 3c 2f d Data (AEAD).</
74e0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
74f0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7500: 63 69 70 68 65 72 5f 69 64 3c 2f 62 3e 20 3c 69 cipher_id</b> <i
7510: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 69 64 3c class="arg">id<
7520: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
7530: 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 69 70 68 The OpenSSL ciph
7540: 65 72 20 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a er id.</p></dd>.
7550: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
7560: 72 69 61 62 6c 65 22 3e 64 65 73 63 72 69 70 74 riable">descript
7570: 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ion</b> <i class
7580: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 ="arg">string</i
7590: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 41 20 ></dt>.<dd><p>A
75a0: 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e text description
75b0: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c of the cipher.<
75c0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
75d0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
75e0: 3e 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 >handshake_diges
75f0: 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 t</b> <i class="
7600: 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e arg">boolean</i>
7610: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 69 67 </dt>.<dd><p>Dig
7620: 65 73 74 20 75 73 65 64 20 64 75 72 69 6e 67 20 est used during
7630: 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 70 3e 3c 2f handshake.</p></
7640: 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 53 65 73 dd>.</dl>.<p>Ses
7650: 73 69 6f 6e 20 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 sion Info</p>.<d
7660: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
7670: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a s_definitions">.
7680: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
7690: 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e riable">alpn</b>
76a0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
76b0: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 protocol</i></dt
76c0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f >.<dd><p>The pro
76d0: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 tocol selected a
76e0: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e fter Application
76f0: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 -Layer Protocol
7700: 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 Negotiation (ALP
7710: 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 N).</p></dd>.<dt
7720: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
7730: 62 6c 65 22 3e 72 65 73 75 6d 61 62 6c 65 3c 2f ble">resumable</
7740: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
7750: 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 ">boolean</i></d
7760: 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 t>.<dd><p>Whethe
7770: 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61 r the session ca
7780: 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 n be resumed or
7790: 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 not.</p></dd>.<d
77a0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
77b0: 61 62 6c 65 22 3e 73 74 61 72 74 5f 74 69 6d 65 able">start_time
77c0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
77d0: 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c rg">seconds</i><
77e0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 69 6d 65 /dt>.<dd><p>Time
77f0: 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 since session s
7800: 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 tarted in second
7810: 73 20 73 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f s since epoch.</
7820: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
7830: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7840: 74 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c 69 20 63 timeout</b> <i c
7850: 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 63 6f 6e lass="arg">secon
7860: 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ds</i></dt>.<dd>
7870: 3c 70 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 <p>Max duration
7880: 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 of session in se
7890: 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d conds before tim
78a0: 65 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a e-out.</p></dd>.
78b0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
78c0: 72 69 61 62 6c 65 22 3e 6c 69 66 65 74 69 6d 65 riable">lifetime
78d0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
78e0: 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f 69 3e 3c rg">seconds</i><
78f0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73 73 /dt>.<dd><p>Sess
7900: 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 ion ticket lifet
7910: 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f ime hint in seco
7920: 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 nds.</p></dd>.<d
7930: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
7940: 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 69 64 able">session_id
7950: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
7960: 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e rg">binary_strin
7970: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
7980: 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e p>Unique session
7990: 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 id for use in r
79a0: 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 esuming the sess
79b0: 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ion.</p></dd>.<d
79c0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
79d0: 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e 5f 74 69 able">session_ti
79e0: 63 6b 65 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 cket</b> <i clas
79f0: 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 s="arg">binary_s
7a00: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
7a10: 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 dd><p>Unique ses
7a20: 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 sion ticket for
7a30: 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 use in resuming
7a40: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 70 3e the session.</p>
7a50: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
7a60: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 74 69 ss="variable">ti
7a70: 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 62 cket_app_data</b
7a80: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
7a90: 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f >binary_string</
7aa0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 55 i></dt>.<dd><p>U
7ab0: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 nique session ti
7ac0: 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e cket application
7ad0: 20 64 61 74 61 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a data.</p></dd>.
7ae0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
7af0: 72 69 61 62 6c 65 22 3e 6d 61 73 74 65 72 5f 6b riable">master_k
7b00: 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ey</b> <i class=
7b10: 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 "arg">binary_str
7b20: 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ing</i></dt>.<dd
7b30: 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 ><p>Unique sessi
7b40: 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c 2f on master key.</
7b50: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
7b60: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
7b70: 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f session_cache_mo
7b80: 64 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d de</b> <i class=
7b90: 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f "arg">mode</i></
7ba0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 72 76 65 dt>.<dd><p>Serve
7bb0: 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c r cache mode (cl
7bc0: 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 ient, server, or
7bd0: 20 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f 64 64 3e both).</p></dd>
7be0: 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e .</dl></dd>.<dt>
7bf0: 3c 61 20 6e 61 6d 65 3d 22 39 22 3e 3c 62 20 63 <a name="9"><b c
7c00: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
7c10: 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 73 70 61 ciphers</b> <spa
7c20: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
7c30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 i class="arg">pr
7c40: 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 otocol</i>?</spa
7c50: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 n> <span class="
7c60: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 opt">?<i class="
7c70: 61 72 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e arg">verbose</i>
7c80: 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 ?</span> <span c
7c90: 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 lass="opt">?<i c
7ca0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 70 70 6f lass="arg">suppo
7cb0: 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e rted</i>?</span>
7cc0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </a></dt>.<dd><p
7cd0: 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 6f 70 74 >Without any opt
7ce0: 69 6f 6e 73 2c 20 69 74 20 72 65 74 75 72 6e 73 ions, it returns
7cf0: 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 a list of all s
7d00: 79 6d 6d 65 74 72 69 63 20 63 69 70 68 65 72 73 ymmetric ciphers
7d10: 20 66 6f 72 20 75 73 65 20 77 69 74 68 20 74 68 for use with th
7d20: 65 0a 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 e.<i class="arg"
7d30: 3e 2d 63 69 70 68 65 72 3c 2f 69 3e 20 6f 70 74 >-cipher</i> opt
7d40: 69 6f 6e 2e 20 57 69 74 68 20 3c 69 20 63 6c 61 ion. With <i cla
7d50: 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f ss="arg">protoco
7d60: 6c 3c 2f 69 3e 2c 20 6f 6e 6c 79 20 74 68 65 20 l</i>, only the
7d70: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 ciphers supporte
7d80: 64 20 66 6f 72 20 74 68 61 74 0a 70 72 6f 74 6f d for that.proto
7d90: 63 6f 6c 20 61 72 65 20 72 65 74 75 72 6e 65 64 col are returned
7da0: 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61 . See the <b cla
7db0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 ss="cmd">tls::pr
7dc0: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d otocols</b> comm
7dd0: 61 6e 64 20 66 6f 72 20 74 68 65 20 73 75 70 70 and for the supp
7de0: 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c 73 2e orted.protocols.
7df0: 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 If <i class="ar
7e00: 67 22 3e 76 65 72 62 6f 73 65 3c 2f 69 3e 20 69 g">verbose</i> i
7e10: 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20 74 s specified as t
7e20: 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 6f rue then a verbo
7e30: 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 62 se, human readab
7e40: 6c 65 0a 6c 69 73 74 20 69 73 20 72 65 74 75 72 le.list is retur
7e50: 6e 65 64 20 77 69 74 68 20 61 64 64 69 74 69 6f ned with additio
7e60: 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 nal information
7e70: 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e 20 49 on the cipher. I
7e80: 66 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 f <i class="arg"
7e90: 3e 73 75 70 70 6f 72 74 65 64 3c 2f 69 3e 0a 69 >supported</i>.i
7ea0: 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20 74 s specified as t
7eb0: 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 rue, then only t
7ec0: 68 65 20 63 69 70 68 65 72 73 20 73 75 70 70 6f he ciphers suppo
7ed0: 72 74 65 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f rted for protoco
7ee0: 6c 20 77 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 l will be listed
7ef0: 2e 0a 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 ..The <i class="
7f00: 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c 2f arg">supported</
7f10: 69 3e 20 61 72 67 20 69 73 20 6e 65 77 20 66 6f i> arg is new fo
7f20: 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 r TclTLS 1.8.</p
7f30: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 ></dd>.<dt><a na
7f40: 6d 65 3d 22 31 30 22 3e 3c 62 20 63 6c 61 73 73 me="10"><b class
7f50: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 ="cmd">tls::prot
7f60: 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 ocols</b></a></d
7f70: 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e t>.<dd><p>Return
7f80: 73 20 61 20 6c 69 73 74 20 6f 66 20 74 68 65 20 s a list of the
7f90: 73 75 70 70 6f 72 74 65 64 20 53 53 4c 2f 54 4c supported SSL/TL
7fa0: 53 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c S protocols. Val
7fb0: 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 3c id values are:.<
7fc0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
7fd0: 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 ssl2</b>, <b cla
7fe0: 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c 33 3c ss="const">ssl3<
7ff0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 /b>, <b class="c
8000: 6f 6e 73 74 22 3e 74 6c 73 31 3c 2f 62 3e 2c 20 onst">tls1</b>,
8010: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
8020: 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62 20 >tls1.1</b>, <b
8030: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 6c class="const">tl
8040: 73 31 2e 32 3c 2f 62 3e 2c 20 61 6e 64 0a 3c 62 s1.2</b>, and.<b
8050: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 class="const">t
8060: 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 ls1.3</b>. Exact
8070: 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e list depends on
8080: 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e OpenSSL version
8090: 20 61 6e 64 20 63 6f 6d 70 69 6c 65 20 74 69 6d and compile tim
80a0: 65 20 66 6c 61 67 73 2e 0a 54 68 69 73 20 63 6f e flags..This co
80b0: 6d 6d 61 6e 64 20 69 73 20 6e 65 77 20 66 6f 72 mmand is new for
80c0: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
80d0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d </dd>.<dt><a nam
80e0: 65 3d 22 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d e="11"><b class=
80f0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 "cmd">tls::versi
8100: 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a on</b></a></dt>.
8110: 3c 64 64 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74 <dd><p>Returns t
8120: 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 he OpenSSL versi
8130: 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f on string.</p></
8140: 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e dd>.</dl>.</div>
8150: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f .<div id="sectio
8160: 6e 33 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f n3" class="docto
8170: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 ols_section"><h2
8180: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f ><a name="sectio
8190: 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 n3">Certificate
81a0: 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f Validation</a></
81b0: 68 32 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 h2>.<div id="sub
81c0: 73 65 63 74 69 6f 6e 31 22 20 63 6c 61 73 73 3d section1" class=
81d0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 "doctools_subsec
81e0: 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d tion"><h3><a nam
81f0: 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 31 22 3e e="subsection1">
8200: 50 4b 49 20 61 6e 64 20 43 65 72 74 69 66 69 63 PKI and Certific
8210: 61 74 65 73 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 ates</a></h3>.<p
8220: 3e 55 73 69 6e 67 20 74 68 65 20 50 75 62 6c 69 >Using the Publi
8230: 63 20 4b 65 79 20 49 6e 66 72 61 73 74 72 75 63 c Key Infrastruc
8240: 74 75 72 65 20 28 50 4b 49 29 2c 20 65 61 63 68 ture (PKI), each
8250: 20 75 73 65 72 20 63 72 65 61 74 65 73 20 61 20 user creates a
8260: 70 72 69 76 61 74 65 20 6b 65 79 20 74 68 61 74 private key that
8270: 0a 6f 6e 6c 79 20 74 68 65 79 20 6b 6e 6f 77 20 .only they know
8280: 61 62 6f 75 74 20 61 6e 64 20 61 20 70 75 62 6c about and a publ
8290: 69 63 20 6b 65 79 20 74 68 65 79 20 63 61 6e 20 ic key they can
82a0: 65 78 63 68 61 6e 67 65 20 77 69 74 68 20 6f 74 exchange with ot
82b0: 68 65 72 73 20 66 6f 72 20 75 73 65 20 69 6e 0a hers for use in.
82c0: 65 6e 63 72 79 70 74 69 6e 67 20 61 6e 64 20 64 encrypting and d
82d0: 65 63 72 79 70 74 69 6e 67 20 64 61 74 61 2e 20 ecrypting data.
82e0: 54 68 65 20 70 72 6f 63 65 73 73 20 69 73 20 74 The process is t
82f0: 68 65 20 73 65 6e 64 65 72 20 65 6e 63 72 79 70 he sender encryp
8300: 74 73 20 74 68 65 69 72 20 64 61 74 61 0a 75 73 ts their data.us
8310: 69 6e 67 20 74 68 65 69 72 20 70 72 69 76 61 74 ing their privat
8320: 65 20 6b 65 79 20 61 6e 64 20 74 68 65 20 72 65 e key and the re
8330: 63 65 69 76 65 72 27 73 20 70 75 62 6c 69 63 20 ceiver's public
8340: 6b 65 79 2e 20 54 68 65 20 64 61 74 61 20 69 73 key. The data is
8350: 20 74 68 65 6e 20 73 65 6e 74 0a 74 6f 20 74 68 then sent.to th
8360: 65 20 72 65 63 65 69 76 65 72 2e 20 49 6e 20 61 e receiver. In a
8370: 20 73 69 6d 69 6c 61 72 20 6d 61 6e 6e 65 72 2c similar manner,
8380: 20 74 68 65 20 72 65 63 65 69 76 65 72 20 75 73 the receiver us
8390: 65 73 20 74 68 65 69 72 20 70 72 69 76 61 74 65 es their private
83a0: 20 6b 65 79 20 61 6e 64 0a 74 68 65 20 73 65 6e key and.the sen
83b0: 64 65 72 27 73 20 70 75 62 6c 69 63 20 6b 65 79 der's public key
83c0: 20 74 6f 20 64 65 63 72 79 70 74 20 74 68 65 20 to decrypt the
83d0: 64 61 74 61 2e 20 54 68 69 73 20 70 72 6f 76 69 data. This provi
83e0: 64 65 73 20 64 61 74 61 20 69 6e 74 65 67 72 69 des data integri
83f0: 74 79 2c 20 74 6f 0a 65 6e 73 75 72 65 20 74 68 ty, to.ensure th
8400: 65 20 64 61 74 61 20 63 61 6e 27 74 20 62 65 20 e data can't be
8410: 76 69 65 77 65 64 20 6f 72 20 61 6c 74 65 72 65 viewed or altere
8420: 64 20 64 75 72 69 6e 67 20 74 72 61 6e 73 70 6f d during transpo
8430: 72 74 2e 20 53 65 65 20 74 68 65 0a 3c 62 20 63 rt. See the.<b c
8440: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b lass="option">-k
8450: 65 79 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c ey</b> and <b cl
8460: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 ass="option">-ke
8470: 79 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e yfile</b> option
8480: 73 20 66 6f 72 20 68 6f 77 20 74 6f 20 73 70 65 s for how to spe
8490: 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 cify the private
84a0: 20 6b 65 79 2e 0a 41 6c 73 6f 20 73 65 65 20 74 key..Also see t
84b0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
84c0: 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f ion">-password</
84d0: 62 3e 20 6f 70 74 69 6f 6e 20 66 6f 72 20 68 6f b> option for ho
84e0: 77 20 74 6f 20 70 72 6f 76 69 64 65 20 74 68 65 w to provide the
84f0: 20 70 61 73 73 77 6f 72 64 2e 3c 2f 70 3e 0a 3c password.</p>.<
8500: 70 3e 49 6e 20 6f 72 64 65 72 20 74 6f 20 70 72 p>In order to pr
8510: 6f 76 69 64 65 20 61 75 74 68 65 6e 74 69 63 61 ovide authentica
8520: 74 69 6f 6e 2c 20 69 2e 65 2e 20 65 6e 73 75 72 tion, i.e. ensur
8530: 69 6e 67 20 73 6f 6d 65 6f 6e 65 20 69 73 20 77 ing someone is w
8540: 68 6f 20 74 68 65 79 20 73 61 79 20 74 68 65 79 ho they say they
8550: 0a 61 72 65 2c 20 74 68 65 20 70 75 62 6c 69 63 .are, the public
8560: 20 6b 65 79 20 61 6e 64 20 75 73 65 72 20 69 64 key and user id
8570: 65 6e 74 69 66 69 63 61 74 69 6f 6e 20 69 6e 66 entification inf
8580: 6f 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 61 o is stored in a
8590: 20 58 2e 35 30 39 0a 63 65 72 74 69 66 69 63 61 X.509.certifica
85a0: 74 65 20 61 6e 64 20 74 68 61 74 20 63 65 72 74 te and that cert
85b0: 69 66 69 63 61 74 65 20 69 73 20 61 75 74 68 65 ificate is authe
85c0: 6e 74 69 63 61 74 65 64 20 28 69 2e 65 2e 20 73 nticated (i.e. s
85d0: 69 67 6e 65 64 29 20 62 79 20 61 20 43 65 72 74 igned) by a Cert
85e0: 69 66 69 63 61 74 65 0a 41 75 74 68 6f 72 69 74 ificate.Authorit
85f0: 79 20 28 43 41 29 2e 20 55 73 65 72 73 20 63 61 y (CA). Users ca
8600: 6e 20 74 68 65 6e 20 65 78 63 68 61 6e 67 65 20 n then exchange
8610: 74 68 65 73 65 20 63 65 72 74 69 66 69 63 61 74 these certificat
8620: 65 73 20 64 75 72 69 6e 67 20 74 68 65 20 54 4c es during the TL
8630: 53 0a 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e S.initialization
8640: 20 70 72 6f 63 65 73 73 20 61 6e 64 20 63 68 65 process and che
8650: 63 6b 20 74 68 65 6d 20 61 67 61 69 6e 73 74 20 ck them against
8660: 74 68 65 20 72 6f 6f 74 20 43 41 20 63 65 72 74 the root CA cert
8670: 69 66 69 63 61 74 65 73 20 74 6f 20 65 6e 73 75 ificates to ensu
8680: 72 65 0a 74 68 65 79 20 61 72 65 20 76 61 6c 69 re.they are vali
8690: 64 2e 20 54 68 69 73 20 69 73 20 68 61 6e 64 6c d. This is handl
86a0: 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 76 69 ed by OpenSSL vi
86b0: 61 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 a the <b class="
86c0: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 option">-request
86d0: 3c 2f 62 3e 20 61 6e 64 0a 3c 62 20 63 6c 61 73 </b> and.<b clas
86e0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 s="option">-requ
86f0: 69 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e ire</b> options.
8700: 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 See the <b clas
8710: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
8720: 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d r</b>, <b class=
8730: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c "option">-cadir<
8740: 2f 62 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 /b>, and.<b clas
8750: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 s="option">-cast
8760: 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 ore</b> options
8770: 66 6f 72 20 68 6f 77 20 74 70 20 73 70 65 63 69 for how tp speci
8780: 66 79 20 77 68 65 72 65 20 74 6f 20 66 69 6e 64 fy where to find
8790: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63 the CA certific
87a0: 61 74 65 73 2e 0a 4f 70 74 69 6f 6e 61 6c 6c 79 ates..Optionally
87b0: 2c 20 69 6e 20 61 20 66 75 74 75 72 65 20 72 65 , in a future re
87c0: 6c 65 61 73 65 2c 20 74 68 65 79 20 63 61 6e 20 lease, they can
87d0: 61 6c 73 6f 20 62 65 20 63 68 65 63 6b 65 64 20 also be checked
87e0: 61 67 61 69 6e 73 74 20 74 68 65 20 43 65 72 74 against the Cert
87f0: 69 66 69 63 61 74 65 0a 52 65 76 6f 63 61 74 69 ificate.Revocati
8800: 6f 6e 20 4c 69 73 74 20 28 43 52 4c 29 20 6f 66 on List (CRL) of
8810: 20 72 65 76 6f 6b 65 64 20 63 65 72 74 69 66 69 revoked certifi
8820: 63 61 74 65 73 2e 20 43 65 72 74 69 66 69 63 61 cates. Certifica
8830: 74 65 73 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a tes can also be.
8840: 73 65 6c 66 2d 73 69 67 6e 65 64 2c 20 62 75 74 self-signed, but
8850: 20 74 68 65 79 20 61 72 65 20 62 79 20 64 65 66 they are by def
8860: 61 75 6c 74 20 6e 6f 74 20 74 72 75 73 74 65 64 ault not trusted
8870: 20 75 6e 6c 65 73 73 20 79 6f 75 20 61 64 64 20 unless you add
8880: 74 68 65 6d 20 74 6f 20 79 6f 75 72 0a 63 65 72 them to your.cer
8890: 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 2e 3c tificate store.<
88a0: 2f 70 3e 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 /p>.<p>Typically
88b0: 20 77 68 65 6e 20 76 69 73 69 74 69 6e 67 20 77 when visiting w
88c0: 65 62 20 73 69 74 65 73 2c 20 6f 6e 6c 79 20 74 eb sites, only t
88d0: 68 65 20 63 6c 69 65 6e 74 20 6e 65 65 64 73 20 he client needs
88e0: 74 6f 20 63 68 65 63 6b 20 74 68 65 20 73 65 72 to check the ser
88f0: 76 65 72 27 73 0a 63 65 72 74 69 66 69 63 61 74 ver's.certificat
8900: 65 20 74 6f 20 65 6e 73 75 72 65 20 69 74 20 69 e to ensure it i
8910: 73 20 76 61 6c 69 64 2e 20 54 68 65 20 73 65 72 s valid. The ser
8920: 76 65 72 20 64 6f 65 73 6e 27 74 20 6e 65 65 64 ver doesn't need
8930: 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 63 6c to check the cl
8940: 69 65 6e 74 0a 63 65 72 74 69 66 69 63 61 74 65 ient.certificate
8950: 20 75 6e 6c 65 73 73 20 79 6f 75 20 6e 65 65 64 unless you need
8960: 20 74 6f 20 61 75 74 68 65 6e 74 69 63 61 74 65 to authenticate
8970: 20 77 69 74 68 20 74 68 65 6d 20 74 6f 20 6c 6f with them to lo
8980: 67 69 6e 2c 20 65 74 63 2e 20 53 65 65 20 74 68 gin, etc. See th
8990: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e.<b class="opti
89a0: 6f 6e 22 3e 2d 63 65 72 74 3c 2f 62 3e 20 61 6e on">-cert</b> an
89b0: 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 d <b class="opti
89c0: 6f 6e 22 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 on">-certfile</b
89d0: 3e 20 6f 70 74 69 6f 6e 73 20 69 66 20 79 6f 75 > options if you
89e0: 20 6e 65 65 64 20 74 6f 20 70 72 6f 76 69 64 65 need to provide
89f0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c a certificate.<
8a00: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 /p>.</div>.<div
8a10: 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 32 22 id="subsection2"
8a20: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
8a30: 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 _subsection"><h3
8a40: 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 ><a name="subsec
8a50: 74 69 6f 6e 32 22 3e 53 75 6d 6d 61 72 79 20 6f tion2">Summary o
8a60: 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f f command line o
8a70: 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 33 3e 0a ptions</a></h3>.
8a80: 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 <p>The following
8a90: 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 75 73 65 options are use
8aa0: 64 20 66 6f 72 20 70 65 65 72 20 63 65 72 74 69 d for peer certi
8ab0: 66 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f ficate validatio
8ac0: 6e 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 n:</p>.<dl class
8ad0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f ="doctools_optio
8ae0: 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 ns">.<dt><b clas
8af0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
8b00: 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 r</b> <i class="
8b10: 61 72 67 22 3e 64 69 72 65 63 74 6f 72 79 3c 2f arg">directory</
8b20: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 i></dt>.<dd><p>S
8b30: 70 65 63 69 66 69 65 73 20 74 68 65 20 64 69 72 pecifies the dir
8b40: 65 63 74 6f 72 79 20 77 68 65 72 65 20 74 68 65 ectory where the
8b50: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
8b60: 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 hority (CA) cert
8b70: 69 66 69 63 61 74 65 73 20 61 72 65 0a 73 74 6f ificates are.sto
8b80: 72 65 64 2e 20 54 68 65 20 64 65 66 61 75 6c 74 red. The default
8b90: 20 69 73 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 is platform spe
8ba0: 63 69 66 69 63 2c 20 62 75 74 20 69 73 20 75 73 cific, but is us
8bb0: 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62 20 63 ually "<b c
8bc0: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65 74 63 lass="file">/etc
8bd0: 2f 73 73 6c 2f 63 65 72 74 73 3c 2f 62 3e 26 71 /ssl/certs</b>&q
8be0: 75 6f 74 3b 20 6f 6e 0a 4c 69 6e 75 78 2f 55 6e uot; on.Linux/Un
8bf0: 69 78 20 73 79 73 74 65 6d 73 2e 20 54 68 65 20 ix systems. The
8c00: 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e default location
8c10: 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 can be overridd
8c20: 65 6e 20 62 79 20 74 68 65 0a 3c 62 20 63 6c 61 en by the.<b cla
8c30: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 ss="variable">SS
8c40: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 L_CERT_DIR</b> e
8c50: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
8c60: 62 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ble.</p></dd>.<d
8c70: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
8c80: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 on">-cafile</b>
8c90: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 <i class="arg">f
8ca0: 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e ilename</i></dt>
8cb0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 .<dd><p>Specifie
8cc0: 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 s the file with
8cd0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
8ce0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 Authority (CA) c
8cf0: 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 20 75 ertificates to u
8d00: 73 65 20 69 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 se in.<b class="
8d10: 63 6f 6e 73 74 22 3e 50 45 4d 3c 2f 62 3e 20 66 const">PEM</b> f
8d20: 69 6c 65 20 66 6f 72 6d 61 74 2e 20 54 68 65 20 ile format. The
8d30: 64 65 66 61 75 6c 74 20 69 73 20 26 71 75 6f 74 default is "
8d40: 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 ;<b class="file"
8d50: 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 >cert.pem</b>&qu
8d60: 6f 74 3b 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e ot;, in the Open
8d70: 53 53 4c 0a 64 69 72 65 63 74 6f 72 79 2e 20 4f SSL.directory. O
8d80: 6e 20 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 73 n Linux/Unix sys
8d90: 74 65 6d 73 2c 20 74 68 69 73 20 69 73 20 75 73 tems, this is us
8da0: 75 61 6c 6c 79 20 26 71 75 6f 74 3b 3c 62 20 63 ually "<b c
8db0: 6c 61 73 73 3d 22 66 69 6c 65 22 3e 2f 65 74 63 lass="file">/etc
8dc0: 2f 73 73 6c 2f 63 61 2d 62 75 6e 64 6c 65 2e 70 /ssl/ca-bundle.p
8dd0: 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 68 em</b>"..Th
8de0: 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20 63 e default file c
8df0: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e an be overridden
8e00: 20 62 79 20 74 68 65 20 3c 62 20 63 6c 61 73 73 by the <b class
8e10: 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f ="variable">SSL_
8e20: 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e CERT_FILE</b> en
8e30: 76 69 72 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 vironment.variab
8e40: 6c 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 le.</p></dd>.<dt
8e50: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f ><b class="optio
8e60: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 n">-castore</b>
8e70: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 55 <i class="arg">U
8e80: 52 49 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e RI</i></dt>.<dd>
8e90: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 <p>Specifies the
8ea0: 20 55 6e 69 66 6f 72 6d 20 52 65 73 6f 75 72 63 Uniform Resourc
8eb0: 65 20 49 64 65 6e 74 69 66 69 65 72 20 28 55 52 e Identifier (UR
8ec0: 49 29 20 66 6f 72 20 74 68 65 20 43 65 72 74 69 I) for the Certi
8ed0: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 ficate Authority
8ee0: 0a 28 43 41 29 20 73 74 6f 72 65 2c 20 77 68 69 .(CA) store, whi
8ef0: 63 68 20 6d 61 79 20 62 65 20 61 20 73 69 6e 67 ch may be a sing
8f00: 6c 65 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 le container or
8f10: 61 20 63 61 74 61 6c 6f 67 20 6f 66 20 63 6f 6e a catalog of con
8f20: 74 61 69 6e 65 72 73 2e 0a 53 74 61 72 74 69 6e tainers..Startin
8f30: 67 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 g with OpenSSL 3
8f40: 2e 32 20 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 .2 on MS Windows
8f50: 2c 20 73 65 74 20 74 6f 20 26 71 75 6f 74 3b 3c , set to "<
8f60: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
8f70: 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e 73 org.openssl.wins
8f80: 74 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f 74 tore://</b>"
8f90: 3b 0a 74 6f 20 75 73 65 20 74 68 65 20 62 75 69 ;.to use the bui
8fa0: 6c 74 2d 69 6e 20 4d 53 20 57 69 6e 64 6f 77 73 lt-in MS Windows
8fb0: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 6f Certificate Sto
8fc0: 72 65 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 re. Starting in
8fd0: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 TclTLS 2.0, this
8fe0: 0a 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 .is the default
8ff0: 69 66 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 if <b class="opt
9000: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c ion">-cadir</b>,
9010: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f <b class="optio
9020: 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 61 n">-cadir</b>, a
9030: 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 nd <b class="opt
9040: 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 ion">-castore</b
9050: 3e 20 61 72 65 0a 6e 6f 74 20 73 70 65 63 69 66 > are.not specif
9060: 69 65 64 2e 20 54 68 69 73 20 73 74 6f 72 65 20 ied. This store
9070: 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73 20 72 6f only supports ro
9080: 6f 74 20 63 65 72 74 69 66 69 63 61 74 65 20 73 ot certificate s
9090: 74 6f 72 65 73 2e 20 53 65 65 0a 3c 73 70 61 6e tores. See.<span
90a0: 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 class="sectref"
90b0: 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 ><a href="#secti
90c0: 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 on3">Certificate
90d0: 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c Validation</a><
90e0: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
90f0: 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 details.</p></dd
9100: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
9110: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 option">-request
9120: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
9130: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 rg">bool</i></dt
9140: 3e 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 65 73 74 >.<dd><p>Request
9150: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66 a certificate f
9160: 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 72 rom the peer dur
9170: 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 ing the SSL hand
9180: 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 20 6e shake. This is n
9190: 65 65 64 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 eeded.to do Cert
91a0: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
91b0: 6f 6e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 on. Starting in
91c0: 54 63 6c 54 4c 53 20 31 2e 38 2c 20 74 68 65 20 TclTLS 1.8, the
91d0: 64 65 66 61 75 6c 74 20 69 73 0a 3c 62 20 63 6c default is.<b cl
91e0: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 ass="const">true
91f0: 3c 2f 62 3e 2e 20 53 74 61 72 74 69 6e 67 20 69 </b>. Starting i
9200: 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c 20 49 66 n TclTLS 2.0, If
9210: 20 73 65 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 set to <b class
9220: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f ="const">false</
9230: 62 3e 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d b> and.<b class=
9240: 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 "option">-requir
9250: 65 3c 2f 62 3e 20 69 73 20 3c 62 20 63 6c 61 73 e</b> is <b clas
9260: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f s="const">true</
9270: 62 3e 2c 20 74 68 65 6e 20 74 68 69 73 20 77 69 b>, then this wi
9280: 6c 6c 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e ll be overridden
9290: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f to <b class="co
92a0: 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 0a 49 nst">true</b>..I
92b0: 6e 20 61 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 n addition, the
92c0: 63 6c 69 65 6e 74 20 63 61 6e 20 6d 61 6e 75 61 client can manua
92d0: 6c 6c 79 20 69 6e 73 70 65 63 74 20 61 6e 64 20 lly inspect and
92e0: 61 63 63 65 70 74 20 6f 72 20 72 65 6a 65 63 74 accept or reject
92f0: 0a 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74 .each certificat
9300: 65 20 75 73 69 6e 67 20 74 68 65 20 3c 69 20 63 e using the <i c
9310: 6c 61 73 73 3d 22 61 72 67 22 3e 2d 76 61 6c 69 lass="arg">-vali
9320: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 datecommand</i>
9330: 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e option.</p></dd>
9340: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
9350: 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c ption">-require<
9360: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
9370: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e g">bool</i></dt>
9380: 0a 3c 64 64 3e 3c 70 3e 52 65 71 75 69 72 65 20 .<dd><p>Require
9390: 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 a valid certific
93a0: 61 74 65 20 66 72 6f 6d 20 74 68 65 20 70 65 65 ate from the pee
93b0: 72 20 64 75 72 69 6e 67 20 74 68 65 20 53 53 4c r during the SSL
93c0: 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 handshake. If t
93d0: 68 69 73 20 69 73 0a 73 65 74 20 74 6f 20 74 72 his is.set to tr
93e0: 75 65 2c 20 74 68 65 6e 20 3c 62 20 63 6c 61 73 ue, then <b clas
93f0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 s="option">-requ
9400: 65 73 74 3c 2f 62 3e 20 6d 75 73 74 20 61 6c 73 est</b> must als
9410: 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 o be set to true
9420: 20 61 6e 64 20 61 20 65 69 74 68 65 72 0a 3c 62 and a either.<b
9430: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
9440: 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 -cadir</b>, <b c
9450: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
9460: 61 66 69 6c 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c afile</b>, <b cl
9470: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
9480: 73 74 6f 72 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 store</b>, or a
9490: 70 6c 61 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 platform default
94a0: 0a 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 65 .must be provide
94b0: 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 d in order to va
94c0: 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20 lidate against.
94d0: 54 68 65 20 64 65 66 61 75 6c 74 20 69 6e 20 54 The default in T
94e0: 63 6c 54 4c 53 20 31 2e 38 20 61 6e 64 0a 65 61 clTLS 1.8 and.ea
94f0: 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 73 20 69 rlier versions i
9500: 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 s <b class="cons
9510: 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 73 69 6e t">false</b> sin
9520: 63 65 20 6e 6f 74 20 61 6c 6c 20 70 6c 61 74 66 ce not all platf
9530: 6f 72 6d 73 20 68 61 76 65 20 63 65 72 74 69 66 orms have certif
9540: 69 63 61 74 65 73 20 74 6f 0a 76 61 6c 69 64 61 icates to.valida
9550: 74 65 20 61 67 61 69 6e 73 74 20 69 6e 20 61 20 te against in a
9560: 66 6f 72 6d 20 63 6f 6d 70 61 74 69 62 6c 65 20 form compatible
9570: 77 69 74 68 20 4f 70 65 6e 53 53 4c 2e 20 53 74 with OpenSSL. St
9580: 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 arting in TclTLS
9590: 20 32 2e 30 2c 0a 74 68 65 20 64 65 66 61 75 6c 2.0,.the defaul
95a0: 74 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 t is <b class="c
95b0: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c onst">true</b>.<
95c0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c /p></dd>.</dl>.<
95d0: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 /div>.<div id="s
95e0: 75 62 73 65 63 74 69 6f 6e 33 22 20 63 6c 61 73 ubsection3" clas
95f0: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 s="doctools_subs
9600: 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e ection"><h3><a n
9610: 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 33 ame="subsection3
9620: 22 3e 57 68 65 6e 20 61 72 65 20 63 6f 6d 6d 61 ">When are comma
9630: 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 20 nd line options
9640: 6e 65 65 64 65 64 3f 3c 2f 61 3e 3c 2f 68 33 3e needed?</a></h3>
9650: 0a 3c 70 3e 49 6e 20 54 63 6c 54 4c 53 20 31 2e .<p>In TclTLS 1.
9660: 38 20 61 6e 64 20 65 61 72 6c 69 65 72 20 76 65 8 and earlier ve
9670: 72 73 69 6f 6e 73 2c 20 63 65 72 74 69 66 69 63 rsions, certific
9680: 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 69 ate validation i
9690: 73 0a 3c 65 6d 3e 4e 4f 54 3c 2f 65 6d 3e 20 65 s.<em>NOT</em> e
96a0: 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c nabled by defaul
96b0: 74 2e 20 54 68 69 73 20 6c 69 6d 69 74 61 74 69 t. This limitati
96c0: 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 74 68 65 on is due to the
96d0: 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f 6d 6d 6f lack of a commo
96e0: 6e 0a 63 72 6f 73 73 20 70 6c 61 74 66 6f 72 6d n.cross platform
96f0: 20 64 61 74 61 62 61 73 65 20 6f 66 20 43 65 72 database of Cer
9700: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 tificate Authori
9710: 74 79 20 28 43 41 29 20 70 72 6f 76 69 64 65 64 ty (CA) provided
9720: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f certificates to
9730: 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 .validate agains
9740: 74 2e 20 4d 61 6e 79 20 4c 69 6e 75 78 20 73 79 t. Many Linux sy
9750: 73 74 65 6d 73 20 6e 61 74 69 76 65 6c 79 20 73 stems natively s
9760: 75 70 70 6f 72 74 20 4f 70 65 6e 53 53 4c 20 61 upport OpenSSL a
9770: 6e 64 20 74 68 75 73 20 68 61 76 65 0a 74 68 65 nd thus have.the
9780: 73 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 se certificates
9790: 69 6e 73 74 61 6c 6c 65 64 20 61 73 20 70 61 72 installed as par
97a0: 74 20 6f 66 20 74 68 65 20 4f 53 2c 20 62 75 74 t of the OS, but
97b0: 20 4d 61 63 4f 53 20 61 6e 64 20 4d 53 20 57 69 MacOS and MS Wi
97c0: 6e 64 6f 77 73 20 64 6f 20 6e 6f 74 2e 0a 53 74 ndows do not..St
97d0: 61 72 69 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 aring in TclTLS
97e0: 32 2e 30 2c 20 74 68 69 73 20 68 61 73 20 62 65 2.0, this has be
97f0: 65 6e 20 63 68 61 6e 67 65 64 20 74 6f 20 72 65 en changed to re
9800: 71 75 69 72 65 20 63 65 72 74 69 66 69 63 61 74 quire certificat
9810: 65 20 76 61 6c 69 64 61 74 69 6f 6e 0a 62 79 20 e validation.by
9820: 64 65 66 61 75 6c 74 2e 20 49 6e 20 6f 72 64 65 default. In orde
9830: 72 20 74 6f 20 75 73 65 20 74 68 65 20 3c 62 20 r to use the <b
9840: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
9850: 72 65 71 75 69 72 65 3c 2f 62 3e 20 6f 70 74 69 require</b> opti
9860: 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 on, one of the f
9870: 6f 6c 6c 6f 77 69 6e 67 0a 6d 75 73 74 20 62 65 ollowing.must be
9880: 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c 75 6c 20 63 true:</p>.<ul c
9890: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 69 lass="doctools_i
98a0: 74 65 6d 69 7a 65 64 22 3e 0a 3c 6c 69 3e 3c 70 temized">.<li><p
98b0: 3e 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 20 55 6e >On Linux and Un
98c0: 69 78 20 73 79 73 74 65 6d 73 20 77 69 74 68 20 ix systems with
98d0: 4f 70 65 6e 53 53 4c 20 61 6c 72 65 61 64 79 20 OpenSSL already
98e0: 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 69 66 20 installed or if
98f0: 74 68 65 20 43 41 0a 63 65 72 74 69 66 69 63 61 the CA.certifica
9900: 74 65 73 20 61 72 65 20 61 76 61 69 6c 61 62 6c tes are availabl
9910: 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74 2c e in PEM format,
9920: 20 61 6e 64 20 69 66 20 74 68 65 79 20 61 72 65 and if they are
9930: 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 0a 73 stored in the.s
9940: 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e tandard location
9950: 73 2c 20 6f 72 20 69 66 20 74 68 65 20 3c 62 20 s, or if the <b
9960: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
9970: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 >SSL_CERT_DIR</b
9980: 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 76 > or <b class="v
9990: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 ariable">SSL_CER
99a0: 54 5f 46 49 4c 45 3c 2f 62 3e 0a 65 6e 76 69 72 T_FILE</b>.envir
99b0: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 73 onment variables
99c0: 20 61 72 65 20 73 65 74 2c 20 74 68 65 6e 20 3c are set, then <
99d0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
99e0: 3e 2d 63 61 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 >-cadir</b>, <b
99f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
9a00: 63 61 64 69 72 3c 2f 62 3e 2c 0a 61 6e 64 20 3c cadir</b>,.and <
9a10: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
9a20: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61 72 >-castore</b> ar
9a30: 65 6e 27 74 20 6e 65 65 64 65 64 2e 3c 2f 70 3e en't needed.</p>
9a40: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20 </li>.<li><p>If
9a50: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 OpenSSL is not i
9a60: 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 68 65 20 nstalled in the
9a70: 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e default location
9a80: 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 6e 67 20 , or when using
9a90: 4d 61 63 20 4f 53 0a 6f 72 20 4d 53 20 57 69 6e Mac OS.or MS Win
9aa0: 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 4c dows and OpenSSL
9ab0: 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74 is installed, t
9ac0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 he <b class="var
9ad0: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f iable">SSL_CERT_
9ae0: 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 0a 3c DIR</b> and/or.<
9af0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
9b00: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 e">SSL_CERT_FILE
9b10: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 </b> environment
9b20: 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 variables or th
9b30: 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 3c 62 20 e one of the <b
9b40: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
9b50: 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 20 63 6c cadir</b>,.<b cl
9b60: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
9b70: 64 69 72 3c 2f 62 3e 2c 20 6f 72 20 3c 62 20 63 dir</b>, or <b c
9b80: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
9b90: 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f astore</b> optio
9ba0: 6e 73 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e ns must be defin
9bb0: 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 ed.</p></li>.<li
9bc0: 3e 3c 70 3e 4f 6e 20 4d 53 20 57 69 6e 64 6f 77 ><p>On MS Window
9bd0: 73 2c 20 73 74 61 72 74 69 6e 67 20 69 6e 20 4f s, starting in O
9be0: 70 65 6e 53 53 4c 20 33 2e 32 2c 20 69 74 20 69 penSSL 3.2, it i
9bf0: 73 20 6e 6f 77 20 70 6f 73 73 69 62 6c 65 20 74 s now possible t
9c00: 6f 20 61 63 63 65 73 73 20 74 68 65 0a 62 75 69 o access the.bui
9c10: 6c 74 2d 69 6e 20 57 69 6e 64 6f 77 73 20 43 65 lt-in Windows Ce
9c20: 72 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 20 rtificate Store
9c30: 66 72 6f 6d 20 4f 70 65 6e 53 53 4c 2e 20 54 68 from OpenSSL. Th
9c40: 69 73 20 63 61 6e 20 75 74 69 6c 69 7a 65 64 20 is can utilized
9c50: 62 79 0a 73 65 74 74 69 6e 67 20 74 68 65 20 3c by.setting the <
9c60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
9c70: 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 >-castore</b> op
9c80: 74 69 6f 6e 20 74 6f 20 26 71 75 6f 74 3b 3c 62 tion to "<b
9c90: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6f class="const">o
9ca0: 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e 73 74 rg.openssl.winst
9cb0: 6f 72 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f 74 3b ore://</b>"
9cc0: 2e 0a 49 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c ..In TclTLS 2.0,
9cd0: 20 74 68 69 73 20 69 73 20 74 68 65 20 64 65 66 this is the def
9ce0: 61 75 6c 74 20 76 61 6c 75 65 20 69 66 20 3c 62 ault value if <b
9cf0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
9d00: 2d 63 61 64 69 72 3c 2f 62 3e 2c 0a 3c 62 20 63 -cadir</b>,.<b c
9d10: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
9d20: 61 64 69 72 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 adir</b>, and <b
9d30: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
9d40: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 61 72 65 -castore</b> are
9d50: 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2e 3c not specified.<
9d60: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e /p></li>.<li><p>
9d70: 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f If OpenSSL is no
9d80: 74 20 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 74 t installed or t
9d90: 68 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 he CA certificat
9da0: 65 73 20 61 72 65 20 6e 6f 74 20 61 76 61 69 6c es are not avail
9db0: 61 62 6c 65 20 69 6e 20 50 45 4d 0a 66 6f 72 6d able in PEM.form
9dc0: 61 74 2c 20 74 68 65 20 43 41 20 63 65 72 74 69 at, the CA certi
9dd0: 66 69 63 61 74 65 73 20 6d 75 73 74 20 62 65 20 ficates must be
9de0: 64 6f 77 6e 6c 6f 61 64 65 64 20 61 6e 64 20 69 downloaded and i
9df0: 6e 73 74 61 6c 6c 65 64 20 77 69 74 68 20 74 68 nstalled with th
9e00: 65 20 75 73 65 72 0a 73 6f 66 74 77 61 72 65 2e e user.software.
9e10: 20 54 68 65 20 43 55 52 4c 20 74 65 61 6d 20 6d The CURL team m
9e20: 61 6b 65 73 20 74 68 65 6d 20 61 76 61 69 6c 61 akes them availa
9e30: 62 6c 65 20 61 74 0a 3c 61 20 68 72 65 66 3d 22 ble at.<a href="
9e40: 68 74 74 70 73 3a 2f 2f 63 75 72 6c 2e 73 65 2f https://curl.se/
9e50: 64 6f 63 73 2f 63 61 65 78 74 72 61 63 74 2e 68 docs/caextract.h
9e60: 74 6d 6c 22 3e 43 41 20 63 65 72 74 69 66 69 63 tml">CA certific
9e70: 61 74 65 73 20 65 78 74 72 61 63 74 65 64 0a 66 ates extracted.f
9e80: 72 6f 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f 61 3e 20 rom Mozilla</a>
9e90: 69 6e 20 74 68 65 20 26 71 75 6f 74 3b 3c 62 20 in the "<b
9ea0: 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63 61 63 class="file">cac
9eb0: 65 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 ert.pem</b>"
9ec0: 3b 20 66 69 6c 65 2e 20 59 6f 75 20 6d 75 73 74 ; file. You must
9ed0: 20 74 68 65 6e 20 65 69 74 68 65 72 20 73 65 74 then either set
9ee0: 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76 the.<b class="v
9ef0: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 ariable">SSL_CER
9f00: 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 T_DIR</b> and/or
9f10: 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 <b class="varia
9f20: 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 ble">SSL_CERT_FI
9f30: 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 LE</b> environme
9f40: 6e 74 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 nt variables or
9f50: 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 the.<b class="op
9f60: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e tion">-cadir</b>
9f70: 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 or <b class="op
9f80: 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 tion">-cafile</b
9f90: 3e 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 > options to the
9fa0: 20 43 41 20 63 65 72 74 20 66 69 6c 65 27 73 20 CA cert file's
9fb0: 69 6e 73 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e install.location
9fc0: 2e 20 49 74 20 69 73 20 79 6f 75 72 20 72 65 73 . It is your res
9fd0: 70 6f 6e 73 69 62 69 6c 69 74 79 20 74 6f 20 6b ponsibility to k
9fe0: 65 65 70 20 74 68 69 73 20 66 69 6c 65 20 75 70 eep this file up
9ff0: 20 74 6f 20 64 61 74 65 2e 3c 2f 70 3e 3c 2f 6c to date.</p></l
a000: 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a i>.</ul>.</div>.
a010: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
a020: 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d section4" class=
a030: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
a040: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h2><a name="
a050: 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 section4">Callba
a060: 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f ck Options</a></
a070: 68 32 3e 0a 3c 70 3e 41 73 20 70 72 65 76 69 6f h2>.<p>As previo
a080: 75 73 6c 79 20 64 65 73 63 72 69 62 65 64 2c 20 usly described,
a090: 65 61 63 68 20 63 68 61 6e 6e 65 6c 20 63 61 6e each channel can
a0a0: 20 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 be given their
a0b0: 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f own callbacks.to
a0c0: 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 handle intermed
a0d0: 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 iate processing
a0e0: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c by the OpenSSL l
a0f0: 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 ibrary, using th
a100: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e.<b class="opti
a110: 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e on">-command</b>
a120: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 , <b class="opti
a130: 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 on">-password</b
a140: 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d >, and <b class=
a150: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 "option">-valida
a160: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f te_command</b> o
a170: 70 74 69 6f 6e 73 0a 70 61 73 73 65 64 20 74 6f ptions.passed to
a180: 20 65 69 74 68 65 72 20 6f 66 20 3c 62 20 63 6c either of <b cl
a190: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 ass="cmd">tls::s
a1a0: 6f 63 6b 65 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 ocket</b> or <b
a1b0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
a1c0: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 0a 55 6e 6c :import</b>..Unl
a1d0: 69 6b 65 20 70 72 65 76 69 6f 75 73 20 76 65 72 ike previous ver
a1e0: 73 69 6f 6e 73 20 6f 66 20 54 63 6c 54 4c 53 2c sions of TclTLS,
a1f0: 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 63 61 6c only if the cal
a200: 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20 lback generates
a210: 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c 6c 20 74 an error,.will t
a220: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 he <b class="sys
a230: 63 6d 64 22 3e 62 67 65 72 72 6f 72 3c 2f 62 3e cmd">bgerror</b>
a240: 20 63 6f 6d 6d 61 6e 64 20 62 65 20 69 6e 76 6f command be invo
a250: 6b 65 64 20 77 69 74 68 20 74 68 65 20 65 72 72 ked with the err
a260: 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 3c or information.<
a270: 2f 70 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 /p>.<div id="sub
a280: 73 65 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d section4" class=
a290: 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 "doctools_subsec
a2a0: 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d tion"><h3><a nam
a2b0: 65 3d 22 73 75 62 73 65 63 74 69 6f 6e 34 22 3e e="subsection4">
a2c0: 56 61 6c 75 65 73 20 66 6f 72 20 43 6f 6d 6d 61 Values for Comma
a2d0: 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c nd Callback</a><
a2e0: 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c /h3>.<p>The call
a2f0: 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 back for the <b
a300: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
a310: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 command</b> opti
a320: 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 61 74 on is invoked at
a330: 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 several points
a340: 64 75 72 69 6e 67 20 74 68 65 0a 4f 70 65 6e 53 during the.OpenS
a350: 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 SL handshake and
a360: 20 64 75 72 69 6e 67 20 72 6f 75 74 69 6e 65 20 during routine
a370: 6f 70 65 72 61 74 69 6f 6e 73 2e 20 53 65 65 20 operations. See
a380: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f below for the po
a390: 73 73 69 62 6c 65 0a 61 72 67 75 6d 65 6e 74 73 ssible.arguments
a3a0: 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 passed to the c
a3b0: 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 allback script.
a3c0: 56 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64 20 Values returned
a3d0: 66 72 6f 6d 20 74 68 65 20 63 61 6c 6c 62 61 63 from the callbac
a3e0: 6b 20 61 72 65 0a 69 67 6e 6f 72 65 64 2e 3c 2f k are.ignored.</
a3f0: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f p>.<dl class="do
a400: 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e ctools_options">
a410: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
a420: 70 74 69 6f 6e 22 3e 65 72 72 6f 72 3c 2f 62 3e ption">error</b>
a430: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
a440: 63 68 61 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 channelId messag
a450: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
a460: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 p>This form of c
a470: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
a480: 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e 20 65 ed whenever an e
a490: 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75 72 69 rror occurs duri
a4a0: 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 ng the initial.c
a4b0: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 onnection, hands
a4c0: 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 hake, or I/O ope
a4d0: 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 3c 69 20 rations. The <i
a4e0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 class="arg">mess
a4f0: 61 67 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 age</i> argument
a500: 20 63 61 6e 20 62 65 0a 66 72 6f 6d 20 74 68 65 can be.from the
a510: 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f Tcl_ErrnoMsg, O
a520: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 20 penSSL function
a530: 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 <b class="functi
a540: 6f 6e 22 3e 45 52 52 5f 72 65 61 73 6f 6e 5f 65 on">ERR_reason_e
a550: 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 3c 2f 62 rror_string()</b
a560: 3e 2c 0a 6f 72 20 61 20 63 75 73 74 6f 6d 20 6d >,.or a custom m
a570: 65 73 73 61 67 65 2e 20 54 68 69 73 20 63 61 6c essage. This cal
a580: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 lback is new for
a590: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
a5a0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
a5b0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 69 6e 66 6f ss="option">info
a5c0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
a5d0: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 61 rg">channelId ma
a5e0: 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73 61 67 jor minor messag
a5f0: 65 20 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a e type</i></dt>.
a600: 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d <dd><p>This form
a610: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
a620: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f invoked by the O
a630: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
a640: 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 <b class="functi
a650: 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 69 6e 66 6f on">SSL_set_info
a660: 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 62 3e 20 _callback()</b>
a670: 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 during the initi
a680: 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e al connection an
a690: 64 20 68 61 6e 64 73 68 61 6b 65 0a 6f 70 65 72 d handshake.oper
a6a0: 61 74 69 6f 6e 73 2e 20 54 68 65 20 61 72 67 75 ations. The argu
a6b0: 6d 65 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c ments are:</p>.<
a6c0: 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f dl class="doctoo
a6d0: 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e ls_definitions">
a6e0: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
a6f0: 72 67 22 3e 6d 61 6a 6f 72 3c 2f 69 3e 3c 2f 64 rg">major</i></d
a700: 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 6a 6f 72 20 t>.<dd><p>Major
a710: 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65 72 72 category for err
a720: 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 or. Valid enums
a730: 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 are: <b class="c
a740: 6f 6e 73 74 22 3e 68 61 6e 64 73 68 61 6b 65 3c onst">handshake<
a750: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 /b>, <b class="c
a760: 6f 6e 73 74 22 3e 61 6c 65 72 74 3c 2f 62 3e 2c onst">alert</b>,
a770: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 .<b class="const
a780: 22 3e 63 6f 6e 6e 65 63 74 3c 2f 62 3e 2c 20 3c ">connect</b>, <
a790: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
a7a0: 61 63 63 65 70 74 3c 2f 62 3e 2e 3c 2f 70 3e 3c accept</b>.</p><
a7b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 /dd>.<dt><i clas
a7c0: 73 3d 22 61 72 67 22 3e 6d 69 6e 6f 72 3c 2f 69 s="arg">minor</i
a7d0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 69 ></dt>.<dd><p>Mi
a7e0: 6e 6f 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 nor category for
a7f0: 20 65 72 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e error. Valid en
a800: 75 6d 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 ums are: <b clas
a810: 73 3d 22 63 6f 6e 73 74 22 3e 73 74 61 72 74 3c s="const">start<
a820: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 /b>, <b class="c
a830: 6f 6e 73 74 22 3e 64 6f 6e 65 3c 2f 62 3e 2c 20 onst">done</b>,
a840: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
a850: 3e 72 65 61 64 3c 2f 62 3e 2c 0a 3c 62 20 63 6c >read</b>,.<b cl
a860: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 77 72 69 74 ass="const">writ
a870: 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d e</b>, <b class=
a880: 22 63 6f 6e 73 74 22 3e 6c 6f 6f 70 3c 2f 62 3e "const">loop</b>
a890: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 , <b class="cons
a8a0: 74 22 3e 65 78 69 74 3c 2f 62 3e 2e 3c 2f 70 3e t">exit</b>.</p>
a8b0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 </dd>.<dt><i cla
a8c0: 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 65 ss="arg">message
a8d0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
a8e0: 3e 44 65 73 63 72 69 70 74 69 76 65 20 6d 65 73 >Descriptive mes
a8f0: 73 61 67 65 20 73 74 72 69 6e 67 20 77 68 69 63 sage string whic
a900: 68 20 6d 61 79 20 62 65 20 67 65 6e 65 72 61 74 h may be generat
a910: 65 64 20 65 69 74 68 65 72 20 62 79 0a 3c 62 20 ed either by.<b
a920: 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 class="function"
a930: 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e >SSL_state_strin
a940: 67 5f 6c 6f 6e 67 28 29 3c 2f 62 3e 20 6f 72 20 g_long()</b> or
a950: 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 <b class="functi
a960: 6f 6e 22 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 on">SSL_alert_de
a970: 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 sc_string_long()
a980: 3c 2f 62 3e 2c 0a 64 65 70 65 6e 64 69 6e 67 20 </b>,.depending
a990: 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c on the context.<
a9a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 /p></dd>.<dt><i
a9b0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 74 79 70 65 class="arg">type
a9c0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
a9d0: 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65 >For alerts, the
a9e0: 20 70 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 possible values
a9f0: 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 are: <b class="
aa00: 63 6f 6e 73 74 22 3e 77 61 72 6e 69 6e 67 3c 2f const">warning</
aa10: 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f b>,.<b class="co
aa20: 6e 73 74 22 3e 66 61 74 61 6c 3c 2f 62 3e 2c 20 nst">fatal</b>,
aa30: 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f and <b class="co
aa40: 6e 73 74 22 3e 75 6e 6b 6e 6f 77 6e 3c 2f 62 3e nst">unknown</b>
aa50: 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 20 3c 62 . For others, <b
aa60: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 69 class="const">i
aa70: 6e 66 6f 3c 2f 62 3e 20 69 73 20 75 73 65 64 2e nfo</b> is used.
aa80: 0a 54 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 .This argument i
aa90: 73 20 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 s new for TclTLS
aaa0: 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 1.8.</p></dd>.<
aab0: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 /dl></dd>.<dt><b
aac0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
aad0: 6d 65 73 73 61 67 65 3c 2f 62 3e 20 3c 69 20 63 message</b> <i c
aae0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
aaf0: 65 6c 49 64 20 64 69 72 65 63 74 69 6f 6e 20 76 elId direction v
ab00: 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 ersion content_t
ab10: 79 70 65 20 6d 65 73 73 61 67 65 3c 2f 69 3e 3c ype message</i><
ab20: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 /dt>.<dd><p>This
ab30: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
ab40: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 k is invoked by
ab50: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 the OpenSSL func
ab60: 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 tion.<b class="f
ab70: 75 6e 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 unction">SSL_set
ab80: 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c _msg_callback()<
ab90: 2f 62 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6d /b> whenever a m
aba0: 65 73 73 61 67 65 20 69 73 20 73 65 6e 74 20 6f essage is sent o
abb0: 72 20 72 65 63 65 69 76 65 64 20 64 75 72 69 6e r received durin
abc0: 67 20 74 68 65 0a 69 6e 69 74 69 61 6c 20 63 6f g the.initial co
abd0: 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 nnection, handsh
abe0: 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 ake, or I/O oper
abf0: 61 74 69 6f 6e 73 2e 20 49 74 20 69 73 20 6f 6e ations. It is on
ac00: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 77 68 65 ly available whe
ac10: 6e 0a 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d n.OpenSSL is com
ac20: 70 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 3c plied with the <
ac30: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
ac40: 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 enable-ssl-trace
ac50: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69 </b> option. Thi
ac60: 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 0a 6e 65 s callback is.ne
ac70: 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 w for TclTLS 1.8
ac80: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 . The arguments
ac90: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 are:</p>.<dl cla
aca0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 ss="doctools_def
acb0: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c initions">.<dt><
acc0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 i class="arg">di
acd0: 72 65 63 74 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e rection</i></dt>
ace0: 0a 3c 64 64 3e 3c 70 3e 44 69 72 65 63 74 69 6f .<dd><p>Directio
acf0: 6e 20 69 73 20 65 69 74 68 65 72 20 3c 62 20 63 n is either <b c
ad00: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 53 65 6e lass="const">Sen
ad10: 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 t</b> or <b clas
ad20: 73 3d 22 63 6f 6e 73 74 22 3e 52 65 63 65 69 76 s="const">Receiv
ad30: 65 64 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e ed</b>.</p></dd>
ad40: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
ad50: 72 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c rg">version</i><
ad60: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 56 65 72 73 /dt>.<dd><p>Vers
ad70: 69 6f 6e 20 69 73 20 74 68 65 20 70 72 6f 74 6f ion is the proto
ad80: 63 6f 6c 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e col version.</p>
ad90: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 </dd>.<dt><i cla
ada0: 73 73 3d 22 61 72 67 22 3e 63 6f 6e 74 65 6e 74 ss="arg">content
adb0: 5f 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c _type</i></dt>.<
adc0: 64 64 3e 3c 70 3e 43 6f 6e 74 65 6e 74 20 74 79 dd><p>Content ty
add0: 70 65 20 69 73 20 74 68 65 20 6d 65 73 73 61 67 pe is the messag
ade0: 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65 2e 3c e content type.<
adf0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 /p></dd>.<dt><i
ae00: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 class="arg">mess
ae10: 61 67 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 age</i></dt>.<dd
ae20: 3e 3c 70 3e 4d 65 73 73 61 67 65 20 69 73 20 6d ><p>Message is m
ae30: 6f 72 65 20 69 6e 66 6f 20 66 72 6f 6d 20 74 68 ore info from th
ae40: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 e <b class="cons
ae50: 74 22 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 62 3e t">SSL_trace</b>
ae60: 20 41 50 49 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c API.</p></dd>.<
ae70: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 /dl></dd>.<dt><b
ae80: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
ae90: 73 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 session</b> <i c
aea0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
aeb0: 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 elId session_id
aec0: 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c session_ticket l
aed0: 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e ifetime</i></dt>
aee0: 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 .<dd><p>This for
aef0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
af00: 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 invoked by the
af10: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e OpenSSL function
af20: 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 .<b class="funct
af30: 69 6f 6e 22 3e 53 53 4c 5f 43 54 58 5f 73 65 73 ion">SSL_CTX_ses
af40: 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f s_set_new_cb()</
af50: 62 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 b> whenever a ne
af60: 77 20 73 65 73 73 69 6f 6e 20 69 64 20 69 73 20 w session id is
af70: 73 65 6e 74 20 62 79 20 74 68 65 0a 73 65 72 76 sent by the.serv
af80: 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e er during the in
af90: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e itial connection
afa0: 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 61 and handshake a
afb0: 6e 64 20 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 nd also during t
afc0: 68 65 20 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 he session.if th
afd0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e <b class="opti
afe0: 6f 6e 22 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 on">-post_handsh
aff0: 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 ake</b> option i
b000: 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20 54 s set to true. T
b010: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 his callback is
b020: 6e 65 77 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 new for.TclTLS 1
b030: 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 .8. The argument
b040: 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 s are:</p>.<dl c
b050: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 lass="doctools_d
b060: 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 efinitions">.<dt
b070: 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ><i class="arg">
b080: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f session_id</i></
b090: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73 73 69 dt>.<dd><p>Sessi
b0a0: 6f 6e 20 49 64 20 69 73 20 74 68 65 20 63 75 72 on Id is the cur
b0b0: 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 rent session ide
b0c0: 6e 74 69 66 69 65 72 3c 2f 70 3e 3c 2f 64 64 3e ntifier</p></dd>
b0d0: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
b0e0: 72 67 22 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b rg">session_tick
b0f0: 65 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e et</i></dt>.<dd>
b100: 3c 70 3e 54 69 63 6b 65 74 20 69 73 20 74 68 65 <p>Ticket is the
b110: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
b120: 69 6e 66 6f 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 info</p></dd>.<d
b130: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 t><i class="arg"
b140: 3e 6c 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64 >lifetime</i></d
b150: 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 66 65 74 69 t>.<dd><p>Lifeti
b160: 6d 65 20 69 73 20 74 68 65 20 74 69 63 6b 65 74 me is the ticket
b170: 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63 lifetime in sec
b180: 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c onds.</p></dd>.<
b190: 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 /dl></dd>.<dt><b
b1a0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
b1b0: 76 65 72 69 66 79 3c 2f 62 3e 20 3c 69 20 63 6c verify</b> <i cl
b1c0: 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 ass="arg">channe
b1d0: 6c 49 64 20 64 65 70 74 68 20 63 65 72 74 20 73 lId depth cert s
b1e0: 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 69 3e 3c tatus error</i><
b1f0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 /dt>.<dd><p>This
b200: 20 63 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f callback was mo
b210: 76 65 64 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d ved to <b class=
b220: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 "option">-valida
b230: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 6e tecommand</b> in
b240: 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e TclTLS 1.8.</p>
b250: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 </dd>.</dl>.</di
b260: 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 v>.<div id="subs
b270: 65 63 74 69 6f 6e 35 22 20 63 6c 61 73 73 3d 22 ection5" class="
b280: 64 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 doctools_subsect
b290: 69 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 ion"><h3><a name
b2a0: 3d 22 73 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 ="subsection5">V
b2b0: 61 6c 75 65 73 20 66 6f 72 20 50 61 73 73 77 6f alues for Passwo
b2c0: 72 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c rd Callback</a><
b2d0: 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c /h3>.<p>The call
b2e0: 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 back for the <b
b2f0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
b300: 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 password</b> opt
b310: 69 6f 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ion is invoked b
b320: 79 20 54 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 y TclTLS wheneve
b330: 72 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a r OpenSSL needs.
b340: 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 to obtain a pass
b350: 77 6f 72 64 2e 20 53 65 65 20 62 65 6c 6f 77 20 word. See below
b360: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 for the possible
b370: 20 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 arguments passe
b380: 64 20 74 6f 20 74 68 65 0a 63 61 6c 6c 62 61 63 d to the.callbac
b390: 6b 20 73 63 72 69 70 74 2e 20 54 68 65 20 75 73 k script. The us
b3a0: 65 72 20 70 72 6f 76 69 64 65 64 20 70 61 73 73 er provided pass
b3b0: 77 6f 72 64 20 69 73 20 65 78 70 65 63 74 65 64 word is expected
b3c0: 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65 64 20 to be returned
b3d0: 62 79 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b 2e by the.callback.
b3e0: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 </p>.<dl class="
b3f0: 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 doctools_options
b400: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d ">.<dt><b class=
b410: 22 6f 70 74 69 6f 6e 22 3e 70 61 73 73 77 6f 72 "option">passwor
b420: 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 d</b> <i class="
b430: 61 72 67 22 3e 72 77 66 6c 61 67 20 73 69 7a 65 arg">rwflag size
b440: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
b450: 3e 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f >Invoked when lo
b460: 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 ading or storing
b470: 20 61 6e 20 65 6e 63 72 79 70 74 65 64 20 50 45 an encrypted PE
b480: 4d 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 54 M certificate. T
b490: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 he arguments are
b4a0: 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d :</p>.<dl class=
b4b0: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 "doctools_defini
b4c0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 tions">.<dt><i c
b4d0: 6c 61 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 lass="arg">rwfla
b4e0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
b4f0: 70 3e 54 68 65 20 72 65 61 64 2f 77 72 69 74 65 p>The read/write
b500: 20 66 6c 61 67 20 69 73 20 30 20 66 6f 72 20 72 flag is 0 for r
b510: 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74 69 6f eading/decryptio
b520: 6e 20 6f 72 20 31 20 66 6f 72 20 77 72 69 74 69 n or 1 for writi
b530: 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 2e 0a 54 ng/encryption..T
b540: 68 65 20 6c 61 74 74 65 72 20 63 61 6e 20 62 65 he latter can be
b550: 20 75 73 65 64 20 74 6f 20 64 65 74 65 72 6d 69 used to determi
b560: 6e 65 20 77 68 65 6e 20 74 6f 20 70 72 6f 6d 70 ne when to promp
b570: 74 20 74 68 65 20 75 73 65 72 20 74 6f 20 63 6f t the user to co
b580: 6e 66 69 72 6d 2e 0a 54 68 69 73 20 61 72 67 75 nfirm..This argu
b590: 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 ment is new for
b5a0: 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c TclTLS 1.8.</p><
b5b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 /dd>.<dt><i clas
b5c0: 73 3d 22 61 72 67 22 3e 73 69 7a 65 3c 2f 69 3e s="arg">size</i>
b5d0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
b5e0: 20 73 69 7a 65 20 69 73 20 74 68 65 20 6d 61 78 size is the max
b5f0: 69 6d 75 6d 20 6c 65 6e 67 74 68 20 6f 66 20 74 imum length of t
b600: 68 65 20 70 61 73 73 77 6f 72 64 20 69 6e 20 62 he password in b
b610: 79 74 65 73 2e 0a 54 68 69 73 20 61 72 67 75 6d ytes..This argum
b620: 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ent is new for T
b630: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
b640: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c dd>.</dl></dd>.<
b650: 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 /dl>.</div>.<div
b660: 20 69 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 36 id="subsection6
b670: 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c " class="doctool
b680: 73 5f 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 s_subsection"><h
b690: 33 3e 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 3><a name="subse
b6a0: 63 74 69 6f 6e 36 22 3e 56 61 6c 75 65 73 20 66 ction6">Values f
b6b0: 6f 72 20 56 61 6c 69 64 61 74 65 20 43 6f 6d 6d or Validate Comm
b6c0: 61 6e 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e and Callback</a>
b6d0: 3c 2f 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c </h3>.<p>The cal
b6e0: 6c 62 61 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 lback for the <b
b6f0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
b700: 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 -validatecommand
b710: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 </b> option is i
b720: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 74 68 nvoked during th
b730: 65 20 68 61 6e 64 73 68 61 6b 65 0a 70 72 6f 63 e handshake.proc
b740: 65 73 73 20 69 6e 20 6f 72 64 65 72 20 66 6f 72 ess in order for
b750: 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e the application
b760: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 to validate the
b770: 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 28 provided value(
b780: 73 29 2e 20 53 65 65 0a 62 65 6c 6f 77 20 66 6f s). See.below fo
b790: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 r the possible a
b7a0: 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 rguments passed
b7b0: 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 to the callback
b7c0: 73 63 72 69 70 74 2e 20 49 66 20 6e 6f 74 0a 73 script. If not.s
b7d0: 70 65 63 69 66 69 65 64 2c 20 4f 70 65 6e 53 53 pecified, OpenSS
b7e0: 4c 20 77 69 6c 6c 20 61 63 63 65 70 74 20 61 6c L will accept al
b7f0: 6c 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 l valid certific
b800: 61 74 65 73 20 61 6e 64 20 65 78 74 65 6e 73 69 ates and extensi
b810: 6f 6e 73 2e 20 54 6f 20 72 65 6a 65 63 74 0a 74 ons. To reject.t
b820: 68 65 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f he value and abo
b830: 72 74 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f rt the connectio
b840: 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 n, the callback
b850: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 2e should return 0.
b860: 20 54 6f 20 61 63 63 65 70 74 20 74 68 65 0a 76 To accept the.v
b870: 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 alue and continu
b880: 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e e the connection
b890: 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 , it should retu
b8a0: 72 6e 20 31 2e 20 54 6f 20 72 65 6a 65 63 74 20 rn 1. To reject
b8b0: 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74 0a 63 the value, but.c
b8c0: 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e ontinue the conn
b8d0: 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c ection, it shoul
b8e0: 64 20 72 65 74 75 72 6e 20 32 2e 20 54 68 69 73 d return 2. This
b8f0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 callback is new
b900: 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e for TclTLS 1.8.
b910: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 </p>.<dl class="
b920: 64 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 doctools_options
b930: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d ">.<dt><b class=
b940: 22 6f 70 74 69 6f 6e 22 3e 61 6c 70 6e 3c 2f 62 "option">alpn</b
b950: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
b960: 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f 74 6f >channelId proto
b970: 63 6f 6c 20 6d 61 74 63 68 3c 2f 69 3e 3c 2f 64 col match</i></d
b980: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 t>.<dd><p>For se
b990: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d rvers, this form
b9a0: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
b9b0: 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 invoked when the
b9c0: 20 63 6c 69 65 6e 74 20 41 4c 50 4e 20 65 78 74 client ALPN ext
b9d0: 65 6e 73 69 6f 6e 20 69 73 0a 72 65 63 65 69 76 ension is.receiv
b9e0: 65 64 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d ed. If <i class=
b9f0: 22 61 72 67 22 3e 6d 61 74 63 68 3c 2f 69 3e 20 "arg">match</i>
ba00: 69 73 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 69 is true, then <i
ba10: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f class="arg">pro
ba20: 74 6f 63 6f 6c 3c 2f 69 3e 20 69 73 20 74 68 65 tocol</i> is the
ba30: 20 66 69 72 73 74 0a 3c 62 20 63 6c 61 73 73 3d first.<b class=
ba40: 22 6f 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f "option">-alpn</
ba50: 62 3e 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 b> protocol opti
ba60: 6f 6e 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 on in common to
ba70: 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e 74 20 both the client
ba80: 61 6e 64 20 73 65 72 76 65 72 2e 0a 49 66 20 6e and server..If n
ba90: 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c ot, the first cl
baa0: 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 ient specified p
bab0: 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 2e rotocol is used.
bac0: 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 This callback i
bad0: 73 20 63 61 6c 6c 65 64 0a 61 66 74 65 72 20 74 s called.after t
bae0: 68 65 20 48 65 6c 6c 6f 20 61 6e 64 20 41 4c 50 he Hello and ALP
baf0: 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e N callbacks.</p>
bb00: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
bb10: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 68 65 6c 6c ss="option">hell
bb20: 6f 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 o</b> <i class="
bb30: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 arg">channelId s
bb40: 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 ervername</i></d
bb50: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 t>.<dd><p>For se
bb60: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d rvers, this form
bb70: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
bb80: 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 invoked during c
bb90: 6c 69 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 lient hello mess
bba0: 61 67 65 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 age.processing.
bbb0: 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 The purpose is s
bbc0: 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 61 6e o the server can
bbd0: 20 73 65 6c 65 63 74 20 74 68 65 20 61 70 70 72 select the appr
bbe0: 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 63 opriate certific
bbf0: 61 74 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 ate.to present t
bc00: 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e o the client, an
bc10: 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 d to make other
bc20: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 configuration ad
bc30: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 justments releva
bc40: 6e 74 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65 nt.to that serve
bc50: 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63 r name and its c
bc60: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 onfiguration. It
bc70: 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 is called befor
bc80: 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c e the SNI and AL
bc90: 50 4e 0a 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 PN.callbacks.</p
bca0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
bcb0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 ass="option">sni
bcc0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
bcd0: 72 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 rg">channelId se
bce0: 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 rvername</i></dt
bcf0: 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 >.<dd><p>For ser
bd00: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
bd10: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
bd20: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 nvoked when the
bd30: 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 Server Name Indi
bd40: 63 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 cation.(SNI) ext
bd50: 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69 76 ension is receiv
bd60: 65 64 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73 ed. The <i class
bd70: 3d 22 61 72 67 22 3e 73 65 72 76 65 72 6e 61 6d ="arg">servernam
bd80: 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 69 e</i> argument i
bd90: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f s the client.pro
bda0: 76 69 64 65 64 20 73 65 72 76 65 72 20 6e 61 6d vided server nam
bdb0: 65 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 e specified in t
bdc0: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
bdd0: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 ion">-servername
bde0: 26 6c 74 3b 2f 62 26 67 74 3b 3c 2f 62 3e 20 6f </b></b> o
bdf0: 70 74 69 6f 6e 2e 20 54 68 65 0a 70 75 72 70 6f ption. The.purpo
be00: 73 65 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 se is so when a
be10: 73 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 server supports
be20: 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 multiple names,
be30: 74 68 65 20 72 69 67 68 74 20 63 65 72 74 69 66 the right certif
be40: 69 63 61 74 65 0a 63 61 6e 20 62 65 20 75 73 65 icate.can be use
be50: 64 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 d. It is called
be60: 61 66 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 after the hello
be70: 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 callback but bef
be80: 6f 72 65 20 74 68 65 20 41 4c 50 4e 0a 63 61 6c ore the ALPN.cal
be90: 6c 62 61 63 6b 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a lback.</p></dd>.
bea0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
beb0: 74 69 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e tion">verify</b>
bec0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
bed0: 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 channelId depth
bee0: 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 6f cert status erro
bef0: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c r</i></dt>.<dd><
bf00: 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 p>This form of c
bf10: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
bf20: 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 68 ed by OpenSSL wh
bf30: 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 66 69 en a new certifi
bf40: 63 61 74 65 20 69 73 20 72 65 63 65 69 76 65 64 cate is received
bf50: 0a 66 72 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 .from the peer.
bf60: 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c It allows the cl
bf70: 69 65 6e 74 20 74 6f 20 63 68 65 63 6b 20 74 68 ient to check th
bf80: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 e certificate ve
bf90: 72 69 66 69 63 61 74 69 6f 6e 0a 72 65 73 75 6c rification.resul
bfa0: 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 ts and choose wh
bfb0: 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 ether to continu
bfc0: 65 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69 73 20 e or not. It is
bfd0: 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63 68 0a called for each.
bfe0: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 certificate in t
bff0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
c000: 68 61 69 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 hain. This callb
c010: 61 63 6b 20 77 61 73 20 6d 6f 76 65 64 20 66 72 ack was moved fr
c020: 6f 6d 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 om.<b class="opt
c030: 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 ion">-command</b
c040: 3e 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e > in TclTLS 1.8.
c050: 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 The arguments a
c060: 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 re:</p>.<dl clas
c070: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 s="doctools_defi
c080: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 nitions">.<dt><i
c090: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 65 70 class="arg">dep
c0a0: 74 68 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e th</i></dt>.<dd>
c0b0: 3c 70 3e 54 68 65 20 64 65 70 74 68 20 69 73 20 <p>The depth is
c0c0: 74 68 65 20 69 6e 74 65 67 65 72 20 64 65 70 74 the integer dept
c0d0: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 h of the certifi
c0e0: 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74 cate in the cert
c0f0: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c 0a 77 ificate chain,.w
c100: 68 65 72 65 20 30 20 69 73 20 74 68 65 20 70 65 here 0 is the pe
c110: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 61 er certificate a
c120: 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 nd higher values
c130: 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 65 going up to the
c140: 20 43 65 72 74 69 66 69 63 61 74 65 0a 41 75 74 Certificate.Aut
c150: 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f 70 3e hority (CA).</p>
c160: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 </dd>.<dt><i cla
c170: 73 73 3d 22 61 72 67 22 3e 63 65 72 74 3c 2f 69 ss="arg">cert</i
c180: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
c190: 65 20 63 65 72 74 20 61 72 67 75 6d 65 6e 74 20 e cert argument
c1a0: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 is a list of key
c1b0: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d -value pairs sim
c1c0: 69 6c 61 72 20 74 6f 20 74 68 6f 73 65 20 72 65 ilar to those re
c1d0: 74 75 72 6e 65 64 20 62 79 0a 3c 62 20 63 6c 61 turned by.<b cla
c1e0: 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 ss="cmd">tls::st
c1f0: 61 74 75 73 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 atus</b>.</p></d
c200: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d d>.<dt><i class=
c210: 22 61 72 67 22 3e 73 74 61 74 75 73 3c 2f 69 3e "arg">status</i>
c220: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
c230: 20 73 74 61 74 75 73 20 61 72 67 75 6d 65 6e 74 status argument
c240: 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 61 6e 20 is the boolean
c250: 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 validity of the
c260: 63 75 72 72 65 6e 74 20 63 65 72 74 69 66 69 63 current certific
c270: 61 74 65 20 77 68 65 72 65 20 30 0a 69 73 20 69 ate where 0.is i
c280: 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 69 73 20 nvalid and 1 is
c290: 76 61 6c 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a valid.</p></dd>.
c2a0: 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 <dt><i class="ar
c2b0: 67 22 3e 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 g">error</i></dt
c2c0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65 72 72 >.<dd><p>The err
c2d0: 6f 72 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 or argument is t
c2e0: 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 he error message
c2f0: 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 61 , if any, genera
c300: 74 65 64 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d ted by.<b class=
c310: 22 66 75 6e 63 74 69 6f 6e 22 3e 58 35 30 39 5f "function">X509_
c320: 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 STORE_CTX_get_er
c330: 72 6f 72 28 29 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f ror()</b>.</p></
c340: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c dd>.</dl></dd>.<
c350: 2f 64 6c 3e 0a 3c 70 3e 52 65 66 65 72 65 6e 63 /dl>.<p>Referenc
c360: 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e e implementation
c370: 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 s of these callb
c380: 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 acks are provide
c390: 64 20 69 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c d in "<b cl
c3a0: 61 73 73 3d 22 66 69 6c 65 22 3e 74 6c 73 2e 74 ass="file">tls.t
c3b0: 63 6c 3c 2f 62 3e 26 71 75 6f 74 3b 0a 61 73 20 cl</b>".as
c3c0: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
c3d0: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e ls::callback</b>
c3e0: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 , <b class="cmd"
c3f0: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f >tls::password</
c400: 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 b>, and <b class
c410: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 ="cmd">tls::vali
c420: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e date_command</b>
c430: 0a 72 65 73 70 65 63 74 69 76 65 6c 79 2e 20 4e .respectively. N
c440: 6f 74 65 20 74 68 61 74 20 74 68 65 73 65 20 61 ote that these a
c450: 72 65 20 6f 6e 6c 79 20 3c 65 6d 3e 73 61 6d 70 re only <em>samp
c460: 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e le</em> implemen
c470: 74 61 74 69 6f 6e 73 2e 20 49 6e 20 61 20 6d 6f tations. In a mo
c480: 72 65 0a 72 65 61 6c 69 73 74 69 63 20 64 65 70 re.realistic dep
c490: 6c 6f 79 6d 65 6e 74 20 79 6f 75 20 77 6f 75 6c loyment you woul
c4a0: 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f d specify your o
c4b0: 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 wn callback scri
c4c0: 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 0a pts on each TLS.
c4d0: 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20 74 68 channel using th
c4e0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e <b class="opti
c4f0: 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e on">-command</b>
c500: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 , <b class="opti
c510: 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 on">-password</b
c520: 3e 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d >, and.<b class=
c530: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 "option">-valida
c540: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f te_command</b> o
c550: 70 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 ptions.</p>.<p>T
c560: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 he default behav
c570: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 62 20 ior when the <b
c580: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
c590: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 61 6e 64 20 command</b> and
c5a0: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
c5b0: 22 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d ">-validate_comm
c5c0: 61 6e 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 73 20 and</b>.options
c5d0: 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 are not specifie
c5e0: 64 2c 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 d, is for TclTLS
c5f0: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
c600: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
c610: 72 79 0a 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 ry.callbacks int
c620: 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 ernally. The def
c630: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 ault behavior wh
c640: 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d en the <b class=
c650: 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f "option">-passwo
c660: 72 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e 0a 69 73 rd</b> option.is
c670: 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 20 69 not specified i
c680: 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 s for TclTLS to
c690: 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f process the asso
c6a0: 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 ciated library c
c6b0: 61 6c 6c 62 61 63 6b 73 20 62 79 0a 61 74 74 65 allbacks by.atte
c6c0: 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 20 3c mpting to call <
c6d0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
c6e0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2e s::password</b>.
c6f0: 20 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 The difference
c700: 62 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 between these tw
c710: 6f 0a 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 o.behaviors is a
c720: 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 consequence of
c730: 6d 61 69 6e 74 61 69 6e 69 6e 67 20 63 6f 6d 70 maintaining comp
c740: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 atibility with e
c750: 61 72 6c 69 65 72 0a 69 6d 70 6c 65 6d 65 6e 74 arlier.implement
c760: 61 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70 3e 3c ations.</p>.<p><
c770: 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20 74 68 em>The use of th
c780: 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c e reference call
c790: 62 61 63 6b 73 20 3c 62 20 63 6c 61 73 73 3d 22 backs <b class="
c7a0: 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 cmd">tls::callba
c7b0: 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 ck</b>, <b class
c7c0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 ="cmd">tls::pass
c7d0: 77 6f 72 64 3c 2f 62 3e 2c 0a 61 6e 64 20 3c 62 word</b>,.and <b
c7e0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
c7f0: 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 ::validate_comma
c800: 6e 64 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65 nd</b> is not re
c810: 63 6f 6d 6d 65 6e 64 65 64 2e 20 54 68 65 79 20 commended. They
c820: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 may be removed f
c830: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 rom future relea
c840: 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f ses.</em></p>.</
c850: 64 69 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 div>.</div>.<div
c860: 20 69 64 3d 22 73 65 63 74 69 6f 6e 35 22 20 63 id="section5" c
c870: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
c880: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e ection"><h2><a n
c890: 61 6d 65 3d 22 73 65 63 74 69 6f 6e 35 22 3e 44 ame="section5">D
c8a0: 65 62 75 67 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 ebug</a></h2>.<p
c8b0: 3e 46 6f 72 20 6d 6f 73 74 20 64 65 62 75 67 67 >For most debugg
c8c0: 69 6e 67 20 6e 65 65 64 73 2c 20 74 68 65 20 3c ing needs, the <
c8d0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
c8e0: 3e 2d 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 6f >-callback</b> o
c8f0: 70 74 69 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 ption can be use
c900: 64 20 74 6f 20 70 72 6f 76 69 64 65 0a 73 75 66 d to provide.suf
c910: 66 69 63 69 65 6e 74 20 69 6e 73 69 67 68 74 20 ficient insight
c920: 61 6e 64 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 and information
c930: 6f 6e 20 74 68 65 20 54 4c 53 20 68 61 6e 64 73 on the TLS hands
c940: 68 61 6b 65 20 61 6e 64 20 70 72 6f 67 72 65 73 hake and progres
c950: 73 2e 20 49 66 0a 66 75 72 74 68 65 72 20 74 72 s. If.further tr
c960: 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e oubleshooting in
c970: 73 69 67 68 74 20 69 73 20 6e 65 65 64 65 64 2c sight is needed,
c980: 20 74 68 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d the compile tim
c990: 65 20 6f 70 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 e option.<b clas
c9a0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 2d 65 6e 61 s="option">--ena
c9b0: 62 6c 65 2d 64 65 62 75 67 3c 2f 62 3e 20 63 61 ble-debug</b> ca
c9c0: 6e 20 62 65 20 75 73 65 64 20 74 6f 20 67 65 74 n be used to get
c9d0: 20 64 65 74 61 69 6c 65 64 20 65 78 65 63 75 74 detailed execut
c9e0: 69 6f 6e 20 66 6c 6f 77 20 73 74 61 74 75 73 2e ion flow status.
c9f0: 3c 2f 70 3e 0a 3c 70 3e 54 4c 53 20 6b 65 79 20 </p>.<p>TLS key
ca00: 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 logging can be e
ca10: 6e 61 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e nabled by settin
ca20: 67 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e g the environmen
ca30: 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 20 63 6c t variable.<b cl
ca40: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 ass="variable">S
ca50: 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e SLKEYLOGFILE</b>
ca60: 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 to the name of
ca70: 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 the file to log
ca80: 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 65 to. Then wheneve
ca90: 72 20 54 4c 53 20 6b 65 79 0a 6d 61 74 65 72 69 r TLS key.materi
caa0: 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 al is generated
cab0: 6f 72 20 72 65 63 65 69 76 65 64 20 69 74 20 77 or received it w
cac0: 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 6f ill be logged to
cad0: 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69 73 20 the file. This
cae0: 69 73 20 75 73 65 66 75 6c 0a 66 6f 72 20 6c 6f is useful.for lo
caf0: 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 gging key data f
cb00: 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 or network loggi
cb10: 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 ng tools to use
cb20: 74 6f 20 64 65 63 72 79 70 74 20 74 68 65 20 64 to decrypt the d
cb30: 61 74 61 2e 3c 2f 70 3e 0a 3c 70 3e 54 68 65 20 ata.</p>.<p>The
cb40: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
cb50: 6c 65 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f le">tls::debug</
cb60: 62 3e 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76 b> variable prov
cb70: 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69 ides some additi
cb80: 6f 6e 61 6c 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 onal control ove
cb90: 72 20 74 68 65 0a 64 65 62 75 67 20 6c 6f 67 67 r the.debug logg
cba0: 69 6e 67 20 69 6e 20 74 68 65 20 3c 62 20 63 6c ing in the <b cl
cbb0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 ass="cmd">tls::c
cbc0: 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 allback</b>, <b
cbd0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
cbe0: 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 :password</b>, a
cbf0: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 nd.<b class="cmd
cc00: 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f ">tls::validate_
cc10: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 64 65 66 61 command</b> defa
cc20: 75 6c 74 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 ult handlers in
cc30: 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 "<b class="
cc40: 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c 2f 62 file">tls.tcl</b
cc50: 3e 26 71 75 6f 74 3b 2e 0a 54 68 65 20 64 65 66 >"..The def
cc60: 61 75 6c 74 20 76 61 6c 75 65 20 69 73 20 30 20 ault value is 0
cc70: 77 69 74 68 20 68 69 67 68 65 72 20 76 61 6c 75 with higher valu
cc80: 65 73 20 70 72 6f 64 75 63 69 6e 67 20 6d 6f 72 es producing mor
cc90: 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 e diagnostic out
cca0: 70 75 74 2c 0a 61 6e 64 20 77 69 6c 6c 20 61 6c put,.and will al
ccb0: 73 6f 20 66 6f 72 63 65 20 74 68 65 20 76 65 72 so force the ver
ccc0: 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c 62 ify method in <b
ccd0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
cce0: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 74 ::callback</b> t
ccf0: 6f 20 61 63 63 65 70 74 20 74 68 65 0a 63 65 72 o accept the.cer
cd00: 74 69 66 69 63 61 74 65 2c 20 65 76 65 6e 20 69 tificate, even i
cd10: 66 20 69 74 20 69 73 20 69 6e 76 61 6c 69 64 20 f it is invalid
cd20: 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 when the <b clas
cd30: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 s="option">-vali
cd40: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a datecommand</b>.
cd50: 6f 70 74 69 6f 6e 20 69 73 20 73 65 74 20 74 6f option is set to
cd60: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e <b class="cmd">
cd70: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f tls::validate_co
cd80: 6d 6d 61 6e 64 3c 2f 62 3e 2e 3c 2f 70 3e 0a 3c mmand</b>.</p>.<
cd90: 70 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 p><em>The use of
cda0: 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c 62 the variable <b
cdb0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
cdc0: 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 62 3e ">tls::debug</b>
cdd0: 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e is not recommen
cde0: 64 65 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 ded..It may be r
cdf0: 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 emoved from futu
ce00: 72 65 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d re releases.</em
ce10: 3e 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 ></p>.</div>.<di
ce20: 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 36 22 20 v id="section6"
ce30: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
ce40: 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 section"><h2><a
ce50: 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 36 22 3e name="section6">
ce60: 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 68 32 Examples</a></h2
ce70: 3e 0a 3c 70 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 >.<p>The followi
ce80: 6e 67 20 61 72 65 20 65 78 61 6d 70 6c 65 20 73 ng are example s
ce90: 63 72 69 70 74 73 20 74 6f 20 64 6f 77 6e 6c 6f cripts to downlo
cea0: 61 64 20 61 20 77 65 62 70 61 67 65 20 61 6e 64 ad a webpage and
ceb0: 20 66 69 6c 65 20 75 73 69 6e 67 20 74 68 65 0a file using the.
cec0: 68 74 74 70 20 70 61 63 6b 61 67 65 2e 20 53 65 http package. Se
ced0: 65 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 e <span class="s
cee0: 65 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d ectref"><a href=
cef0: 22 23 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 "#section3">Cert
cf00: 69 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 ificate Validati
cf10: 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f on</a></span> fo
cf20: 72 20 77 68 65 6e 20 74 68 65 0a 3c 62 20 63 6c r when the.<b cl
cf30: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
cf40: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 dir</b>, <b clas
cf50: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 s="option">-cafi
cf60: 6c 65 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 le</b>, and <b c
cf70: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
cf80: 61 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f astore</b> optio
cf90: 6e 73 20 61 72 65 20 61 6c 73 6f 0a 6e 65 65 64 ns are also.need
cfa0: 65 64 2e 20 53 65 65 20 74 68 65 20 26 71 75 6f ed. See the &quo
cfb0: 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 6c 65 t;<b class="file
cfc0: 22 3e 64 65 6d 6f 73 3c 2f 62 3e 26 71 75 6f 74 ">demos</b>"
cfd0: 3b 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 ; directory for
cfe0: 6d 6f 72 65 20 65 78 61 6d 70 6c 65 20 73 63 72 more example scr
cff0: 69 70 74 73 2e 3c 2f 70 3e 0a 3c 70 3e 45 78 61 ipts.</p>.<p>Exa
d000: 6d 70 6c 65 20 23 31 3a 20 44 6f 77 6e 6c 6f 61 mple #1: Downloa
d010: 64 20 61 20 77 65 62 20 70 61 67 65 3c 2f 70 3e d a web page</p>
d020: 0a 3c 70 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 .<pre class="doc
d030: 74 6f 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a tools_example">.
d040: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 package require
d050: 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 http.package req
d060: 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c uire tls.set url
d070: 20 26 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 "https://w
d080: 77 77 2e 74 63 6c 2e 74 6b 2f 26 71 75 6f 74 3b ww.tcl.tk/"
d090: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 .http::register
d0a0: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 https 443 [list
d0b0: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 ::tls::socket -a
d0c0: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 utoservername 1
d0d0: 2d 72 65 71 75 69 72 65 20 31 5d 0a 23 20 47 65 -require 1].# Ge
d0e0: 74 20 55 52 4c 0a 73 65 74 20 74 6f 6b 65 6e 20 t URL.set token
d0f0: 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 [http::geturl $u
d100: 72 6c 5d 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 rl].# Check for
d110: 65 72 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a error.if {[http:
d120: 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 :status $token]
d130: 6e 65 20 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 ne "ok"
d140: 3b 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 ;} {. puts [f
d150: 6f 72 6d 61 74 20 26 71 75 6f 74 3b 45 72 72 6f ormat "Erro
d160: 72 20 25 73 26 71 75 6f 74 3b 20 5b 68 74 74 70 r %s" [http
d170: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d ::status $token]
d180: 5d 0a 7d 0a 23 20 53 61 76 65 20 77 65 62 20 70 ].}.# Save web p
d190: 61 67 65 20 74 6f 20 66 69 6c 65 0a 73 65 74 20 age to file.set
d1a0: 63 68 20 5b 6f 70 65 6e 20 65 78 61 6d 70 6c 65 ch [open example
d1b0: 2e 68 74 6d 6c 20 77 62 5d 0a 70 75 74 73 20 24 .html wb].puts $
d1c0: 63 68 20 5b 68 74 74 70 3a 3a 64 61 74 61 20 24 ch [http::data $
d1d0: 74 6f 6b 65 6e 5d 0a 63 6c 6f 73 65 20 24 63 68 token].close $ch
d1e0: 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 .# Cleanup.::htt
d1f0: 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 p::cleanup $toke
d200: 6e 0a 3c 2f 70 72 65 3e 0a 3c 70 3e 45 78 61 6d n.</pre>.<p>Exam
d210: 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 ple #2: Download
d220: 20 61 20 66 69 6c 65 3c 2f 70 3e 0a 3c 70 72 65 a file</p>.<pre
d230: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
d240: 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 63 6b 61 _example">.packa
d250: 67 65 20 72 65 71 75 69 72 65 20 68 74 74 70 0a ge require http.
d260: 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 package require
d270: 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 71 75 6f tls.set url &quo
d280: 74 3b 68 74 74 70 73 3a 2f 2f 77 69 6b 69 2e 74 t;https://wiki.t
d290: 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 73 69 74 65 cl-lang.org/site
d2a0: 6d 61 70 2e 78 6d 6c 26 71 75 6f 74 3b 0a 68 74 map.xml".ht
d2b0: 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 tp::register htt
d2c0: 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 ps 443 [list ::t
d2d0: 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f ls::socket -auto
d2e0: 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 servername 1 -re
d2f0: 71 75 69 72 65 20 31 5d 0a 23 20 4f 70 65 6e 20 quire 1].# Open
d300: 6f 75 74 70 75 74 20 66 69 6c 65 0a 73 65 74 20 output file.set
d310: 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 20 74 filename [file t
d320: 61 69 6c 20 24 75 72 6c 5d 0a 73 65 74 20 63 68 ail $url].set ch
d330: 20 5b 6f 70 65 6e 20 24 66 69 6c 65 6e 61 6d 65 [open $filename
d340: 20 77 62 5d 0a 23 20 47 65 74 20 66 69 6c 65 0a wb].# Get file.
d350: 73 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 74 74 set token [::htt
d360: 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 20 2d p::geturl $url -
d370: 62 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33 36 20 blocksize 65536
d380: 2d 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 23 20 -channel $ch].#
d390: 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f 72 0a Check for error.
d3a0: 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 if {[http::statu
d3b0: 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 s $token] ne &qu
d3c0: 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 ot;ok"} {.
d3d0: 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 puts [format
d3e0: 26 71 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71 "Error %s&q
d3f0: 75 6f 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74 uot; [http::stat
d400: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 us $token]].}.#
d410: 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 Cleanup.close $c
d420: 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 h.::http::cleanu
d430: 70 20 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a p $token.</pre>.
d440: 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 </div>.<div id="
d450: 73 65 63 74 69 6f 6e 37 22 20 63 6c 61 73 73 3d section7" class=
d460: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
d470: 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h2><a name="
d480: 73 65 63 74 69 6f 6e 37 22 3e 53 70 65 63 69 61 section7">Specia
d490: 6c 20 43 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 l Considerations
d4a0: 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 </a></h2>.<p>The
d4b0: 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 capabilities of
d4c0: 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 this package ca
d4d0: 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c n vary enormousl
d4e0: 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 y based upon how
d4f0: 20 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f the.linked to O
d500: 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 penSSL library w
d510: 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e as configured an
d520: 64 20 62 75 69 6c 74 2e 20 4e 65 77 20 76 65 72 d built. New ver
d530: 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 sions may obsole
d540: 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f te.older protoco
d550: 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 l versions, add
d560: 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 72 or remove cipher
d570: 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 6c s, change defaul
d580: 74 20 76 61 6c 75 65 73 2c 20 65 74 63 2e 0a 55 t values, etc..U
d590: 73 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d se the <b class=
d5a0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f "cmd">tls::proto
d5b0: 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 cols</b> command
d5c0: 73 20 74 6f 20 6f 62 74 61 69 6e 20 74 68 65 20 s to obtain the
d5d0: 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 supported.protoc
d5e0: 6f 6c 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e ol versions.</p>
d5f0: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d .</div>.<div id=
d600: 22 73 65 65 2d 61 6c 73 6f 22 20 63 6c 61 73 73 "see-also" class
d610: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 ="doctools_secti
d620: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d on"><h2><a name=
d630: 22 73 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 "see-also">See A
d640: 6c 73 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e lso</a></h2>.<p>
d650: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f <a href="https:/
d660: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 /www.openssl.org
d670: 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 /">OpenSSL</a>,
d680: 68 74 74 70 2c 20 73 6f 63 6b 65 74 3c 2f 70 3e http, socket</p>
d690: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d .</div>.<div id=
d6a0: 22 6b 65 79 77 6f 72 64 73 22 20 63 6c 61 73 73 "keywords" class
d6b0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 ="doctools_secti
d6c0: 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d on"><h2><a name=
d6d0: 22 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77 6f "keywords">Keywo
d6e0: 72 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e rds</a></h2>.<p>
d6f0: 49 2f 4f 2c 20 49 50 20 41 64 64 72 65 73 73 2c I/O, IP Address,
d700: 20 4f 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 OpenSSL, SSL, T
d710: 43 50 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53 2c CP, TLS, TclTLS,
d720: 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49 2f asynchronous I/
d730: 4f 2c 20 62 69 6e 64 2c 20 63 65 72 74 69 66 69 O, bind, certifi
d740: 63 61 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 cate, channel, c
d750: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 onnection, domai
d760: 6e 20 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68 74 n name, host, ht
d770: 74 70 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 tps, network, ne
d780: 74 77 6f 72 6b 20 61 64 64 72 65 73 73 2c 20 73 twork address, s
d790: 6f 63 6b 65 74 2c 20 74 6c 73 3c 2f 70 3e 0a 3c ocket, tls</p>.<
d7a0: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63 /div>.<div id="c
d7b0: 61 74 65 67 6f 72 79 22 20 63 6c 61 73 73 3d 22 ategory" class="
d7c0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
d7d0: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 "><h2><a name="c
d7e0: 61 74 65 67 6f 72 79 22 3e 43 61 74 65 67 6f 72 ategory">Categor
d7f0: 79 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 74 6c y</a></h2>.<p>tl
d800: 73 3c 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 s</p>.</div>.<di
d810: 76 20 69 64 3d 22 63 6f 70 79 72 69 67 68 74 22 v id="copyright"
d820: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
d830: 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 _section"><h2><a
d840: 20 6e 61 6d 65 3d 22 63 6f 70 79 72 69 67 68 74 name="copyright
d850: 22 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c ">Copyright</a><
d860: 2f 68 32 3e 0a 3c 70 3e 43 6f 70 79 72 69 67 68 /h2>.<p>Copyrigh
d870: 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 t © 1999 Ma
d880: 74 74 20 4e 65 77 6d 61 6e 3c 62 72 3e 0a 43 6f tt Newman<br>.Co
d890: 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 pyright © 2
d8a0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73 004 Starfish Sys
d8b0: 74 65 6d 73 3c 62 72 3e 0a 43 6f 70 79 72 69 67 tems<br>.Copyrig
d8c0: 68 74 20 26 63 6f 70 79 3b 20 32 30 32 34 20 42 ht © 2024 B
d8d0: 72 69 61 6e 20 4f 27 48 61 67 61 6e 3c 2f 70 3e rian O'Hagan</p>
d8e0: 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 3c 2f .</div>.</div></
d8f0: 62 6f 64 79 3e 3c 2f 68 74 6d 6c 3e 0a body></html>.