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 48 54 54 50 20 50 61 63 6b 61 ion6">HTTP Packa
0e40: 67 65 20 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c ge Examples</a><
0e50: 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d 22 /li>.<li class="
0e60: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
0e70: 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 "><a href="#sect
0e80: 69 6f 6e 37 22 3e 53 70 65 63 69 61 6c 20 43 6f ion7">Special Co
0e90: 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c 2f 61 3e nsiderations</a>
0ea0: 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 73 73 3d </li>.<li class=
0eb0: 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f "doctools_sectio
0ec0: 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 65 n"><a href="#see
0ed0: 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73 6f 3c -also">See Also<
0ee0: 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 63 6c 61 /a></li>.<li cla
0ef0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 ss="doctools_sec
0f00: 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 3d 22 23 tion"><a href="#
0f10: 6b 65 79 77 6f 72 64 73 22 3e 4b 65 79 77 6f 72 keywords">Keywor
0f20: 64 73 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 20 ds</a></li>.<li
0f30: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
0f40: 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 72 65 66 section"><a href
0f50: 3d 22 23 63 61 74 65 67 6f 72 79 22 3e 43 61 74 ="#category">Cat
0f60: 65 67 6f 72 79 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c egory</a></li>.<
0f70: 6c 69 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f li class="doctoo
0f80: 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 61 20 68 ls_section"><a h
0f90: 72 65 66 3d 22 23 63 6f 70 79 72 69 67 68 74 22 ref="#copyright"
0fa0: 3e 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c 2f >Copyright</a></
0fb0: 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e li>.</ul>.</div>
0fc0: 0a 3c 64 69 76 20 69 64 3d 22 73 79 6e 6f 70 73 .<div id="synops
0fd0: 69 73 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f is" class="docto
0fe0: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 ols_section"><h2
0ff0: 3e 3c 61 20 6e 61 6d 65 3d 22 73 79 6e 6f 70 73 ><a name="synops
1000: 69 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f 61 3e is">Synopsis</a>
1010: 3c 2f 68 32 3e 0a 3c 64 69 76 20 63 6c 61 73 73 </h2>.<div class
1020: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 79 6e 6f 70 ="doctools_synop
1030: 73 69 73 22 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d sis">.<ul class=
1040: 22 64 6f 63 74 6f 6f 6c 73 5f 72 65 71 75 69 72 "doctools_requir
1050: 65 6d 65 6e 74 73 22 3e 0a 3c 6c 69 3e 70 61 63 ements">.<li>pac
1060: 6b 61 67 65 20 72 65 71 75 69 72 65 20 3c 62 20 kage require <b
1070: 63 6c 61 73 73 3d 22 70 6b 67 6e 61 6d 65 22 3e class="pkgname">
1080: 54 63 6c 20 38 2e 35 2d 3c 2f 62 3e 3c 2f 6c 69 Tcl 8.5-</b></li
1090: 3e 0a 3c 6c 69 3e 70 61 63 6b 61 67 65 20 72 65 >.<li>package re
10a0: 71 75 69 72 65 20 3c 62 20 63 6c 61 73 73 3d 22 quire <b class="
10b0: 70 6b 67 6e 61 6d 65 22 3e 74 6c 73 20 32 2e 30 pkgname">tls 2.0
10c0: 62 31 3c 2f 62 3e 3c 2f 6c 69 3e 0a 3c 2f 75 6c b1</b></li>.</ul
10d0: 3e 0a 3c 75 6c 20 63 6c 61 73 73 3d 22 64 6f 63 >.<ul class="doc
10e0: 74 6f 6f 6c 73 5f 73 79 6e 74 61 78 22 3e 0a 3c tools_syntax">.<
10f0: 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 31 22 3e li><a href="#1">
1100: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
1110: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 ls::init</b> <sp
1120: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
1130: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d <i class="arg">-
1140: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 option</i>?</spa
1150: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 n> <span class="
1160: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 opt">?<i class="
1170: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c arg">value</i>?<
1180: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
1190: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
11a0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
11b0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c value ...</i>?<
11c0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a /span></a></li>.
11d0: 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 32 22 <li><a href="#2"
11e0: 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e ><b class="cmd">
11f0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 tls::socket</b>
1200: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 <span class="opt
1210: 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 ">?<i class="arg
1220: 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f ">-option</i>?</
1230: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
1240: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
1250: 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 s="arg">value</i
1260: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 >?</span> <span
1270: 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 class="opt">?<i
1280: 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 class="arg">-opt
1290: 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 ion value ...</i
12a0: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 >?</span> <i cla
12b0: 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f 69 ss="arg">host</i
12c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
12d0: 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c >port</i></a></l
12e0: 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 i>.<li><a href="
12f0: 23 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d #3"><b class="cm
1300: 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f d">tls::socket</
1310: 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 b> <b class="opt
1320: 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e ion">-server</b>
1330: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
1340: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 61 command</i> <spa
1350: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
1360: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
1370: 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e ption</i>?</span
1380: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1390: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
13a0: 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c 2f rg">value</i>?</
13b0: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
13c0: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
13d0: 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e 20 s="arg">-option
13e0: 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f value ...</i>?</
13f0: 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 span> <i class="
1400: 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 arg">port</i></a
1410: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 ></li>.<li><a hr
1420: 65 66 3d 22 23 34 22 3e 3c 62 20 63 6c 61 73 73 ef="#4"><b class
1430: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f ="cmd">tls::impo
1440: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d rt</b> <i class=
1450: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
1460: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1470: 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 pt">?<i class="a
1480: 72 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f rg">-option</i>?
1490: 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c </span> <span cl
14a0: 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c ass="opt">?<i cl
14b0: 61 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c ass="arg">value<
14c0: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
14d0: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
14e0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f i class="arg">-o
14f0: 70 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c ption value ...<
1500: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c /i>?</span></a><
1510: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 /li>.<li><a href
1520: 3d 22 23 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22 ="#5"><b class="
1530: 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f cmd">tls::unimpo
1540: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d rt</b> <i class=
1550: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
1560: 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c ></a></li>.<li><
1570: 61 20 68 72 65 66 3d 22 23 36 22 3e 3c 62 20 63 a href="#6"><b c
1580: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
1590: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 handshake</b> <i
15a0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 class="arg">cha
15b0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 nnel</i></a></li
15c0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 >.<li><a href="#
15d0: 37 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 7"><b class="cmd
15e0: 22 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 ">tls::status</b
15f0: 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f > <span class="o
1600: 70 74 22 3e 3f 3c 62 20 63 6c 61 73 73 3d 22 6f pt">?<b class="o
1610: 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 6c 3c 2f 62 ption">-local</b
1620: 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 >?</span> <i cla
1630: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c ss="arg">channel
1640: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 6c </i></a></li>.<l
1650: 69 3e 3c 61 20 68 72 65 66 3d 22 23 38 22 3e 3c i><a href="#8"><
1660: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
1670: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 s::connection</b
1680: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
1690: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
16a0: 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 </li>.<li><a hre
16b0: 66 3d 22 23 39 22 3e 3c 62 20 63 6c 61 73 73 3d f="#9"><b class=
16c0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 69 70 68 65 "cmd">tls::ciphe
16d0: 72 73 3c 2f 62 3e 20 3c 73 70 61 6e 20 63 6c 61 rs</b> <span cla
16e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
16f0: 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f ss="arg">protoco
1700: 6c 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 l</i>?</span> <s
1710: 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e pan class="opt">
1720: 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e ?<i class="arg">
1730: 76 65 72 62 6f 73 65 3c 2f 69 3e 3f 3c 2f 73 70 verbose</i>?</sp
1740: 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d an> <span class=
1750: 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d "opt">?<i class=
1760: 22 61 72 67 22 3e 73 75 70 70 6f 72 74 65 64 3c "arg">supported<
1770: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 3c 2f 61 3e 3c /i>?</span></a><
1780: 2f 6c 69 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 /li>.<li><a href
1790: 3d 22 23 31 30 22 3e 3c 62 20 63 6c 61 73 73 3d ="#10"><b class=
17a0: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f "cmd">tls::proto
17b0: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 cols</b></a></li
17c0: 3e 0a 3c 6c 69 3e 3c 61 20 68 72 65 66 3d 22 23 >.<li><a href="#
17d0: 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 11"><b class="cm
17e0: 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c d">tls::version<
17f0: 2f 62 3e 3c 2f 61 3e 3c 2f 6c 69 3e 0a 3c 2f 75 /b></a></li>.</u
1800: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e l>.</div>.</div>
1810: 0a 3c 64 69 76 20 69 64 3d 22 73 65 63 74 69 6f .<div id="sectio
1820: 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f n1" class="docto
1830: 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 ols_section"><h2
1840: 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f ><a name="sectio
1850: 6e 31 22 3e 44 65 73 63 72 69 70 74 69 6f 6e 3c n1">Description<
1860: 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 69 73 /a></h2>.<p>This
1870: 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 extension provi
1880: 64 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 des TCL script a
1890: 63 63 65 73 73 20 74 6f 20 73 65 63 75 72 65 20 ccess to secure
18a0: 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61 socket communica
18b0: 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20 tions.using the
18c0: 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 Transport Layer
18d0: 53 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 Security (TLS) p
18e0: 72 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 rotocol. It prov
18f0: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 0a 62 ides a generic.b
1900: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 inding to <a hre
1910: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f f="https://www.o
1920: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 penssl.org/">Ope
1930: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a nSSL</a>, utiliz
1940: 69 6e 67 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 ing the.<b class
1950: 3d 22 73 79 73 63 6d 64 22 3e 54 63 6c 5f 53 74 ="syscmd">Tcl_St
1960: 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 62 3e 20 41 ackChannel</b> A
1970: 50 49 20 69 6e 20 54 43 4c 20 38 2e 34 20 61 6e PI in TCL 8.4 an
1980: 64 20 68 69 67 68 65 72 2e 0a 54 68 65 73 65 20 d higher..These
1990: 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 sockets behave e
19a0: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20 xactly the same
19b0: 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 as channels crea
19c0: 74 65 64 20 75 73 69 6e 67 20 74 68 65 20 62 75 ted using the bu
19d0: 69 6c 74 2d 69 6e 0a 3c 62 20 63 6c 61 73 73 3d ilt-in.<b class=
19e0: 22 73 79 73 63 6d 64 22 3e 73 6f 63 6b 65 74 3c "syscmd">socket<
19f0: 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c 20 61 6c 6f /b> command, alo
1a00: 6e 67 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e ng with addition
1a10: 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 al options for c
1a20: 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 68 65 20 53 ontrolling.the S
1a30: 53 4c 2f 54 4c 53 20 73 65 73 73 69 6f 6e 2e 3c SL/TLS session.<
1a40: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 /p>.</div>.<div
1a50: 69 64 3d 22 73 65 63 74 69 6f 6e 32 22 20 63 6c id="section2" cl
1a60: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 ass="doctools_se
1a70: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 ction"><h2><a na
1a80: 6d 65 3d 22 73 65 63 74 69 6f 6e 32 22 3e 43 6f me="section2">Co
1a90: 6d 6d 61 6e 64 73 3c 2f 61 3e 3c 2f 68 32 3e 0a mmands</a></h2>.
1aa0: 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 <p>Typically one
1ab0: 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c would use the <
1ac0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
1ad0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 63 6f s::socket</b> co
1ae0: 6d 6d 61 6e 64 20 74 6f 20 63 72 65 61 74 65 20 mmand to create
1af0: 61 20 6e 65 77 20 65 6e 63 72 79 70 74 65 64 0a a new encrypted.
1b00: 54 43 50 20 73 6f 63 6b 65 74 2e 20 49 74 20 69 TCP socket. It i
1b10: 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 s compatible wit
1b20: 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 43 4c h the native TCL
1b30: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d <b class="syscm
1b40: 64 22 3e 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 d">::socket</b>
1b50: 63 6f 6d 6d 61 6e 64 2e 0a 41 6c 74 65 72 6e 61 command..Alterna
1b60: 74 69 76 65 6c 79 20 66 6f 72 20 61 6e 20 65 78 tively for an ex
1b70: 69 73 74 69 6e 67 20 54 43 50 20 73 6f 63 6b 65 isting TCP socke
1b80: 74 2c 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d t, the <b class=
1b90: 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f 72 "cmd">tls::impor
1ba0: 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 63 61 t</b> command ca
1bb0: 6e 20 62 65 0a 75 73 65 64 20 74 6f 20 73 74 61 n be.used to sta
1bc0: 72 74 20 54 4c 53 20 6f 6e 20 74 68 65 20 63 6f rt TLS on the co
1bd0: 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 0a 3c 64 nnection.</p>.<d
1be0: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
1bf0: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a s_definitions">.
1c00: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 31 22 3e <dt><a name="1">
1c10: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
1c20: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 73 70 ls::init</b> <sp
1c30: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
1c40: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d <i class="arg">-
1c50: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 option</i>?</spa
1c60: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 n> <span class="
1c70: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 opt">?<i class="
1c80: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c arg">value</i>?<
1c90: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
1ca0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
1cb0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
1cc0: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c value ...</i>?<
1cd0: 2f 73 70 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a /span></a></dt>.
1ce0: 3c 64 64 3e 3c 70 3e 4f 70 74 69 6f 6e 61 6c 20 <dd><p>Optional
1cf0: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 function to set
1d00: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 the default opti
1d10: 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 62 20 63 ons used by <b c
1d20: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
1d30: 73 6f 63 6b 65 74 3c 2f 62 3e 2e 20 49 66 20 79 socket</b>. If y
1d40: 6f 75 0a 63 61 6c 6c 20 3c 62 20 63 6c 61 73 73 ou.call <b class
1d50: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 6d 70 6f ="cmd">tls::impo
1d60: 72 74 3c 2f 62 3e 20 64 69 72 65 63 74 6c 79 2c rt</b> directly,
1d70: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 this command ha
1d80: 73 20 6e 6f 20 65 66 66 65 63 74 2e 20 54 68 69 s no effect. Thi
1d90: 73 20 63 6f 6d 6d 61 6e 64 0a 73 75 70 70 6f 72 s command.suppor
1da0: 74 73 20 61 6c 6c 20 6f 66 20 74 68 65 20 73 61 ts all of the sa
1db0: 6d 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 me options as th
1dc0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 e <b class="cmd"
1dd0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
1de0: 20 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 command, though
1df0: 20 79 6f 75 0a 73 68 6f 75 6c 64 20 6c 69 6d 69 you.should limi
1e00: 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 t your options t
1e10: 6f 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 o only TLS relat
1e20: 65 64 20 6f 6e 65 73 2e 3c 2f 70 3e 3c 2f 64 64 ed ones.</p></dd
1e30: 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 32 >.<dt><a name="2
1e40: 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 "><b class="cmd"
1e50: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
1e60: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
1e70: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
1e80: 67 22 3e 2d 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c g">-option</i>?<
1e90: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
1ea0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
1eb0: 73 73 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f ss="arg">value</
1ec0: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 6e i>?</span> <span
1ed0: 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 class="opt">?<i
1ee0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 6f 70 class="arg">-op
1ef0: 74 69 6f 6e 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f tion value ...</
1f00: 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 69 20 63 6c i>?</span> <i cl
1f10: 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 74 3c 2f ass="arg">host</
1f20: 69 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 i> <i class="arg
1f30: 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 2f ">port</i></a></
1f40: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 dt>.<dd><p>This
1f50: 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 is a helper func
1f60: 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a tion that utiliz
1f70: 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e es the underlyin
1f80: 67 20 63 6f 6d 6d 61 6e 64 73 20 3c 62 20 63 6c g commands <b cl
1f90: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 ass="syscmd">soc
1fa0: 6b 65 74 3c 2f 62 3e 0a 61 6e 64 20 3c 62 20 63 ket</b>.and <b c
1fb0: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
1fc0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 74 6f 20 63 72 import</b> to cr
1fd0: 65 61 74 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 eate the connect
1fe0: 69 6f 6e 2e 20 49 74 20 62 65 68 61 76 65 73 20 ion. It behaves
1ff0: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 0a the same as the.
2000: 6e 61 74 69 76 65 20 54 43 4c 20 3c 62 20 63 6c native TCL <b cl
2010: 61 73 73 3d 22 73 79 73 63 6d 64 22 3e 73 6f 63 ass="syscmd">soc
2020: 6b 65 74 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2c ket</b> command,
2030: 20 62 75 74 20 61 6c 73 6f 20 73 75 70 70 6f 72 but also suppor
2040: 74 73 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d ts the <b class=
2050: 22 63 6d 64 22 3e 74 6c 73 3a 69 6d 70 6f 72 74 "cmd">tls:import
2060: 3c 2f 62 3e 0a 63 6f 6d 6d 61 6e 64 20 6f 70 74 </b>.command opt
2070: 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64 ions with one ad
2080: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 2e ditional option.
2090: 20 49 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 It returns the
20a0: 63 68 61 6e 6e 65 6c 20 68 61 6e 64 6c 65 20 69 channel handle i
20b0: 64 0a 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f d.for the new so
20c0: 63 6b 65 74 2e 3c 2f 70 3e 0a 3c 64 6c 20 63 6c cket.</p>.<dl cl
20d0: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 6f 70 ass="doctools_op
20e0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 tions">.<dt><b c
20f0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 61 lass="option">-a
2100: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 utoservername</b
2110: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
2120: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
2130: 64 64 3e 3c 70 3e 49 66 20 3c 62 20 63 6c 61 73 dd><p>If <b clas
2140: 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f s="const">true</
2150: 62 3e 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c b>, automaticall
2160: 79 20 73 65 74 20 74 68 65 20 3c 62 20 63 6c 61 y set the <b cla
2170: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 72 ss="option">-ser
2180: 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 61 72 67 75 vername</b> argu
2190: 6d 65 6e 74 20 74 6f 20 74 68 65 0a 3c 65 6d 3e ment to the.<em>
21a0: 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 host</em> argume
21b0: 6e 74 2e 20 50 72 69 6f 72 20 74 6f 20 54 63 6c nt. Prior to Tcl
21c0: 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 64 65 66 TLS 2.0, the def
21d0: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 ault is <b class
21e0: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f ="const">false</
21f0: 62 3e 2e 0a 53 74 61 72 74 69 6e 67 20 69 6e 20 b>..Starting in
2200: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 65 20 TclTLS 2.0, the
2210: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c default is <b cl
2220: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 ass="const">true
2230: 3c 2f 62 3e 20 75 6e 6c 65 73 73 20 3c 62 20 63 </b> unless <b c
2240: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 lass="option">-s
2250: 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 0a 69 73 ervername</b>.is
2260: 20 61 6c 73 6f 20 73 70 65 63 69 66 69 65 64 2e also specified.
2270: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 3c </p></dd>.</dl><
2280: 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 /dd>.<dt><a name
2290: 3d 22 33 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 ="3"><b class="c
22a0: 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c md">tls::socket<
22b0: 2f 62 3e 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 /b> <b class="op
22c0: 74 69 6f 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 tion">-server</b
22d0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
22e0: 3e 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 3c 73 70 >command</i> <sp
22f0: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
2300: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d <i class="arg">-
2310: 6f 70 74 69 6f 6e 3c 2f 69 3e 3f 3c 2f 73 70 61 option</i>?</spa
2320: 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 n> <span class="
2330: 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 opt">?<i class="
2340: 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e 3f 3c arg">value</i>?<
2350: 2f 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 /span> <span cla
2360: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
2370: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
2380: 20 76 61 6c 75 65 20 2e 2e 2e 3c 2f 69 3e 3f 3c value ...</i>?<
2390: 2f 73 70 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d /span> <i class=
23a0: 22 61 72 67 22 3e 70 6f 72 74 3c 2f 69 3e 3c 2f "arg">port</i></
23b0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 a></dt>.<dd><p>S
23c0: 61 6d 65 20 61 73 20 70 72 65 76 69 6f 75 73 2c ame as previous,
23d0: 20 62 75 74 20 69 6e 73 74 65 61 64 20 63 72 65 but instead cre
23e0: 61 74 65 73 20 61 20 73 65 72 76 65 72 20 73 6f ates a server so
23f0: 63 6b 65 74 20 66 6f 72 20 63 6c 69 65 6e 74 73 cket for clients
2400: 20 74 6f 20 63 6f 6e 6e 65 63 74 20 74 6f 0a 6a to connect to.j
2410: 75 73 74 20 6c 69 6b 65 20 74 68 65 20 54 63 6c ust like the Tcl
2420: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d <b class="syscm
2430: 64 22 3e 73 6f 63 6b 65 74 20 2d 73 65 72 76 65 d">socket -serve
2440: 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 2e 20 49 r</b> command. I
2450: 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 68 t returns the ch
2460: 61 6e 6e 65 6c 0a 68 61 6e 64 6c 65 20 69 64 20 annel.handle id
2470: 66 6f 72 20 74 68 65 20 6e 65 77 20 73 6f 63 6b for the new sock
2480: 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 et.</p></dd>.<dt
2490: 3e 3c 61 20 6e 61 6d 65 3d 22 34 22 3e 3c 62 20 ><a name="4"><b
24a0: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
24b0: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 20 63 :import</b> <i c
24c0: 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e lass="arg">chann
24d0: 65 6c 3c 2f 69 3e 20 3c 73 70 61 6e 20 63 6c 61 el</i> <span cla
24e0: 73 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 ss="opt">?<i cla
24f0: 73 73 3d 22 61 72 67 22 3e 2d 6f 70 74 69 6f 6e ss="arg">-option
2500: 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 </i>?</span> <sp
2510: 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f an class="opt">?
2520: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 <i class="arg">v
2530: 61 6c 75 65 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e alue</i>?</span>
2540: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 <span class="op
2550: 74 22 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 t">?<i class="ar
2560: 67 22 3e 2d 6f 70 74 69 6f 6e 20 76 61 6c 75 65 g">-option value
2570: 20 2e 2e 2e 3c 2f 69 3e 3f 3c 2f 73 70 61 6e 3e ...</i>?</span>
2580: 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </a></dt>.<dd><p
2590: 3e 53 74 61 72 74 20 54 4c 53 20 65 6e 63 72 79 >Start TLS encry
25a0: 70 74 69 6f 6e 20 6f 6e 20 54 43 4c 20 63 68 61 ption on TCL cha
25b0: 6e 6e 65 6c 20 3c 69 20 63 6c 61 73 73 3d 22 61 nnel <i class="a
25c0: 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 20 rg">channel</i>
25d0: 76 69 61 20 61 20 73 74 61 63 6b 65 64 20 63 68 via a stacked ch
25e0: 61 6e 6e 65 6c 2e 20 49 74 0a 6e 65 65 64 20 6e annel. It.need n
25f0: 6f 74 20 62 65 20 61 20 73 6f 63 6b 65 74 2c 20 ot be a socket,
2600: 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 but must provide
2610: 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 bi-directional
2620: 66 6c 6f 77 2e 20 41 6c 73 6f 20 73 65 74 73 20 flow. Also sets
2630: 73 65 73 73 69 6f 6e 0a 70 61 72 61 6d 65 74 65 session.paramete
2640: 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 rs for SSL hands
2650: 68 61 6b 65 2e 20 56 61 6c 69 64 20 6f 70 74 69 hake. Valid opti
2660: 6f 6e 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c ons are:</p>.<dl
2670: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
2680: 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c _options">.<dt><
2690: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
26a0: 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 3c 69 20 63 6c >-alpn</b> <i cl
26b0: 61 73 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f ass="arg">list</
26c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c i></dt>.<dd><p>L
26d0: 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 ist of protocols
26e0: 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69 6e 67 to offer during
26f0: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
2700: 65 72 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f er Protocol Nego
2710: 74 69 61 74 69 6f 6e 0a 28 41 4c 50 4e 29 2e 20 tiation.(ALPN).
2720: 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 62 20 For example: <b
2730: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 68 32 class="const">h2
2740: 3c 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 </b> and <b clas
2750: 73 3d 22 63 6f 6e 73 74 22 3e 68 74 74 70 2f 31 s="const">http/1
2760: 2e 31 3c 2f 62 3e 2c 20 62 75 74 20 6e 6f 74 20 .1</b>, but not
2770: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
2780: 3e 68 33 3c 2f 62 3e 20 6f 72 0a 3c 62 20 63 6c >h3</b> or.<b cl
2790: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 71 75 69 63 ass="const">quic
27a0: 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c </b>.</p></dd>.<
27b0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
27c0: 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 ion">-cadir</b>
27d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 <i class="arg">d
27e0: 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c 2f 64 74 irectory</i></dt
27f0: 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 >.<dd><p>Specifi
2800: 65 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 es the directory
2810: 20 77 68 65 72 65 20 74 68 65 20 43 65 72 74 69 where the Certi
2820: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 ficate Authority
2830: 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 (CA) certificat
2840: 65 73 20 61 72 65 0a 73 74 6f 72 65 64 2e 20 54 es are.stored. T
2850: 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c he default is pl
2860: 61 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 atform specific
2870: 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 and can be set a
2880: 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 t compile time.
2890: 54 68 65 0a 64 65 66 61 75 6c 74 20 6c 6f 63 61 The.default loca
28a0: 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76 65 72 tion can be over
28b0: 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c 62 ridden by the <b
28c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
28d0: 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f ">SSL_CERT_DIR</
28e0: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 76 b> environment.v
28f0: 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c 73 70 ariable. See <sp
2900: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 an class="sectre
2910: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 f"><a href="#sec
2920: 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 tion3">Certifica
2930: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 te Validation</a
2940: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 ></span> for mor
2950: 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f e details.</p></
2960: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
2970: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c ="option">-cafil
2980: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
2990: 61 72 67 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 arg">filename</i
29a0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 ></dt>.<dd><p>Sp
29b0: 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 ecifies the file
29c0: 20 77 69 74 68 20 74 68 65 20 43 65 72 74 69 66 with the Certif
29d0: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 icate Authority
29e0: 28 43 41 29 20 63 65 72 74 69 66 69 63 61 74 65 (CA) certificate
29f0: 73 20 74 6f 20 75 73 65 20 69 6e 0a 3c 62 20 63 s to use in.<b c
2a00: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 50 45 4d lass="const">PEM
2a10: 3c 2f 62 3e 20 66 69 6c 65 20 66 6f 72 6d 61 74 </b> file format
2a20: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
2a30: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d "<b class=
2a40: 22 66 69 6c 65 22 3e 63 65 72 74 2e 70 65 6d 3c "file">cert.pem<
2a50: 2f 62 3e 26 71 75 6f 74 3b 2c 20 69 6e 20 74 68 /b>", in th
2a60: 65 20 4f 70 65 6e 53 53 4c 0a 64 69 72 65 63 74 e OpenSSL.direct
2a70: 6f 72 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 ory. The default
2a80: 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76 65 file can be ove
2a90: 72 72 69 64 64 65 6e 20 62 79 20 74 68 65 20 3c rridden by the <
2aa0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
2ab0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 e">SSL_CERT_FILE
2ac0: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 </b> environment
2ad0: 0a 76 61 72 69 61 62 6c 65 2e 20 53 65 65 20 3c .variable. See <
2ae0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 span class="sect
2af0: 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 ref"><a href="#s
2b00: 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 ection3">Certifi
2b10: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c cate Validation<
2b20: 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 6d /a></span> for m
2b30: 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 3e ore details.</p>
2b40: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
2b50: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 ss="option">-cas
2b60: 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 tore</b> <i clas
2b70: 73 3d 22 61 72 67 22 3e 55 52 49 3c 2f 69 3e 3c s="arg">URI</i><
2b80: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 /dt>.<dd><p>Spec
2b90: 69 66 69 65 73 20 74 68 65 20 55 6e 69 66 6f 72 ifies the Unifor
2ba0: 6d 20 52 65 73 6f 75 72 63 65 20 49 64 65 6e 74 m Resource Ident
2bb0: 69 66 69 65 72 20 28 55 52 49 29 20 66 6f 72 20 ifier (URI) for
2bc0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
2bd0: 41 75 74 68 6f 72 69 74 79 0a 28 43 41 29 20 73 Authority.(CA) s
2be0: 74 6f 72 65 2c 20 77 68 69 63 68 20 6d 61 79 20 tore, which may
2bf0: 62 65 20 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 be a single cont
2c00: 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c ainer or a catal
2c10: 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 og of containers
2c20: 2e 0a 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 ..Starting with
2c30: 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 4d OpenSSL 3.2 on M
2c40: 53 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74 S Windows, set t
2c50: 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 o "<b class
2c60: 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f 70 65 ="const">org.ope
2c70: 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f nssl.winstore://
2c80: 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 6f 20 75 73 </b>".to us
2c90: 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 4d e the built-in M
2ca0: 53 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 S Windows Certif
2cb0: 69 63 61 74 65 20 53 74 6f 72 65 2e 20 53 65 65 icate Store. See
2cc0: 0a 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 .<span class="se
2cd0: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 ctref"><a href="
2ce0: 23 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 #section3">Certi
2cf0: 66 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f ficate Validatio
2d00: 6e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 n</a></span> for
2d10: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f more details.</
2d20: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
2d30: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 lass="option">-c
2d40: 65 72 74 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 ertfile</b> <i c
2d50: 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e lass="arg">filen
2d60: 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ame</i></dt>.<dd
2d70: 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 ><p>Specifies th
2d80: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 e name of the fi
2d90: 6c 65 20 77 69 74 68 20 74 68 65 20 63 65 72 74 le with the cert
2da0: 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 69 ificate to use i
2db0: 6e 20 50 45 4d 20 66 6f 72 6d 61 74 0a 61 73 20 n PEM format.as
2dc0: 74 68 65 20 6c 6f 63 61 6c 20 28 63 6c 69 65 6e the local (clien
2dd0: 74 20 6f 72 20 73 65 72 76 65 72 29 20 63 65 72 t or server) cer
2de0: 74 69 66 69 63 61 74 65 2e 20 49 74 20 61 6c 73 tificate. It als
2df0: 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 o contains the p
2e00: 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 70 3e 3c 2f ublic key.</p></
2e10: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
2e20: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 65 72 74 3c ="option">-cert<
2e30: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
2e40: 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 g">string</i></d
2e50: 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 t>.<dd><p>Specif
2e60: 69 65 73 20 74 68 65 20 63 65 72 74 69 66 69 63 ies the certific
2e70: 61 74 65 20 74 6f 20 75 73 65 20 61 73 20 61 20 ate to use as a
2e80: 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74 72 69 DER encoded stri
2e90: 6e 67 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c ng (X.509 DER).<
2ea0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
2eb0: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
2ec0: 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 20 63 6c cipher</b> <i cl
2ed0: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 ass="arg">string
2ee0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
2ef0: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c >Specifies the l
2f00: 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 ist of ciphers t
2f10: 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e o use for TLS 1.
2f20: 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20 63 6f 2 and earlier co
2f30: 6e 6e 65 63 74 69 6f 6e 73 2e 0a 53 74 72 69 6e nnections..Strin
2f40: 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 26 71 75 g is a colon &qu
2f50: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e ot;<b class="con
2f60: 73 74 22 3e 3a 3c 2f 62 3e 26 71 75 6f 74 3b 20 st">:</b>"
2f70: 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f separated list o
2f80: 66 20 63 69 70 68 65 72 73 2e 0a 43 69 70 68 65 f ciphers..Ciphe
2f90: 72 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e rs can be combin
2fa0: 65 64 20 75 73 69 6e 67 20 74 68 65 20 26 71 75 ed using the &qu
2fb0: 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e ot;<b class="con
2fc0: 73 74 22 3e 2b 3c 2f 62 3e 26 71 75 6f 74 3b 20 st">+</b>"
2fd0: 63 68 61 72 61 63 74 65 72 2e 0a 50 72 65 66 69 character..Prefi
2fe0: 78 65 73 20 63 61 6e 20 62 65 20 75 73 65 64 20 xes can be used
2ff0: 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 72 to permanently r
3000: 65 6d 6f 76 65 20 26 71 75 6f 74 3b 3c 62 20 63 emove "<b c
3010: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 21 3c 2f lass="const">!</
3020: 62 3e 26 71 75 6f 74 3b 2c 20 64 65 6c 65 74 65 b>", delete
3030: 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d "<b class=
3040: 22 63 6f 6e 73 74 22 3e 2d 3c 2f 62 3e 26 71 75 "const">-</b>&qu
3050: 6f 74 3b 2c 20 6f 72 0a 6d 6f 76 65 20 74 6f 20 ot;, or.move to
3060: 74 68 65 20 65 6e 64 20 26 71 75 6f 74 3b 3c 62 the end "<b
3070: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 2b class="const">+
3080: 3c 2f 62 3e 26 71 75 6f 74 3b 20 61 20 73 70 65 </b>" a spe
3090: 63 69 66 69 65 64 20 63 69 70 68 65 72 2e 0a 4b cified cipher..K
30a0: 65 79 77 6f 72 64 73 20 3c 62 20 63 6c 61 73 73 eywords <b class
30b0: 3d 22 63 6f 6e 73 74 22 3e 40 53 54 52 45 4e 47 ="const">@STRENG
30c0: 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 TH</b> (sort by
30d0: 61 6c 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 algorithm key le
30e0: 6e 67 74 68 29 2c 0a 3c 62 20 63 6c 61 73 73 3d ngth),.<b class=
30f0: 22 63 6f 6e 73 74 22 3e 40 53 45 43 4c 45 56 45 "const">@SECLEVE
3100: 4c 3d 3c 2f 62 3e 3c 65 6d 3e 6e 3c 2f 65 6d 3e L=</b><em>n</em>
3110: 20 28 73 65 74 20 73 65 63 75 72 69 74 79 20 6c (set security l
3120: 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64 0a evel to n), and.
3130: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
3140: 3e 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 >DEFAULT</b> (us
3150: 65 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 e default cipher
3160: 20 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 list, at start
3170: 6f 6e 6c 79 29 20 63 61 6e 20 61 6c 73 6f 20 62 only) can also b
3180: 65 20 73 70 65 63 69 66 69 65 64 2e 0a 53 65 65 e specified..See
3190: 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 the <a href="ht
31a0: 74 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 tps://docs.opens
31b0: 73 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 sl.org/master/ma
31c0: 6e 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 n1/openssl-ciphe
31d0: 72 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 rs/#options">Ope
31e0: 6e 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e nSSL</a>.documen
31f0: 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 tation for the f
3200: 75 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 ull list of vali
3210: 64 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 d values.</p></d
3220: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
3230: 22 6f 70 74 69 6f 6e 22 3e 2d 63 69 70 68 65 72 "option">-cipher
3240: 73 75 69 74 65 73 3c 2f 62 3e 20 3c 69 20 63 6c suites</b> <i cl
3250: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 ass="arg">string
3260: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
3270: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c >Specifies the l
3280: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 ist of cipher su
3290: 69 74 65 73 20 74 6f 20 75 73 65 20 66 6f 72 20 ites to use for
32a0: 54 4c 53 20 31 2e 33 20 61 73 20 61 20 63 6f 6c TLS 1.3 as a col
32b0: 6f 6e 0a 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 on."<b clas
32c0: 73 3d 22 63 6f 6e 73 74 22 3e 3a 3c 2f 62 3e 26 s="const">:</b>&
32d0: 71 75 6f 74 3b 20 73 65 70 61 72 61 74 65 64 20 quot; separated
32e0: 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 list of cipher s
32f0: 75 69 74 65 20 6e 61 6d 65 73 2e 20 53 65 65 20 uite names. See
3300: 74 68 65 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 the.<a href="htt
3310: 70 73 3a 2f 2f 64 6f 63 73 2e 6f 70 65 6e 73 73 ps://docs.openss
3320: 6c 2e 6f 72 67 2f 6d 61 73 74 65 72 2f 6d 61 6e l.org/master/man
3330: 31 2f 6f 70 65 6e 73 73 6c 2d 63 69 70 68 65 72 1/openssl-cipher
3340: 73 2f 23 6f 70 74 69 6f 6e 73 22 3e 4f 70 65 6e s/#options">Open
3350: 53 53 4c 3c 2f 61 3e 0a 64 6f 63 75 6d 65 6e 74 SSL</a>.document
3360: 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 ation for the fu
3370: 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 ll list of valid
3380: 20 76 61 6c 75 65 73 2e 3c 2f 70 3e 3c 2f 64 64 values.</p></dd
3390: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
33a0: 6f 70 74 69 6f 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 option">-command
33b0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
33c0: 72 67 22 3e 63 61 6c 6c 62 61 63 6b 3c 2f 69 3e rg">callback</i>
33d0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 </dt>.<dd><p>Spe
33e0: 63 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 cifies the callb
33f0: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 ack command to b
3400: 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 e invoked at sev
3410: 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 eral points duri
3420: 6e 67 20 74 68 65 0a 68 61 6e 64 73 68 61 6b 65 ng the.handshake
3430: 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c to pass errors,
3440: 20 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 tracing informa
3450: 74 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 tion, and protoc
3460: 6f 6c 20 6d 65 73 73 61 67 65 73 2e 0a 53 65 65 ol messages..See
3470: 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 <span class="se
3480: 63 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 ctref"><a href="
3490: 23 73 65 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 #section4">Callb
34a0: 61 63 6b 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c ack Options</a><
34b0: 2f 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 /span> for more
34c0: 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c info.</p></dd>.<
34d0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
34e0: 69 6f 6e 22 3e 2d 64 68 70 61 72 61 6d 73 3c 2f ion">-dhparams</
34f0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
3500: 22 3e 66 69 6c 65 6e 61 6d 65 3c 2f 69 3e 3c 2f ">filename</i></
3510: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 dt>.<dd><p>Speci
3520: 66 69 65 73 20 74 68 65 20 44 69 66 66 69 65 2d fies the Diffie-
3530: 48 65 6c 6c 6d 61 6e 20 28 44 48 29 20 70 61 72 Hellman (DH) par
3540: 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 70 ameters file.</p
3550: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
3560: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 ass="option">-ke
3570: 79 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 yfile</b> <i cla
3580: 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 6e 61 6d ss="arg">filenam
3590: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
35a0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 p>Specifies the
35b0: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 private key file
35c0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
35d0: 20 74 6f 20 75 73 65 20 74 68 65 20 66 69 6c 65 to use the file
35e0: 0a 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 .specified by th
35f0: 65 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 e <i class="arg"
3600: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 69 3e 20 6f >-certfile</i> o
3610: 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a ption.</p></dd>.
3620: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
3630: 74 69 6f 6e 22 3e 2d 6b 65 79 3c 2f 62 3e 20 3c tion">-key</b> <
3640: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
3650: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
3660: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 d><p>Specifies t
3670: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 he private key t
3680: 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65 o use as a DER e
3690: 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 50 ncoded string (P
36a0: 4b 43 53 23 31 20 44 45 52 29 2e 3c 2f 70 3e 3c KCS#1 DER).</p><
36b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
36c0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6d 6f 64 65 s="option">-mode
36d0: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 l</b> <i class="
36e0: 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e arg">channel</i>
36f0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 </dt>.<dd><p>For
3700: 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 ce this channel
3710: 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d to share the sam
3720: 65 20 3c 69 20 63 6c 61 73 73 3d 22 74 65 72 6d e <i class="term
3730: 22 3e 53 53 4c 5f 43 54 58 3c 2f 69 3e 20 73 74 ">SSL_CTX</i> st
3740: 72 75 63 74 75 72 65 20 61 73 20 74 68 65 0a 73 ructure as the.s
3750: 70 65 63 69 66 69 65 64 20 3c 69 20 63 6c 61 73 pecified <i clas
3760: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c s="arg">channel<
3770: 2f 69 3e 2c 20 61 6e 64 20 74 68 65 72 65 66 6f /i>, and therefo
3780: 72 65 20 73 68 61 72 65 20 63 6f 6e 66 69 67 2c re share config,
3790: 20 63 61 6c 6c 62 61 63 6b 73 2c 20 65 74 63 2e callbacks, etc.
37a0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
37b0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
37c0: 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 3c 69 -password</b> <i
37d0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 61 6c class="arg">cal
37e0: 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c lback</i></dt>.<
37f0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 dd><p>Specifies
3800: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d the callback com
3810: 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 77 mand to invoke w
3820: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 hen OpenSSL need
3830: 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 0a 70 61 s to obtain a.pa
3840: 73 73 77 6f 72 64 2e 20 54 68 69 73 20 69 73 20 ssword. This is
3850: 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 typically used t
3860: 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 o unlock the pri
3870: 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 65 vate key of a ce
3880: 72 74 69 66 69 63 61 74 65 2e 0a 54 68 65 20 63 rtificate..The c
3890: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 allback should r
38a0: 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 eturn a password
38b0: 20 73 74 72 69 6e 67 2e 20 53 65 65 20 3c 73 70 string. See <sp
38c0: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 an class="sectre
38d0: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 f"><a href="#sec
38e0: 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b 20 tion4">Callback
38f0: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 Options</a></spa
3900: 6e 3e 0a 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f n>.for more info
3910: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
3920: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
3930: 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 >-post_handshake
3940: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
3950: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 rg">bool</i></dt
3960: 3e 0a 3c 64 64 3e 3c 70 3e 41 6c 6c 6f 77 20 70 >.<dd><p>Allow p
3970: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 73 65 ost-handshake se
3980: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 75 70 64 ssion ticket upd
3990: 61 74 65 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c ates.</p></dd>.<
39a0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
39b0: 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 ion">-request</b
39c0: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
39d0: 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c >bool</i></dt>.<
39e0: 64 64 3e 3c 70 3e 52 65 71 75 65 73 74 20 61 20 dd><p>Request a
39f0: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d certificate from
3a00: 20 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 the peer during
3a10: 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 the SSL handsha
3a20: 6b 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 ke. This is need
3a30: 65 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69 ed.to do Certifi
3a40: 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e cate Validation.
3a50: 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c Starting in Tcl
3a60: 54 4c 53 20 31 2e 38 2c 20 74 68 65 20 64 65 66 TLS 1.8, the def
3a70: 61 75 6c 74 20 69 73 0a 3c 62 20 63 6c 61 73 73 ault is.<b class
3a80: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 ="const">true</b
3a90: 3e 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 >. Starting in T
3aa0: 63 6c 54 4c 53 20 32 2e 30 2c 20 49 66 20 73 65 clTLS 2.0, If se
3ab0: 74 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 t to <b class="c
3ac0: 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 onst">false</b>
3ad0: 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 and.<b class="op
3ae0: 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f tion">-require</
3af0: 62 3e 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 b> is <b class="
3b00: 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c const">true</b>,
3b10: 20 74 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 then this will
3b20: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 74 6f be overridden to
3b30: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
3b40: 22 3e 74 72 75 65 3c 2f 62 3e 2e 0a 53 65 65 20 ">true</b>..See
3b50: 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 <span class="sec
3b60: 74 72 65 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 tref"><a href="#
3b70: 73 65 63 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 section3">Certif
3b80: 69 63 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e icate Validation
3b90: 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 </a></span> for
3ba0: 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 3c 2f 70 more details.</p
3bb0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
3bc0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 ass="option">-re
3bd0: 71 75 69 72 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 quire</b> <i cla
3be0: 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 ss="arg">bool</i
3bf0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 ></dt>.<dd><p>Re
3c00: 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 quire a valid ce
3c10: 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 74 rtificate from t
3c20: 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 74 he peer during t
3c30: 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 he SSL handshake
3c40: 2e 20 49 66 20 74 68 69 73 20 69 73 0a 73 65 74 . If this is.set
3c50: 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 3c to true, then <
3c60: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
3c70: 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e 20 6d 75 >-request</b> mu
3c80: 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 st also be set t
3c90: 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 o true and a eit
3ca0: 68 65 72 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 her.<b class="op
3cb0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e tion">-cadir</b>
3cc0: 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 , <b class="opti
3cd0: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 2c on">-cafile</b>,
3ce0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f <b class="optio
3cf0: 6e 22 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 2c n">-castore</b>,
3d00: 20 6f 72 20 61 20 70 6c 61 74 66 6f 72 6d 20 64 or a platform d
3d10: 65 66 61 75 6c 74 0a 6d 75 73 74 20 62 65 20 70 efault.must be p
3d20: 72 6f 76 69 64 65 64 20 69 6e 20 6f 72 64 65 72 rovided in order
3d30: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 61 67 61 to validate aga
3d40: 69 6e 73 74 2e 20 54 68 65 20 64 65 66 61 75 6c inst. The defaul
3d50: 74 20 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 20 t in TclTLS 1.8
3d60: 61 6e 64 0a 65 61 72 6c 69 65 72 20 76 65 72 73 and.earlier vers
3d70: 69 6f 6e 73 20 69 73 20 3c 62 20 63 6c 61 73 73 ions is <b class
3d80: 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c 2f ="const">false</
3d90: 62 3e 20 73 69 6e 63 65 20 6e 6f 74 20 61 6c 6c b> since not all
3da0: 20 70 6c 61 74 66 6f 72 6d 73 20 68 61 76 65 20 platforms have
3db0: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 6f 0a certificates to.
3dc0: 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 validate against
3dd0: 20 69 6e 20 61 20 66 6f 72 6d 20 63 6f 6d 70 61 in a form compa
3de0: 74 69 62 6c 65 20 77 69 74 68 20 4f 70 65 6e 53 tible with OpenS
3df0: 53 4c 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 SL. Starting in
3e00: 54 63 6c 54 4c 53 20 32 2e 30 2c 0a 74 68 65 20 TclTLS 2.0,.the
3e10: 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c default is <b cl
3e20: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 ass="const">true
3e30: 3c 2f 62 3e 2e 0a 53 65 65 20 3c 73 70 61 6e 20 </b>..See <span
3e40: 63 6c 61 73 73 3d 22 73 65 63 74 72 65 66 22 3e class="sectref">
3e50: 3c 61 20 68 72 65 66 3d 22 23 73 65 63 74 69 6f <a href="#sectio
3e60: 6e 33 22 3e 43 65 72 74 69 66 69 63 61 74 65 20 n3">Certificate
3e70: 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f Validation</a></
3e80: 73 70 61 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 span> for more d
3e90: 65 74 61 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e etails.</p></dd>
3ea0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
3eb0: 70 74 69 6f 6e 22 3e 2d 73 65 63 75 72 69 74 79 ption">-security
3ec0: 5f 6c 65 76 65 6c 3c 2f 62 3e 20 3c 69 20 63 6c _level</b> <i cl
3ed0: 61 73 73 3d 22 61 72 67 22 3e 69 6e 74 65 67 65 ass="arg">intege
3ee0: 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c r</i></dt>.<dd><
3ef0: 70 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 p>Specifies the
3f00: 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 28 security level (
3f10: 76 61 6c 75 65 20 66 72 6f 6d 20 30 20 74 6f 20 value from 0 to
3f20: 35 29 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 5). The security
3f30: 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a 74 level affects.t
3f40: 68 65 20 61 6c 6c 6f 77 65 64 20 63 69 70 68 65 he allowed ciphe
3f50: 72 20 73 75 69 74 65 20 65 6e 63 72 79 70 74 69 r suite encrypti
3f60: 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 on algorithms, s
3f70: 75 70 70 6f 72 74 65 64 20 45 43 43 20 63 75 72 upported ECC cur
3f80: 76 65 73 2c 0a 73 75 70 70 6f 72 74 65 64 20 73 ves,.supported s
3f90: 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 ignature algorit
3fa0: 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 hms, DH paramete
3fb0: 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 r sizes, certifi
3fc0: 63 61 74 65 20 6b 65 79 20 73 69 7a 65 73 0a 61 cate key sizes.a
3fd0: 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 nd signature alg
3fe0: 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 orithms. The def
3ff0: 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 ault is 1 prior
4000: 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 61 to OpenSSL 3.2 a
4010: 6e 64 20 32 0a 74 68 65 72 65 61 66 74 65 72 2e nd 2.thereafter.
4020: 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69 67 Level 3 and hig
4030: 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70 70 her disable supp
4040: 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 ort for session
4050: 74 69 63 6b 65 74 73 20 61 6e 64 0a 6f 6e 6c 79 tickets and.only
4060: 20 61 63 63 65 70 74 20 63 69 70 68 65 72 20 73 accept cipher s
4070: 75 69 74 65 73 20 74 68 61 74 20 70 72 6f 76 69 uites that provi
4080: 64 65 20 66 6f 72 77 61 72 64 20 73 65 63 72 65 de forward secre
4090: 63 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 cy.</p></dd>.<dt
40a0: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f ><b class="optio
40b0: 6e 22 3e 2d 73 65 72 76 65 72 3c 2f 62 3e 20 3c n">-server</b> <
40c0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f i class="arg">bo
40d0: 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ol</i></dt>.<dd>
40e0: 3c 70 3e 53 70 65 63 69 66 69 65 73 20 77 68 65 <p>Specifies whe
40f0: 74 68 65 72 20 74 6f 20 61 63 74 20 61 73 20 61 ther to act as a
4100: 20 73 65 72 76 65 72 20 61 6e 64 20 72 65 73 70 server and resp
4110: 6f 6e 64 20 77 69 74 68 20 61 20 73 65 72 76 65 ond with a serve
4120: 72 20 68 61 6e 64 73 68 61 6b 65 20 77 68 65 6e r handshake when
4130: 20 61 0a 63 6c 69 65 6e 74 20 63 6f 6e 6e 65 63 a.client connec
4140: 74 73 20 61 6e 64 20 70 72 6f 76 69 64 65 73 20 ts and provides
4150: 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 73 68 61 a client handsha
4160: 6b 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 ke. The default
4170: 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e is <b class="con
4180: 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 2e 3c 2f st">false</b>.</
4190: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
41a0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 lass="option">-s
41b0: 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 ervername</b> <i
41c0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 68 6f 73 class="arg">hos
41d0: 74 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tname</i></dt>.<
41e0: 64 64 3e 3c 70 3e 53 70 65 63 69 66 79 20 74 68 dd><p>Specify th
41f0: 65 20 70 65 65 72 27 73 20 68 6f 73 74 6e 61 6d e peer's hostnam
4200: 65 2e 20 54 68 69 73 20 69 73 20 75 73 65 64 20 e. This is used
4210: 74 6f 20 73 65 74 20 74 68 65 20 54 4c 53 20 53 to set the TLS S
4220: 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 erver Name Indic
4230: 61 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 ation.(SNI) exte
4240: 6e 73 69 6f 6e 2e 20 53 65 74 20 74 68 69 73 20 nsion. Set this
4250: 74 6f 20 74 68 65 20 65 78 70 65 63 74 65 64 20 to the expected
4260: 73 65 72 76 65 72 6e 61 6d 65 20 69 6e 20 74 68 servername in th
4270: 65 20 73 65 72 76 65 72 27 73 20 63 65 72 74 69 e server's certi
4280: 66 69 63 61 74 65 0a 6f 72 20 6f 6e 65 20 6f 66 ficate.or one of
4290: 20 74 68 65 20 53 75 62 6a 65 63 74 20 41 6c 74 the Subject Alt
42a0: 65 72 6e 61 74 65 20 4e 61 6d 65 73 20 28 53 41 ernate Names (SA
42b0: 4e 29 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 N). Starting in
42c0: 54 63 6c 54 4c 53 20 32 2e 30 2c 20 74 68 69 73 TclTLS 2.0, this
42d0: 20 77 69 6c 6c 0a 64 65 66 61 75 6c 74 20 74 6f will.default to
42e0: 20 74 68 65 20 68 6f 73 74 20 66 6f 72 20 74 68 the host for th
42f0: 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 e <b class="cmd"
4300: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
4310: 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 70 3e 3c 2f 64 command.</p></d
4320: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
4330: 22 6f 70 74 69 6f 6e 22 3e 2d 73 65 73 73 69 6f "option">-sessio
4340: 6e 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 n_id</b> <i clas
4350: 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 s="arg">binary_s
4360: 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c tring</i></dt>.<
4370: 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 dd><p>Specifies
4380: 74 68 65 20 73 65 73 73 69 6f 6e 20 69 64 20 74 the session id t
4390: 6f 20 72 65 73 75 6d 65 20 61 20 73 65 73 73 69 o resume a sessi
43a0: 6f 6e 2e 20 4e 6f 74 20 73 75 70 70 6f 72 74 65 on. Not supporte
43b0: 64 20 79 65 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a d yet.</p></dd>.
43c0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 <dt><b class="op
43d0: 74 69 6f 6e 22 3e 2d 73 73 6c 32 3c 2f 62 3e 20 tion">-ssl2</b>
43e0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 <i class="arg">b
43f0: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ool</i></dt>.<dd
4400: 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f ><p>Enable use o
4410: 66 20 53 53 4c 20 76 32 2e 20 54 68 65 20 64 65 f SSL v2. The de
4420: 66 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 fault is <b clas
4430: 73 3d 22 63 6f 6e 73 74 22 3e 66 61 6c 73 65 3c s="const">false<
4440: 2f 62 3e 2e 20 4e 6f 74 65 3a 20 52 65 63 65 6e /b>. Note: Recen
4450: 74 20 76 65 72 73 69 6f 6e 73 20 6f 66 0a 4f 70 t versions of.Op
4460: 65 6e 53 53 4c 20 6e 6f 20 6c 6f 6e 67 65 72 20 enSSL no longer
4470: 73 75 70 70 6f 72 74 20 53 53 4c 76 32 2c 20 73 support SSLv2, s
4480: 6f 20 74 68 69 73 20 6d 61 79 20 6e 6f 74 20 68 o this may not h
4490: 61 76 65 20 61 6e 79 20 65 66 66 65 63 74 2e 20 ave any effect.
44a0: 53 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 See the.<b class
44b0: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 ="cmd">tls::prot
44c0: 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e ocols</b> comman
44d0: 64 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 d for supported
44e0: 70 72 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 3e 3c 2f protocols.</p></
44f0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
4500: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 73 73 6c 33 3c ="option">-ssl3<
4510: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
4520: 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e g">bool</i></dt>
4530: 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 75 .<dd><p>Enable u
4540: 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 54 68 se of SSL v3. Th
4550: 65 20 64 65 66 61 75 6c 74 20 69 73 20 3c 62 20 e default is <b
4560: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 61 class="const">fa
4570: 6c 73 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a 20 52 lse</b>. Note: R
4580: 65 63 65 6e 74 20 76 65 72 73 69 6f 6e 73 0a 6f ecent versions.o
4590: 66 20 4f 70 65 6e 53 53 4c 20 6d 61 79 20 68 61 f OpenSSL may ha
45a0: 76 65 20 74 68 69 73 20 64 69 73 61 62 6c 65 64 ve this disabled
45b0: 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 at compile time
45c0: 2c 20 73 6f 20 74 68 69 73 20 6d 61 79 20 6e 6f , so this may no
45d0: 74 20 68 61 76 65 20 61 6e 79 0a 65 66 66 65 63 t have any.effec
45e0: 74 2e 20 53 65 65 20 74 68 65 20 3c 62 20 63 6c t. See the <b cl
45f0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 ass="cmd">tls::p
4600: 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d rotocols</b> com
4610: 6d 61 6e 64 20 66 6f 72 20 73 75 70 70 6f 72 74 mand for support
4620: 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c 2f 70 ed protocols.</p
4630: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
4640: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c ass="option">-tl
4650: 73 31 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d s1</b> <i class=
4660: 22 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f "arg">bool</i></
4670: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c dt>.<dd><p>Enabl
4680: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e e use of TLS v1.
4690: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
46a0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
46b0: 3e 74 72 75 65 3c 2f 62 3e 2e 20 4e 6f 74 65 3a >true</b>. Note:
46c0: 20 54 4c 53 20 31 2e 30 20 6e 65 65 64 73 0a 53 TLS 1.0 needs.S
46d0: 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 HA1 to operate,
46e0: 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 which is only av
46f0: 61 69 6c 61 62 6c 65 20 69 6e 20 73 65 63 75 72 ailable in secur
4700: 69 74 79 20 6c 65 76 65 6c 20 30 20 66 6f 72 20 ity level 0 for
4710: 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 0a 53 Open SSL 3.0+..S
4720: 65 65 20 74 68 65 20 3c 69 20 63 6c 61 73 73 3d ee the <i class=
4730: 22 61 72 67 22 3e 2d 73 65 63 75 72 69 74 79 5f "arg">-security_
4740: 6c 65 76 65 6c 3c 2f 69 3e 20 6f 70 74 69 6f 6e level</i> option
4750: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
4760: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4770: 3e 2d 74 6c 73 31 2e 31 3c 2f 62 3e 20 3c 69 20 >-tls1.1</b> <i
4780: 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f 6f 6c class="arg">bool
4790: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
47a0: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 >Enable use of T
47b0: 4c 53 20 76 31 2e 31 2e 20 54 68 65 20 64 65 66 LS v1.1. The def
47c0: 61 75 6c 74 20 69 73 20 3c 62 20 63 6c 61 73 73 ault is <b class
47d0: 3d 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 ="const">true</b
47e0: 3e 2e 20 4e 6f 74 65 3a 20 54 4c 53 20 31 2e 31 >. Note: TLS 1.1
47f0: 20 6e 65 65 64 73 0a 53 48 41 31 20 74 6f 20 6f needs.SHA1 to o
4800: 70 65 72 61 74 65 2c 20 77 68 69 63 68 20 69 73 perate, which is
4810: 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 only available
4820: 69 6e 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 in security leve
4830: 6c 20 30 20 66 6f 72 20 4f 70 65 6e 20 53 53 4c l 0 for Open SSL
4840: 20 33 2e 30 2b 2e 0a 53 65 65 20 74 68 65 20 3c 3.0+..See the <
4850: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 73 i class="arg">-s
4860: 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 69 ecurity_level</i
4870: 3e 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 > option.</p></d
4880: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
4890: 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e 32 "option">-tls1.2
48a0: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
48b0: 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 rg">bool</i></dt
48c0: 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 20 >.<dd><p>Enable
48d0: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 2e use of TLS v1.2.
48e0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
48f0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
4900: 3e 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f >true</b>.</p></
4910: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
4920: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 74 6c 73 31 2e ="option">-tls1.
4930: 33 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 3</b> <i class="
4940: 61 72 67 22 3e 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 arg">bool</i></d
4950: 74 3e 0a 3c 64 64 3e 3c 70 3e 45 6e 61 62 6c 65 t>.<dd><p>Enable
4960: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 use of TLS v1.3
4970: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
4980: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
4990: 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c ">true</b>.</p><
49a0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
49b0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 s="option">-vali
49c0: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 datecommand</b>
49d0: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
49e0: 61 6c 6c 62 61 63 6b 3c 2f 69 3e 3c 2f 64 74 3e allback</i></dt>
49f0: 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 .<dd><p>Specifie
4a00: 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 s the callback c
4a10: 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 ommand to invoke
4a20: 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 to validate the
4a30: 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74 peer certificat
4a40: 65 73 0a 61 6e 64 20 6f 74 68 65 72 20 63 6f 6e es.and other con
4a50: 66 69 67 20 69 6e 66 6f 20 64 75 72 69 6e 67 20 fig info during
4a60: 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 the protocol neg
4a70: 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20 otiation phase.
4a80: 54 68 69 73 20 63 61 6e 20 62 65 20 75 73 65 64 This can be used
4a90: 0a 62 79 20 54 43 4c 20 73 63 72 69 70 74 73 20 .by TCL scripts
4aa0: 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 to perform their
4ab0: 20 6f 77 6e 20 43 65 72 74 69 66 69 63 61 74 65 own Certificate
4ac0: 20 56 61 6c 69 64 61 74 69 6f 6e 20 74 6f 20 73 Validation to s
4ad0: 75 70 70 6c 65 6d 65 6e 74 20 74 68 65 0a 64 65 upplement the.de
4ae0: 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e fault validation
4af0: 20 70 72 6f 76 69 64 65 64 20 62 79 20 4f 70 65 provided by Ope
4b00: 6e 53 53 4c 2e 20 54 68 65 20 73 63 72 69 70 74 nSSL. The script
4b10: 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61 20 62 must return a b
4b20: 6f 6f 6c 65 61 6e 20 74 72 75 65 0a 74 6f 20 63 oolean true.to c
4b30: 6f 6e 74 69 6e 75 65 20 74 68 65 20 6e 65 67 6f ontinue the nego
4b40: 74 69 61 74 69 6f 6e 2e 20 53 65 65 20 3c 73 70 tiation. See <sp
4b50: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 an class="sectre
4b60: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 f"><a href="#sec
4b70: 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b 20 tion4">Callback
4b80: 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 73 70 61 Options</a></spa
4b90: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f n> for more info
4ba0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e .</p></dd>.</dl>
4bb0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d </dd>.<dt><a nam
4bc0: 65 3d 22 35 22 3e 3c 62 20 63 6c 61 73 73 3d 22 e="5"><b class="
4bd0: 63 6d 64 22 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f cmd">tls::unimpo
4be0: 72 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d rt</b> <i class=
4bf0: 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 "arg">channel</i
4c00: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c ></a></dt>.<dd><
4c10: 70 3e 43 6f 6d 70 6c 69 6d 65 6e 74 20 74 6f 20 p>Compliment to
4c20: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
4c30: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 2e 20 ls::import</b>.
4c40: 55 73 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 74 Used to remove t
4c50: 68 65 20 74 6f 70 20 6c 65 76 65 6c 20 73 74 61 he top level sta
4c60: 63 6b 65 64 20 63 68 61 6e 6e 65 6c 0a 66 72 6f cked channel.fro
4c70: 6d 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 m <i class="arg"
4c80: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 2e 20 54 68 >channel</i>. Th
4c90: 69 73 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20 is unstacks the
4ca0: 65 6e 63 72 79 70 74 69 6f 6e 20 6f 66 20 61 20 encryption of a
4cb0: 72 65 67 75 6c 61 72 20 54 43 4c 20 63 68 61 6e regular TCL chan
4cc0: 6e 65 6c 2e 20 41 6e 0a 65 72 72 6f 72 20 69 73 nel. An.error is
4cd0: 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 thrown if TLS i
4ce0: 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 s not the top st
4cf0: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 acked channel ty
4d00: 70 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 pe.</p></dd>.<dt
4d10: 3e 3c 61 20 6e 61 6d 65 3d 22 36 22 3e 3c 62 20 ><a name="6"><b
4d20: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
4d30: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c :handshake</b> <
4d40: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 i class="arg">ch
4d50: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 annel</i></a></d
4d60: 74 3e 0a 3c 64 64 3e 3c 70 3e 46 6f 72 63 65 73 t>.<dd><p>Forces
4d70: 20 74 68 65 20 54 4c 53 20 6e 65 67 6f 74 69 61 the TLS negotia
4d80: 74 69 6f 6e 20 68 61 6e 64 73 68 61 6b 65 20 74 tion handshake t
4d90: 6f 20 74 61 6b 65 20 70 6c 61 63 65 20 69 6d 6d o take place imm
4da0: 65 64 69 61 74 65 6c 79 2c 20 61 6e 64 20 72 65 ediately, and re
4db0: 74 75 72 6e 73 20 30 0a 69 66 20 68 61 6e 64 73 turns 0.if hands
4dc0: 68 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e hake is still in
4dd0: 20 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 progress (non-b
4de0: 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 locking), or 1 i
4df0: 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 f the handshake
4e00: 77 61 73 0a 73 75 63 63 65 73 73 66 75 6c 2e 20 was.successful.
4e10: 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 If the handshake
4e20: 20 66 61 69 6c 65 64 2c 20 61 6e 20 65 72 72 6f failed, an erro
4e30: 72 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e r will be return
4e40: 65 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ed.</p></dd>.<dt
4e50: 3e 3c 61 20 6e 61 6d 65 3d 22 37 22 3e 3c 62 20 ><a name="7"><b
4e60: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
4e70: 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 73 70 61 :status</b> <spa
4e80: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
4e90: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
4ea0: 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3f 3c 2f 73 70 >-local</b>?</sp
4eb0: 61 6e 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 an> <i class="ar
4ec0: 67 22 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f g">channel</i></
4ed0: 61 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 a></dt>.<dd><p>R
4ee0: 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 eturns the curre
4ef0: 6e 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 nt status of an
4f00: 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 SSL channel. The
4f10: 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 result is a lis
4f20: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 0a 70 t of key-value.p
4f30: 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 airs describing
4f40: 74 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69 the SSL, certifi
4f50: 63 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66 cate, and certif
4f60: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 icate verificati
4f70: 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 0a 74 68 on status. If.th
4f80: 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 e SSL handshake
4f90: 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 has not yet comp
4fa0: 6c 65 74 65 64 2c 20 61 6e 20 65 6d 70 74 79 20 leted, an empty
4fb0: 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 list is returned
4fc0: 2e 20 49 66 20 74 68 65 0a 3c 62 20 63 6c 61 73 . If the.<b clas
4fd0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6c 6f 63 61 s="option">-loca
4fe0: 6c 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 l</b> option is
4ff0: 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 specified, then
5000: 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 the local certif
5010: 69 63 61 74 65 20 69 73 20 75 73 65 64 2e 20 52 icate is used. R
5020: 65 74 75 72 6e 65 64 0a 76 61 6c 75 65 73 20 69 eturned.values i
5030: 6e 63 6c 75 64 65 3a 3c 2f 70 3e 0a 3c 70 3e 53 nclude:</p>.<p>S
5040: 53 4c 20 53 74 61 74 75 73 3c 2f 70 3e 0a 3c 64 SL Status</p>.<d
5050: 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c l class="doctool
5060: 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a s_definitions">.
5070: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
5080: 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c 2f 62 3e riable">alpn</b>
5090: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
50a0: 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c 2f 64 74 protocol</i></dt
50b0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f >.<dd><p>The pro
50c0: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 tocol selected a
50d0: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e fter Application
50e0: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 20 -Layer Protocol
50f0: 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 Negotiation (ALP
5100: 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 N).</p></dd>.<dt
5110: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
5120: 62 6c 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20 ble">cipher</b>
5130: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
5140: 69 70 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c ipher</i></dt>.<
5150: 64 64 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 6e dd><p>The curren
5160: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
5170: 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 2e for the session.
5180: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
5190: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
51a0: 22 3e 70 65 65 72 6e 61 6d 65 3c 2f 62 3e 20 3c ">peername</b> <
51b0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 61 i class="arg">na
51c0: 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e me</i></dt>.<dd>
51d0: 3c 70 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 20 <p>The peername
51e0: 66 72 6f 6d 20 74 68 65 20 63 65 72 74 69 66 69 from the certifi
51f0: 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c cate.</p></dd>.<
5200: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5210: 69 61 62 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c iable">protocol<
5220: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
5230: 67 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f g">version</i></
5240: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 dt>.<dd><p>The p
5250: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 rotocol version
5260: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e used for the con
5270: 6e 65 63 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 nection: SSL2, S
5280: 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e SL3, TLS1, TLS1.
5290: 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 1, TLS1.2, TLS1.
52a0: 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 3, or unknown.</
52b0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 p></dd>.<dt><b c
52c0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
52d0: 73 62 69 74 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 sbits</b> <i cla
52e0: 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 3e 3c 2f ss="arg">n</i></
52f0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 6e dt>.<dd><p>The n
5300: 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 umber of bits us
5310: 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 ed for the sessi
5320: 6f 6e 20 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e on key.</p></dd>
5330: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
5340: 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 ariable">signatu
5350: 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c reHashAlgorithm<
5360: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
5370: 67 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e g">algorithm</i>
5380: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
5390: 20 73 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 signature hash
53a0: 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 70 3e 3c 2f algorithm.</p></
53b0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
53c0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e ="variable">sign
53d0: 61 74 75 72 65 54 79 70 65 3c 2f 62 3e 20 3c 69 atureType</b> <i
53e0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 74 79 70 class="arg">typ
53f0: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
5400: 70 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 p>The signature
5410: 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 70 3e 3c type value.</p><
5420: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
5430: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 s="variable">ver
5440: 69 66 79 44 65 70 74 68 3c 2f 62 3e 20 3c 69 20 ifyDepth</b> <i
5450: 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f 69 class="arg">n</i
5460: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 61 ></dt>.<dd><p>Ma
5470: 78 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 ximum depth for
5480: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
5490: 63 68 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 chain verificati
54a0: 6f 6e 2e 20 44 65 66 61 75 6c 74 20 69 73 20 2d on. Default is -
54b0: 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 1, to check all.
54c0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
54d0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
54e0: 22 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 62 3e ">verifyMode</b>
54f0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
5500: 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 list</i></dt>.<d
5510: 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 63 65 72 d><p>List of cer
5520: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 tificate verific
5530: 61 74 69 6f 6e 20 6d 6f 64 65 73 2e 3c 2f 70 3e ation modes.</p>
5540: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
5550: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 ss="variable">ve
5560: 72 69 66 79 52 65 73 75 6c 74 3c 2f 62 3e 20 3c rifyResult</b> <
5570: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 72 65 i class="arg">re
5580: 73 75 6c 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 sult</i></dt>.<d
5590: 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 d><p>Certificate
55a0: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 verification re
55b0: 73 75 6c 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c sult.</p></dd>.<
55c0: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
55d0: 69 61 62 6c 65 22 3e 63 61 5f 6e 61 6d 65 73 3c iable">ca_names<
55e0: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
55f0: 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 3e g">list</i></dt>
5600: 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 20 .<dd><p>List of
5610: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
5620: 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 Authorities used
5630: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 to create the c
5640: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c ertificate.</p><
5650: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e 43 65 /dd>.</dl>.<p>Ce
5660: 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75 73 rtificate Status
5670: 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 </p>.<dl class="
5680: 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 doctools_definit
5690: 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c ions">.<dt><b cl
56a0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 61 ass="variable">a
56b0: 6c 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ll</b> <i class=
56c0: 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 3e "arg">string</i>
56d0: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 75 6d </dt>.<dd><p>Dum
56e0: 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 p of all certifi
56f0: 63 61 74 65 20 69 6e 66 6f 2e 3c 2f 70 3e 3c 2f cate info.</p></
5700: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
5710: 3d 22 76 61 72 69 61 62 6c 65 22 3e 76 65 72 73 ="variable">vers
5720: 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ion</b> <i class
5730: 3d 22 61 72 67 22 3e 76 61 6c 75 65 3c 2f 69 3e ="arg">value</i>
5740: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 </dt>.<dd><p>The
5750: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 certificate ver
5760: 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c sion.</p></dd>.<
5770: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5780: 69 61 62 6c 65 22 3e 73 65 72 69 61 6c 4e 75 6d iable">serialNum
5790: 62 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ber</b> <i class
57a0: 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f 69 ="arg">string</i
57b0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
57c0: 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 e serial number
57d0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
57e0: 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 te as a hex stri
57f0: 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 ng.</p></dd>.<dt
5800: 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 ><b class="varia
5810: 62 6c 65 22 3e 73 69 67 6e 61 74 75 72 65 3c 2f ble">signature</
5820: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
5830: 22 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 69 3e 3c ">algorithm</i><
5840: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 43 69 70 68 /dt>.<dd><p>Ciph
5850: 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 er algorithm use
5860: 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 d for certificat
5870: 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 70 3e e signature.</p>
5880: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
5890: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 73 ss="variable">is
58a0: 73 75 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 suer</b> <i clas
58b0: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f s="arg">string</
58c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
58d0: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
58e0: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
58f0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 e certificate is
5900: 73 75 65 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c suer.</p></dd>.<
5910: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
5920: 69 61 62 6c 65 22 3e 6e 6f 74 42 65 66 6f 72 65 iable">notBefore
5930: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
5940: 72 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f 64 74 rg">date</i></dt
5950: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 62 65 67 >.<dd><p>The beg
5960: 69 6e 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 inning date of t
5970: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 he certificate v
5980: 61 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c 2f 64 64 alidity.</p></dd
5990: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
59a0: 76 61 72 69 61 62 6c 65 22 3e 6e 6f 74 41 66 74 variable">notAft
59b0: 65 72 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d er</b> <i class=
59c0: 22 61 72 67 22 3e 64 61 74 65 3c 2f 69 3e 3c 2f "arg">date</i></
59d0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 65 dt>.<dd><p>The e
59e0: 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 6f xpiration date o
59f0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
5a00: 65 20 76 61 6c 69 64 69 74 79 2e 3c 2f 70 3e 3c e validity.</p><
5a10: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
5a20: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 75 62 s="variable">sub
5a30: 6a 65 63 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 ject</b> <i clas
5a40: 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 3c 2f s="arg">string</
5a50: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
5a60: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
5a70: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
5a80: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 75 e certificate su
5a90: 62 6a 65 63 74 2e 20 46 69 65 6c 64 73 20 69 6e bject. Fields in
5aa0: 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e 0a 4e 61 clude: Common.Na
5ab0: 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a me (CN), Organiz
5ac0: 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c ation (O), Local
5ad0: 69 74 79 20 6f 72 20 43 69 74 79 20 28 4c 29 2c ity or City (L),
5ae0: 20 53 74 61 74 65 20 6f 72 20 50 72 6f 76 69 6e State or Provin
5af0: 63 65 20 28 53 29 2c 20 61 6e 64 0a 43 6f 75 6e ce (S), and.Coun
5b00: 74 72 79 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 70 try Name (C).</p
5b10: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
5b20: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 69 ass="variable">i
5b30: 73 73 75 65 72 55 6e 69 71 75 65 49 44 3c 2f 62 ssuerUniqueID</b
5b40: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
5b50: 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e >string</i></dt>
5b60: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 69 73 73 75 .<dd><p>The issu
5b70: 65 72 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 70 er unique id.</p
5b80: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
5b90: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 ass="variable">s
5ba0: 75 62 6a 65 63 74 55 6e 69 71 75 65 49 44 3c 2f ubjectUniqueID</
5bb0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
5bc0: 22 3e 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 ">string</i></dt
5bd0: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 75 62 >.<dd><p>The sub
5be0: 6a 65 63 74 20 75 6e 69 71 75 65 20 69 64 2e 3c ject unique id.<
5bf0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
5c00: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
5c10: 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c >num_extensions<
5c20: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
5c30: 67 22 3e 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 g">n</i></dt>.<d
5c40: 64 3e 3c 70 3e 4e 75 6d 62 65 72 20 6f 66 20 63 d><p>Number of c
5c50: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e ertificate exten
5c60: 73 69 6f 6e 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a sions.</p></dd>.
5c70: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
5c80: 72 69 61 62 6c 65 22 3e 65 78 74 65 6e 73 69 6f riable">extensio
5c90: 6e 73 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ns</b> <i class=
5ca0: 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f "arg">list</i></
5cb0: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 dt>.<dd><p>List
5cc0: 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 65 of certificate e
5cd0: 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c xtension names.<
5ce0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
5cf0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
5d00: 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49 64 65 >authorityKeyIde
5d10: 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c 69 20 63 ntifier</b> <i c
5d20: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e lass="arg">strin
5d30: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
5d40: 70 3e 41 75 74 68 6f 72 69 74 79 20 4b 65 79 20 p>Authority Key
5d50: 49 64 65 6e 74 69 66 69 65 72 20 28 41 4b 49 29 Identifier (AKI)
5d60: 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67 20 of the Issuing
5d70: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20 74 CA certificate t
5d80: 68 61 74 20 73 69 67 6e 65 64 20 74 68 65 0a 53 hat signed the.S
5d90: 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 61 SL certificate a
5da0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20 s a hex string.
5db0: 54 68 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68 This value match
5dc0: 65 73 20 74 68 65 20 53 4b 49 20 76 61 6c 75 65 es the SKI value
5dd0: 20 6f 66 20 74 68 65 0a 49 6e 74 65 72 6d 65 64 of the.Intermed
5de0: 69 61 74 65 20 43 41 20 63 65 72 74 69 66 69 63 iate CA certific
5df0: 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ate.</p></dd>.<d
5e00: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
5e10: 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 4b 65 79 able">subjectKey
5e20: 49 64 65 6e 74 69 66 69 65 72 3c 2f 62 3e 20 3c Identifier</b> <
5e30: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 i class="arg">st
5e40: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
5e50: 64 3e 3c 70 3e 53 75 62 6a 65 63 74 20 4b 65 79 d><p>Subject Key
5e60: 20 49 64 65 6e 74 69 66 69 65 72 20 28 53 4b 49 Identifier (SKI
5e70: 29 20 68 61 73 68 20 6f 66 20 74 68 65 20 70 75 ) hash of the pu
5e80: 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 blic key inside
5e90: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
5ea0: 61 73 20 61 0a 68 65 78 20 73 74 72 69 6e 67 2e as a.hex string.
5eb0: 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 Used to identif
5ec0: 79 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 y certificates t
5ed0: 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 hat contain a pa
5ee0: 72 74 69 63 75 6c 61 72 20 70 75 62 6c 69 63 20 rticular public
5ef0: 6b 65 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 key.</p></dd>.<d
5f00: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
5f10: 61 62 6c 65 22 3e 73 75 62 6a 65 63 74 41 6c 74 able">subjectAlt
5f20: 4e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 Name</b> <i clas
5f30: 73 3d 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e s="arg">list</i>
5f40: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 </dt>.<dd><p>Lis
5f50: 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 20 t of all of the
5f60: 53 75 62 6a 65 63 74 20 41 6c 74 65 72 6e 61 74 Subject Alternat
5f70: 69 76 65 20 4e 61 6d 65 73 20 28 53 41 4e 29 20 ive Names (SAN)
5f80: 69 6e 63 6c 75 64 69 6e 67 20 64 6f 6d 61 69 6e including domain
5f90: 20 6e 61 6d 65 73 2c 20 73 75 62 0a 64 6f 6d 61 names, sub.doma
5fa0: 69 6e 73 2c 20 61 6e 64 20 49 50 20 61 64 64 72 ins, and IP addr
5fb0: 65 73 73 65 73 20 74 68 61 74 20 61 72 65 20 73 esses that are s
5fc0: 65 63 75 72 65 64 20 62 79 20 74 68 65 20 63 65 ecured by the ce
5fd0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f rtificate.</p></
5fe0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
5ff0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 6f 63 73 70 ="variable">ocsp
6000: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6010: 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f 64 74 rg">list</i></dt
6020: 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 6f 66 >.<dd><p>List of
6030: 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 all Online Cert
6040: 69 66 69 63 61 74 65 20 53 74 61 74 75 73 20 50 ificate Status P
6050: 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 rotocol (OCSP) U
6060: 52 4c 73 20 74 68 61 74 20 63 61 6e 20 62 65 20 RLs that can be
6070: 75 73 65 64 20 74 6f 0a 63 68 65 63 6b 20 74 68 used to.check th
6080: 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 e validity of th
6090: 69 73 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c is certificate.<
60a0: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
60b0: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
60c0: 3e 63 65 72 74 69 66 69 63 61 74 65 3c 2f 62 3e >certificate</b>
60d0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
60e0: 63 65 72 74 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 cert</i></dt>.<d
60f0: 64 3e 3c 70 3e 54 68 65 20 50 45 4d 20 65 6e 63 d><p>The PEM enc
6100: 6f 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 oded certificate
6110: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6120: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6130: 65 22 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f e">signatureAlgo
6140: 72 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 rithm</b> <i cla
6150: 73 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 ss="arg">algorit
6160: 68 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e hm</i></dt>.<dd>
6170: 3c 70 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 <p>Cipher algori
6180: 74 68 6d 20 75 73 65 64 20 66 6f 72 20 74 68 65 thm used for the
6190: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 certificate sig
61a0: 6e 61 74 75 72 65 2e 3c 2f 70 3e 3c 2f 64 64 3e nature.</p></dd>
61b0: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
61c0: 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 75 ariable">signatu
61d0: 72 65 56 61 6c 75 65 3c 2f 62 3e 20 3c 69 20 63 reValue</b> <i c
61e0: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e lass="arg">strin
61f0: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
6200: 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 p>Certificate si
6210: 67 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 78 gnature as a hex
6220: 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 string.</p></dd
6230: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
6240: 76 61 72 69 61 62 6c 65 22 3e 73 69 67 6e 61 74 variable">signat
6250: 75 72 65 44 69 67 65 73 74 3c 2f 62 3e 20 3c 69 ureDigest</b> <i
6260: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 76 65 72 class="arg">ver
6270: 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 sion</i></dt>.<d
6280: 64 3e 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 d><p>Certificate
6290: 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20 signing digest
62a0: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e as a hex string.
62b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
62c0: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
62d0: 22 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 ">publicKeyAlgor
62e0: 69 74 68 6d 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 ithm</b> <i clas
62f0: 73 3d 22 61 72 67 22 3e 61 6c 67 6f 72 69 74 68 s="arg">algorith
6300: 6d 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c m</i></dt>.<dd><
6310: 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 p>Certificate si
6320: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
6330: 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 70 ey algorithm.</p
6340: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c ></dd>.<dt><b cl
6350: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 70 ass="variable">p
6360: 75 62 6c 69 63 4b 65 79 3c 2f 62 3e 20 3c 69 20 ublicKey</b> <i
6370: 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 class="arg">stri
6380: 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e ng</i></dt>.<dd>
6390: 3c 70 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 <p>Certificate s
63a0: 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 ignature public
63b0: 6b 65 79 20 61 73 20 61 20 68 65 78 20 73 74 72 key as a hex str
63c0: 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ing.</p></dd>.<d
63d0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 t><b class="vari
63e0: 61 62 6c 65 22 3e 62 69 74 73 3c 2f 62 3e 20 3c able">bits</b> <
63f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c i class="arg">n<
6400: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
6410: 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 Number of bits u
6420: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 sed for certific
6430: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 ate signature ke
6440: 79 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e y.</p></dd>.<dt>
6450: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
6460: 6c 65 22 3e 73 65 6c 66 5f 73 69 67 6e 65 64 3c le">self_signed<
6470: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
6480: 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f g">boolean</i></
6490: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 dt>.<dd><p>Wheth
64a0: 65 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 er the certifica
64b0: 74 65 20 73 69 67 6e 61 74 75 72 65 20 69 73 20 te signature is
64c0: 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 70 3e self signed.</p>
64d0: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
64e0: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 68 ss="variable">sh
64f0: 61 31 5f 68 61 73 68 3c 2f 62 3e 20 3c 69 20 63 a1_hash</b> <i c
6500: 6c 61 73 73 3d 22 61 72 67 22 3e 68 61 73 68 3c lass="arg">hash<
6510: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
6520: 54 68 65 20 53 48 41 31 20 68 61 73 68 20 6f 66 The SHA1 hash of
6530: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
6540: 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 as a hex string
6550: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6560: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6570: 65 22 3e 73 68 61 32 35 36 5f 68 61 73 68 3c 2f e">sha256_hash</
6580: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
6590: 22 3e 68 61 73 68 3c 2f 69 3e 3c 2f 64 74 3e 0a ">hash</i></dt>.
65a0: 3c 64 64 3e 3c 70 3e 54 68 65 20 53 48 41 32 35 <dd><p>The SHA25
65b0: 36 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 6 hash of the ce
65c0: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
65d0: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f ex string.</p></
65e0: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c dd>.</dl></dd>.<
65f0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 38 22 3e 3c dt><a name="8"><
6600: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
6610: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 s::connection</b
6620: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
6630: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
6640: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 </dt>.<dd><p>Ret
6650: 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 urns the current
6660: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 connection stat
6670: 75 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 us of an SSL cha
6680: 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 nnel. The result
6690: 20 69 73 20 61 20 6c 69 73 74 0a 6f 66 20 6b 65 is a list.of ke
66a0: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 y-value pairs de
66b0: 73 63 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e scribing the con
66c0: 6e 65 63 74 69 6f 6e 2e 20 52 65 74 75 72 6e 65 nection. Returne
66d0: 64 20 76 61 6c 75 65 73 20 69 6e 63 6c 75 64 65 d values include
66e0: 3a 3c 2f 70 3e 0a 3c 70 3e 53 53 4c 20 53 74 61 :</p>.<p>SSL Sta
66f0: 74 75 73 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 tus</p>.<dl clas
6700: 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 s="doctools_defi
6710: 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 62 nitions">.<dt><b
6720: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
6730: 22 3e 73 74 61 74 65 3c 2f 62 3e 20 3c 69 20 63 ">state</b> <i c
6740: 6c 61 73 73 3d 22 61 72 67 22 3e 73 74 61 74 65 lass="arg">state
6750: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
6760: 3e 53 74 61 74 65 20 6f 66 20 74 68 65 20 63 6f >State of the co
6770: 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 nnection.</p></d
6780: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6790: 22 76 61 72 69 61 62 6c 65 22 3e 73 65 72 76 65 "variable">serve
67a0: 72 6e 61 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 rname</b> <i cla
67b0: 73 73 3d 22 61 72 67 22 3e 6e 61 6d 65 3c 2f 69 ss="arg">name</i
67c0: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 ></dt>.<dd><p>Th
67d0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f e name of the co
67e0: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 nnected to serve
67f0: 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e r.</p></dd>.<dt>
6800: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
6810: 6c 65 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 62 3e le">protocol</b>
6820: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
6830: 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e version</i></dt>
6840: 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 70 72 6f 74 .<dd><p>The prot
6850: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 ocol version use
6860: 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 d for the connec
6870: 74 69 6f 6e 3a 20 53 53 4c 32 2c 20 53 53 4c 33 tion: SSL2, SSL3
6880: 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 , TLS1, TLS1.1,
6890: 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 TLS1.2, TLS1.3,
68a0: 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 70 3e 3c or unknown.</p><
68b0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
68c0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 72 65 6e s="variable">ren
68d0: 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 egotiation_allow
68e0: 65 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d ed</b> <i class=
68f0: 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 "arg">boolean</i
6900: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 ></dt>.<dd><p>Wh
6910: 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 ether protocol r
6920: 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 enegotiation is
6930: 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 supported or not
6940: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6950: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6960: 65 22 3e 73 65 63 75 72 69 74 79 5f 6c 65 76 65 e">security_leve
6970: 6c 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 l</b> <i class="
6980: 61 72 67 22 3e 6c 65 76 65 6c 3c 2f 69 3e 3c 2f arg">level</i></
6990: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 dt>.<dd><p>The s
69a0: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 ecurity level us
69b0: 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e ed for selection
69c0: 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 of ciphers, key
69d0: 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 70 3e 3c size, etc.</p><
69e0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
69f0: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 73 s="variable">ses
6a00: 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 62 3e 20 sion_reused</b>
6a10: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 <i class="arg">b
6a20: 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a oolean</i></dt>.
6a30: 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 <dd><p>Whether t
6a40: 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 he session has b
6a50: 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f een reused or no
6a60: 74 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e t.</p></dd>.<dt>
6a70: 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 <b class="variab
6a80: 6c 65 22 3e 69 73 5f 73 65 72 76 65 72 3c 2f 62 le">is_server</b
6a90: 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 > <i class="arg"
6aa0: 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 >boolean</i></dt
6ab0: 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 >.<dd><p>Whether
6ac0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 the connection
6ad0: 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 is configured as
6ae0: 20 61 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 a server (1) or
6af0: 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 70 3e client (0).</p>
6b00: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
6b10: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 6f ss="variable">co
6b20: 6d 70 72 65 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 mpression</b> <i
6b30: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6d 6f 64 class="arg">mod
6b40: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
6b50: 70 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 p>Compression me
6b60: 74 68 6f 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c thod.</p></dd>.<
6b70: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 dt><b class="var
6b80: 69 61 62 6c 65 22 3e 65 78 70 61 6e 73 69 6f 6e iable">expansion
6b90: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6ba0: 72 67 22 3e 6d 6f 64 65 3c 2f 69 3e 3c 2f 64 74 rg">mode</i></dt
6bb0: 3e 0a 3c 64 64 3e 3c 70 3e 45 78 70 61 6e 73 69 >.<dd><p>Expansi
6bc0: 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 70 3e 3c 2f on method.</p></
6bd0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
6be0: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 61 4c 69 ="variable">caLi
6bf0: 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d st</b> <i class=
6c00: 22 61 72 67 22 3e 6c 69 73 74 3c 2f 69 3e 3c 2f "arg">list</i></
6c10: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4c 69 73 74 20 dt>.<dd><p>List
6c20: 6f 66 20 43 65 72 74 69 66 69 63 61 74 65 20 41 of Certificate A
6c30: 75 74 68 6f 72 69 74 69 65 73 20 28 43 41 29 20 uthorities (CA)
6c40: 66 6f 72 20 58 2e 35 30 39 20 63 65 72 74 69 66 for X.509 certif
6c50: 69 63 61 74 65 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a icate.</p></dd>.
6c60: 3c 2f 64 6c 3e 0a 3c 70 3e 43 69 70 68 65 72 20 </dl>.<p>Cipher
6c70: 49 6e 66 6f 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 Info</p>.<dl cla
6c80: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 ss="doctools_def
6c90: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c initions">.<dt><
6ca0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6cb0: 65 22 3e 63 69 70 68 65 72 3c 2f 62 3e 20 3c 69 e">cipher</b> <i
6cc0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 69 70 class="arg">cip
6cd0: 68 65 72 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 her</i></dt>.<dd
6ce0: 3e 3c 70 3e 54 68 65 20 63 75 72 72 65 6e 74 20 ><p>The current
6cf0: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f cipher in use fo
6d00: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e r the connection
6d10: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6d20: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6d30: 65 22 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 e">standard_name
6d40: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
6d50: 72 67 22 3e 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 rg">name</i></dt
6d60: 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 74 61 >.<dd><p>The sta
6d70: 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f ndard RFC name o
6d80: 66 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 f cipher.</p></d
6d90: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6da0: 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 67 6f 72 "variable">algor
6db0: 69 74 68 6d 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 ithm_bits</b> <i
6dc0: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f class="arg">n</
6dd0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
6de0: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f he number of pro
6df0: 63 65 73 73 65 64 20 62 69 74 73 20 75 73 65 64 cessed bits used
6e00: 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e for cipher.</p>
6e10: 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 </dd>.<dt><b cla
6e20: 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 73 65 ss="variable">se
6e30: 63 72 65 74 5f 62 69 74 73 3c 2f 62 3e 20 3c 69 cret_bits</b> <i
6e40: 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6e 3c 2f class="arg">n</
6e50: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
6e60: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 he number of sec
6e70: 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f ret bits used fo
6e80: 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f 64 r cipher.</p></d
6e90: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
6ea0: 22 76 61 72 69 61 62 6c 65 22 3e 6d 69 6e 5f 76 "variable">min_v
6eb0: 65 72 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c ersion</b> <i cl
6ec0: 61 73 73 3d 22 61 72 67 22 3e 76 65 72 73 69 6f ass="arg">versio
6ed0: 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c n</i></dt>.<dd><
6ee0: 70 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 p>The minimum pr
6ef0: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 otocol version f
6f00: 6f 72 20 63 69 70 68 65 72 2e 3c 2f 70 3e 3c 2f or cipher.</p></
6f10: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
6f20: 3d 22 76 61 72 69 61 62 6c 65 22 3e 63 69 70 68 ="variable">ciph
6f30: 65 72 5f 69 73 5f 61 65 61 64 3c 2f 62 3e 20 3c er_is_aead</b> <
6f40: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 6f i class="arg">bo
6f50: 6f 6c 65 61 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c olean</i></dt>.<
6f60: 64 64 3e 3c 70 3e 57 68 65 74 68 65 72 20 74 68 dd><p>Whether th
6f70: 65 20 63 69 70 68 65 72 20 69 73 20 41 75 74 68 e cipher is Auth
6f80: 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72 79 70 enticated Encryp
6f90: 74 69 6f 6e 20 77 69 74 68 20 41 73 73 6f 63 69 tion with Associ
6fa0: 61 74 65 64 20 44 61 74 61 20 28 41 45 41 44 29 ated Data (AEAD)
6fb0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
6fc0: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
6fd0: 65 22 3e 63 69 70 68 65 72 5f 69 64 3c 2f 62 3e e">cipher_id</b>
6fe0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
6ff0: 69 64 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e id</i></dt>.<dd>
7000: 3c 70 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20 63 <p>The OpenSSL c
7010: 69 70 68 65 72 20 69 64 2e 3c 2f 70 3e 3c 2f 64 ipher id.</p></d
7020: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7030: 22 76 61 72 69 61 62 6c 65 22 3e 64 65 73 63 72 "variable">descr
7040: 69 70 74 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c iption</b> <i cl
7050: 61 73 73 3d 22 61 72 67 22 3e 73 74 72 69 6e 67 ass="arg">string
7060: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
7070: 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 70 74 >A text descript
7080: 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 ion of the ciphe
7090: 72 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e r.</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 68 61 6e 64 73 68 61 6b 65 5f 64 69 le">handshake_di
70c0: 67 65 73 74 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 gest</b> <i clas
70d0: 73 3d 22 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c s="arg">boolean<
70e0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
70f0: 44 69 67 65 73 74 20 75 73 65 64 20 64 75 72 69 Digest used duri
7100: 6e 67 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 70 ng handshake.</p
7110: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 70 3e ></dd>.</dl>.<p>
7120: 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 70 3e Session Info</p>
7130: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
7140: 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 6f 6e 73 ools_definitions
7150: 22 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d ">.<dt><b class=
7160: 22 76 61 72 69 61 62 6c 65 22 3e 61 6c 70 6e 3c "variable">alpn<
7170: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
7180: 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3c g">protocol</i><
7190: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
71a0: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 protocol selecte
71b0: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 d after Applicat
71c0: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
71d0: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 ol Negotiation (
71e0: 41 4c 50 4e 29 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a ALPN).</p></dd>.
71f0: 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 61 <dt><b class="va
7200: 72 69 61 62 6c 65 22 3e 72 65 73 75 6d 61 62 6c riable">resumabl
7210: 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 e</b> <i class="
7220: 61 72 67 22 3e 62 6f 6f 6c 65 61 6e 3c 2f 69 3e arg">boolean</i>
7230: 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 57 68 65 </dt>.<dd><p>Whe
7240: 74 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e ther the session
7250: 20 63 61 6e 20 62 65 20 72 65 73 75 6d 65 64 20 can be resumed
7260: 6f 72 20 6e 6f 74 2e 3c 2f 70 3e 3c 2f 64 64 3e or not.</p></dd>
7270: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
7280: 61 72 69 61 62 6c 65 22 3e 73 74 61 72 74 5f 74 ariable">start_t
7290: 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ime</b> <i class
72a0: 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f ="arg">seconds</
72b0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 i></dt>.<dd><p>T
72c0: 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 69 6f ime since sessio
72d0: 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 65 63 n started in sec
72e0: 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f 63 68 onds since epoch
72f0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
7300: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
7310: 65 22 3e 74 69 6d 65 6f 75 74 3c 2f 62 3e 20 3c e">timeout</b> <
7320: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 i class="arg">se
7330: 63 6f 6e 64 73 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c conds</i></dt>.<
7340: 64 64 3e 3c 70 3e 4d 61 78 20 64 75 72 61 74 69 dd><p>Max durati
7350: 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e on of session in
7360: 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 seconds before
7370: 74 69 6d 65 2d 6f 75 74 2e 3c 2f 70 3e 3c 2f 64 time-out.</p></d
7380: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
7390: 22 76 61 72 69 61 62 6c 65 22 3e 6c 69 66 65 74 "variable">lifet
73a0: 69 6d 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 ime</b> <i class
73b0: 3d 22 61 72 67 22 3e 73 65 63 6f 6e 64 73 3c 2f ="arg">seconds</
73c0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 i></dt>.<dd><p>S
73d0: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 ession ticket li
73e0: 66 65 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 fetime hint in s
73f0: 65 63 6f 6e 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e econds.</p></dd>
7400: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
7410: 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e ariable">session
7420: 5f 69 64 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 _id</b> <i class
7430: 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 ="arg">binary_st
7440: 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 ring</i></dt>.<d
7450: 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 73 73 d><p>Unique sess
7460: 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 ion id for use i
7470: 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 n resuming the s
7480: 65 73 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e ession.</p></dd>
7490: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 76 .<dt><b class="v
74a0: 61 72 69 61 62 6c 65 22 3e 73 65 73 73 69 6f 6e ariable">session
74b0: 5f 74 69 63 6b 65 74 3c 2f 62 3e 20 3c 69 20 63 _ticket</b> <i c
74c0: 6c 61 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 lass="arg">binar
74d0: 79 5f 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 y_string</i></dt
74e0: 3e 0a 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 >.<dd><p>Unique
74f0: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 session ticket f
7500: 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 or use in resumi
7510: 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c ng the session.<
7520: 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 /p></dd>.<dt><b
7530: 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 class="variable"
7540: 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 >ticket_app_data
7550: 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 </b> <i class="a
7560: 72 67 22 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e rg">binary_strin
7570: 67 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c g</i></dt>.<dd><
7580: 70 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e p>Unique session
7590: 20 74 69 63 6b 65 74 20 61 70 70 6c 69 63 61 74 ticket applicat
75a0: 69 6f 6e 20 64 61 74 61 2e 3c 2f 70 3e 3c 2f 64 ion data.</p></d
75b0: 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d d>.<dt><b class=
75c0: 22 76 61 72 69 61 62 6c 65 22 3e 6d 61 73 74 65 "variable">maste
75d0: 72 5f 6b 65 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 r_key</b> <i cla
75e0: 73 73 3d 22 61 72 67 22 3e 62 69 6e 61 72 79 5f ss="arg">binary_
75f0: 73 74 72 69 6e 67 3c 2f 69 3e 3c 2f 64 74 3e 0a string</i></dt>.
7600: 3c 64 64 3e 3c 70 3e 55 6e 69 71 75 65 20 73 65 <dd><p>Unique se
7610: 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 ssion master key
7620: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
7630: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
7640: 65 22 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 e">session_cache
7650: 5f 6d 6f 64 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 _mode</b> <i cla
7660: 73 73 3d 22 61 72 67 22 3e 6d 6f 64 65 3c 2f 69 ss="arg">mode</i
7670: 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 65 ></dt>.<dd><p>Se
7680: 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 rver cache mode
7690: 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c (client, server,
76a0: 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 70 3e 3c 2f or both).</p></
76b0: 64 64 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c dd>.</dl></dd>.<
76c0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 39 22 3e 3c dt><a name="9"><
76d0: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
76e0: 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c s::ciphers</b> <
76f0: 73 70 61 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 span class="opt"
7700: 3e 3f 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 >?<i class="arg"
7710: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 69 3e 3f 3c 2f >protocol</i>?</
7720: 73 70 61 6e 3e 20 3c 73 70 61 6e 20 63 6c 61 73 span> <span clas
7730: 73 3d 22 6f 70 74 22 3e 3f 3c 69 20 63 6c 61 73 s="opt">?<i clas
7740: 73 3d 22 61 72 67 22 3e 76 65 72 62 6f 73 65 3c s="arg">verbose<
7750: 2f 69 3e 3f 3c 2f 73 70 61 6e 3e 20 3c 73 70 61 /i>?</span> <spa
7760: 6e 20 63 6c 61 73 73 3d 22 6f 70 74 22 3e 3f 3c n class="opt">?<
7770: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 i class="arg">su
7780: 70 70 6f 72 74 65 64 3c 2f 69 3e 3f 3c 2f 73 70 pported</i>?</sp
7790: 61 6e 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 an></a></dt>.<dd
77a0: 3e 3c 70 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 ><p>Without any
77b0: 61 72 67 73 2c 20 72 65 74 75 72 6e 73 20 61 20 args, returns a
77c0: 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d 6d list of all symm
77d0: 65 74 72 69 63 20 63 69 70 68 65 72 73 20 66 6f etric ciphers fo
77e0: 72 20 75 73 65 20 77 69 74 68 20 74 68 65 0a 3c r use with the.<
77f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 2d 63 i class="arg">-c
7800: 69 70 68 65 72 3c 2f 69 3e 20 6f 70 74 69 6f 6e ipher</i> option
7810: 2e 20 57 69 74 68 20 3c 69 20 63 6c 61 73 73 3d . With <i class=
7820: 22 61 72 67 22 3e 70 72 6f 74 6f 63 6f 6c 3c 2f "arg">protocol</
7830: 69 3e 2c 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 i>, only the cip
7840: 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 hers supported f
7850: 6f 72 20 74 68 61 74 0a 70 72 6f 74 6f 63 6f 6c or that.protocol
7860: 20 61 72 65 20 72 65 74 75 72 6e 65 64 2e 20 53 are returned. S
7870: 65 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d ee the <b class=
7880: 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f "cmd">tls::proto
7890: 63 6f 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 cols</b> command
78a0: 20 66 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 for the support
78b0: 65 64 0a 70 72 6f 74 6f 63 6f 6c 73 2e 20 49 66 ed.protocols. If
78c0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
78d0: 76 65 72 62 6f 73 65 3c 2f 69 3e 20 69 73 20 73 verbose</i> is s
78e0: 70 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65 pecified as true
78f0: 20 74 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c then a verbose,
7900: 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 0a human readable.
7910: 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 list is returned
7920: 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c with additional
7930: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 information on
7940: 74 68 65 20 63 69 70 68 65 72 2e 20 49 66 20 3c the cipher. If <
7950: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 75 i class="arg">su
7960: 70 70 6f 72 74 65 64 3c 2f 69 3e 0a 69 73 20 73 pported</i>.is s
7970: 70 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65 pecified as true
7980: 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 , then only the
7990: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 ciphers supporte
79a0: 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 d for protocol w
79b0: 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f ill be listed.</
79c0: 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 61 20 6e p></dd>.<dt><a n
79d0: 61 6d 65 3d 22 31 30 22 3e 3c 62 20 63 6c 61 73 ame="10"><b clas
79e0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f s="cmd">tls::pro
79f0: 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 2f tocols</b></a></
7a00: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 52 65 74 75 72 dt>.<dd><p>Retur
7a10: 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 74 68 65 ns a list of the
7a20: 20 73 75 70 70 6f 72 74 65 64 20 53 53 4c 2f 54 supported SSL/T
7a30: 4c 53 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 LS protocols. Va
7a40: 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a lid values are:.
7a50: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
7a60: 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 20 63 6c >ssl2</b>, <b cl
7a70: 61 73 73 3d 22 63 6f 6e 73 74 22 3e 73 73 6c 33 ass="const">ssl3
7a80: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 </b>, <b class="
7a90: 63 6f 6e 73 74 22 3e 74 6c 73 31 3c 2f 62 3e 2c const">tls1</b>,
7aa0: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
7ab0: 22 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62 ">tls1.1</b>, <b
7ac0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 74 class="const">t
7ad0: 6c 73 31 2e 32 3c 2f 62 3e 2c 20 61 6e 64 0a 3c ls1.2</b>, and.<
7ae0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
7af0: 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 tls1.3</b>. Exac
7b00: 74 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f t list depends o
7b10: 6e 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f n OpenSSL versio
7b20: 6e 20 61 6e 64 20 63 6f 6d 70 69 6c 65 20 74 69 n and compile ti
7b30: 6d 65 20 66 6c 61 67 73 2e 3c 2f 70 3e 3c 2f 64 me flags.</p></d
7b40: 64 3e 0a 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 d>.<dt><a name="
7b50: 31 31 22 3e 3c 62 20 63 6c 61 73 73 3d 22 63 6d 11"><b class="cm
7b60: 64 22 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c d">tls::version<
7b70: 2f 62 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 3c 64 64 /b></a></dt>.<dd
7b80: 3e 3c 70 3e 52 65 74 75 72 6e 73 20 74 68 65 20 ><p>Returns the
7b90: 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 OpenSSL version
7ba0: 73 74 72 69 6e 67 2e 3c 2f 70 3e 3c 2f 64 64 3e string.</p></dd>
7bb0: 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 .</dl>.</div>.<d
7bc0: 69 76 20 69 64 3d 22 73 65 63 74 69 6f 6e 33 22 iv id="section3"
7bd0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
7be0: 5f 73 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 _section"><h2><a
7bf0: 20 6e 61 6d 65 3d 22 73 65 63 74 69 6f 6e 33 22 name="section3"
7c00: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c >Certificate Val
7c10: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e idation</a></h2>
7c20: 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 .<div id="subsec
7c30: 74 69 6f 6e 31 22 20 63 6c 61 73 73 3d 22 64 6f tion1" class="do
7c40: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f ctools_subsectio
7c50: 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h3><a name="
7c60: 73 75 62 73 65 63 74 69 6f 6e 31 22 3e 50 4b 49 subsection1">PKI
7c70: 20 61 6e 64 20 43 65 72 74 69 66 69 63 61 74 65 and Certificate
7c80: 73 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e 55 73 s</a></h3>.<p>Us
7c90: 69 6e 67 20 74 68 65 20 50 75 62 6c 69 63 20 4b ing the Public K
7ca0: 65 79 20 49 6e 66 72 61 73 74 72 75 63 74 75 72 ey Infrastructur
7cb0: 65 20 28 50 4b 49 29 2c 20 65 61 63 68 20 75 73 e (PKI), each us
7cc0: 65 72 20 63 72 65 61 74 65 73 20 61 20 70 72 69 er creates a pri
7cd0: 76 61 74 65 20 6b 65 79 20 74 68 61 74 0a 6f 6e vate key that.on
7ce0: 6c 79 20 74 68 65 79 20 6b 6e 6f 77 20 61 62 6f ly they know abo
7cf0: 75 74 20 61 6e 64 20 61 20 70 75 62 6c 69 63 20 ut and a public
7d00: 6b 65 79 20 74 68 65 79 20 63 61 6e 20 65 78 63 key they can exc
7d10: 68 61 6e 67 65 20 77 69 74 68 20 6f 74 68 65 72 hange with other
7d20: 73 20 66 6f 72 20 75 73 65 20 69 6e 0a 65 6e 63 s for use in.enc
7d30: 72 79 70 74 69 6e 67 20 61 6e 64 20 64 65 63 72 rypting and decr
7d40: 79 70 74 69 6e 67 20 64 61 74 61 2e 20 54 68 65 ypting data. The
7d50: 20 70 72 6f 63 65 73 73 20 69 73 20 74 68 65 20 process is the
7d60: 73 65 6e 64 65 72 20 65 6e 63 72 79 70 74 73 20 sender encrypts
7d70: 74 68 65 69 72 20 64 61 74 61 0a 75 73 69 6e 67 their data.using
7d80: 20 74 68 65 69 72 20 70 72 69 76 61 74 65 20 6b their private k
7d90: 65 79 20 61 6e 64 20 74 68 65 20 72 65 63 65 69 ey and the recei
7da0: 76 65 72 27 73 20 70 75 62 6c 69 63 20 6b 65 79 ver's public key
7db0: 2e 20 54 68 65 20 64 61 74 61 20 69 73 20 74 68 . The data is th
7dc0: 65 6e 20 73 65 6e 74 0a 74 6f 20 74 68 65 20 72 en sent.to the r
7dd0: 65 63 65 69 76 65 72 2e 20 49 6e 20 61 20 73 69 eceiver. In a si
7de0: 6d 69 6c 61 72 20 6d 61 6e 6e 65 72 2c 20 74 68 milar manner, th
7df0: 65 20 72 65 63 65 69 76 65 72 20 75 73 65 73 20 e receiver uses
7e00: 74 68 65 69 72 20 70 72 69 76 61 74 65 20 6b 65 their private ke
7e10: 79 20 61 6e 64 0a 74 68 65 20 73 65 6e 64 65 72 y and.the sender
7e20: 27 73 20 70 75 62 6c 69 63 20 6b 65 79 20 74 6f 's public key to
7e30: 20 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 decrypt the dat
7e40: 61 2e 20 54 68 69 73 20 70 72 6f 76 69 64 65 73 a. This provides
7e50: 20 64 61 74 61 20 69 6e 74 65 67 72 69 74 79 2c data integrity,
7e60: 20 74 6f 0a 65 6e 73 75 72 65 20 74 68 65 20 64 to.ensure the d
7e70: 61 74 61 20 63 61 6e 27 74 20 62 65 20 76 69 65 ata can't be vie
7e80: 77 65 64 20 6f 72 20 61 6c 74 65 72 65 64 20 64 wed or altered d
7e90: 75 72 69 6e 67 20 74 72 61 6e 73 70 6f 72 74 2e uring transport.
7ea0: 20 53 65 65 20 74 68 65 0a 3c 62 20 63 6c 61 73 See the.<b clas
7eb0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 3c s="option">-key<
7ec0: 2f 62 3e 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 /b> and <b class
7ed0: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 6b 65 79 66 69 ="option">-keyfi
7ee0: 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 66 le</b> options f
7ef0: 6f 72 20 68 6f 77 20 74 6f 20 73 70 65 63 69 66 or how to specif
7f00: 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 y the private ke
7f10: 79 2e 0a 41 6c 73 6f 20 73 65 65 20 74 68 65 20 y..Also see the
7f20: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
7f30: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 20 ">-password</b>
7f40: 6f 70 74 69 6f 6e 20 66 6f 72 20 68 6f 77 20 74 option for how t
7f50: 6f 20 70 72 6f 76 69 64 65 20 74 68 65 20 70 61 o provide the pa
7f60: 73 73 77 6f 72 64 2e 3c 2f 70 3e 0a 3c 70 3e 49 ssword.</p>.<p>I
7f70: 6e 20 6f 72 64 65 72 20 74 6f 20 70 72 6f 76 69 n order to provi
7f80: 64 65 20 61 75 74 68 65 6e 74 69 63 61 74 69 6f de authenticatio
7f90: 6e 2c 20 69 2e 65 2e 20 65 6e 73 75 72 69 6e 67 n, i.e. ensuring
7fa0: 20 73 6f 6d 65 6f 6e 65 20 69 73 20 77 68 6f 20 someone is who
7fb0: 74 68 65 79 20 73 61 79 20 74 68 65 79 0a 61 72 they say they.ar
7fc0: 65 2c 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 e, the public ke
7fd0: 79 20 61 6e 64 20 75 73 65 72 20 69 64 65 6e 74 y and user ident
7fe0: 69 66 69 63 61 74 69 6f 6e 20 69 6e 66 6f 20 69 ification info i
7ff0: 73 20 73 74 6f 72 65 64 20 69 6e 20 61 20 58 2e s stored in a X.
8000: 35 30 39 0a 63 65 72 74 69 66 69 63 61 74 65 20 509.certificate
8010: 61 6e 64 20 74 68 61 74 20 63 65 72 74 69 66 69 and that certifi
8020: 63 61 74 65 20 69 73 20 61 75 74 68 65 6e 74 69 cate is authenti
8030: 63 61 74 65 64 20 28 69 2e 65 2e 20 73 69 67 6e cated (i.e. sign
8040: 65 64 29 20 62 79 20 61 20 43 65 72 74 69 66 69 ed) by a Certifi
8050: 63 61 74 65 0a 41 75 74 68 6f 72 69 74 79 20 28 cate.Authority (
8060: 43 41 29 2e 20 55 73 65 72 73 20 63 61 6e 20 74 CA). Users can t
8070: 68 65 6e 20 65 78 63 68 61 6e 67 65 20 74 68 65 hen exchange the
8080: 73 65 20 63 65 72 74 69 66 69 63 61 74 65 73 20 se certificates
8090: 64 75 72 69 6e 67 20 74 68 65 20 54 4c 53 0a 69 during the TLS.i
80a0: 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 70 72 nitialization pr
80b0: 6f 63 65 73 73 20 61 6e 64 20 63 68 65 63 6b 20 ocess and check
80c0: 74 68 65 6d 20 61 67 61 69 6e 73 74 20 74 68 65 them against the
80d0: 20 72 6f 6f 74 20 43 41 20 63 65 72 74 69 66 69 root CA certifi
80e0: 63 61 74 65 73 20 74 6f 20 65 6e 73 75 72 65 0a cates to ensure.
80f0: 74 68 65 79 20 61 72 65 20 76 61 6c 69 64 2e 20 they are valid.
8100: 54 68 69 73 20 69 73 20 68 61 6e 64 6c 65 64 20 This is handled
8110: 62 79 20 4f 70 65 6e 53 53 4c 20 76 69 61 20 74 by OpenSSL via t
8120: 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 he <b class="opt
8130: 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 ion">-request</b
8140: 3e 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 > and.<b class="
8150: 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 option">-require
8160: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 2e 20 53 65 </b> options. Se
8170: 65 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 e the <b class="
8180: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f option">-cadir</
8190: 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 b>, <b class="op
81a0: 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e tion">-cadir</b>
81b0: 2c 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 , and.<b class="
81c0: 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 65 option">-castore
81d0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 66 6f 72 </b> options for
81e0: 20 68 6f 77 20 74 70 20 73 70 65 63 69 66 79 20 how tp specify
81f0: 77 68 65 72 65 20 74 6f 20 66 69 6e 64 20 74 68 where to find th
8200: 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 e CA certificate
8210: 73 2e 0a 4f 70 74 69 6f 6e 61 6c 6c 79 2c 20 69 s..Optionally, i
8220: 6e 20 61 20 66 75 74 75 72 65 20 72 65 6c 65 61 n a future relea
8230: 73 65 2c 20 74 68 65 79 20 63 61 6e 20 61 6c 73 se, they can als
8240: 6f 20 62 65 20 63 68 65 63 6b 65 64 20 61 67 61 o be checked aga
8250: 69 6e 73 74 20 74 68 65 20 43 65 72 74 69 66 69 inst the Certifi
8260: 63 61 74 65 0a 52 65 76 6f 63 61 74 69 6f 6e 20 cate.Revocation
8270: 4c 69 73 74 20 28 43 52 4c 29 20 6f 66 20 72 65 List (CRL) of re
8280: 76 6f 6b 65 64 20 63 65 72 74 69 66 69 63 61 74 voked certificat
8290: 65 73 2e 20 43 65 72 74 69 66 69 63 61 74 65 73 es. Certificates
82a0: 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a 73 65 6c can also be.sel
82b0: 66 2d 73 69 67 6e 65 64 2c 20 62 75 74 20 74 68 f-signed, but th
82c0: 65 79 20 61 72 65 20 62 79 20 64 65 66 61 75 6c ey are by defaul
82d0: 74 20 6e 6f 74 20 74 72 75 73 74 65 64 20 75 6e t not trusted un
82e0: 6c 65 73 73 20 79 6f 75 20 61 64 64 20 74 68 65 less you add the
82f0: 6d 20 74 6f 20 79 6f 75 72 0a 63 65 72 74 69 66 m to your.certif
8300: 69 63 61 74 65 20 73 74 6f 72 65 2e 3c 2f 70 3e icate store.</p>
8310: 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 77 68 .<p>Typically wh
8320: 65 6e 20 76 69 73 69 74 69 6e 67 20 77 65 62 20 en visiting web
8330: 73 69 74 65 73 2c 20 6f 6e 6c 79 20 74 68 65 20 sites, only the
8340: 63 6c 69 65 6e 74 20 6e 65 65 64 73 20 74 6f 20 client needs to
8350: 63 68 65 63 6b 20 74 68 65 20 73 65 72 76 65 72 check the server
8360: 27 73 0a 63 65 72 74 69 66 69 63 61 74 65 20 74 's.certificate t
8370: 6f 20 65 6e 73 75 72 65 20 69 74 20 69 73 20 76 o ensure it is v
8380: 61 6c 69 64 2e 20 54 68 65 20 73 65 72 76 65 72 alid. The server
8390: 20 64 6f 65 73 6e 27 74 20 6e 65 65 64 20 74 6f doesn't need to
83a0: 20 63 68 65 63 6b 20 74 68 65 20 63 6c 69 65 6e check the clien
83b0: 74 0a 63 65 72 74 69 66 69 63 61 74 65 20 75 6e t.certificate un
83c0: 6c 65 73 73 20 79 6f 75 20 6e 65 65 64 20 74 6f less you need to
83d0: 20 61 75 74 68 65 6e 74 69 63 61 74 65 20 77 69 authenticate wi
83e0: 74 68 20 74 68 65 6d 20 74 6f 20 6c 6f 67 69 6e th them to login
83f0: 2c 20 65 74 63 2e 20 53 65 65 20 74 68 65 0a 3c , etc. See the.<
8400: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8410: 3e 2d 63 65 72 74 3c 2f 62 3e 20 61 6e 64 20 3c >-cert</b> and <
8420: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
8430: 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 62 3e 20 6f >-certfile</b> o
8440: 70 74 69 6f 6e 73 20 69 66 20 79 6f 75 20 6e 65 ptions if you ne
8450: 65 64 20 74 6f 20 70 72 6f 76 69 64 65 20 61 20 ed to provide a
8460: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 70 3e certificate.</p>
8470: 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d .</div>.<div id=
8480: 22 73 75 62 73 65 63 74 69 6f 6e 32 22 20 63 6c "subsection2" cl
8490: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 75 ass="doctools_su
84a0: 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e 3c 61 bsection"><h3><a
84b0: 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 69 6f name="subsectio
84c0: 6e 32 22 3e 53 75 6d 6d 61 72 79 20 6f 66 20 63 n2">Summary of c
84d0: 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 ommand line opti
84e0: 6f 6e 73 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e ons</a></h3>.<p>
84f0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 The following op
8500: 74 69 6f 6e 73 20 61 72 65 20 75 73 65 64 20 66 tions are used f
8510: 6f 72 20 70 65 65 72 20 63 65 72 74 69 66 69 63 or peer certific
8520: 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 3a 3c ate validation:<
8530: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 /p>.<dl class="d
8540: 6f 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 octools_options"
8550: 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 >.<dt><b class="
8560: 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f option">-cadir</
8570: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
8580: 22 3e 64 69 72 65 63 74 6f 72 79 3c 2f 69 3e 3c ">directory</i><
8590: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 53 70 65 63 /dt>.<dd><p>Spec
85a0: 69 66 69 65 73 20 74 68 65 20 64 69 72 65 63 74 ifies the direct
85b0: 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 43 65 ory where the Ce
85c0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
85d0: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 ity (CA) certifi
85e0: 63 61 74 65 73 20 61 72 65 0a 73 74 6f 72 65 64 cates are.stored
85f0: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 . The default is
8600: 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66 platform specif
8610: 69 63 2c 20 62 75 74 20 69 73 20 75 73 75 61 6c ic, but is usual
8620: 6c 79 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 ly "<b clas
8630: 73 3d 22 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 s="file">/etc/ss
8640: 6c 2f 63 65 72 74 73 3c 2f 62 3e 26 71 75 6f 74 l/certs</b>"
8650: 3b 20 6f 6e 0a 4c 69 6e 75 78 2f 55 6e 69 78 20 ; on.Linux/Unix
8660: 73 79 73 74 65 6d 73 2e 20 54 68 65 20 64 65 66 systems. The def
8670: 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20 63 61 ault location ca
8680: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 n be overridden
8690: 62 79 20 74 68 65 0a 3c 62 20 63 6c 61 73 73 3d by the.<b class=
86a0: 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 "variable">SSL_C
86b0: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 ERT_DIR</b> envi
86c0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
86d0: 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c .</p></dd>.<dt><
86e0: 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 b class="option"
86f0: 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 3c 69 20 >-cafile</b> <i
8700: 63 6c 61 73 73 3d 22 61 72 67 22 3e 66 69 6c 65 class="arg">file
8710: 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 name</i></dt>.<d
8720: 64 3e 3c 70 3e 53 70 65 63 69 66 69 65 73 20 74 d><p>Specifies t
8730: 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 he file with the
8740: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
8750: 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 hority (CA) cert
8760: 69 66 69 63 61 74 65 73 20 74 6f 20 75 73 65 20 ificates to use
8770: 69 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e in.<b class="con
8780: 73 74 22 3e 50 45 4d 3c 2f 62 3e 20 66 69 6c 65 st">PEM</b> file
8790: 20 66 6f 72 6d 61 74 2e 20 54 68 65 20 64 65 66 format. The def
87a0: 61 75 6c 74 20 69 73 20 26 71 75 6f 74 3b 3c 62 ault is "<b
87b0: 20 63 6c 61 73 73 3d 22 66 69 6c 65 22 3e 63 65 class="file">ce
87c0: 72 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b rt.pem</b>"
87d0: 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53 53 4c , in the OpenSSL
87e0: 0a 64 69 72 65 63 74 6f 72 79 2e 20 4f 6e 20 4c .directory. On L
87f0: 69 6e 75 78 2f 55 6e 69 78 20 73 79 73 74 65 6d inux/Unix system
8800: 73 2c 20 74 68 69 73 20 69 73 20 75 73 75 61 6c s, this is usual
8810: 6c 79 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 ly "<b clas
8820: 73 3d 22 66 69 6c 65 22 3e 2f 65 74 63 2f 73 73 s="file">/etc/ss
8830: 6c 2f 63 61 2d 62 75 6e 64 6c 65 2e 70 65 6d 3c l/ca-bundle.pem<
8840: 2f 62 3e 26 71 75 6f 74 3b 2e 0a 54 68 65 20 64 /b>"..The d
8850: 65 66 61 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 efault file can
8860: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 62 79 be overridden by
8870: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 76 the <b class="v
8880: 61 72 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 ariable">SSL_CER
8890: 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 T_FILE</b> envir
88a0: 6f 6e 6d 65 6e 74 0a 76 61 72 69 61 62 6c 65 2e onment.variable.
88b0: 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 </p></dd>.<dt><b
88c0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
88d0: 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 3c 69 20 -castore</b> <i
88e0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 55 52 49 3c class="arg">URI<
88f0: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
8900: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 55 6e Specifies the Un
8910: 69 66 6f 72 6d 20 52 65 73 6f 75 72 63 65 20 49 iform Resource I
8920: 64 65 6e 74 69 66 69 65 72 20 28 55 52 49 29 20 dentifier (URI)
8930: 66 6f 72 20 74 68 65 20 43 65 72 74 69 66 69 63 for the Certific
8940: 61 74 65 20 41 75 74 68 6f 72 69 74 79 0a 28 43 ate Authority.(C
8950: 41 29 20 73 74 6f 72 65 2c 20 77 68 69 63 68 20 A) store, which
8960: 6d 61 79 20 62 65 20 61 20 73 69 6e 67 6c 65 20 may be a single
8970: 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 61 20 63 container or a c
8980: 61 74 61 6c 6f 67 20 6f 66 20 63 6f 6e 74 61 69 atalog of contai
8990: 6e 65 72 73 2e 0a 53 74 61 72 74 69 6e 67 20 77 ners..Starting w
89a0: 69 74 68 20 4f 70 65 6e 53 53 4c 20 33 2e 32 20 ith OpenSSL 3.2
89b0: 6f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 on MS Windows, s
89c0: 65 74 20 74 6f 20 26 71 75 6f 74 3b 3c 62 20 63 et to "<b c
89d0: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 lass="const">org
89e0: 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 .openssl.winstor
89f0: 65 3a 2f 2f 3c 2f 62 3e 26 71 75 6f 74 3b 0a 74 e://</b>".t
8a00: 6f 20 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d o use the built-
8a10: 69 6e 20 4d 53 20 57 69 6e 64 6f 77 73 20 43 65 in MS Windows Ce
8a20: 72 74 69 66 69 63 61 74 65 20 53 74 6f 72 65 2e rtificate Store.
8a30: 0a 54 68 69 73 20 73 74 6f 72 65 20 6f 6e 6c 79 .This store only
8a40: 20 73 75 70 70 6f 72 74 73 20 72 6f 6f 74 20 63 supports root c
8a50: 65 72 74 69 66 69 63 61 74 65 20 73 74 6f 72 65 ertificate store
8a60: 73 2e 20 53 65 65 0a 3c 73 70 61 6e 20 63 6c 61 s. See.<span cla
8a70: 73 73 3d 22 73 65 63 74 72 65 66 22 3e 3c 61 20 ss="sectref"><a
8a80: 68 72 65 66 3d 22 23 73 65 63 74 69 6f 6e 33 22 href="#section3"
8a90: 3e 43 65 72 74 69 66 69 63 61 74 65 20 56 61 6c >Certificate Val
8aa0: 69 64 61 74 69 6f 6e 3c 2f 61 3e 3c 2f 73 70 61 idation</a></spa
8ab0: 6e 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 n> for more deta
8ac0: 69 6c 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ils.</p></dd>.<d
8ad0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
8ae0: 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c 2f 62 3e on">-request</b>
8af0: 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e <i class="arg">
8b00: 62 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 bool</i></dt>.<d
8b10: 64 3e 3c 70 3e 52 65 71 75 65 73 74 20 61 20 63 d><p>Request a c
8b20: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 ertificate from
8b30: 74 68 65 20 70 65 65 72 20 64 75 72 69 6e 67 20 the peer during
8b40: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b the SSL handshak
8b50: 65 2e 20 54 68 69 73 20 69 73 20 6e 65 65 64 65 e. This is neede
8b60: 64 0a 74 6f 20 64 6f 20 43 65 72 74 69 66 69 63 d.to do Certific
8b70: 61 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 2e 20 ate Validation.
8b80: 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 6c 54 Starting in TclT
8b90: 4c 53 20 31 2e 38 2c 20 74 68 65 20 64 65 66 61 LS 1.8, the defa
8ba0: 75 6c 74 20 69 73 0a 3c 62 20 63 6c 61 73 73 3d ult is.<b class=
8bb0: 22 63 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e "const">true</b>
8bc0: 2e 20 53 74 61 72 74 69 6e 67 20 69 6e 20 54 63 . Starting in Tc
8bd0: 6c 54 4c 53 20 32 2e 30 2c 20 49 66 20 73 65 74 lTLS 2.0, If set
8be0: 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f to <b class="co
8bf0: 6e 73 74 22 3e 66 61 6c 73 65 3c 2f 62 3e 20 61 nst">false</b> a
8c00: 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 nd.<b class="opt
8c10: 69 6f 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 ion">-require</b
8c20: 3e 20 69 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 > is <b class="c
8c30: 6f 6e 73 74 22 3e 74 72 75 65 3c 2f 62 3e 2c 20 onst">true</b>,
8c40: 74 68 65 6e 20 74 68 69 73 20 77 69 6c 6c 20 62 then this will b
8c50: 65 20 6f 76 65 72 72 69 64 64 65 6e 20 74 6f 20 e overridden to
8c60: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
8c70: 3e 74 72 75 65 3c 2f 62 3e 2e 0a 49 6e 20 61 64 >true</b>..In ad
8c80: 64 69 74 69 6f 6e 2c 20 74 68 65 20 63 6c 69 65 dition, the clie
8c90: 6e 74 20 63 61 6e 20 6d 61 6e 75 61 6c 6c 79 20 nt can manually
8ca0: 69 6e 73 70 65 63 74 20 61 6e 64 20 61 63 63 65 inspect and acce
8cb0: 70 74 20 6f 72 20 72 65 6a 65 63 74 0a 65 61 63 pt or reject.eac
8cc0: 68 20 63 65 72 74 69 66 69 63 61 74 65 20 75 73 h certificate us
8cd0: 69 6e 67 20 74 68 65 20 3c 69 20 63 6c 61 73 73 ing the <i class
8ce0: 3d 22 61 72 67 22 3e 2d 76 61 6c 69 64 61 74 65 ="arg">-validate
8cf0: 63 6f 6d 6d 61 6e 64 3c 2f 69 3e 20 6f 70 74 69 command</i> opti
8d00: 6f 6e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 on.</p></dd>.<dt
8d10: 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f ><b class="optio
8d20: 6e 22 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 n">-require</b>
8d30: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 62 <i class="arg">b
8d40: 6f 6f 6c 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ool</i></dt>.<dd
8d50: 3e 3c 70 3e 52 65 71 75 69 72 65 20 61 20 76 61 ><p>Require a va
8d60: 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 lid certificate
8d70: 66 72 6f 6d 20 74 68 65 20 70 65 65 72 20 64 75 from the peer du
8d80: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e ring the SSL han
8d90: 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20 dshake. If this
8da0: 69 73 0a 73 65 74 20 74 6f 20 74 72 75 65 2c 20 is.set to true,
8db0: 74 68 65 6e 20 3c 62 20 63 6c 61 73 73 3d 22 6f then <b class="o
8dc0: 70 74 69 6f 6e 22 3e 2d 72 65 71 75 65 73 74 3c ption">-request<
8dd0: 2f 62 3e 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 /b> must also be
8de0: 20 73 65 74 20 74 6f 20 74 72 75 65 20 61 6e 64 set to true and
8df0: 20 61 20 65 69 74 68 65 72 0a 3c 62 20 63 6c 61 a either.<b cla
8e00: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 ss="option">-cad
8e10: 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 ir</b>, <b class
8e20: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c ="option">-cafil
8e30: 65 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d e</b>, <b class=
8e40: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f 72 "option">-castor
8e50: 65 3c 2f 62 3e 2c 20 6f 72 20 61 20 70 6c 61 74 e</b>, or a plat
8e60: 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 6d 75 73 form default.mus
8e70: 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 6e t be provided in
8e80: 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 order to valida
8e90: 74 65 20 61 67 61 69 6e 73 74 2e 20 54 68 65 20 te against. The
8ea0: 64 65 66 61 75 6c 74 20 69 6e 20 54 63 6c 54 4c default in TclTL
8eb0: 53 20 31 2e 38 20 61 6e 64 0a 65 61 72 6c 69 65 S 1.8 and.earlie
8ec0: 72 20 76 65 72 73 69 6f 6e 73 20 69 73 20 3c 62 r versions is <b
8ed0: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 66 class="const">f
8ee0: 61 6c 73 65 3c 2f 62 3e 20 73 69 6e 63 65 20 6e alse</b> since n
8ef0: 6f 74 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 73 ot all platforms
8f00: 20 68 61 76 65 20 63 65 72 74 69 66 69 63 61 74 have certificat
8f10: 65 73 20 74 6f 0a 76 61 6c 69 64 61 74 65 20 61 es to.validate a
8f20: 67 61 69 6e 73 74 20 69 6e 20 61 20 66 6f 72 6d gainst in a form
8f30: 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 compatible with
8f40: 20 4f 70 65 6e 53 53 4c 2e 20 53 74 61 72 74 69 OpenSSL. Starti
8f50: 6e 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 ng in TclTLS 2.0
8f60: 2c 0a 74 68 65 20 64 65 66 61 75 6c 74 20 69 73 ,.the default is
8f70: 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 <b class="const
8f80: 22 3e 74 72 75 65 3c 2f 62 3e 2e 3c 2f 70 3e 3c ">true</b>.</p><
8f90: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 /dd>.</dl>.</div
8fa0: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 >.<div id="subse
8fb0: 63 74 69 6f 6e 33 22 20 63 6c 61 73 73 3d 22 64 ction3" class="d
8fc0: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
8fd0: 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d on"><h3><a name=
8fe0: 22 73 75 62 73 65 63 74 69 6f 6e 33 22 3e 57 68 "subsection3">Wh
8ff0: 65 6e 20 61 72 65 20 63 6f 6d 6d 61 6e 64 20 6c en are command l
9000: 69 6e 65 20 6f 70 74 69 6f 6e 73 20 6e 65 65 64 ine options need
9010: 65 64 3f 3c 2f 61 3e 3c 2f 68 33 3e 0a 3c 70 3e ed?</a></h3>.<p>
9020: 49 6e 20 54 63 6c 54 4c 53 20 31 2e 38 20 61 6e In TclTLS 1.8 an
9030: 64 20 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f d earlier versio
9040: 6e 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 ns, certificate
9050: 76 61 6c 69 64 61 74 69 6f 6e 20 69 73 0a 3c 65 validation is.<e
9060: 6d 3e 4e 4f 54 3c 2f 65 6d 3e 20 65 6e 61 62 6c m>NOT</em> enabl
9070: 65 64 20 62 79 20 64 65 66 61 75 6c 74 2e 20 54 ed by default. T
9080: 68 69 73 20 6c 69 6d 69 74 61 74 69 6f 6e 20 69 his limitation i
9090: 73 20 64 75 65 20 74 6f 20 74 68 65 20 6c 61 63 s due to the lac
90a0: 6b 20 6f 66 20 61 20 63 6f 6d 6d 6f 6e 0a 63 72 k of a common.cr
90b0: 6f 73 73 20 70 6c 61 74 66 6f 72 6d 20 64 61 74 oss platform dat
90c0: 61 62 61 73 65 20 6f 66 20 43 65 72 74 69 66 69 abase of Certifi
90d0: 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 cate Authority (
90e0: 43 41 29 20 70 72 6f 76 69 64 65 64 20 63 65 72 CA) provided cer
90f0: 74 69 66 69 63 61 74 65 73 20 74 6f 0a 76 61 6c tificates to.val
9100: 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20 4d idate against. M
9110: 61 6e 79 20 4c 69 6e 75 78 20 73 79 73 74 65 6d any Linux system
9120: 73 20 6e 61 74 69 76 65 6c 79 20 73 75 70 70 6f s natively suppo
9130: 72 74 20 4f 70 65 6e 53 53 4c 20 61 6e 64 20 74 rt OpenSSL and t
9140: 68 75 73 20 68 61 76 65 0a 74 68 65 73 65 20 63 hus have.these c
9150: 65 72 74 69 66 69 63 61 74 65 73 20 69 6e 73 74 ertificates inst
9160: 61 6c 6c 65 64 20 61 73 20 70 61 72 74 20 6f 66 alled as part of
9170: 20 74 68 65 20 4f 53 2c 20 62 75 74 20 4d 61 63 the OS, but Mac
9180: 4f 53 20 61 6e 64 20 4d 53 20 57 69 6e 64 6f 77 OS and MS Window
9190: 73 20 64 6f 20 6e 6f 74 2e 0a 53 74 61 72 69 6e s do not..Starin
91a0: 67 20 69 6e 20 54 63 6c 54 4c 53 20 32 2e 30 2c g in TclTLS 2.0,
91b0: 20 74 68 69 73 20 68 61 73 20 62 65 65 6e 20 63 this has been c
91c0: 68 61 6e 67 65 64 20 74 6f 20 72 65 71 75 69 72 hanged to requir
91d0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 e certificate va
91e0: 6c 69 64 61 74 69 6f 6e 0a 62 79 20 64 65 66 61 lidation.by defa
91f0: 75 6c 74 2e 20 49 6e 20 6f 72 64 65 72 20 74 6f ult. In order to
9200: 20 75 73 65 20 74 68 65 20 3c 62 20 63 6c 61 73 use the <b clas
9210: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 72 65 71 75 s="option">-requ
9220: 69 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2c 20 ire</b> option,
9230: 6f 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f one of the follo
9240: 77 69 6e 67 0a 6d 75 73 74 20 62 65 20 74 72 75 wing.must be tru
9250: 65 3a 3c 2f 70 3e 0a 3c 75 6c 20 63 6c 61 73 73 e:</p>.<ul class
9260: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 69 74 65 6d 69 ="doctools_itemi
9270: 7a 65 64 22 3e 0a 3c 6c 69 3e 3c 70 3e 4f 6e 20 zed">.<li><p>On
9280: 4c 69 6e 75 78 20 61 6e 64 20 55 6e 69 78 20 73 Linux and Unix s
9290: 79 73 74 65 6d 73 20 77 69 74 68 20 4f 70 65 6e ystems with Open
92a0: 53 53 4c 20 61 6c 72 65 61 64 79 20 69 6e 73 74 SSL already inst
92b0: 61 6c 6c 65 64 20 6f 72 20 69 66 20 74 68 65 20 alled or if the
92c0: 43 41 0a 63 65 72 74 69 66 69 63 61 74 65 73 20 CA.certificates
92d0: 61 72 65 20 61 76 61 69 6c 61 62 6c 65 20 69 6e are available in
92e0: 20 50 45 4d 20 66 6f 72 6d 61 74 2c 20 61 6e 64 PEM format, and
92f0: 20 69 66 20 74 68 65 79 20 61 72 65 20 73 74 6f if they are sto
9300: 72 65 64 20 69 6e 20 74 68 65 0a 73 74 61 6e 64 red in the.stand
9310: 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f ard locations, o
9320: 72 20 69 66 20 74 68 65 20 3c 62 20 63 6c 61 73 r if the <b clas
9330: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c s="variable">SSL
9340: 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 6f 72 _CERT_DIR</b> or
9350: 20 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 <b class="varia
9360: 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 ble">SSL_CERT_FI
9370: 4c 45 3c 2f 62 3e 0a 65 6e 76 69 72 6f 6e 6d 65 LE</b>.environme
9380: 6e 74 20 76 61 72 69 61 62 6c 65 73 20 61 72 65 nt variables are
9390: 20 73 65 74 2c 20 74 68 65 6e 20 3c 62 20 63 6c set, then <b cl
93a0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
93b0: 64 69 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 dir</b>, <b clas
93c0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
93d0: 72 3c 2f 62 3e 2c 0a 61 6e 64 20 3c 62 20 63 6c r</b>,.and <b cl
93e0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
93f0: 73 74 6f 72 65 3c 2f 62 3e 20 61 72 65 6e 27 74 store</b> aren't
9400: 20 6e 65 65 64 65 64 2e 3c 2f 70 3e 3c 2f 6c 69 needed.</p></li
9410: 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 20 4f 70 65 6e >.<li><p>If Open
9420: 53 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 SSL is not insta
9430: 6c 6c 65 64 20 69 6e 20 74 68 65 20 64 65 66 61 lled in the defa
9440: 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 2c 20 6f 72 ult location, or
9450: 20 77 68 65 6e 20 75 73 69 6e 67 20 4d 61 63 20 when using Mac
9460: 4f 53 0a 6f 72 20 4d 53 20 57 69 6e 64 6f 77 73 OS.or MS Windows
9470: 20 61 6e 64 20 4f 70 65 6e 53 53 4c 20 69 73 20 and OpenSSL is
9480: 69 6e 73 74 61 6c 6c 65 64 2c 20 74 68 65 20 3c installed, the <
9490: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
94a0: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c e">SSL_CERT_DIR<
94b0: 2f 62 3e 20 61 6e 64 2f 6f 72 0a 3c 62 20 63 6c /b> and/or.<b cl
94c0: 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 ass="variable">S
94d0: 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e SL_CERT_FILE</b>
94e0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 environment var
94f0: 69 61 62 6c 65 73 20 6f 72 20 74 68 65 20 6f 6e iables or the on
9500: 65 20 6f 66 20 74 68 65 20 3c 62 20 63 6c 61 73 e of the <b clas
9510: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
9520: 72 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 73 3d r</b>,.<b class=
9530: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 72 3c "option">-cadir<
9540: 2f 62 3e 2c 20 6f 72 20 3c 62 20 63 6c 61 73 73 /b>, or <b class
9550: 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 74 6f ="option">-casto
9560: 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 20 6d re</b> options m
9570: 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 2e 3c ust be defined.<
9580: 2f 70 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e /p></li>.<li><p>
9590: 4f 6e 20 4d 53 20 57 69 6e 64 6f 77 73 2c 20 73 On MS Windows, s
95a0: 74 61 72 74 69 6e 67 20 69 6e 20 4f 70 65 6e 53 tarting in OpenS
95b0: 53 4c 20 33 2e 32 2c 20 69 74 20 69 73 20 6e 6f SL 3.2, it is no
95c0: 77 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 61 63 w possible to ac
95d0: 63 65 73 73 20 74 68 65 0a 62 75 69 6c 74 2d 69 cess the.built-i
95e0: 6e 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69 66 n Windows Certif
95f0: 69 63 61 74 65 20 53 74 6f 72 65 20 66 72 6f 6d icate Store from
9600: 20 4f 70 65 6e 53 53 4c 2e 20 54 68 69 73 20 63 OpenSSL. This c
9610: 61 6e 20 75 74 69 6c 69 7a 65 64 20 62 79 0a 73 an utilized by.s
9620: 65 74 74 69 6e 67 20 74 68 65 20 3c 62 20 63 6c etting the <b cl
9630: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 ass="option">-ca
9640: 73 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e store</b> option
9650: 20 74 6f 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 to "<b cla
9660: 73 73 3d 22 63 6f 6e 73 74 22 3e 6f 72 67 2e 6f ss="const">org.o
9670: 70 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72 65 3a penssl.winstore:
9680: 2f 2f 3c 2f 62 3e 26 71 75 6f 74 3b 2e 3c 2f 70 //</b>".</p
9690: 3e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 3c 70 3e 49 66 ></li>.<li><p>If
96a0: 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 OpenSSL is not
96b0: 69 6e 73 74 61 6c 6c 65 64 20 6f 72 20 74 68 65 installed or the
96c0: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 CA certificates
96d0: 20 61 72 65 20 6e 6f 74 20 61 76 61 69 6c 61 62 are not availab
96e0: 6c 65 20 69 6e 20 50 45 4d 0a 66 6f 72 6d 61 74 le in PEM.format
96f0: 2c 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 , the CA certifi
9700: 63 61 74 65 73 20 6d 75 73 74 20 62 65 20 64 6f cates must be do
9710: 77 6e 6c 6f 61 64 65 64 20 61 6e 64 20 69 6e 73 wnloaded and ins
9720: 74 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 20 talled with the
9730: 75 73 65 72 0a 73 6f 66 74 77 61 72 65 2e 20 54 user.software. T
9740: 68 65 20 43 55 52 4c 20 74 65 61 6d 20 6d 61 6b he CURL team mak
9750: 65 73 20 74 68 65 6d 20 61 76 61 69 6c 61 62 6c es them availabl
9760: 65 20 61 74 0a 3c 61 20 68 72 65 66 3d 22 68 74 e at.<a href="ht
9770: 74 70 73 3a 2f 2f 63 75 72 6c 2e 73 65 2f 64 6f tps://curl.se/do
9780: 63 73 2f 63 61 65 78 74 72 61 63 74 2e 68 74 6d cs/caextract.htm
9790: 6c 22 3e 43 41 20 63 65 72 74 69 66 69 63 61 74 l">CA certificat
97a0: 65 73 20 65 78 74 72 61 63 74 65 64 0a 66 72 6f es extracted.fro
97b0: 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f 61 3e 20 69 6e m Mozilla</a> in
97c0: 20 74 68 65 20 26 71 75 6f 74 3b 3c 62 20 63 6c the "<b cl
97d0: 61 73 73 3d 22 66 69 6c 65 22 3e 63 61 63 65 72 ass="file">cacer
97e0: 74 2e 70 65 6d 3c 2f 62 3e 26 71 75 6f 74 3b 20 t.pem</b>"
97f0: 66 69 6c 65 2e 20 59 6f 75 20 6d 75 73 74 20 74 file. You must t
9800: 68 65 6e 20 65 69 74 68 65 72 20 73 65 74 20 74 hen either set t
9810: 68 65 0a 3c 62 20 63 6c 61 73 73 3d 22 76 61 72 he.<b class="var
9820: 69 61 62 6c 65 22 3e 53 53 4c 5f 43 45 52 54 5f iable">SSL_CERT_
9830: 44 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 20 3c DIR</b> and/or <
9840: 62 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c b class="variabl
9850: 65 22 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 e">SSL_CERT_FILE
9860: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 </b> environment
9870: 20 76 61 72 69 61 62 6c 65 73 20 6f 72 20 74 68 variables or th
9880: 65 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 e.<b class="opti
9890: 6f 6e 22 3e 2d 63 61 64 69 72 3c 2f 62 3e 20 6f on">-cadir</b> o
98a0: 72 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 r <b class="opti
98b0: 6f 6e 22 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 20 on">-cafile</b>
98c0: 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 43 options to the C
98d0: 41 20 63 65 72 74 20 66 69 6c 65 27 73 20 69 6e A cert file's in
98e0: 73 74 61 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 2e 20 stall.location.
98f0: 49 74 20 69 73 20 79 6f 75 72 20 72 65 73 70 6f It is your respo
9900: 6e 73 69 62 69 6c 69 74 79 20 74 6f 20 6b 65 65 nsibility to kee
9910: 70 20 74 68 69 73 20 66 69 6c 65 20 75 70 20 74 p this file up t
9920: 6f 20 64 61 74 65 2e 3c 2f 70 3e 3c 2f 6c 69 3e o date.</p></li>
9930: 0a 3c 2f 75 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 2f .</ul>.</div>.</
9940: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 div>.<div id="se
9950: 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 ction4" class="d
9960: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 octools_section"
9970: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 ><h2><a name="se
9980: 63 74 69 6f 6e 34 22 3e 43 61 6c 6c 62 61 63 6b ction4">Callback
9990: 20 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 Options</a></h2
99a0: 3e 0a 3c 70 3e 41 73 20 70 72 65 76 69 6f 75 73 >.<p>As previous
99b0: 6c 79 20 64 65 73 63 72 69 62 65 64 2c 20 65 61 ly described, ea
99c0: 63 68 20 63 68 61 6e 6e 65 6c 20 63 61 6e 20 62 ch channel can b
99d0: 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 e given their ow
99e0: 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 n callbacks.to h
99f0: 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 andle intermedia
9a00: 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 te processing by
9a10: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 the OpenSSL lib
9a20: 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a rary, using the.
9a30: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
9a40: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 ">-command</b>,
9a50: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
9a60: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c ">-password</b>,
9a70: 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 6f and <b class="o
9a80: 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 ption">-validate
9a90: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 _command</b> opt
9aa0: 69 6f 6e 73 0a 70 61 73 73 65 64 20 74 6f 20 65 ions.passed to e
9ab0: 69 74 68 65 72 20 6f 66 20 3c 62 20 63 6c 61 73 ither of <b clas
9ac0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 6f 63 s="cmd">tls::soc
9ad0: 6b 65 74 3c 2f 62 3e 20 6f 72 20 3c 62 20 63 6c ket</b> or <b cl
9ae0: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 69 ass="cmd">tls::i
9af0: 6d 70 6f 72 74 3c 2f 62 3e 2e 0a 55 6e 6c 69 6b mport</b>..Unlik
9b00: 65 20 70 72 65 76 69 6f 75 73 20 76 65 72 73 69 e previous versi
9b10: 6f 6e 73 20 6f 66 20 54 63 6c 54 4c 53 2c 20 6f ons of TclTLS, o
9b20: 6e 6c 79 20 69 66 20 74 68 65 20 63 61 6c 6c 62 nly if the callb
9b30: 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20 61 6e ack generates an
9b40: 20 65 72 72 6f 72 2c 0a 77 69 6c 6c 20 74 68 65 error,.will the
9b50: 20 3c 62 20 63 6c 61 73 73 3d 22 73 79 73 63 6d <b class="syscm
9b60: 64 22 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 d">bgerror</b> c
9b70: 6f 6d 6d 61 6e 64 20 62 65 20 69 6e 76 6f 6b 65 ommand be invoke
9b80: 64 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72 d with the error
9b90: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 3c 2f 70 information.</p
9ba0: 3e 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 >.<div id="subse
9bb0: 63 74 69 6f 6e 34 22 20 63 6c 61 73 73 3d 22 64 ction4" class="d
9bc0: 6f 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 octools_subsecti
9bd0: 6f 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d on"><h3><a name=
9be0: 22 73 75 62 73 65 63 74 69 6f 6e 34 22 3e 56 61 "subsection4">Va
9bf0: 6c 75 65 73 20 66 6f 72 20 43 6f 6d 6d 61 6e 64 lues for Command
9c00: 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 Callback</a></h
9c10: 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c 62 61 3>.<p>The callba
9c20: 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 63 6c ck for the <b cl
9c30: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f ass="option">-co
9c40: 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f 6e mmand</b> option
9c50: 20 69 73 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 is invoked at s
9c60: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 everal points du
9c70: 72 69 6e 67 20 74 68 65 0a 4f 70 65 6e 53 53 4c ring the.OpenSSL
9c80: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 64 handshake and d
9c90: 75 72 69 6e 67 20 72 6f 75 74 69 6e 65 20 6f 70 uring routine op
9ca0: 65 72 61 74 69 6f 6e 73 2e 20 53 65 65 20 62 65 erations. See be
9cb0: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 low for the poss
9cc0: 69 62 6c 65 0a 61 72 67 75 6d 65 6e 74 73 20 70 ible.arguments p
9cd0: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c assed to the cal
9ce0: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 56 61 lback script. Va
9cf0: 6c 75 65 73 20 72 65 74 75 72 6e 65 64 20 66 72 lues returned fr
9d00: 6f 6d 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 om the callback
9d10: 61 72 65 0a 69 67 6e 6f 72 65 64 2e 3c 2f 70 3e are.ignored.</p>
9d20: 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f 63 74 .<dl class="doct
9d30: 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e 0a 3c ools_options">.<
9d40: 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 dt><b class="opt
9d50: 69 6f 6e 22 3e 65 72 72 6f 72 3c 2f 62 3e 20 3c ion">error</b> <
9d60: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 i class="arg">ch
9d70: 61 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 3c annelId message<
9d80: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
9d90: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c This form of cal
9da0: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
9db0: 20 77 68 65 6e 65 76 65 72 20 61 6e 20 65 72 72 whenever an err
9dc0: 6f 72 20 6f 63 63 75 72 73 20 64 75 72 69 6e 67 or occurs during
9dd0: 20 74 68 65 20 69 6e 69 74 69 61 6c 0a 63 6f 6e the initial.con
9de0: 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 nection, handsha
9df0: 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 ke, or I/O opera
9e00: 74 69 6f 6e 73 2e 20 54 68 65 20 3c 69 20 63 6c tions. The <i cl
9e10: 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 ass="arg">messag
9e20: 65 3c 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 63 e</i> argument c
9e30: 61 6e 20 62 65 0a 66 72 6f 6d 20 74 68 65 20 54 an be.from the T
9e40: 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f 70 65 cl_ErrnoMsg, Ope
9e50: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 20 3c 62 nSSL function <b
9e60: 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e class="function
9e70: 22 3e 45 52 52 5f 72 65 61 73 6f 6e 5f 65 72 72 ">ERR_reason_err
9e80: 6f 72 5f 73 74 72 69 6e 67 28 29 3c 2f 62 3e 2c or_string()</b>,
9e90: 0a 6f 72 20 61 20 63 75 73 74 6f 6d 20 6d 65 73 .or a custom mes
9ea0: 73 61 67 65 2e 20 54 68 69 73 20 63 61 6c 6c 62 sage. This callb
9eb0: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ack is new for T
9ec0: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
9ed0: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
9ee0: 3d 22 6f 70 74 69 6f 6e 22 3e 69 6e 66 6f 3c 2f ="option">info</
9ef0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
9f00: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f ">channelId majo
9f10: 72 20 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 20 r minor message
9f20: 74 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 type</i></dt>.<d
9f30: 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 6f d><p>This form o
9f40: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
9f50: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 voked by the Ope
9f60: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c 62 nSSL function.<b
9f70: 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e class="function
9f80: 22 3e 53 53 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 ">SSL_set_info_c
9f90: 61 6c 6c 62 61 63 6b 28 29 3c 2f 62 3e 20 64 75 allback()</b> du
9fa0: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c ring the initial
9fb0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 connection and
9fc0: 68 61 6e 64 73 68 61 6b 65 0a 6f 70 65 72 61 74 handshake.operat
9fd0: 69 6f 6e 73 2e 20 54 68 65 20 61 72 67 75 6d 65 ions. The argume
9fe0: 6e 74 73 20 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c nts are:</p>.<dl
9ff0: 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 class="doctools
a000: 5f 64 65 66 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c _definitions">.<
a010: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
a020: 22 3e 6d 61 6a 6f 72 3c 2f 69 3e 3c 2f 64 74 3e ">major</i></dt>
a030: 0a 3c 64 64 3e 3c 70 3e 4d 61 6a 6f 72 20 63 61 .<dd><p>Major ca
a040: 74 65 67 6f 72 79 20 66 6f 72 20 65 72 72 6f 72 tegory for error
a050: 2e 20 56 61 6c 69 64 20 65 6e 75 6d 73 20 61 72 . Valid enums ar
a060: 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e e: <b class="con
a070: 73 74 22 3e 68 61 6e 64 73 68 61 6b 65 3c 2f 62 st">handshake</b
a080: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e >, <b class="con
a090: 73 74 22 3e 61 6c 65 72 74 3c 2f 62 3e 2c 0a 3c st">alert</b>,.<
a0a0: 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e b class="const">
a0b0: 63 6f 6e 6e 65 63 74 3c 2f 62 3e 2c 20 3c 62 20 connect</b>, <b
a0c0: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 61 63 class="const">ac
a0d0: 63 65 70 74 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 cept</b>.</p></d
a0e0: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d d>.<dt><i class=
a0f0: 22 61 72 67 22 3e 6d 69 6e 6f 72 3c 2f 69 3e 3c "arg">minor</i><
a100: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 4d 69 6e 6f /dt>.<dd><p>Mino
a110: 72 20 63 61 74 65 67 6f 72 79 20 66 6f 72 20 65 r category for e
a120: 72 72 6f 72 2e 20 56 61 6c 69 64 20 65 6e 75 6d rror. Valid enum
a130: 73 20 61 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d s are: <b class=
a140: 22 63 6f 6e 73 74 22 3e 73 74 61 72 74 3c 2f 62 "const">start</b
a150: 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e >, <b class="con
a160: 73 74 22 3e 64 6f 6e 65 3c 2f 62 3e 2c 20 3c 62 st">done</b>, <b
a170: 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 72 class="const">r
a180: 65 61 64 3c 2f 62 3e 2c 0a 3c 62 20 63 6c 61 73 ead</b>,.<b clas
a190: 73 3d 22 63 6f 6e 73 74 22 3e 77 72 69 74 65 3c s="const">write<
a1a0: 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 63 /b>, <b class="c
a1b0: 6f 6e 73 74 22 3e 6c 6f 6f 70 3c 2f 62 3e 2c 20 onst">loop</b>,
a1c0: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
a1d0: 3e 65 78 69 74 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f >exit</b>.</p></
a1e0: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 dd>.<dt><i class
a1f0: 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 65 3c 2f ="arg">message</
a200: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 44 i></dt>.<dd><p>D
a210: 65 73 63 72 69 70 74 69 76 65 20 6d 65 73 73 61 escriptive messa
a220: 67 65 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 ge string which
a230: 6d 61 79 20 62 65 20 67 65 6e 65 72 61 74 65 64 may be generated
a240: 20 65 69 74 68 65 72 20 62 79 0a 3c 62 20 63 6c either by.<b cl
a250: 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e 22 3e 53 ass="function">S
a260: 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e 67 5f SL_state_string_
a270: 6c 6f 6e 67 28 29 3c 2f 62 3e 20 6f 72 20 3c 62 long()</b> or <b
a280: 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f 6e class="function
a290: 22 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 ">SSL_alert_desc
a2a0: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
a2b0: 62 3e 2c 0a 64 65 70 65 6e 64 69 6e 67 20 6f 6e b>,.depending on
a2c0: 20 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c 2f 70 the context.</p
a2d0: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c ></dd>.<dt><i cl
a2e0: 61 73 73 3d 22 61 72 67 22 3e 74 79 70 65 3c 2f ass="arg">type</
a2f0: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 46 i></dt>.<dd><p>F
a300: 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 or alerts, the p
a310: 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 61 ossible values a
a320: 72 65 3a 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f re: <b class="co
a330: 6e 73 74 22 3e 77 61 72 6e 69 6e 67 3c 2f 62 3e nst">warning</b>
a340: 2c 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 ,.<b class="cons
a350: 74 22 3e 66 61 74 61 6c 3c 2f 62 3e 2c 20 61 6e t">fatal</b>, an
a360: 64 20 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 d <b class="cons
a370: 74 22 3e 75 6e 6b 6e 6f 77 6e 3c 2f 62 3e 2e 20 t">unknown</b>.
a380: 46 6f 72 20 6f 74 68 65 72 73 2c 20 3c 62 20 63 For others, <b c
a390: 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 69 6e 66 lass="const">inf
a3a0: 6f 3c 2f 62 3e 20 69 73 20 75 73 65 64 2e 0a 54 o</b> is used..T
a3b0: 68 69 73 20 61 72 67 75 6d 65 6e 74 20 69 73 20 his argument is
a3c0: 6e 65 77 20 66 6f 72 20 54 63 6c 54 4c 53 20 31 new for TclTLS 1
a3d0: 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 .8.</p></dd>.</d
a3e0: 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 l></dd>.<dt><b c
a3f0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 6d 65 lass="option">me
a400: 73 73 61 67 65 3c 2f 62 3e 20 3c 69 20 63 6c 61 ssage</b> <i cla
a410: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c ss="arg">channel
a420: 49 64 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 Id direction ver
a430: 73 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 sion content_typ
a440: 65 20 6d 65 73 73 61 67 65 3c 2f 69 3e 3c 2f 64 e message</i></d
a450: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 66 t>.<dd><p>This f
a460: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
a470: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 is invoked by th
a480: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 e OpenSSL functi
a490: 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d 22 66 75 6e on.<b class="fun
a4a0: 63 74 69 6f 6e 22 3e 53 53 4c 5f 73 65 74 5f 6d ction">SSL_set_m
a4b0: 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 62 sg_callback()</b
a4c0: 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6d 65 73 > whenever a mes
a4d0: 73 61 67 65 20 69 73 20 73 65 6e 74 20 6f 72 20 sage is sent or
a4e0: 72 65 63 65 69 76 65 64 20 64 75 72 69 6e 67 20 received during
a4f0: 74 68 65 0a 69 6e 69 74 69 61 6c 20 63 6f 6e 6e the.initial conn
a500: 65 63 74 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b ection, handshak
a510: 65 2c 20 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74 e, or I/O operat
a520: 69 6f 6e 73 2e 20 49 74 20 69 73 20 6f 6e 6c 79 ions. It is only
a530: 20 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a available when.
a540: 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c OpenSSL is compl
a550: 69 65 64 20 77 69 74 68 20 74 68 65 20 3c 62 20 ied with the <b
a560: 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 3e 65 6e class="const">en
a570: 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 3c 2f able-ssl-trace</
a580: 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69 73 20 b> option. This
a590: 63 61 6c 6c 62 61 63 6b 20 69 73 0a 6e 65 77 20 callback is.new
a5a0: 66 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 20 for TclTLS 1.8.
a5b0: 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 The arguments ar
a5c0: 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 e:</p>.<dl class
a5d0: 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e ="doctools_defin
a5e0: 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 itions">.<dt><i
a5f0: 63 6c 61 73 73 3d 22 61 72 67 22 3e 64 69 72 65 class="arg">dire
a600: 63 74 69 6f 6e 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c ction</i></dt>.<
a610: 64 64 3e 3c 70 3e 44 69 72 65 63 74 69 6f 6e 20 dd><p>Direction
a620: 69 73 20 65 69 74 68 65 72 20 3c 62 20 63 6c 61 is either <b cla
a630: 73 73 3d 22 63 6f 6e 73 74 22 3e 53 65 6e 74 3c ss="const">Sent<
a640: 2f 62 3e 20 6f 72 20 3c 62 20 63 6c 61 73 73 3d /b> or <b class=
a650: 22 63 6f 6e 73 74 22 3e 52 65 63 65 69 76 65 64 "const">Received
a660: 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c </b>.</p></dd>.<
a670: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
a680: 22 3e 76 65 72 73 69 6f 6e 3c 2f 69 3e 3c 2f 64 ">version</i></d
a690: 74 3e 0a 3c 64 64 3e 3c 70 3e 56 65 72 73 69 6f t>.<dd><p>Versio
a6a0: 6e 20 69 73 20 74 68 65 20 70 72 6f 74 6f 63 6f n is the protoco
a6b0: 6c 20 76 65 72 73 69 6f 6e 2e 3c 2f 70 3e 3c 2f l version.</p></
a6c0: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 dd>.<dt><i class
a6d0: 3d 22 61 72 67 22 3e 63 6f 6e 74 65 6e 74 5f 74 ="arg">content_t
a6e0: 79 70 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 ype</i></dt>.<dd
a6f0: 3e 3c 70 3e 43 6f 6e 74 65 6e 74 20 74 79 70 65 ><p>Content type
a700: 20 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 20 is the message
a710: 63 6f 6e 74 65 6e 74 20 74 79 70 65 2e 3c 2f 70 content type.</p
a720: 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c ></dd>.<dt><i cl
a730: 61 73 73 3d 22 61 72 67 22 3e 6d 65 73 73 61 67 ass="arg">messag
a740: 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c e</i></dt>.<dd><
a750: 70 3e 4d 65 73 73 61 67 65 20 69 73 20 6d 6f 72 p>Message is mor
a760: 65 20 69 6e 66 6f 20 66 72 6f 6d 20 74 68 65 20 e info from the
a770: 3c 62 20 63 6c 61 73 73 3d 22 63 6f 6e 73 74 22 <b class="const"
a780: 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 62 3e 20 41 >SSL_trace</b> A
a790: 50 49 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 PI.</p></dd>.</d
a7a0: 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 l></dd>.<dt><b c
a7b0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 65 lass="option">se
a7c0: 73 73 69 6f 6e 3c 2f 62 3e 20 3c 69 20 63 6c 61 ssion</b> <i cla
a7d0: 73 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c ss="arg">channel
a7e0: 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 73 65 Id session_id se
a7f0: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 20 6c 69 66 ssion_ticket lif
a800: 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c etime</i></dt>.<
a810: 64 64 3e 3c 70 3e 54 68 69 73 20 66 6f 72 6d 20 dd><p>This form
a820: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
a830: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 nvoked by the Op
a840: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 3c enSSL function.<
a850: 62 20 63 6c 61 73 73 3d 22 66 75 6e 63 74 69 6f b class="functio
a860: 6e 22 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f n">SSL_CTX_sess_
a870: 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 62 3e set_new_cb()</b>
a880: 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 20 whenever a new
a890: 73 65 73 73 69 6f 6e 20 69 64 20 69 73 20 73 65 session id is se
a8a0: 6e 74 20 62 79 20 74 68 65 0a 73 65 72 76 65 72 nt by the.server
a8b0: 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 during the init
a8c0: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 ial connection a
a8d0: 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 nd handshake and
a8e0: 20 61 6c 73 6f 20 64 75 72 69 6e 67 20 74 68 65 also during the
a8f0: 20 73 65 73 73 69 6f 6e 0a 69 66 20 74 68 65 20 session.if the
a900: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
a910: 22 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b ">-post_handshak
a920: 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 e</b> option is
a930: 73 65 74 20 74 6f 20 74 72 75 65 2e 20 54 68 69 set to true. Thi
a940: 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 s callback is ne
a950: 77 20 66 6f 72 0a 54 63 6c 54 4c 53 20 31 2e 38 w for.TclTLS 1.8
a960: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 . The arguments
a970: 61 72 65 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 are:</p>.<dl cla
a980: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 ss="doctools_def
a990: 69 6e 69 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c initions">.<dt><
a9a0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 73 65 i class="arg">se
a9b0: 73 73 69 6f 6e 5f 69 64 3c 2f 69 3e 3c 2f 64 74 ssion_id</i></dt
a9c0: 3e 0a 3c 64 64 3e 3c 70 3e 53 65 73 73 69 6f 6e >.<dd><p>Session
a9d0: 20 49 64 20 69 73 20 74 68 65 20 63 75 72 72 65 Id is the curre
a9e0: 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 nt session ident
a9f0: 69 66 69 65 72 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c ifier</p></dd>.<
aa00: 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 dt><i class="arg
aa10: 22 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 ">session_ticket
aa20: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
aa30: 3e 54 69 63 6b 65 74 20 69 73 20 74 68 65 20 73 >Ticket is the s
aa40: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e ession ticket in
aa50: 66 6f 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 74 3e fo</p></dd>.<dt>
aa60: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 6c <i class="arg">l
aa70: 69 66 65 74 69 6d 65 3c 2f 69 3e 3c 2f 64 74 3e ifetime</i></dt>
aa80: 0a 3c 64 64 3e 3c 70 3e 4c 69 66 65 74 69 6d 65 .<dd><p>Lifetime
aa90: 20 69 73 20 74 68 65 20 74 69 63 6b 65 74 20 6c is the ticket l
aaa0: 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e ifetime in secon
aab0: 64 73 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 2f 64 ds.</p></dd>.</d
aac0: 6c 3e 3c 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 l></dd>.<dt><b c
aad0: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 76 65 lass="option">ve
aae0: 72 69 66 79 3c 2f 62 3e 20 3c 69 20 63 6c 61 73 rify</b> <i clas
aaf0: 73 3d 22 61 72 67 22 3e 63 68 61 6e 6e 65 6c 49 s="arg">channelI
ab00: 64 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 d depth cert sta
ab10: 74 75 73 20 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 tus error</i></d
ab20: 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 69 73 20 63 t>.<dd><p>This c
ab30: 61 6c 6c 62 61 63 6b 20 77 61 73 20 6d 6f 76 65 allback was move
ab40: 64 20 74 6f 20 3c 62 20 63 6c 61 73 73 3d 22 6f d to <b class="o
ab50: 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 ption">-validate
ab60: 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 69 6e 20 54 command</b> in T
ab70: 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f clTLS 1.8.</p></
ab80: 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 64 69 76 3e dd>.</dl>.</div>
ab90: 0a 3c 64 69 76 20 69 64 3d 22 73 75 62 73 65 63 .<div id="subsec
aba0: 74 69 6f 6e 35 22 20 63 6c 61 73 73 3d 22 64 6f tion5" class="do
abb0: 63 74 6f 6f 6c 73 5f 73 75 62 73 65 63 74 69 6f ctools_subsectio
abc0: 6e 22 3e 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 n"><h3><a name="
abd0: 73 75 62 73 65 63 74 69 6f 6e 35 22 3e 56 61 6c subsection5">Val
abe0: 75 65 73 20 66 6f 72 20 50 61 73 73 77 6f 72 64 ues for Password
abf0: 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f 68 Callback</a></h
ac00: 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c 62 61 3>.<p>The callba
ac10: 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 63 6c ck for the <b cl
ac20: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 70 61 ass="option">-pa
ac30: 73 73 77 6f 72 64 3c 2f 62 3e 20 6f 70 74 69 6f ssword</b> optio
ac40: 6e 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 n is invoked by
ac50: 54 63 6c 54 4c 53 20 77 68 65 6e 65 76 65 72 20 TclTLS whenever
ac60: 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 0a 74 6f OpenSSL needs.to
ac70: 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f obtain a passwo
ac80: 72 64 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f rd. See below fo
ac90: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 r the possible a
aca0: 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 rguments passed
acb0: 74 6f 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b 20 to the.callback
acc0: 73 63 72 69 70 74 2e 20 54 68 65 20 75 73 65 72 script. The user
acd0: 20 70 72 6f 76 69 64 65 64 20 70 61 73 73 77 6f provided passwo
ace0: 72 64 20 69 73 20 65 78 70 65 63 74 65 64 20 74 rd is expected t
acf0: 6f 20 62 65 20 72 65 74 75 72 6e 65 64 20 62 79 o be returned by
ad00: 20 74 68 65 0a 63 61 6c 6c 62 61 63 6b 2e 3c 2f the.callback.</
ad10: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f p>.<dl class="do
ad20: 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e ctools_options">
ad30: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
ad40: 70 74 69 6f 6e 22 3e 70 61 73 73 77 6f 72 64 3c ption">password<
ad50: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
ad60: 67 22 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f g">rwflag size</
ad70: 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 49 i></dt>.<dd><p>I
ad80: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 nvoked when load
ad90: 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 ing or storing a
ada0: 6e 20 65 6e 63 72 79 70 74 65 64 20 50 45 4d 20 n encrypted PEM
adb0: 63 65 72 74 69 66 69 63 61 74 65 2e 20 54 68 65 certificate. The
adc0: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 3c arguments are:<
add0: 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 /p>.<dl class="d
ade0: 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 74 69 octools_definiti
adf0: 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 ons">.<dt><i cla
ae00: 73 73 3d 22 61 72 67 22 3e 72 77 66 6c 61 67 3c ss="arg">rwflag<
ae10: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
ae20: 54 68 65 20 72 65 61 64 2f 77 72 69 74 65 20 66 The read/write f
ae30: 6c 61 67 20 69 73 20 30 20 66 6f 72 20 72 65 61 lag is 0 for rea
ae40: 64 69 6e 67 2f 64 65 63 72 79 70 74 69 6f 6e 20 ding/decryption
ae50: 6f 72 20 31 20 66 6f 72 20 77 72 69 74 69 6e 67 or 1 for writing
ae60: 2f 65 6e 63 72 79 70 74 69 6f 6e 2e 0a 54 68 65 /encryption..The
ae70: 20 6c 61 74 74 65 72 20 63 61 6e 20 62 65 20 75 latter can be u
ae80: 73 65 64 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 sed to determine
ae90: 20 77 68 65 6e 20 74 6f 20 70 72 6f 6d 70 74 20 when to prompt
aea0: 74 68 65 20 75 73 65 72 20 74 6f 20 63 6f 6e 66 the user to conf
aeb0: 69 72 6d 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 irm..This argume
aec0: 6e 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 nt is new for Tc
aed0: 6c 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 lTLS 1.8.</p></d
aee0: 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d d>.<dt><i class=
aef0: 22 61 72 67 22 3e 73 69 7a 65 3c 2f 69 3e 3c 2f "arg">size</i></
af00: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 dt>.<dd><p>The s
af10: 69 7a 65 20 69 73 20 74 68 65 20 6d 61 78 69 6d ize is the maxim
af20: 75 6d 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 um length of the
af30: 20 70 61 73 73 77 6f 72 64 20 69 6e 20 62 79 74 password in byt
af40: 65 73 2e 0a 54 68 69 73 20 61 72 67 75 6d 65 6e es..This argumen
af50: 74 20 69 73 20 6e 65 77 20 66 6f 72 20 54 63 6c t is new for Tcl
af60: 54 4c 53 20 31 2e 38 2e 3c 2f 70 3e 3c 2f 64 64 TLS 1.8.</p></dd
af70: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 >.</dl></dd>.</d
af80: 6c 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 l>.</div>.<div i
af90: 64 3d 22 73 75 62 73 65 63 74 69 6f 6e 36 22 20 d="subsection6"
afa0: 63 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f class="doctools_
afb0: 73 75 62 73 65 63 74 69 6f 6e 22 3e 3c 68 33 3e subsection"><h3>
afc0: 3c 61 20 6e 61 6d 65 3d 22 73 75 62 73 65 63 74 <a name="subsect
afd0: 69 6f 6e 36 22 3e 56 61 6c 75 65 73 20 66 6f 72 ion6">Values for
afe0: 20 56 61 6c 69 64 61 74 65 20 43 6f 6d 6d 61 6e Validate Comman
aff0: 64 20 43 61 6c 6c 62 61 63 6b 3c 2f 61 3e 3c 2f d Callback</a></
b000: 68 33 3e 0a 3c 70 3e 54 68 65 20 63 61 6c 6c 62 h3>.<p>The callb
b010: 61 63 6b 20 66 6f 72 20 74 68 65 20 3c 62 20 63 ack for the <b c
b020: 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 76 lass="option">-v
b030: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f alidatecommand</
b040: 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 69 6e 76 b> option is inv
b050: 6f 6b 65 64 20 64 75 72 69 6e 67 20 74 68 65 20 oked during the
b060: 68 61 6e 64 73 68 61 6b 65 0a 70 72 6f 63 65 73 handshake.proces
b070: 73 20 69 6e 20 6f 72 64 65 72 20 66 6f 72 20 74 s in order for t
b080: 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 74 he application t
b090: 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 o validate the p
b0a0: 72 6f 76 69 64 65 64 20 76 61 6c 75 65 28 73 29 rovided value(s)
b0b0: 2e 20 53 65 65 0a 62 65 6c 6f 77 20 66 6f 72 20 . See.below for
b0c0: 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 72 67 the possible arg
b0d0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
b0e0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
b0f0: 72 69 70 74 2e 20 49 66 20 6e 6f 74 0a 73 70 65 ript. If not.spe
b100: 63 69 66 69 65 64 2c 20 4f 70 65 6e 53 53 4c 20 cified, OpenSSL
b110: 77 69 6c 6c 20 61 63 63 65 70 74 20 61 6c 6c 20 will accept all
b120: 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 valid certificat
b130: 65 73 20 61 6e 64 20 65 78 74 65 6e 73 69 6f 6e es and extension
b140: 73 2e 20 54 6f 20 72 65 6a 65 63 74 0a 74 68 65 s. To reject.the
b150: 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 value and abort
b160: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c the connection,
b170: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 the callback sh
b180: 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 2e 20 54 ould return 0. T
b190: 6f 20 61 63 63 65 70 74 20 74 68 65 0a 76 61 6c o accept the.val
b1a0: 75 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 ue and continue
b1b0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 the connection,
b1c0: 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e it should return
b1d0: 20 31 2e 20 54 6f 20 72 65 6a 65 63 74 20 74 68 1. To reject th
b1e0: 65 20 76 61 6c 75 65 2c 20 62 75 74 0a 63 6f 6e e value, but.con
b1f0: 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 tinue the connec
b200: 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 tion, it should
b210: 72 65 74 75 72 6e 20 32 2e 20 54 68 69 73 20 63 return 2. This c
b220: 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 allback is new f
b230: 6f 72 20 54 63 6c 54 4c 53 20 31 2e 38 2e 3c 2f or TclTLS 1.8.</
b240: 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d 22 64 6f p>.<dl class="do
b250: 63 74 6f 6f 6c 73 5f 6f 70 74 69 6f 6e 73 22 3e ctools_options">
b260: 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f .<dt><b class="o
b270: 70 74 69 6f 6e 22 3e 61 6c 70 6e 3c 2f 62 3e 20 ption">alpn</b>
b280: 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 <i class="arg">c
b290: 68 61 6e 6e 65 6c 49 64 20 70 72 6f 74 6f 63 6f hannelId protoco
b2a0: 6c 20 6d 61 74 63 68 3c 2f 69 3e 3c 2f 64 74 3e l match</i></dt>
b2b0: 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 .<dd><p>For serv
b2c0: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f ers, this form o
b2d0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
b2e0: 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63 voked when the c
b2f0: 6c 69 65 6e 74 20 41 4c 50 4e 20 65 78 74 65 6e lient ALPN exten
b300: 73 69 6f 6e 20 69 73 0a 72 65 63 65 69 76 65 64 sion is.received
b310: 2e 20 49 66 20 3c 69 20 63 6c 61 73 73 3d 22 61 . If <i class="a
b320: 72 67 22 3e 6d 61 74 63 68 3c 2f 69 3e 20 69 73 rg">match</i> is
b330: 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 69 20 63 true, then <i c
b340: 6c 61 73 73 3d 22 61 72 67 22 3e 70 72 6f 74 6f lass="arg">proto
b350: 63 6f 6c 3c 2f 69 3e 20 69 73 20 74 68 65 20 66 col</i> is the f
b360: 69 72 73 74 0a 3c 62 20 63 6c 61 73 73 3d 22 6f irst.<b class="o
b370: 70 74 69 6f 6e 22 3e 2d 61 6c 70 6e 3c 2f 62 3e ption">-alpn</b>
b380: 20 70 72 6f 74 6f 63 6f 6c 20 6f 70 74 69 6f 6e protocol option
b390: 20 69 6e 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f in common to bo
b3a0: 74 68 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e th the client an
b3b0: 64 20 73 65 72 76 65 72 2e 0a 49 66 20 6e 6f 74 d server..If not
b3c0: 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c 69 65 , the first clie
b3d0: 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 72 6f nt specified pro
b3e0: 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 2e 20 54 tocol is used. T
b3f0: 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 his callback is
b400: 63 61 6c 6c 65 64 0a 61 66 74 65 72 20 74 68 65 called.after the
b410: 20 48 65 6c 6c 6f 20 61 6e 64 20 41 4c 50 4e 20 Hello and ALPN
b420: 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c 2f callbacks.</p></
b430: 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 73 dd>.<dt><b class
b440: 3d 22 6f 70 74 69 6f 6e 22 3e 68 65 6c 6c 6f 3c ="option">hello<
b450: 2f 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 /b> <i class="ar
b460: 67 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 g">channelId ser
b470: 76 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e vername</i></dt>
b480: 0a 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 .<dd><p>For serv
b490: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f ers, this form o
b4a0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
b4b0: 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c 69 voked during cli
b4c0: 65 6e 74 20 68 65 6c 6c 6f 20 6d 65 73 73 61 67 ent hello messag
b4d0: 65 0a 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 e.processing. Th
b4e0: 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 e purpose is so
b4f0: 74 68 65 20 73 65 72 76 65 72 20 63 61 6e 20 73 the server can s
b500: 65 6c 65 63 74 20 74 68 65 20 61 70 70 72 6f 70 elect the approp
b510: 72 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74 riate certificat
b520: 65 0a 74 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 e.to present to
b530: 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 the client, and
b540: 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 20 63 6f to make other co
b550: 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 nfiguration adju
b560: 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 stments relevant
b570: 0a 74 6f 20 74 68 61 74 20 73 65 72 76 65 72 20 .to that server
b580: 6e 61 6d 65 20 61 6e 64 20 69 74 73 20 63 6f 6e name and its con
b590: 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 20 69 figuration. It i
b5a0: 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 s called before
b5b0: 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e the SNI and ALPN
b5c0: 0a 63 61 6c 6c 62 61 63 6b 73 2e 3c 2f 70 3e 3c .callbacks.</p><
b5d0: 2f 64 64 3e 0a 3c 64 74 3e 3c 62 20 63 6c 61 73 /dd>.<dt><b clas
b5e0: 73 3d 22 6f 70 74 69 6f 6e 22 3e 73 6e 69 3c 2f s="option">sni</
b5f0: 62 3e 20 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 b> <i class="arg
b600: 22 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 ">channelId serv
b610: 65 72 6e 61 6d 65 3c 2f 69 3e 3c 2f 64 74 3e 0a ername</i></dt>.
b620: 3c 64 64 3e 3c 70 3e 46 6f 72 20 73 65 72 76 65 <dd><p>For serve
b630: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 rs, this form of
b640: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
b650: 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 oked when the Se
b660: 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 rver Name Indica
b670: 74 69 6f 6e 0a 28 53 4e 49 29 20 65 78 74 65 6e tion.(SNI) exten
b680: 73 69 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 sion is received
b690: 2e 20 54 68 65 20 3c 69 20 63 6c 61 73 73 3d 22 . The <i class="
b6a0: 61 72 67 22 3e 73 65 72 76 65 72 6e 61 6d 65 3c arg">servername<
b6b0: 2f 69 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 /i> argument is
b6c0: 74 68 65 20 63 6c 69 65 6e 74 0a 70 72 6f 76 69 the client.provi
b6d0: 64 65 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 ded server name
b6e0: 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 specified in the
b6f0: 20 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f <b class="optio
b700: 6e 22 3e 2d 73 65 72 76 65 72 6e 61 6d 65 26 6c n">-servername&l
b710: 74 3b 2f 62 26 67 74 3b 3c 2f 62 3e 20 6f 70 74 t;/b></b> opt
b720: 69 6f 6e 2e 20 54 68 65 0a 70 75 72 70 6f 73 65 ion. The.purpose
b730: 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 73 65 is so when a se
b740: 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 rver supports mu
b750: 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 ltiple names, th
b760: 65 20 72 69 67 68 74 20 63 65 72 74 69 66 69 63 e right certific
b770: 61 74 65 0a 63 61 6e 20 62 65 20 75 73 65 64 2e ate.can be used.
b780: 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 66 It is called af
b790: 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 63 61 ter the hello ca
b7a0: 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72 llback but befor
b7b0: 65 20 74 68 65 20 41 4c 50 4e 0a 63 61 6c 6c 62 e the ALPN.callb
b7c0: 61 63 6b 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 ack.</p></dd>.<d
b7d0: 74 3e 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 t><b class="opti
b7e0: 6f 6e 22 3e 76 65 72 69 66 79 3c 2f 62 3e 20 3c on">verify</b> <
b7f0: 69 20 63 6c 61 73 73 3d 22 61 72 67 22 3e 63 68 i class="arg">ch
b800: 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 annelId depth ce
b810: 72 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c rt status error<
b820: 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e /i></dt>.<dd><p>
b830: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c This form of cal
b840: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
b850: 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 68 65 6e by OpenSSL when
b860: 20 61 20 6e 65 77 20 63 65 72 74 69 66 69 63 61 a new certifica
b870: 74 65 20 69 73 20 72 65 63 65 69 76 65 64 0a 66 te is received.f
b880: 72 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 rom the peer. It
b890: 20 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 allows the clie
b8a0: 6e 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 nt to check the
b8b0: 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 certificate veri
b8c0: 66 69 63 61 74 69 6f 6e 0a 72 65 73 75 6c 74 73 fication.results
b8d0: 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 65 74 and choose whet
b8e0: 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65 20 her to continue
b8f0: 6f 72 20 6e 6f 74 2e 20 49 74 20 69 73 20 63 61 or not. It is ca
b900: 6c 6c 65 64 20 66 6f 72 20 65 61 63 68 0a 63 65 lled for each.ce
b910: 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 rtificate in the
b920: 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 certificate cha
b930: 69 6e 2e 20 54 68 69 73 20 63 61 6c 6c 62 61 63 in. This callbac
b940: 6b 20 77 61 73 20 6d 6f 76 65 64 20 66 72 6f 6d k was moved from
b950: 0a 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f .<b class="optio
b960: 6e 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 n">-command</b>
b970: 69 6e 20 54 63 6c 54 4c 53 20 31 2e 38 2e 20 54 in TclTLS 1.8. T
b980: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 he arguments are
b990: 3a 3c 2f 70 3e 0a 3c 64 6c 20 63 6c 61 73 73 3d :</p>.<dl class=
b9a0: 22 64 6f 63 74 6f 6f 6c 73 5f 64 65 66 69 6e 69 "doctools_defini
b9b0: 74 69 6f 6e 73 22 3e 0a 3c 64 74 3e 3c 69 20 63 tions">.<dt><i c
b9c0: 6c 61 73 73 3d 22 61 72 67 22 3e 64 65 70 74 68 lass="arg">depth
b9d0: 3c 2f 69 3e 3c 2f 64 74 3e 0a 3c 64 64 3e 3c 70 </i></dt>.<dd><p
b9e0: 3e 54 68 65 20 64 65 70 74 68 20 69 73 20 74 68 >The depth is th
b9f0: 65 20 69 6e 74 65 67 65 72 20 64 65 70 74 68 20 e integer depth
ba00: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
ba10: 74 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 te in the certif
ba20: 69 63 61 74 65 20 63 68 61 69 6e 2c 0a 77 68 65 icate chain,.whe
ba30: 72 65 20 30 20 69 73 20 74 68 65 20 70 65 65 72 re 0 is the peer
ba40: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 certificate and
ba50: 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 67 higher values g
ba60: 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 65 20 43 oing up to the C
ba70: 65 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f ertificate.Autho
ba80: 72 69 74 79 20 28 43 41 29 2e 3c 2f 70 3e 3c 2f rity (CA).</p></
ba90: 64 64 3e 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 dd>.<dt><i class
baa0: 3d 22 61 72 67 22 3e 63 65 72 74 3c 2f 69 3e 3c ="arg">cert</i><
bab0: 2f 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 /dt>.<dd><p>The
bac0: 63 65 72 74 20 61 72 67 75 6d 65 6e 74 20 69 73 cert argument is
bad0: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 a list of key-v
bae0: 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c alue pairs simil
baf0: 61 72 20 74 6f 20 74 68 6f 73 65 20 72 65 74 75 ar to those retu
bb00: 72 6e 65 64 20 62 79 0a 3c 62 20 63 6c 61 73 73 rned by.<b class
bb10: 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 73 74 61 74 ="cmd">tls::stat
bb20: 75 73 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 3e us</b>.</p></dd>
bb30: 0a 3c 64 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 .<dt><i class="a
bb40: 72 67 22 3e 73 74 61 74 75 73 3c 2f 69 3e 3c 2f rg">status</i></
bb50: 64 74 3e 0a 3c 64 64 3e 3c 70 3e 54 68 65 20 73 dt>.<dd><p>The s
bb60: 74 61 74 75 73 20 61 72 67 75 6d 65 6e 74 20 69 tatus argument i
bb70: 73 20 74 68 65 20 62 6f 6f 6c 65 61 6e 20 76 61 s the boolean va
bb80: 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 75 lidity of the cu
bb90: 72 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 rrent certificat
bba0: 65 20 77 68 65 72 65 20 30 0a 69 73 20 69 6e 76 e where 0.is inv
bbb0: 61 6c 69 64 20 61 6e 64 20 31 20 69 73 20 76 61 alid and 1 is va
bbc0: 6c 69 64 2e 3c 2f 70 3e 3c 2f 64 64 3e 0a 3c 64 lid.</p></dd>.<d
bbd0: 74 3e 3c 69 20 63 6c 61 73 73 3d 22 61 72 67 22 t><i class="arg"
bbe0: 3e 65 72 72 6f 72 3c 2f 69 3e 3c 2f 64 74 3e 0a >error</i></dt>.
bbf0: 3c 64 64 3e 3c 70 3e 54 68 65 20 65 72 72 6f 72 <dd><p>The error
bc00: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 argument is the
bc10: 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 2c 20 error message,
bc20: 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 61 74 65 if any, generate
bc30: 64 20 62 79 0a 3c 62 20 63 6c 61 73 73 3d 22 66 d by.<b class="f
bc40: 75 6e 63 74 69 6f 6e 22 3e 58 35 30 39 5f 53 54 unction">X509_ST
bc50: 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f ORE_CTX_get_erro
bc60: 72 28 29 3c 2f 62 3e 2e 3c 2f 70 3e 3c 2f 64 64 r()</b>.</p></dd
bc70: 3e 0a 3c 2f 64 6c 3e 3c 2f 64 64 3e 0a 3c 2f 64 >.</dl></dd>.</d
bc80: 6c 3e 0a 3c 70 3e 52 65 66 65 72 65 6e 63 65 20 l>.<p>Reference
bc90: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 implementations
bca0: 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 of these callbac
bcb0: 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 ks are provided
bcc0: 69 6e 20 26 71 75 6f 74 3b 3c 62 20 63 6c 61 73 in "<b clas
bcd0: 73 3d 22 66 69 6c 65 22 3e 74 6c 73 2e 74 63 6c s="file">tls.tcl
bce0: 3c 2f 62 3e 26 71 75 6f 74 3b 0a 61 73 20 3c 62 </b>".as <b
bcf0: 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 class="cmd">tls
bd00: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 2c 20 ::callback</b>,
bd10: 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 <b class="cmd">t
bd20: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e ls::password</b>
bd30: 2c 20 61 6e 64 20 3c 62 20 63 6c 61 73 73 3d 22 , and <b class="
bd40: 63 6d 64 22 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 cmd">tls::valida
bd50: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 72 te_command</b>.r
bd60: 65 73 70 65 63 74 69 76 65 6c 79 2e 20 4e 6f 74 espectively. Not
bd70: 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 e that these are
bd80: 20 6f 6e 6c 79 20 3c 65 6d 3e 73 61 6d 70 6c 65 only <em>sample
bd90: 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 </em> implementa
bda0: 74 69 6f 6e 73 2e 20 49 6e 20 61 20 6d 6f 72 65 tions. In a more
bdb0: 0a 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c 6f .realistic deplo
bdc0: 79 6d 65 6e 74 20 79 6f 75 20 77 6f 75 6c 64 20 yment you would
bdd0: 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 6e specify your own
bde0: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 callback script
bdf0: 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 0a 63 68 s on each TLS.ch
be00: 61 6e 6e 65 6c 20 75 73 69 6e 67 20 74 68 65 20 annel using the
be10: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
be20: 22 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 2c 20 ">-command</b>,
be30: 3c 62 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e <b class="option
be40: 22 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2c ">-password</b>,
be50: 20 61 6e 64 0a 3c 62 20 63 6c 61 73 73 3d 22 6f and.<b class="o
be60: 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 74 65 ption">-validate
be70: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 _command</b> opt
be80: 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70 3e 54 68 65 ions.</p>.<p>The
be90: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f default behavio
bea0: 72 20 77 68 65 6e 20 74 68 65 20 3c 62 20 63 6c r when the <b cl
beb0: 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 6f ass="option">-co
bec0: 6d 6d 61 6e 64 3c 2f 62 3e 20 61 6e 64 20 3c 62 mmand</b> and <b
bed0: 20 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e class="option">
bee0: 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e -validate_comman
bef0: 64 3c 2f 62 3e 0a 6f 70 74 69 6f 6e 73 20 61 72 d</b>.options ar
bf00: 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2c e not specified,
bf10: 20 69 73 20 66 6f 72 20 54 63 6c 54 4c 53 20 74 is for TclTLS t
bf20: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 o process the as
bf30: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 sociated library
bf40: 0a 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 65 72 .callbacks inter
bf50: 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 75 nally. The defau
bf60: 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e lt behavior when
bf70: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 6f the <b class="o
bf80: 70 74 69 6f 6e 22 3e 2d 70 61 73 73 77 6f 72 64 ption">-password
bf90: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 0a 69 73 20 6e </b> option.is n
bfa0: 6f 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 ot specified is
bfb0: 66 6f 72 20 54 63 6c 54 4c 53 20 74 6f 20 70 72 for TclTLS to pr
bfc0: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 ocess the associ
bfd0: 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c ated library cal
bfe0: 6c 62 61 63 6b 73 20 62 79 0a 61 74 74 65 6d 70 lbacks by.attemp
bff0: 74 69 6e 67 20 74 6f 20 63 61 6c 6c 20 3c 62 20 ting to call <b
c000: 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a class="cmd">tls:
c010: 3a 70 61 73 73 77 6f 72 64 3c 2f 62 3e 2e 20 54 :password</b>. T
c020: 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 he difference be
c030: 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f 0a tween these two.
c040: 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 63 behaviors is a c
c050: 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 onsequence of ma
c060: 69 6e 74 61 69 6e 69 6e 67 20 63 6f 6d 70 61 74 intaining compat
c070: 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 72 ibility with ear
c080: 6c 69 65 72 0a 69 6d 70 6c 65 6d 65 6e 74 61 74 lier.implementat
c090: 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c 70 3e 3c 65 6d ions.</p>.<p><em
c0a0: 3e 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 >The use of the
c0b0: 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 reference callba
c0c0: 63 6b 73 20 3c 62 20 63 6c 61 73 73 3d 22 63 6d cks <b class="cm
c0d0: 64 22 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b d">tls::callback
c0e0: 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d 22 </b>, <b class="
c0f0: 63 6d 64 22 3e 74 6c 73 3a 3a 70 61 73 73 77 6f cmd">tls::passwo
c100: 72 64 3c 2f 62 3e 2c 0a 61 6e 64 20 3c 62 20 63 rd</b>,.and <b c
c110: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
c120: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
c130: 3c 2f 62 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f </b> is not reco
c140: 6d 6d 65 6e 64 65 64 2e 20 54 68 65 79 20 6d 61 mmended. They ma
c150: 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f y be removed fro
c160: 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 m future release
c170: 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 3c 2f 64 69 s.</em></p>.</di
c180: 76 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 v>.</div>.<div i
c190: 64 3d 22 73 65 63 74 69 6f 6e 35 22 20 63 6c 61 d="section5" cla
c1a0: 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 ss="doctools_sec
c1b0: 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d tion"><h2><a nam
c1c0: 65 3d 22 73 65 63 74 69 6f 6e 35 22 3e 44 65 62 e="section5">Deb
c1d0: 75 67 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 46 ug</a></h2>.<p>F
c1e0: 6f 72 20 6d 6f 73 74 20 64 65 62 75 67 67 69 6e or most debuggin
c1f0: 67 20 6e 65 65 64 73 2c 20 74 68 65 20 3c 62 20 g needs, the <b
c200: 63 6c 61 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d class="option">-
c210: 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 6f 70 74 callback</b> opt
c220: 69 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 ion can be used
c230: 74 6f 20 70 72 6f 76 69 64 65 0a 73 75 66 66 69 to provide.suffi
c240: 63 69 65 6e 74 20 69 6e 73 69 67 68 74 20 61 6e cient insight an
c250: 64 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e d information on
c260: 20 74 68 65 20 54 4c 53 20 68 61 6e 64 73 68 61 the TLS handsha
c270: 6b 65 20 61 6e 64 20 70 72 6f 67 72 65 73 73 2e ke and progress.
c280: 20 49 66 0a 66 75 72 74 68 65 72 20 74 72 6f 75 If.further trou
c290: 62 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e 73 69 bleshooting insi
c2a0: 67 68 74 20 69 73 20 6e 65 65 64 65 64 2c 20 74 ght is needed, t
c2b0: 68 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 he compile time
c2c0: 6f 70 74 69 6f 6e 0a 3c 62 20 63 6c 61 73 73 3d option.<b class=
c2d0: 22 6f 70 74 69 6f 6e 22 3e 2d 2d 65 6e 61 62 6c "option">--enabl
c2e0: 65 2d 64 65 62 75 67 3c 2f 62 3e 20 63 61 6e 20 e-debug</b> can
c2f0: 62 65 20 75 73 65 64 20 74 6f 20 67 65 74 20 64 be used to get d
c300: 65 74 61 69 6c 65 64 20 65 78 65 63 75 74 69 6f etailed executio
c310: 6e 20 66 6c 6f 77 20 73 74 61 74 75 73 2e 3c 2f n flow status.</
c320: 70 3e 0a 3c 70 3e 54 4c 53 20 6b 65 79 20 6c 6f p>.<p>TLS key lo
c330: 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 gging can be ena
c340: 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 bled by setting
c350: 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 the environment
c360: 76 61 72 69 61 62 6c 65 0a 3c 62 20 63 6c 61 73 variable.<b clas
c370: 73 3d 22 76 61 72 69 61 62 6c 65 22 3e 53 53 4c s="variable">SSL
c380: 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 KEYLOGFILE</b> t
c390: 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 o the name of th
c3a0: 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f e file to log to
c3b0: 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 . Then whenever
c3c0: 54 4c 53 20 6b 65 79 0a 6d 61 74 65 72 69 61 6c TLS key.material
c3d0: 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 is generated or
c3e0: 20 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c received it wil
c3f0: 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 l be logged to t
c400: 68 65 20 66 69 6c 65 2e 20 54 68 69 73 20 69 73 he file. This is
c410: 20 75 73 65 66 75 6c 0a 66 6f 72 20 6c 6f 67 67 useful.for logg
c420: 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72 ing key data for
c430: 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 network logging
c440: 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f tools to use to
c450: 20 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 decrypt the dat
c460: 61 2e 3c 2f 70 3e 0a 3c 70 3e 54 68 65 20 3c 62 a.</p>.<p>The <b
c470: 20 63 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 class="variable
c480: 22 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 62 3e ">tls::debug</b>
c490: 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 variable provid
c4a0: 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e es some addition
c4b0: 61 6c 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 al control over
c4c0: 74 68 65 0a 64 65 62 75 67 20 6c 6f 67 67 69 6e the.debug loggin
c4d0: 67 20 69 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 g in the <b clas
c4e0: 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 63 61 6c s="cmd">tls::cal
c4f0: 6c 62 61 63 6b 3c 2f 62 3e 2c 20 3c 62 20 63 6c lback</b>, <b cl
c500: 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a 70 ass="cmd">tls::p
c510: 61 73 73 77 6f 72 64 3c 2f 62 3e 2c 20 61 6e 64 assword</b>, and
c520: 0a 3c 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e .<b class="cmd">
c530: 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f tls::validate_co
c540: 6d 6d 61 6e 64 3c 2f 62 3e 20 64 65 66 61 75 6c mmand</b> defaul
c550: 74 20 68 61 6e 64 6c 65 72 73 20 69 6e 20 26 71 t handlers in &q
c560: 75 6f 74 3b 3c 62 20 63 6c 61 73 73 3d 22 66 69 uot;<b class="fi
c570: 6c 65 22 3e 74 6c 73 2e 74 63 6c 3c 2f 62 3e 26 le">tls.tcl</b>&
c580: 71 75 6f 74 3b 2e 0a 54 68 65 20 64 65 66 61 75 quot;..The defau
c590: 6c 74 20 76 61 6c 75 65 20 69 73 20 30 20 77 69 lt value is 0 wi
c5a0: 74 68 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 th higher values
c5b0: 20 70 72 6f 64 75 63 69 6e 67 20 6d 6f 72 65 20 producing more
c5c0: 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 diagnostic outpu
c5d0: 74 2c 0a 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f t,.and will also
c5e0: 20 66 6f 72 63 65 20 74 68 65 20 76 65 72 69 66 force the verif
c5f0: 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c 62 20 63 y method in <b c
c600: 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c 73 3a 3a lass="cmd">tls::
c610: 63 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 74 6f 20 callback</b> to
c620: 61 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 accept the.certi
c630: 66 69 63 61 74 65 2c 20 65 76 65 6e 20 69 66 20 ficate, even if
c640: 69 74 20 69 73 20 69 6e 76 61 6c 69 64 20 77 68 it is invalid wh
c650: 65 6e 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d en the <b class=
c660: 22 6f 70 74 69 6f 6e 22 3e 2d 76 61 6c 69 64 61 "option">-valida
c670: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 6f 70 tecommand</b>.op
c680: 74 69 6f 6e 20 69 73 20 73 65 74 20 74 6f 20 3c tion is set to <
c690: 62 20 63 6c 61 73 73 3d 22 63 6d 64 22 3e 74 6c b class="cmd">tl
c6a0: 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d s::validate_comm
c6b0: 61 6e 64 3c 2f 62 3e 2e 3c 2f 70 3e 0a 3c 70 3e and</b>.</p>.<p>
c6c0: 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20 74 <em>The use of t
c6d0: 68 65 20 76 61 72 69 61 62 6c 65 20 3c 62 20 63 he variable <b c
c6e0: 6c 61 73 73 3d 22 76 61 72 69 61 62 6c 65 22 3e lass="variable">
c6f0: 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 62 3e 20 69 tls::debug</b> i
c700: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 s not recommende
c710: 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d d..It may be rem
c720: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
c730: 20 72 65 6c 65 61 73 65 73 2e 3c 2f 65 6d 3e 3c releases.</em><
c740: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 /p>.</div>.<div
c750: 69 64 3d 22 73 65 63 74 69 6f 6e 36 22 20 63 6c id="section6" cl
c760: 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 65 ass="doctools_se
c770: 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e 61 ction"><h2><a na
c780: 6d 65 3d 22 73 65 63 74 69 6f 6e 36 22 3e 48 54 me="section6">HT
c790: 54 50 20 50 61 63 6b 61 67 65 20 45 78 61 6d 70 TP Package Examp
c7a0: 6c 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e les</a></h2>.<p>
c7b0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 72 The following ar
c7c0: 65 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 74 e example script
c7d0: 73 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 61 20 s to download a
c7e0: 77 65 62 70 61 67 65 20 61 6e 64 20 66 69 6c 65 webpage and file
c7f0: 20 75 73 69 6e 67 20 74 68 65 0a 68 74 74 70 20 using the.http
c800: 70 61 63 6b 61 67 65 2e 20 53 65 65 20 3c 73 70 package. See <sp
c810: 61 6e 20 63 6c 61 73 73 3d 22 73 65 63 74 72 65 an class="sectre
c820: 66 22 3e 3c 61 20 68 72 65 66 3d 22 23 73 65 63 f"><a href="#sec
c830: 74 69 6f 6e 33 22 3e 43 65 72 74 69 66 69 63 61 tion3">Certifica
c840: 74 65 20 56 61 6c 69 64 61 74 69 6f 6e 3c 2f 61 te Validation</a
c850: 3e 3c 2f 73 70 61 6e 3e 20 66 6f 72 20 77 68 65 ></span> for whe
c860: 74 68 65 72 20 74 68 65 0a 3c 62 20 63 6c 61 73 ther the.<b clas
c870: 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 64 69 s="option">-cadi
c880: 72 3c 2f 62 3e 2c 20 3c 62 20 63 6c 61 73 73 3d r</b>, <b class=
c890: 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 66 69 6c 65 "option">-cafile
c8a0: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 20 63 6c 61 </b>, and <b cla
c8b0: 73 73 3d 22 6f 70 74 69 6f 6e 22 3e 2d 63 61 73 ss="option">-cas
c8c0: 74 6f 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 tore</b> options
c8d0: 20 61 72 65 20 61 6c 73 6f 0a 6e 65 65 64 65 64 are also.needed
c8e0: 2e 20 53 65 65 20 74 68 65 20 64 65 6d 6f 73 20 . See the demos
c8f0: 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 6d 6f directory for mo
c900: 72 65 20 65 78 61 6d 70 6c 65 20 73 63 72 69 70 re example scrip
c910: 74 73 2e 3c 2f 70 3e 0a 3c 70 3e 45 78 61 6d 70 ts.</p>.<p>Examp
c920: 6c 65 20 23 31 3a 20 44 6f 77 6e 6c 6f 61 64 20 le #1: Download
c930: 61 20 77 65 62 20 70 61 67 65 3c 2f 70 3e 0a 3c a web page</p>.<
c940: 70 72 65 20 63 6c 61 73 73 3d 22 64 6f 63 74 6f pre class="docto
c950: 6f 6c 73 5f 65 78 61 6d 70 6c 65 22 3e 0a 70 61 ols_example">.pa
c960: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 ckage require ht
c970: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 tp.package requi
c980: 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 26 re tls.set url &
c990: 71 75 6f 74 3b 68 74 74 70 73 3a 2f 2f 77 77 77 quot;https://www
c9a0: 2e 74 63 6c 2e 74 6b 2f 26 71 75 6f 74 3b 0a 68 .tcl.tk/".h
c9b0: 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 ttp::register ht
c9c0: 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a tps 443 [list ::
c9d0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 tls::socket -aut
c9e0: 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 oservername 1 -r
c9f0: 65 71 75 69 72 65 20 31 5d 0a 23 20 47 65 74 20 equire 1].# Get
ca00: 55 52 4c 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 URL.set token [h
ca10: 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c ttp::geturl $url
ca20: 5d 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 ].# Check for er
ca30: 72 6f 72 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 ror.if {[http::s
ca40: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 tatus $token] ne
ca50: 20 26 71 75 6f 74 3b 6f 6b 26 71 75 6f 74 3b 7d "ok"}
ca60: 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 6f 72 {. puts [for
ca70: 6d 61 74 20 26 71 75 6f 74 3b 45 72 72 6f 72 20 mat "Error
ca80: 25 73 26 71 75 6f 74 3b 20 5b 68 74 74 70 3a 3a %s" [http::
ca90: 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a status $token]].
caa0: 7d 0a 23 20 53 61 76 65 20 77 65 62 20 70 61 67 }.# Save web pag
cab0: 65 20 74 6f 20 66 69 6c 65 0a 73 65 74 20 63 68 e to file.set ch
cac0: 20 5b 6f 70 65 6e 20 65 78 61 6d 70 6c 65 2e 68 [open example.h
cad0: 74 6d 6c 20 77 62 5d 0a 70 75 74 73 20 24 63 68 tml wb].puts $ch
cae0: 20 5b 68 74 74 70 3a 3a 64 61 74 61 20 24 74 6f [http::data $to
caf0: 6b 65 6e 5d 0a 63 6c 6f 73 65 20 24 63 68 0a 23 ken].close $ch.#
cb00: 20 43 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 70 3a Cleanup.::http:
cb10: 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a :cleanup $token.
cb20: 3c 2f 70 72 65 3e 0a 3c 70 3e 45 78 61 6d 70 6c </pre>.<p>Exampl
cb30: 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 20 61 e #2: Download a
cb40: 20 66 69 6c 65 3c 2f 70 3e 0a 3c 70 72 65 20 63 file</p>.<pre c
cb50: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 65 lass="doctools_e
cb60: 78 61 6d 70 6c 65 22 3e 0a 70 61 63 6b 61 67 65 xample">.package
cb70: 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 require http.pa
cb80: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c ckage require tl
cb90: 73 0a 73 65 74 20 75 72 6c 20 26 71 75 6f 74 3b s.set url "
cba0: 68 74 74 70 73 3a 2f 2f 77 69 6b 69 2e 74 63 6c https://wiki.tcl
cbb0: 2d 6c 61 6e 67 2e 6f 72 67 2f 73 69 74 65 6d 61 -lang.org/sitema
cbc0: 70 2e 78 6d 6c 26 71 75 6f 74 3b 0a 68 74 74 70 p.xml".http
cbd0: 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 73 ::register https
cbe0: 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 443 [list ::tls
cbf0: 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 ::socket -autose
cc00: 72 76 65 72 6e 61 6d 65 20 31 20 2d 72 65 71 75 rvername 1 -requ
cc10: 69 72 65 20 31 5d 0a 23 20 4f 70 65 6e 20 6f 75 ire 1].# Open ou
cc20: 74 70 75 74 20 66 69 6c 65 0a 73 65 74 20 66 69 tput file.set fi
cc30: 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 20 74 61 69 lename [file tai
cc40: 6c 20 24 75 72 6c 5d 0a 73 65 74 20 63 68 20 5b l $url].set ch [
cc50: 6f 70 65 6e 20 24 66 69 6c 65 6e 61 6d 65 20 77 open $filename w
cc60: 62 5d 0a 23 20 47 65 74 20 66 69 6c 65 0a 73 65 b].# Get file.se
cc70: 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a t token [::http:
cc80: 3a 67 65 74 75 72 6c 20 24 75 72 6c 20 2d 62 6c :geturl $url -bl
cc90: 6f 63 6b 73 69 7a 65 20 36 35 35 33 36 20 2d 63 ocksize 65536 -c
cca0: 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 23 20 43 68 hannel $ch].# Ch
ccb0: 65 63 6b 20 66 6f 72 20 65 72 72 6f 72 0a 69 66 eck for error.if
ccc0: 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 {[http::status
ccd0: 24 74 6f 6b 65 6e 5d 20 6e 65 20 26 71 75 6f 74 $token] ne "
cce0: 3b 6f 6b 26 71 75 6f 74 3b 7d 20 7b 0a 20 20 20 ;ok"} {.
ccf0: 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 26 71 puts [format &q
cd00: 75 6f 74 3b 45 72 72 6f 72 20 25 73 26 71 75 6f uot;Error %s&quo
cd10: 74 3b 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 t; [http::status
cd20: 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 23 20 43 6c $token]].}.# Cl
cd30: 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 68 0a eanup.close $ch.
cd40: 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 ::http::cleanup
cd50: 24 74 6f 6b 65 6e 0a 3c 2f 70 72 65 3e 0a 3c 2f $token.</pre>.</
cd60: 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 65 div>.<div id="se
cd70: 63 74 69 6f 6e 37 22 20 63 6c 61 73 73 3d 22 64 ction7" class="d
cd80: 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 octools_section"
cd90: 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 65 ><h2><a name="se
cda0: 63 74 69 6f 6e 37 22 3e 53 70 65 63 69 61 6c 20 ction7">Special
cdb0: 43 6f 6e 73 69 64 65 72 61 74 69 6f 6e 73 3c 2f Considerations</
cdc0: 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 54 68 65 20 63 a></h2>.<p>The c
cdd0: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74 apabilities of t
cde0: 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20 his package can
cdf0: 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 vary enormously
ce00: 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 74 based upon how t
ce10: 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 65 he.linked to Ope
ce20: 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 nSSL library was
ce30: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 configured and
ce40: 62 75 69 6c 74 2e 20 4e 65 77 20 76 65 72 73 69 built. New versi
ce50: 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 74 65 ons may obsolete
ce60: 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f 6c 20 .older protocol
ce70: 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 6f 72 versions, add or
ce80: 20 72 65 6d 6f 76 65 20 63 69 70 68 65 72 73 2c remove ciphers,
ce90: 20 63 68 61 6e 67 65 20 64 65 66 61 75 6c 74 20 change default
cea0: 76 61 6c 75 65 73 2c 20 65 74 63 2e 0a 55 73 65 values, etc..Use
ceb0: 20 74 68 65 20 3c 62 20 63 6c 61 73 73 3d 22 63 the <b class="c
cec0: 6d 64 22 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f md">tls::protoco
ced0: 6c 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 73 20 ls</b> commands
cee0: 74 6f 20 6f 62 74 61 69 6e 20 74 68 65 20 73 75 to obtain the su
cef0: 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c pported.protocol
cf00: 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 3c versions.</p>.<
cf10: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 73 /div>.<div id="s
cf20: 65 65 2d 61 6c 73 6f 22 20 63 6c 61 73 73 3d 22 ee-also" class="
cf30: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
cf40: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 73 "><h2><a name="s
cf50: 65 65 2d 61 6c 73 6f 22 3e 53 65 65 20 41 6c 73 ee-also">See Als
cf60: 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 3c 61 o</a></h2>.<p><a
cf70: 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 href="https://w
cf80: 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 ww.openssl.org/"
cf90: 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 68 74 >OpenSSL</a>, ht
cfa0: 74 70 2c 20 73 6f 63 6b 65 74 3c 2f 70 3e 0a 3c tp, socket</p>.<
cfb0: 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 6b /div>.<div id="k
cfc0: 65 79 77 6f 72 64 73 22 20 63 6c 61 73 73 3d 22 eywords" class="
cfd0: 64 6f 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e doctools_section
cfe0: 22 3e 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 6b "><h2><a name="k
cff0: 65 79 77 6f 72 64 73 22 3e 4b 65 79 77 6f 72 64 eywords">Keyword
d000: 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 49 2f s</a></h2>.<p>I/
d010: 4f 2c 20 49 50 20 41 64 64 72 65 73 73 2c 20 4f O, IP Address, O
d020: 70 65 6e 53 53 4c 2c 20 53 53 4c 2c 20 54 43 50 penSSL, SSL, TCP
d030: 2c 20 54 4c 53 2c 20 54 63 6c 54 4c 53 2c 20 61 , TLS, TclTLS, a
d040: 73 79 6e 63 68 72 6f 6e 6f 75 73 20 49 2f 4f 2c synchronous I/O,
d050: 20 62 69 6e 64 2c 20 63 65 72 74 69 66 69 63 61 bind, certifica
d060: 74 65 2c 20 63 68 61 6e 6e 65 6c 2c 20 63 6f 6e te, channel, con
d070: 6e 65 63 74 69 6f 6e 2c 20 64 6f 6d 61 69 6e 20 nection, domain
d080: 6e 61 6d 65 2c 20 68 6f 73 74 2c 20 68 74 74 70 name, host, http
d090: 73 2c 20 6e 65 74 77 6f 72 6b 2c 20 6e 65 74 77 s, network, netw
d0a0: 6f 72 6b 20 61 64 64 72 65 73 73 2c 20 73 6f 63 ork address, soc
d0b0: 6b 65 74 2c 20 74 6c 73 3c 2f 70 3e 0a 3c 2f 64 ket, tls</p>.</d
d0c0: 69 76 3e 0a 3c 64 69 76 20 69 64 3d 22 63 61 74 iv>.<div id="cat
d0d0: 65 67 6f 72 79 22 20 63 6c 61 73 73 3d 22 64 6f egory" class="do
d0e0: 63 74 6f 6f 6c 73 5f 73 65 63 74 69 6f 6e 22 3e ctools_section">
d0f0: 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 63 61 74 <h2><a name="cat
d100: 65 67 6f 72 79 22 3e 43 61 74 65 67 6f 72 79 3c egory">Category<
d110: 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 3e 74 6c 73 3c /a></h2>.<p>tls<
d120: 2f 70 3e 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 /p>.</div>.<div
d130: 69 64 3d 22 63 6f 70 79 72 69 67 68 74 22 20 63 id="copyright" c
d140: 6c 61 73 73 3d 22 64 6f 63 74 6f 6f 6c 73 5f 73 lass="doctools_s
d150: 65 63 74 69 6f 6e 22 3e 3c 68 32 3e 3c 61 20 6e ection"><h2><a n
d160: 61 6d 65 3d 22 63 6f 70 79 72 69 67 68 74 22 3e ame="copyright">
d170: 43 6f 70 79 72 69 67 68 74 3c 2f 61 3e 3c 2f 68 Copyright</a></h
d180: 32 3e 0a 3c 70 3e 43 6f 70 79 72 69 67 68 74 20 2>.<p>Copyright
d190: 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 74 © 1999 Matt
d1a0: 20 4e 65 77 6d 61 6e 3c 62 72 3e 0a 43 6f 70 79 Newman<br>.Copy
d1b0: 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 right © 200
d1c0: 34 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 4 Starfish Syste
d1d0: 6d 73 3c 62 72 3e 0a 43 6f 70 79 72 69 67 68 74 ms<br>.Copyright
d1e0: 20 26 63 6f 70 79 3b 20 32 30 32 34 20 42 72 69 © 2024 Bri
d1f0: 61 6e 20 4f 27 48 61 67 61 6e 3c 2f 70 3e 0a 3c an O'Hagan</p>.<
d200: 2f 64 69 76 3e 0a 3c 2f 64 69 76 3e 3c 2f 62 6f /div>.</div></bo
d210: 64 79 3e 3c 2f 68 74 6d 6c 3e 0a dy></html>.