0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a <!DOCTYPE html>.
0010: 3c 68 74 6d 6c 20 6c 61 6e 67 3d 22 65 6e 22 3e <html lang="en">
0020: 0a 3c 68 65 61 64 3e 0a 3c 6d 65 74 61 20 68 74 .<head>.<meta ht
0030: 74 70 2d 65 71 75 69 76 3d 22 43 6f 6e 74 65 6e tp-equiv="Conten
0040: 74 2d 54 79 70 65 22 20 63 6f 6e 74 65 6e 74 3d t-Type" content=
0050: 22 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 "text/html; char
0060: 73 65 74 3d 75 74 66 2d 38 22 3e 0a 3c 6d 65 74 set=utf-8">.<met
0070: 61 20 6e 61 6d 65 3d 22 43 6f 70 79 72 69 67 68 a name="Copyrigh
0080: 74 22 20 63 6f 6e 74 65 6e 74 3d 22 31 39 39 39 t" content="1999
0090: 20 4d 61 74 74 20 4e 65 77 6d 61 6e 20 2f 20 32 Matt Newman / 2
00a0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73 004 Starfish Sys
00b0: 74 65 6d 73 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c tems">.<title>TL
00c0: 53 20 28 53 53 4c 29 20 54 43 4c 20 43 6f 6d 6d S (SSL) TCL Comm
00d0: 61 6e 64 73 3c 2f 74 69 74 6c 65 3e 0a 3c 6c 69 ands</title>.<li
00e0: 6e 6b 20 72 65 6c 3d 22 73 74 79 6c 65 73 68 65 nk rel="styleshe
00f0: 65 74 22 20 68 72 65 66 3d 22 64 6f 63 73 2e 63 et" href="docs.c
0100: 73 73 22 20 74 79 70 65 3d 22 74 65 78 74 2f 63 ss" type="text/c
0110: 73 73 22 20 6d 65 64 69 61 3d 22 61 6c 6c 22 3e ss" media="all">
0120: 0a 3c 2f 68 65 61 64 3e 0a 0a 3c 62 6f 64 79 20 .</head>..<body
0130: 63 6c 61 73 73 3d 22 76 73 63 2d 69 6e 69 74 69 class="vsc-initi
0140: 61 6c 69 7a 65 64 22 3e 0a 0a 3c 68 32 3e 54 63 alized">..<h2>Tc
0150: 6c 20 54 6c 73 20 45 78 74 65 6e 73 69 6f 6e 20 l Tls Extension
0160: 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 3c 2f 68 Documentation</h
0170: 32 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 64 2>..<dl>. <dd
0180: 3e 3c 61 20 68 72 65 66 3d 22 23 4e 41 4d 45 22 ><a href="#NAME"
0190: 3e 4e 41 4d 45 3c 2f 61 3e 0a 20 20 20 20 3c 64 >NAME</a>. <d
01a0: 6c 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f l>..<dd><b>tls</
01b0: 62 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 b> - binding to
01c0: 3c 62 3e 4f 70 65 6e 53 53 4c 3c 2f 62 3e 20 6c <b>OpenSSL</b> l
01d0: 69 62 72 61 72 79 0a 09 66 6f 72 20 73 6f 63 6b ibrary..for sock
01e0: 65 74 20 61 6e 64 20 49 2f 4f 20 63 68 61 6e 6e et and I/O chann
01f0: 65 6c 20 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e el communication
0200: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c s.</dd>. </dl
0210: 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 >. </dd>.
0220: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 59 <dd><a href="#SY
0230: 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 NOPSIS">SYNOPSIS
0240: 3c 2f 61 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 3c </a> </dd>. <
0250: 64 64 3e 3c 64 6c 3e 0a 09 20 20 20 20 3c 64 64 dd><dl>.. <dd
0260: 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75 ><b>package requ
0270: 69 72 65 20 54 63 6c 3c 2f 62 3e 20 3c 65 6d 3e ire Tcl</b> <em>
0280: 3f 3c 62 3e 38 2e 35 3c 2f 62 3e 3f 3c 2f 65 6d ?<b>8.5</b>?</em
0290: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
02a0: 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 <b>package requi
02b0: 72 65 20 74 6c 73 3c 2f 62 3e 3c 2f 64 64 3e 0a re tls</b></dd>.
02c0: 09 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c . <dt> <
02d0: 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 /dt>.. <dd><b
02e0: 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c >tls::init</b> <
02f0: 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d em>?options?</em
0300: 3e 20 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 > </dd>.. <dd
0310: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c ><b>tls::socket<
0320: 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 /b> <em>?options
0330: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e ? host port</em>
0340: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dd>.. <dd><
0350: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 b>tls::socket</b
0360: 3e 20 3c 65 6d 3e 3f 2d 73 65 72 76 65 72 20 63 > <em>?-server c
0370: 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 ommand? ?options
0380: 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 64 3e ? port</em></dd>
0390: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 .. <dd><b>tls
03a0: 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 ::handshake</b>
03b0: 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em> channel</em
03c0: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
03d0: 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f <b>tls::status</
03e0: 62 3e 20 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 b> <em>?-local?
03f0: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 channel</em></dd
0400: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c >.. <dd><b>tl
0410: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 s::connection</b
0420: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 > <em>channel</e
0430: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 m></dd>.. <dd
0440: 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c ><b>tls::import<
0450: 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 /b> <em>channel
0460: 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d 3e 3c 2f ?options?</em></
0470: 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e dd>.. <dd><b>
0480: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 tls::unimport</b
0490: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 > <em>channel</e
04a0: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 m></dd>.. <dt
04b0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 > </dt>..
04c0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 69 <dd><b>tls::ci
04d0: 70 68 65 72 73 3c 2f 62 3e 20 3c 65 6d 3e 3f 70 phers</b> <em>?p
04e0: 72 6f 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 rotocol? ?verbos
04f0: 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f e? ?supported?</
0500: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 em></dd>.. <d
0510: 64 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 d><b>tls::protoc
0520: 6f 6c 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 09 20 20 ols</b></dd>..
0530: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 76 65 <dd><b>tls::ve
0540: 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 64 64 3e 0a 09 rsion</b></dd>..
0550: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a </dl>. </dd>.
0560: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0570: 22 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d "#COMMANDS">COMM
0580: 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 ANDS</a></dd>.
0590: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 <dd><a href="#
05a0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
05b0: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
05c0: 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 NS</a></dd>.
05d0: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 <dd><a href="#HT
05e0: 54 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 TPS EXAMPLE">HTT
05f0: 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f PS EXAMPLE</a></
0600: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 dd>. <dd><a h
0610: 72 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e ref="#SEE ALSO">
0620: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 SPECIAL CONSIDER
0630: 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a ATIONS</a></dd>.
0640: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0650: 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 "#SEE ALSO">SEE
0660: 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f ALSO</a></dd>.</
0670: 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c dl>..<hr>..<h3><
0680: 61 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 a name="NAME">NA
0690: 4d 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e ME</a></h3>..<p>
06a0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 <strong>tls</str
06b0: 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 ong> - binding t
06c0: 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 o <strong>OpenSS
06d0: 4c 3c 2f 73 74 72 6f 6e 67 3e 20 6c 69 62 72 61 L</strong> libra
06e0: 72 79 0a 66 6f 72 20 73 6f 63 6b 65 74 20 61 6e ry.for socket an
06f0: 64 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f d I/O channel co
0700: 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c 2f 70 mmunications.</p
0710: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
0720: 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 SYNOPSIS">SYNOPS
0730: 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e IS</a></h3>..<p>
0740: 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 <b>package requi
0750: 72 65 20 54 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f re Tcl</b> <em>?
0760: 3c 62 3e 38 2e 35 3c 2f 62 3e 3f 3c 2f 65 6d 3e <b>8.5</b>?</em>
0770: 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20 <br>.<b>package
0780: 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 3c require tls</b><
0790: 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 br>.<br>.<a href
07a0: 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 ="#tls::init"><b
07b0: 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c >tls::init</b> <
07c0: 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c i>?options?</i><
07d0: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
07e0: 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c "#tls::socket"><
07f0: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 b>tls::socket</b
0800: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 > <i>?options? h
0810: 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c 62 72 3e ost port</i><br>
0820: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0830: 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a socket"><b>tls::
0840: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 2d socket</b> <i>?-
0850: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 server command?
0860: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f ?options? port</
0870: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0880: 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 ef="#tls::status
0890: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73 "><b>tls::status
08a0: 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 61 6c 3f </b> <i>?-local?
08b0: 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e channel</i></a>
08c0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
08d0: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e ls::connection">
08e0: 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 <b>tls::connecti
08f0: 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 on</b> <i>channe
0900: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 l</i></a><br>.<a
0910: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e href="#tls::han
0920: 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a dshake"><b>tls::
0930: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 handshake</b> <i
0940: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
0950: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
0960: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ls::import"><b>t
0970: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c ls::import</b> <
0980: 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f i>channel ?optio
0990: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a ns?</i></a><br>.
09a0: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 75 <a href="#tls::u
09b0: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a nimport"><b>tls:
09c0: 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 :unimport</b> <i
09d0: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
09e0: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 <br>.<br>.<a hre
09f0: 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 f="#tls::ciphers
0a00: 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 "><b>tls::cipher
0a10: 73 3c 2f 62 3e 20 3c 69 3e 3f 70 72 6f 74 6f 63 s</b> <i>?protoc
0a20: 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 ol? ?verbose? ?s
0a30: 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f 61 upported?</i></a
0a40: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 ><br>.<a href="#
0a50: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e tls::protocols">
0a60: 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c <b>tls::protocol
0a70: 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 s</b></a><br>.<a
0a80: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 76 65 72 href="#tls::ver
0a90: 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 76 65 sion"><b>tls::ve
0aa0: 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 rsion</b></a><br
0ab0: 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e >.</p>..<h3><a n
0ac0: 61 6d 65 3d 22 44 45 53 43 52 49 50 54 49 4f 4e ame="DESCRIPTION
0ad0: 22 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c 2f 61 ">DESCRIPTION</a
0ae0: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 ></h3>..<p>This
0af0: 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 extension provid
0b00: 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 63 es TCL script ac
0b10: 63 65 73 73 20 74 6f 20 73 65 63 75 72 65 20 73 cess to secure s
0b20: 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61 74 ocket communicat
0b30: 69 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20 54 ions.using the T
0b40: 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 ransport Layer S
0b50: 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 ecurity (TLS) pr
0b60: 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 otocol. It provi
0b70: 64 65 73 20 61 20 67 65 6e 65 72 69 63 0a 62 69 des a generic.bi
0b80: 6e 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 nding to <a href
0b90: 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 ="http://www.ope
0ba0: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 nssl.org/">OpenS
0bb0: 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e SL</a>, utilizin
0bc0: 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 63 g the.<strong>Tc
0bd0: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f l_StackChannel</
0be0: 73 74 72 6f 6e 67 3e 20 41 50 49 20 69 6e 20 54 strong> API in T
0bf0: 63 6c 20 38 2e 34 20 61 6e 64 20 68 69 67 68 65 cl 8.4 and highe
0c00: 72 2e 0a 54 68 65 73 65 20 73 6f 63 6b 65 74 73 r..These sockets
0c10: 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 20 behave exactly
0c20: 74 68 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e the same as chan
0c30: 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 nels created usi
0c40: 6e 67 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a ng the built-in.
0c50: 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f <strong>socket</
0c60: 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61 6e 64 2c strong> command,
0c70: 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 64 64 69 along with addi
0c80: 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 tional options f
0c90: 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 or controlling.t
0ca0: 68 65 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a he SSL session..
0cb0: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d </p>..<h3><a nam
0cc0: 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d e="COMMANDS">COM
0cd0: 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a MANDS</a></h3>..
0ce0: 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 <p>Typically one
0cf0: 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c would use the <
0d00: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b strong>tls::sock
0d10: 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d et </strong>comm
0d20: 61 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69 64 and.which provid
0d30: 65 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 es compatibility
0d40: 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 65 with the native
0d50: 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 Tcl <strong>soc
0d60: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d ket</strong>.com
0d70: 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63 61 mand. In such ca
0d80: 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a ses <strong>tls:
0d90: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
0da0: 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75 should not be.u
0db0: 73 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70 sed directly.</p
0dc0: 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e >..<dl>. <dt>
0dd0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e <a name="tls::in
0de0: 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 it"><b>tls::init
0df0: 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b><i>?options
0e00: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 ?</i></a></dt>.
0e10: 20 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 <dd>Optional
0e20: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 function to set
0e30: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 the default opti
0e40: 6f 6e 73 20 75 73 65 64 20 62 79 0a 09 3c 73 74 ons used by..<st
0e50: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 rong>tls::socket
0e60: 3c 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f </strong>. If yo
0e70: 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 u call <strong>t
0e80: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f ls::import</stro
0e90: 6e 67 3e 0a 09 64 69 72 65 63 74 6c 79 20 74 68 ng>..directly th
0ea0: 69 73 20 72 6f 75 74 69 6e 65 20 68 61 73 20 6e is routine has n
0eb0: 6f 20 65 66 66 65 63 74 2e 20 41 6e 79 20 6f 66 o effect. Any of
0ec0: 20 74 68 65 20 6f 70 74 69 6f 6e 73 0a 09 74 68 the options..th
0ed0: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a at <strong>tls::
0ee0: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 socket</strong>
0ef0: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73 accepts can be s
0f00: 65 74 0a 09 75 73 69 6e 67 20 74 68 69 73 20 63 et..using this c
0f10: 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 ommand, though y
0f20: 6f 75 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 ou should limit
0f30: 79 6f 75 72 20 6f 70 74 69 6f 6e 73 0a 09 74 6f your options..to
0f40: 20 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 only TLS relate
0f50: 64 20 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 d ones.</dd>.
0f60: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e <dt> </dt>
0f70: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
0f80: 3d 22 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c ="tls::socket"><
0f90: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f b>tls::socket </
0fa0: 62 3e 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a b><em>?options?.
0fb0: 09 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c .host port</em><
0fc0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 /a></dt>. <dt
0fd0: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c ><b>tls::socket<
0fe0: 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 /b><em> ?-server
0ff0: 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f command? ?optio
1000: 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 ns? port</em></d
1010: 74 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 73 20 t>. <dd>This
1020: 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 is a helper func
1030: 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a tion that utiliz
1040: 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e es the underlyin
1050: 67 0a 09 63 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 g..commands (<st
1060: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 rong>tls::import
1070: 3c 2f 73 74 72 6f 6e 67 3e 29 2e 20 49 74 20 62 </strong>). It b
1080: 65 68 61 76 65 73 0a 09 65 78 61 63 74 6c 79 20 ehaves..exactly
1090: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 the same as the
10a0: 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72 6f native Tcl <stro
10b0: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e ng>socket</stron
10c0: 67 3e 0a 09 63 6f 6d 6d 61 6e 64 20 65 78 63 65 g>..command exce
10d0: 70 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 pt the options c
10e0: 61 6e 20 61 6c 73 6f 20 69 6e 63 6c 75 64 65 20 an also include
10f0: 61 6e 79 20 6f 66 20 74 68 65 0a 09 61 70 70 6c any of the..appl
1100: 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d 22 icable <a href="
1110: 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 #tls::import"><s
1120: 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 trong>tls:import
1130: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f </strong></a>..o
1140: 70 74 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 ptions with one
1150: 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f additional optio
1160: 6e 3a 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 75 n:</dd>.<blockqu
1170: 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c ote>. <dl>..<
1180: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 75 74 6f dt><strong>-auto
1190: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f servername</stro
11a0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
11b0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 75 74 6f ></dt>..<dd>Auto
11c0: 6d 61 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 matically set th
11d0: 65 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 61 72 e -servername ar
11e0: 67 75 6d 65 6e 74 20 74 6f 20 74 68 65 20 3c 65 gument to the <e
11f0: 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 0a 09 20 20 20 m>host</em>..
1200: 20 61 72 67 75 6d 65 6e 74 20 28 64 65 66 61 75 argument (defau
1210: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c lt is <em>false<
1220: 2f 65 6d 3e 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 /em>).</dd>.
1230: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f </dl>.</blockquo
1240: 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 te>.. <dt><a
1250: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 name="tls::impor
1260: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 t"><b>tls::impor
1270: 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c t </b><i>channel
1280: 0a 09 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c ..?options?</i><
1290: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
12a0: 3e 41 64 64 20 53 53 4c 2f 54 4c 53 20 65 6e 63 >Add SSL/TLS enc
12b0: 72 79 70 74 69 6f 6e 20 74 6f 20 61 20 72 65 67 ryption to a reg
12c0: 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c ular Tcl channel
12d0: 2e 20 49 74 20 6e 65 65 64 0a 09 6e 6f 74 20 62 . It need..not b
12e0: 65 20 61 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 e a socket, but
12f0: 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d must provide bi-
1300: 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 directional flow
1310: 2e 20 41 6c 73 6f 0a 09 73 65 74 20 73 65 73 73 . Also..set sess
1320: 69 6f 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 ion parameters f
1330: 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 or SSL handshake
1340: 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 .</dd>..<blockqu
1350: 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c ote>. <dl>..<
1360: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 6e dt><strong>-alpn
1370: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 </strong> <em>li
1380: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 st</em></dt>..<d
1390: 64 3e 4c 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 d>List of protoc
13a0: 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 75 72 ols to offer dur
13b0: 69 6e 67 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d ing Application-
13c0: 4c 61 79 65 72 0a 09 20 20 20 20 50 72 6f 74 6f Layer.. Proto
13d0: 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 col Negotiation
13e0: 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d (ALPN). For exam
13f0: 70 6c 65 3a 20 3c 65 6d 3e 68 32 3c 2f 65 6d 3e ple: <em>h2</em>
1400: 20 61 6e 64 0a 09 20 20 20 20 3c 65 6d 3e 68 74 and.. <em>ht
1410: 74 70 2f 31 2e 31 3c 2f 65 6d 3e 2c 20 62 75 74 tp/1.1</em>, but
1420: 20 6e 6f 74 20 3c 65 6d 3e 68 33 3c 2f 65 6d 3e not <em>h3</em>
1430: 20 6f 72 20 3c 65 6d 3e 71 75 69 63 3c 2f 65 6d or <em>quic</em
1440: 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 >.</dd>..<dt><st
1450: 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72 rong>-cadir</str
1460: 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d ong> <em>dir</em
1470: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 ></dt>..<dd>Set
1480: 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63 61 the CA certifica
1490: 74 65 73 20 70 61 74 68 2e 20 54 68 65 20 64 65 tes path. The de
14a0: 66 61 75 6c 74 20 64 69 72 65 63 74 6f 72 79 20 fault directory
14b0: 69 73 20 70 6c 61 74 66 6f 72 6d 0a 09 20 20 20 is platform..
14c0: 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 specific and ca
14d0: 6e 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 n be set at comp
14e0: 69 6c 65 20 74 69 6d 65 2e 20 54 68 69 73 20 63 ile time. This c
14f0: 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e an be overridden
1500: 0a 09 20 20 20 20 76 69 61 20 74 68 65 20 3c 62 .. via the <b
1510: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 >SSL_CERT_DIR</b
1520: 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 > environment va
1530: 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 riable.</dd>..<d
1540: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c t><strong>-cafil
1550: 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 e </strong><em>f
1560: 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 ilename</em></dt
1570: 3e 0a 09 3c 64 64 3e 53 65 74 20 74 68 65 20 63 >..<dd>Set the c
1580: 65 72 74 69 66 69 63 61 74 65 20 61 75 74 68 6f ertificate autho
1590: 72 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 rity (CA) certif
15a0: 69 63 61 74 65 73 20 66 69 6c 65 2e 20 54 68 65 icates file. The
15b0: 20 64 65 66 61 75 6c 74 0a 09 20 20 20 20 69 73 default.. is
15c0: 20 74 68 65 20 63 65 72 74 2e 70 65 6d 20 66 69 the cert.pem fi
15d0: 6c 65 20 69 6e 20 74 68 65 20 4f 70 73 6e 53 53 le in the OpsnSS
15e0: 4c 20 64 69 72 65 63 74 6f 72 79 2e 20 54 68 69 L directory. Thi
15f0: 73 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a 09 20 s can also be..
1600: 20 20 20 6f 76 65 72 72 69 64 64 65 6e 20 76 69 overridden vi
1610: 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 a the <b>SSL_CER
1620: 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 T_FILE</b> envir
1630: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e onment variable.
1640: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
1650: 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 74 ng>-certfile</st
1660: 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 rong> <em>filena
1670: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 me</em></dt>..<d
1680: 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 66 69 d>Specify the fi
1690: 6c 65 6e 61 6d 65 20 77 69 74 68 20 74 68 65 20 lename with the
16a0: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 certificate to u
16b0: 73 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 se.</dd>..<dt><s
16c0: 74 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f 73 74 72 trong>-cert</str
16d0: 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d ong> <em>filenam
16e0: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 e</em></dt>..<dd
16f0: 3e 53 70 65 63 69 66 79 20 74 68 65 20 63 6f 6e >Specify the con
1700: 74 65 6e 74 73 20 6f 66 20 61 20 63 65 72 74 69 tents of a certi
1710: 66 69 63 61 74 65 20 74 6f 20 75 73 65 2c 20 61 ficate to use, a
1720: 73 20 61 20 44 45 52 0a 09 20 20 20 20 65 6e 63 s a DER.. enc
1730: 6f 64 65 64 20 62 69 6e 61 72 79 20 76 61 6c 75 oded binary valu
1740: 65 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f e (X.509 DER).</
1750: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
1760: 3e 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 >-cipher</strong
1770: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
1780: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 ></dt>..<dd>List
1790: 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 of ciphers to u
17a0: 73 65 2e 20 53 74 72 69 6e 67 20 69 73 20 61 20 se. String is a
17b0: 63 6f 6c 6f 6e 20 28 22 3a 22 29 20 73 65 70 61 colon (":") sepa
17c0: 72 61 74 65 64 20 6c 69 73 74 0a 09 20 20 20 20 rated list..
17d0: 6f 66 20 63 69 70 68 65 72 73 2e 20 43 69 70 68 of ciphers. Ciph
17e0: 65 72 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 ers can be combi
17f0: 6e 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74 ned.. using t
1800: 68 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 he <b>+</b> char
1810: 61 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20 acter. Prefixes
1820: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 can be used to p
1830: 65 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 ermanently..
1840: 72 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65 remove ("!"), de
1850: 6c 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d lete ("-"), or m
1860: 6f 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20 ove a cypher to
1870: 74 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 the end of..
1880: 74 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 the list ("+").
1890: 4b 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 Keywords <b>@STR
18a0: 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 ENGTH</b> (sort
18b0: 62 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 by algorithm..
18c0: 20 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c key length), <
18d0: 62 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e b>@SECLEVEL=</b>
18e0: 3c 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 <i>n</i> (set se
18f0: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a curity level to.
1900: 09 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e . n), and <b>
1910: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 DEFAULT</b> (use
1920: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 default cipher
1930: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f list, at start o
1940: 6e 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c nly).. can al
1950: 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e so be specified.
1960: 20 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 See OpenSSL doc
1970: 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 umentation for t
1980: 68 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 he full.. lis
1990: 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 t of valid value
19a0: 73 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 s. (TLS 1.2 and
19b0: 65 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 earlier only)</d
19c0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
19d0: 2d 63 69 70 68 65 72 73 75 69 74 65 73 3c 2f 73 -ciphersuites</s
19e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
19f0: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
1a00: 3e 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 >List of cipher
1a10: 73 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53 suites to use. S
1a20: 74 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e tring is a colon
1a30: 20 28 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61 (":").. sepa
1a40: 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 rated list of ci
1a50: 70 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 pher suite names
1a60: 2e 20 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 . (TLS 1.3 only)
1a70: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
1a80: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ng>-command</str
1a90: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 ong> <em>callbac
1aa0: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 k</em></dt>..<dd
1ab0: 3e 43 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e >Callback comman
1ac0: 64 20 74 6f 20 69 6e 76 6f 6b 65 20 61 74 20 73 d to invoke at s
1ad0: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 everal points du
1ae0: 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 ring the handsha
1af0: 6b 65 2e 0a 09 20 20 20 20 54 68 69 73 20 69 73 ke... This is
1b00: 20 75 73 65 64 20 74 6f 20 70 61 73 73 20 65 72 used to pass er
1b10: 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 6e 67 rors and tracing
1b20: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e information, an
1b30: 64 0a 09 20 20 20 20 69 74 20 63 61 6e 20 61 6c d.. it can al
1b40: 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 74 73 20 low Tcl scripts
1b50: 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 to perform their
1b60: 20 6f 77 6e 20 63 65 72 74 69 66 69 63 61 74 65 own certificate
1b70: 0a 09 20 20 20 20 76 61 6c 69 64 61 74 69 6f 6e .. validation
1b80: 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 68 65 in place of the
1b90: 20 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 default validat
1ba0: 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79 0a ion provided by.
1bb0: 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e 20 53 65 . OpenSSL. Se
1bc0: 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c e <a href="#CALL
1bd0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 BACK OPTIONS">CA
1be0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f LLBACK OPTIONS</
1bf0: 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 74 a>.. for furt
1c00: 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c her discussion.<
1c10: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1c20: 67 3e 2d 64 68 70 61 72 61 6d 73 20 3c 2f 73 74 g>-dhparams </st
1c30: 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d rong><em>filenam
1c40: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 e</em></dt>..<dd
1c50: 3e 53 70 65 63 69 66 79 20 74 68 65 20 44 69 66 >Specify the Dif
1c60: 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 fie-Hellman para
1c70: 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 meters file.</dd
1c80: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1c90: 6b 65 79 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e keyfile</strong>
1ca0: 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 <em>filename</e
1cb0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 m></dt>..<dd>Spe
1cc0: 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 cify the private
1cd0: 20 6b 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 key file. (defa
1ce0: 75 6c 74 20 69 73 0a 09 20 20 20 20 76 61 6c 75 ult is.. valu
1cf0: 65 20 6f 66 20 2d 63 65 72 74 66 69 6c 65 29 3c e of -certfile)<
1d00: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1d10: 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 g>-key</strong>
1d20: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d <em>filename</em
1d30: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 ></dt>..<dd>Spec
1d40: 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 20 ify the private
1d50: 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 key to use as a
1d60: 44 45 52 20 65 6e 63 6f 64 65 64 20 76 61 6c 75 DER encoded valu
1d70: 65 20 28 50 4b 43 53 23 31 20 44 45 52 29 3c 2f e (PKCS#1 DER)</
1d80: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
1d90: 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e >-model</strong>
1da0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em>channel</em
1db0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 ></dt>..<dd>Forc
1dc0: 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 e this channel t
1dd0: 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 o share the same
1de0: 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c <em><strong>SSL
1df0: 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 _CTX</strong></e
1e00: 6d 3e 0a 09 20 20 20 20 73 74 72 75 63 74 75 72 m>.. structur
1e10: 65 20 61 73 20 74 68 65 20 73 70 65 63 69 66 69 e as the specifi
1e20: 65 64 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f ed <em>channel</
1e30: 65 6d 3e 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 em>, and.. th
1e40: 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 erefore share ca
1e50: 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 llbacks etc.</dd
1e60: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1e70: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
1e80: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f > <em>callback</
1e90: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 em></dt>..<dd>Ca
1ea0: 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 llback command t
1eb0: 6f 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 o invoke when Op
1ec0: 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f enSSL needs to o
1ed0: 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 btain a password
1ee0: 2e 0a 09 20 20 20 20 54 79 70 69 63 61 6c 6c 79 ... Typically
1ef0: 20 75 73 65 64 20 74 6f 20 75 6e 6c 6f 63 6b 20 used to unlock
1f00: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 the private key
1f10: 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74 65 of a certificate
1f20: 2e 20 54 68 65 0a 09 20 20 20 20 63 61 6c 6c 62 . The.. callb
1f30: 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 ack should retur
1f40: 6e 20 61 20 73 74 72 69 6e 67 20 77 68 69 63 68 n a string which
1f50: 20 72 65 70 72 65 73 65 6e 74 73 20 74 68 65 20 represents the
1f60: 70 61 73 73 77 6f 72 64 0a 09 20 20 20 20 74 6f password.. to
1f70: 20 62 65 20 75 73 65 64 2e 20 53 65 65 20 3c 61 be used. See <a
1f80: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b href="#CALLBACK
1f90: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 OPTIONS">CALLBA
1fa0: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 CK OPTIONS</a>..
1fb0: 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 72 20 for further
1fc0: 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e discussion.</dd>
1fd0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 ..<dt><strong>-p
1fe0: 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 73 ost_handshake</s
1ff0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
2000: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 /em></dt>..<dd>A
2010: 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 llow post-handsh
2020: 61 6b 65 20 74 69 63 6b 65 74 20 75 70 64 61 74 ake ticket updat
2030: 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 es.</dd>..<dt><s
2040: 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20 3c trong>-request <
2050: 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c /strong><em>bool
2060: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
2070: 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69 66 Request a certif
2080: 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 icate from peer
2090: 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 during SSL hands
20a0: 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 65 66 61 hake... (defa
20b0: 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c ult is <em>true<
20c0: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>)</dd>..<dt>
20d0: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 69 72 65 <strong>-require
20e0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
20f0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ol</em></dt>..<d
2100: 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 d>Require a vali
2110: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 d certificate fr
2120: 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 53 om peer during S
2130: 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 SL handshake...
2140: 20 20 20 49 66 20 74 68 69 73 20 69 73 20 73 65 If this is se
2150: 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 t to true, then
2160: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 <strong>-request
2170: 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 74 0a 09 </strong> must..
2180: 20 20 20 20 61 6c 73 6f 20 62 65 20 73 65 74 20 also be set
2190: 74 6f 20 74 72 75 65 20 61 6e 64 20 61 20 65 69 to true and a ei
21a0: 74 68 65 72 20 61 20 2d 63 61 64 69 72 2c 20 2d ther a -cadir, -
21b0: 63 61 66 69 6c 65 2c 20 6f 72 20 70 6c 61 74 66 cafile, or platf
21c0: 6f 72 6d 0a 09 20 20 20 20 64 65 66 61 75 6c 74 orm.. default
21d0: 20 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 65 must be provide
21e0: 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 d in order to va
21f0: 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e 0a lidate against..
2200: 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73 . (default is
2210: 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 <em>false</em>)
2220: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
2230: 6e 67 3e 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 ng>-security_lev
2240: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e el</strong> <em>
2250: 69 6e 74 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 74 integer</em></dt
2260: 3e 0a 09 3c 64 64 3e 53 65 74 20 73 65 63 75 72 >..<dd>Set secur
2270: 69 74 79 20 6c 65 76 65 6c 2e 20 4d 75 73 74 20 ity level. Must
2280: 62 65 20 30 20 74 6f 20 35 2e 20 54 68 65 20 73 be 0 to 5. The s
2290: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 61 66 ecurity level af
22a0: 66 65 63 74 73 0a 09 20 20 20 20 74 68 65 20 63 fects.. the c
22b0: 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 ipher suite encr
22c0: 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d yption algorithm
22d0: 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 s, supported ECC
22e0: 20 63 75 72 76 65 73 2c 0a 09 20 20 20 20 73 75 curves,.. su
22f0: 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 75 72 pported signatur
2300: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 44 48 e algorithms, DH
2310: 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a 65 73 parameter sizes
2320: 2c 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 , certificate..
2330: 20 20 20 6b 65 79 20 73 69 7a 65 73 20 61 6e 64 key sizes and
2340: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
2350: 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 61 75 ithms. The defau
2360: 6c 74 20 69 73 20 31 2e 0a 09 20 20 20 20 4c 65 lt is 1... Le
2370: 76 65 6c 20 33 20 61 6e 64 20 68 69 67 68 65 72 vel 3 and higher
2380: 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74 disable support
2390: 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 63 for session tic
23a0: 6b 65 74 73 20 61 6e 64 20 6f 6e 6c 79 0a 09 20 kets and only..
23b0: 20 20 20 61 63 63 65 70 74 20 63 69 70 68 65 72 accept cipher
23c0: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f suites that pro
23d0: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63 vide forward sec
23e0: 72 65 63 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e recy.</dd>..<dt>
23f0: 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c <strong>-server<
2400: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
2410: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
2420: 3e 53 65 74 20 74 6f 20 61 63 74 20 61 73 20 61 >Set to act as a
2430: 20 73 65 72 76 65 72 20 61 6e 64 20 72 65 73 70 server and resp
2440: 6f 6e 64 20 77 69 74 68 20 61 20 73 65 72 76 65 ond with a serve
2450: 72 20 68 61 6e 64 73 68 61 6b 65 20 77 68 65 6e r handshake when
2460: 0a 09 20 20 20 20 61 20 63 6c 69 65 6e 74 20 63 .. a client c
2470: 6f 6e 6e 65 63 74 73 20 61 6e 64 20 70 72 6f 76 onnects and prov
2480: 69 64 65 73 20 61 20 63 6c 69 65 6e 74 20 68 61 ides a client ha
2490: 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 ndshake... (d
24a0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 efault is <em>fa
24b0: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 lse</em>)</dd>..
24c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 <dt><strong>-ser
24d0: 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e vername</strong>
24e0: 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f <em>host</em></
24f0: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 dt>..<dd>Specify
2500: 20 73 65 72 76 65 72 27 73 20 68 6f 73 74 6e 61 server's hostna
2510: 6d 65 2e 20 55 73 65 64 20 74 6f 20 73 65 74 20 me. Used to set
2520: 74 68 65 20 54 4c 53 20 27 53 65 72 76 65 72 20 the TLS 'Server
2530: 4e 61 6d 65 0a 09 20 20 20 20 49 6e 64 69 63 61 Name.. Indica
2540: 74 69 6f 6e 27 20 28 53 4e 49 29 20 65 78 74 65 tion' (SNI) exte
2550: 6e 73 69 6f 6e 2e 20 53 65 74 20 74 6f 20 74 68 nsion. Set to th
2560: 65 20 65 78 70 65 63 74 65 64 20 73 65 72 76 65 e expected serve
2570: 72 6e 61 6d 65 0a 09 20 20 20 20 69 6e 20 74 68 rname.. in th
2580: 65 20 73 65 72 76 65 72 27 73 20 63 65 72 74 69 e server's certi
2590: 66 69 63 61 74 65 20 6f 72 20 6f 6e 65 20 6f 66 ficate or one of
25a0: 20 74 68 65 20 73 75 62 6a 65 63 74 41 6c 74 4e the subjectAltN
25b0: 61 6d 65 0a 09 20 20 20 20 61 6c 74 65 72 6e 61 ame.. alterna
25c0: 74 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c tes.</dd>..<dt><
25d0: 73 74 72 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f strong>-session_
25e0: 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e id</strong> <em>
25f0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e string</em></dt>
2600: 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69 64 ..<dd>Session id
2610: 20 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73 69 to resume sessi
2620: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
2630: 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 trong>-ssl2</str
2640: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 ong> <em>bool</e
2650: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 m></dt>..<dd>Ena
2660: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 ble use of SSL v
2670: 32 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 2. (default is <
2680: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f em>false</em>)</
2690: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
26a0: 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e >-ssl3 </strong>
26b0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
26c0: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 t>..<dd>Enable u
26d0: 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 64 se of SSL v3. (d
26e0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 efault is <em>fa
26f0: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 lse</em>)</dd>..
2700: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 <dt>-<strong>tls
2710: 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 1</strong> <em>b
2720: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
2730: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 dd>Enable use of
2740: 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75 6c TLS v1. (defaul
2750: 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 t is <em>true</e
2760: 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c m>)</dd>..<dt>-<
2770: 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 strong>tls1.1</s
2780: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
2790: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 /em></dt>..<dd>E
27a0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 nable use of TLS
27b0: 20 76 31 2e 31 20 28 64 65 66 61 75 6c 74 20 69 v1.1 (default i
27c0: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 s <em>true</em>)
27d0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 </dd>..<dt>-<str
27e0: 6f 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f ong>tls1.2</stro
27f0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
2800: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 ></dt>..<dd>Enab
2810: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
2820: 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c .2 (default is <
2830: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 em>true</em>)</d
2840: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 d>..<dt>-<strong
2850: 3e 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e >tls1.3</strong>
2860: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
2870: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 dt>..<dd>Enable
2880: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 use of TLS v1.3
2890: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
28a0: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
28b0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 .<dt><strong>-va
28c0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 lidatecommand</s
28d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 trong> <em>callb
28e0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ack</em></dt>..<
28f0: 64 64 3e 43 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d dd>Callback comm
2900: 61 6e 64 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f and to invoke to
2910: 20 76 65 72 69 66 79 20 6f 72 20 76 61 6c 69 64 verify or valid
2920: 61 74 65 20 70 72 6f 74 6f 63 6f 6c 20 63 6f 6e ate protocol con
2930: 66 69 67 0a 09 20 20 20 20 70 61 72 61 6d 65 74 fig.. paramet
2940: 65 72 73 20 64 75 72 69 6e 67 20 74 68 65 20 70 ers during the p
2950: 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 rotocol negotiat
2960: 69 6f 6e 20 70 68 61 73 65 2e 20 53 65 65 0a 09 ion phase. See..
2970: 20 20 20 20 3c 61 20 68 72 65 66 3d 22 23 43 41 <a href="#CA
2980: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e LLBACK OPTIONS">
2990: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
29a0: 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 </a>.. for fu
29b0: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e rther discussion
29c0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e .</dd>. </dl>
29d0: 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a .</blockquote>..
29e0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
29f0: 22 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e "tls::unimport">
2a00: 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 <b>tls::unimport
2a10: 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c </b><i>channel<
2a20: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 /i></a></dt>.
2a30: 20 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 6f <dd>Provided fo
2a40: 72 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 r symmetry to <s
2a50: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 trong>tls::impor
2a60: 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 t</strong>, this
2a70: 0a 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 20 . unstacks
2a80: 74 68 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f the encryption o
2a90: 66 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 f a regular Tcl
2aa0: 63 68 61 6e 6e 65 6c 2e 20 41 6e 20 65 72 72 6f channel. An erro
2ab0: 72 0a 20 20 20 20 20 20 69 73 20 74 68 72 6f 77 r. is throw
2ac0: 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 n if TLS is not
2ad0: 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 the top stacked
2ae0: 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 channel type.</d
2af0: 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 d>. <dt> 
2b00: 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c ;</dt>. <dt><
2b10: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e a name="tls::han
2b20: 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e dshake"><strong>
2b30: 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f tls::handshake</
2b40: 73 74 72 6f 6e 67 3e 0a 09 3c 65 6d 3e 63 68 61 strong>..<em>cha
2b50: 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 nnel</em></a></d
2b60: 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 65 t>. <dd>Force
2b70: 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 s handshake to t
2b80: 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 72 ake place, and r
2b90: 65 74 75 72 6e 73 20 30 20 69 66 0a 09 68 61 6e eturns 0 if..han
2ba0: 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 dshake is still
2bb0: 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e in progress (non
2bc0: 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 -blocking), or 1
2bd0: 20 69 66 0a 09 74 68 65 20 68 61 6e 64 73 68 61 if..the handsha
2be0: 6b 65 20 77 61 73 20 73 75 63 63 65 73 73 66 75 ke was successfu
2bf0: 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 l. If the handsh
2c00: 61 6b 65 20 66 61 69 6c 65 64 0a 09 74 68 69 73 ake failed..this
2c10: 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 68 routine will th
2c20: 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64 row an error.</d
2c30: 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 d>. <dt> 
2c40: 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c ;</dt>. <dt><
2c50: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61 a name="tls::sta
2c60: 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 tus"><strong>tls
2c70: 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 ::status</strong
2c80: 3e 0a 20 20 20 20 3c 65 6d 3e 3f 3c 2f 65 6d 3e >. <em>?</em>
2c90: 3c 62 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3c 65 6d <b>-local</b><em
2ca0: 3e 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c >? channel</em><
2cb0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
2cc0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 >Returns the cur
2cd0: 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 20 61 rent status of a
2ce0: 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 n SSL channel. T
2cf0: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c he result is a l
2d00: 69 73 74 0a 09 6f 66 20 6b 65 79 2d 76 61 6c 75 ist..of key-valu
2d10: 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62 69 e pairs describi
2d20: 6e 67 20 74 68 65 20 53 53 4c 2c 20 63 65 72 74 ng the SSL, cert
2d30: 69 66 69 63 61 74 65 2c 20 61 6e 64 20 63 65 72 ificate, and cer
2d40: 74 69 66 69 63 61 74 65 0a 09 76 65 72 69 66 69 tificate..verifi
2d50: 63 61 74 69 6f 6e 20 73 74 61 74 75 73 2e 20 49 cation status. I
2d60: 66 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 f the SSL handsh
2d70: 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 ake has not yet
2d80: 63 6f 6d 70 6c 65 74 65 64 2c 0a 09 61 6e 20 65 completed,..an e
2d90: 6d 70 74 79 20 6c 69 73 74 20 69 73 20 72 65 74 mpty list is ret
2da0: 75 72 6e 65 64 2e 20 49 66 20 3c 62 3e 2d 6c 6f urned. If <b>-lo
2db0: 63 61 6c 3c 2f 62 3e 20 69 73 20 73 70 65 63 69 cal</b> is speci
2dc0: 66 69 65 64 2c 20 74 68 65 6e 20 74 68 65 0a 09 fied, then the..
2dd0: 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 63 61 74 local certificat
2de0: 65 20 69 73 20 75 73 65 64 2e 3c 2f 64 64 3e 0a e is used.</dd>.
2df0: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 <blockquote>..<b
2e00: 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a >SSL Status</b>.
2e10: 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 <dl>..<dt><s
2e20: 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f trong>alpn</stro
2e30: 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c ng> <em>protocol
2e40: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
2e50: 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c The protocol sel
2e60: 65 63 74 65 64 20 61 66 74 65 72 20 41 70 70 6c ected after Appl
2e70: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 ication-Layer Pr
2e80: 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f otocol.. Nego
2e90: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c tiation (ALPN).<
2ea0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
2eb0: 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 g>cipher</strong
2ec0: 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d > <em>cipher</em
2ed0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
2ee0: 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 current cipher i
2ef0: 6e 20 75 73 65 20 62 65 74 77 65 65 6e 20 66 6f n use between fo
2f00: 72 20 74 68 65 20 63 68 61 6e 6e 65 6c 2e 3c 2f r the channel.</
2f10: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
2f20: 3e 70 65 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e >peername</stron
2f30: 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e g> <em>name</em>
2f40: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 </dt>..<dd>The p
2f50: 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 eername from the
2f60: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
2f70: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
2f80: 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 protocol</strong
2f90: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 > <em>version</e
2fa0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
2fb0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
2fc0: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 n used for the c
2fd0: 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 onnection:..
2fe0: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 SSL2, SSL3, TLS1
2ff0: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 , TLS1.1, TLS1.2
3000: 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b , TLS1.3, or unk
3010: 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e nown.</dd>..<dt>
3020: 3c 73 74 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 <strong>sbits</s
3030: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
3040: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
3050: 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 number of bits u
3060: 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73 sed for the sess
3070: 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c ion key.</dd>..<
3080: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 dt><strong>signa
3090: 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68 tureHashAlgorith
30a0: 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 m</strong> <em>a
30b0: 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 lgorithm</em></d
30c0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e t>..<dd>The sign
30d0: 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 ature hash algor
30e0: 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e ithm.</dd>..<dt>
30f0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 <strong>signatur
3100: 65 54 79 70 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c eType</strong> <
3110: 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64 74 em>type</em></dt
3120: 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 >..<dd>The signa
3130: 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 2e ture type value.
3140: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3150: 6e 67 3e 76 65 72 69 66 79 44 65 70 74 68 3c 2f ng>verifyDepth</
3160: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 strong> <em>n</e
3170: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 m></dt>..<dd>Max
3180: 69 6d 75 6d 20 64 65 70 74 68 20 66 6f 72 20 74 imum depth for t
3190: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
31a0: 68 61 69 6e 20 76 65 72 69 66 69 63 61 74 69 6f hain verificatio
31b0: 6e 2e 0a 09 20 20 20 20 44 65 66 61 75 6c 74 20 n... Default
31c0: 69 73 20 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 is -1, to check
31d0: 61 6c 6c 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c all.</dd>..<dt><
31e0: 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 4d 6f 64 strong>verifyMod
31f0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c e</strong> <em>l
3200: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ist</em></dt>..<
3210: 64 64 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69 dd>List of certi
3220: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 ficate verificat
3230: 69 6f 6e 20 6d 6f 64 65 73 2e 3c 2f 64 64 3e 0a ion modes.</dd>.
3240: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 .<dt><strong>ver
3250: 69 66 79 52 65 73 75 6c 74 3c 2f 73 74 72 6f 6e ifyResult</stron
3260: 67 3e 20 3c 65 6d 3e 72 65 73 75 6c 74 3c 2f 65 g> <em>result</e
3270: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 m></dt>..<dd>Cer
3280: 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 tificate verific
3290: 61 74 69 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 ation result.</d
32a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
32b0: 63 61 5f 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e 67 ca_names</strong
32c0: 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c > <em>list</em><
32d0: 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f /dt>..<dd>List o
32e0: 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 f the Certificat
32f0: 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 e Authorities us
3300: 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 ed to create the
3310: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
3320: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 d>. </dl>.</b
3330: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 lockquote>.<bloc
3340: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 65 72 74 kquote>..<b>Cert
3350: 69 66 69 63 61 74 65 20 53 74 61 74 75 73 3c 2f ificate Status</
3360: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 b>. <dl>..<dt
3370: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 6c 3c 2f 73 74 ><strong>all</st
3380: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
3390: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
33a0: 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 Dump of all cert
33b0: 69 66 69 63 61 74 65 20 69 6e 66 6f 2e 3c 2f 64 ificate info.</d
33c0: 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 d>...<dt><strong
33d0: 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 >version</strong
33e0: 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e > <em>value</em>
33f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 </dt>..<dd>The c
3400: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 73 69 ertificate versi
3410: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
3420: 74 72 6f 6e 67 3e 73 65 72 69 61 6c 4e 75 6d 62 trong>serialNumb
3430: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
3440: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 n</em></dt>..<dd
3450: 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 >The serial numb
3460: 65 72 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 er of the certif
3470: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 icate as a hex s
3480: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 tring.</dd>..<dt
3490: 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 ><strong>signatu
34a0: 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e re</strong> <em>
34b0: 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f algorithm</em></
34c0: 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65 72 20 dt>..<dd>Cipher
34d0: 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 algorithm used f
34e0: 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 20 73 or certificate s
34f0: 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 ignature.</dd>..
3500: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 <dt><strong>issu
3510: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
3520: 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 dn</em></dt>..<d
3530: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 d>The distinguis
3540: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 hed name (DN) of
3550: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3560: 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 09 3c issuer.</dd>..<
3570: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65 dt><strong>notBe
3580: 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fore</strong> <e
3590: 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>date</em></dt>
35a0: 0a 09 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 ..<dd>The begin
35b0: 64 61 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c date for the val
35c0: 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 idity of the cer
35d0: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 tificate.</dd>..
35e0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 <dt><strong>notA
35f0: 66 74 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fter</strong> <e
3600: 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>date</em></dt>
3610: 0a 09 3c 64 64 3e 54 68 65 20 65 78 70 69 72 61 ..<dd>The expira
3620: 74 69 6f 6e 20 64 61 74 65 20 66 6f 72 20 74 68 tion date for th
3630: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f e certificate.</
3640: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3650: 3e 73 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 >subject</strong
3660: 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 > <em>dn</em></d
3670: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 t>..<dd>The dist
3680: 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 inguished name (
3690: 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 DN) of the certi
36a0: 66 69 63 61 74 65 20 73 75 62 6a 65 63 74 2e 0a ficate subject..
36b0: 09 20 20 20 20 46 69 65 6c 64 73 20 69 6e 63 6c . Fields incl
36c0: 75 64 65 3a 20 43 6f 6d 6d 6f 6e 20 4e 61 6d 65 ude: Common Name
36d0: 20 28 43 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 (CN), Organizat
36e0: 69 6f 6e 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 ion (O), Localit
36f0: 79 0a 09 20 20 20 20 6f 72 20 43 69 74 79 20 28 y.. or City (
3700: 4c 29 2c 20 53 74 61 74 65 20 6f 72 20 50 72 6f L), State or Pro
3710: 76 69 6e 63 65 20 28 53 29 2c 20 61 6e 64 20 43 vince (S), and C
3720: 6f 75 6e 74 72 79 20 4e 61 6d 65 20 28 43 29 2e ountry Name (C).
3730: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3740: 6e 67 3e 69 73 73 75 65 72 55 6e 69 71 75 65 49 ng>issuerUniqueI
3750: 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 D</strong> <em>s
3760: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
3770: 09 3c 64 64 3e 54 68 65 20 69 73 73 75 65 72 20 .<dd>The issuer
3780: 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e 0a unique id.</dd>.
3790: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 .<dt><strong>sub
37a0: 6a 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 73 74 jectUniqueID</st
37b0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
37c0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
37d0: 54 68 65 20 73 75 62 6a 65 63 74 20 75 6e 69 71 The subject uniq
37e0: 75 65 20 69 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 ue id.</dd>...<d
37f0: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 75 6d 5f 65 78 t><strong>num_ex
3800: 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 tensions</strong
3810: 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 > <em>n</em></dt
3820: 3e 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 >..<dd>Number of
3830: 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74 certificate ext
3840: 65 6e 73 69 6f 6e 73 2e 3c 2f 64 64 3e 0a 09 3c ensions.</dd>..<
3850: 64 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 74 65 6e dt><strong>exten
3860: 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c sions</strong> <
3870: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 em>list</em></dt
3880: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 >..<dd>List of c
3890: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e ertificate exten
38a0: 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 64 64 3e sion names.</dd>
38b0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 75 ..<dt><strong>au
38c0: 74 68 6f 72 69 74 79 4b 65 79 49 64 65 6e 74 69 thorityKeyIdenti
38d0: 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fier</strong> <e
38e0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
38f0: 74 3e 0a 09 3c 64 64 3e 28 41 4b 49 29 20 4b 65 t>..<dd>(AKI) Ke
3900: 79 20 69 64 65 6e 74 69 66 69 65 72 20 6f 66 20 y identifier of
3910: 74 68 65 20 49 73 73 75 69 6e 67 20 43 41 20 63 the Issuing CA c
3920: 65 72 74 69 66 69 63 61 74 65 20 74 68 61 74 20 ertificate that
3930: 73 69 67 6e 65 64 0a 09 20 20 20 20 74 68 65 20 signed.. the
3940: 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 20 SSL certificate
3950: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e as a hex string.
3960: 20 54 68 69 73 20 76 61 6c 75 65 20 6d 61 74 63 This value matc
3970: 68 65 73 20 74 68 65 20 53 4b 49 0a 09 20 20 20 hes the SKI..
3980: 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 49 6e value of the In
3990: 74 65 72 6d 65 64 69 61 74 65 20 43 41 20 63 65 termediate CA ce
39a0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
39b0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 .<dt><strong>sub
39c0: 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 66 69 65 jectKeyIdentifie
39d0: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 r</strong> <em>s
39e0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
39f0: 09 3c 64 64 3e 28 53 4b 49 29 20 48 61 73 68 20 .<dd>(SKI) Hash
3a00: 6f 66 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 of the public ke
3a10: 79 20 69 6e 73 69 64 65 20 74 68 65 20 63 65 72 y inside the cer
3a20: 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 tificate as a he
3a30: 78 0a 09 20 20 20 73 74 72 69 6e 67 2e 20 55 73 x.. string. Us
3a40: 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 63 ed to identify c
3a50: 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61 74 ertificates that
3a60: 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 69 contain a parti
3a70: 63 75 6c 61 72 0a 09 20 20 20 70 75 62 6c 69 63 cular.. public
3a80: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e key.</dd>..<dt>
3a90: 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 41 <strong>subjectA
3aa0: 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 ltName</strong>
3ab0: 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 <em>list</em></d
3ac0: 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 t>..<dd>List of
3ad0: 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c 74 65 72 all of the alter
3ae0: 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e 20 6e 61 native domain na
3af0: 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 69 6e 73 mes, sub domains
3b00: 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 20 61 64 ,.. and IP ad
3b10: 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72 65 dresses that are
3b20: 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65 20 secured by the
3b30: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 certificate.</dd
3b40: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6f >..<dt><strong>o
3b50: 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d csp</strong> <em
3b60: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >list</em></dt>.
3b70: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c .<dd>List of all
3b80: 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 63 Online Certific
3b90: 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 6f ate Status Proto
3ba0: 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 2e col (OCSP) URLs.
3bb0: 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 </dd>...<dt><str
3bc0: 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65 3c ong>certificate<
3bd0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65 72 /strong> <em>cer
3be0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
3bf0: 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 >The PEM encoded
3c00: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
3c10: 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 d>...<dt><strong
3c20: 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 >signatureAlgori
3c30: 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d thm</strong> <em
3c40: 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c >algorithm</em><
3c50: 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65 72 /dt>..<dd>Cipher
3c60: 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 20 algorithm used
3c70: 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 for the certific
3c80: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f ate signature.</
3c90: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3ca0: 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 3c >signatureValue<
3cb0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 /strong> <em>str
3cc0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ing</em></dt>..<
3cd0: 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 dd>Certificate s
3ce0: 69 67 6e 61 74 75 72 65 20 61 73 20 61 20 68 65 ignature as a he
3cf0: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 x string.</dd>..
3d00: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e <dt><strong>sign
3d10: 61 74 75 72 65 44 69 67 65 73 74 3c 2f 73 74 72 atureDigest</str
3d20: 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e ong> <em>version
3d30: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3d40: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
3d50: 69 6e 67 20 64 69 67 65 73 74 20 61 73 20 61 20 ing digest as a
3d60: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e hex string.</dd>
3d70: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 ..<dt><strong>pu
3d80: 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d blicKeyAlgorithm
3d90: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c </strong> <em>al
3da0: 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 gorithm</em></dt
3db0: 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 >..<dd>Certifica
3dc0: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 te signature pub
3dd0: 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 lic key algorith
3de0: 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 m.</dd>..<dt><st
3df0: 72 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 3c 2f rong>publicKey</
3e00: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
3e10: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
3e20: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 d>Certificate si
3e30: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
3e40: 65 79 20 61 73 20 61 20 68 65 78 20 73 74 72 69 ey as a hex stri
3e50: 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ng.</dd>..<dt><s
3e60: 74 72 6f 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f trong>bits</stro
3e70: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f ng> <em>n</em></
3e80: 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 dt>..<dd>Number
3e90: 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 of bits used for
3ea0: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 certificate sig
3eb0: 6e 61 74 75 72 65 20 6b 65 79 2e 3c 2f 64 64 3e nature key.</dd>
3ec0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 ..<dt><strong>se
3ed0: 6c 66 5f 73 69 67 6e 65 64 3c 2f 73 74 72 6f 6e lf_signed</stron
3ee0: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f g> <em>boolean</
3ef0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 em></dt>..<dd>Wh
3f00: 65 74 68 65 72 20 74 68 65 20 63 65 72 74 69 66 ether the certif
3f10: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
3f20: 69 73 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c is self signed.<
3f30: 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f /dd>...<dt><stro
3f40: 6e 67 3e 73 68 61 31 5f 68 61 73 68 3c 2f 73 74 ng>sha1_hash</st
3f50: 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f rong> <em>hash</
3f60: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
3f70: 65 20 53 48 41 31 20 68 61 73 68 20 6f 66 20 74 e SHA1 hash of t
3f80: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 he certificate a
3f90: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c s a hex string.<
3fa0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3fb0: 67 3e 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 73 g>sha256_hash</s
3fc0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c trong> <em>hash<
3fd0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
3fe0: 68 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f he SHA256 hash o
3ff0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
4000: 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e e as a hex strin
4010: 67 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c g.</dd>. </dl
4020: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >.</blockquote>.
4030: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
4040: 3d 22 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f ="tls::connectio
4050: 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a n"><strong>tls::
4060: 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 73 74 72 6f connection</stro
4070: 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 63 68 61 6e ng>. <em>chan
4080: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 nel</em></a></dt
4090: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e >. <dd>Return
40a0: 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f s the current co
40b0: 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 73 20 nnection status
40c0: 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 of an SSL channe
40d0: 6c 2e 20 54 68 65 0a 09 72 65 73 75 6c 74 20 69 l. The..result i
40e0: 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d s a list of key-
40f0: 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 value pairs desc
4100: 72 69 62 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 ribing the conne
4110: 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f ction.</dd>.<blo
4120: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c ckquote>..<b>SSL
4130: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 Status</b>.
4140: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e <dl>..<dt><stron
4150: 67 3e 73 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e g>state</strong>
4160: 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c <em>state</em><
4170: 2f 64 74 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 /dt>..<dd>State
4180: 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f of the connectio
4190: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 n.</dd>..<dt><st
41a0: 72 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c rong>servername<
41b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d /strong> <em>nam
41c0: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 e</em></dt>..<dd
41d0: 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 >The name of the
41e0: 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 connected to se
41f0: 72 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e rver.</dd>..<dt>
4200: 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c <strong>protocol
4210: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 </strong> <em>ve
4220: 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a rsion</em></dt>.
4230: 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f .<dd>The protoco
4240: 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 l version used f
4250: 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f or the connectio
4260: 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 n:.. SSL2, SS
4270: 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 L3, TLS1, TLS1.1
4280: 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 , TLS1.2, TLS1.3
4290: 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 , or unknown.</d
42a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
42b0: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c renegotiation_al
42c0: 6c 6f 77 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c lowed</strong> <
42d0: 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c em>boolean</em><
42e0: 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 /dt>..<dd>Whethe
42f0: 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 r protocol reneg
4300: 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 otiation is supp
4310: 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 orted or not.</d
4320: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4330: 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f security_level</
4340: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 65 strong> <em>leve
4350: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
4360: 3e 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 >The security le
4370: 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c vel used for sel
4380: 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 ection of cipher
4390: 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 s, key size, etc
43a0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
43b0: 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 ong>session_reus
43c0: 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ed</strong> <em>
43d0: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
43e0: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 >..<dd>Whether t
43f0: 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 he session has b
4400: 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f een reused or no
4410: 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 t.</dd>..<dt><st
4420: 72 6f 6e 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f rong>is_server</
4430: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
4440: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ean</em></dt>..<
4450: 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 dd>Whether the c
4460: 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e onnection is con
4470: 66 69 67 75 72 65 64 20 61 73 20 61 20 73 65 72 figured as a ser
4480: 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65 6e ver (1) or clien
4490: 74 20 28 30 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 t (0).</dd>..<dt
44a0: 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 73 ><strong>compres
44b0: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 sion</strong> <e
44c0: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>mode</em></dt>
44d0: 0a 09 3c 64 64 3e 43 6f 6d 70 72 65 73 73 69 6f ..<dd>Compressio
44e0: 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 n method.</dd>..
44f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 61 <dt><strong>expa
4500: 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c nsion</strong> <
4510: 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 em>mode</em></dt
4520: 3e 0a 09 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e >..<dd>Expansion
4530: 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c method.</dd>..<
4540: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 4c 69 73 dt><strong>caLis
4550: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c t</strong> <em>l
4560: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ist</em></dt>..<
4570: 64 64 3e 4c 69 73 74 20 6f 66 20 43 65 72 74 69 dd>List of Certi
4580: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 ficate Authoriti
4590: 65 73 20 28 43 41 29 20 66 6f 72 20 58 2e 35 30 es (CA) for X.50
45a0: 39 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 9 certificate.</
45b0: 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f dd>. </dl>.</
45c0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f blockquote>.<blo
45d0: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 ckquote>..<b>Cip
45e0: 68 65 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 her Info</b>.
45f0: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
4600: 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e ng>cipher</stron
4610: 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 g> <em>cipher</e
4620: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
4630: 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 current cipher
4640: 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 in use for the c
4650: 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a onnection.</dd>.
4660: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 .<dt><strong>sta
4670: 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f ndard_name</stro
4680: 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d ng> <em>name</em
4690: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
46a0: 73 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d standard RFC nam
46b0: 65 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 e of cipher.</dd
46c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 >..<dt><strong>a
46d0: 6c 67 6f 72 69 74 68 6d 5f 62 69 74 73 3c 2f 73 lgorithm_bits</s
46e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
46f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
4700: 6e 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 number of proces
4710: 73 65 64 20 62 69 74 73 20 75 73 65 64 20 66 6f sed bits used fo
4720: 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 r cipher.</dd>..
4730: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 72 <dt><strong>secr
4740: 65 74 5f 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e et_bits</strong>
4750: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>n</em></dt>
4760: 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 ..<dd>The number
4770: 20 6f 66 20 73 65 63 72 65 74 20 62 69 74 73 20 of secret bits
4780: 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e used for cipher.
4790: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
47a0: 6e 67 3e 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f ng>min_version</
47b0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 strong> <em>vers
47c0: 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ion</em></dt>..<
47d0: 64 64 3e 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 dd>The minimum p
47e0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 rotocol version
47f0: 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e for cipher.</dd>
4800: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 ..<dt><strong>ci
4810: 70 68 65 72 5f 69 73 5f 61 65 61 64 3c 2f 73 74 pher_is_aead</st
4820: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 rong> <em>boolea
4830: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 n</em></dt>..<dd
4840: 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 69 70 >Whether the cip
4850: 68 65 72 20 69 73 20 41 75 74 68 65 6e 74 69 63 her is Authentic
4860: 61 74 65 64 20 45 6e 63 72 79 70 74 69 6f 6e 20 ated Encryption
4870: 77 69 74 68 0a 09 41 73 73 6f 63 69 61 74 65 64 with..Associated
4880: 20 44 61 74 61 20 28 41 45 41 44 29 2e 3c 2f 64 Data (AEAD).</d
4890: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
48a0: 63 69 70 68 65 72 5f 69 64 3c 2f 73 74 72 6f 6e cipher_id</stron
48b0: 67 3e 20 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f g> <em>id</em></
48c0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 4f 70 65 dt>..<dd>The Ope
48d0: 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c nSSL cipher id.<
48e0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
48f0: 67 3e 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 g>description</s
4900: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
4910: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
4920: 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 70 74 >A text descript
4930: 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 ion of the ciphe
4940: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
4950: 72 6f 6e 67 3e 68 61 6e 64 73 68 61 6b 65 5f 64 rong>handshake_d
4960: 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c igest</strong> <
4970: 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c em>boolean</em><
4980: 2f 64 74 3e 0a 09 3c 64 64 3e 44 69 67 65 73 74 /dt>..<dd>Digest
4990: 20 75 73 65 64 20 64 75 72 69 6e 67 20 68 61 6e used during han
49a0: 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 20 20 20 dshake.</dd>.
49b0: 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 </dl>.</blockqu
49c0: 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 ote>.<blockquote
49d0: 3e 0a 09 3c 62 3e 53 65 73 73 69 6f 6e 20 49 6e >..<b>Session In
49e0: 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a fo</b>. <dl>.
49f0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 .<dt><strong>alp
4a00: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 n</strong> <em>p
4a10: 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 rotocol</em></dt
4a20: 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f >..<dd>The proto
4a30: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 col selected aft
4a40: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c er Application-L
4a50: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 ayer Protocol..
4a60: 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 Negotiation (
4a70: 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ALPN).</dd>..<dt
4a80: 3e 3c 73 74 72 6f 6e 67 3e 72 65 73 75 6d 61 62 ><strong>resumab
4a90: 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e le</strong> <em>
4aa0: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
4ab0: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 >..<dd>Whether t
4ac0: 68 65 20 73 65 73 73 69 6f 6e 20 63 61 6e 20 62 he session can b
4ad0: 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 e resumed or not
4ae0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4af0: 6f 6e 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f ong>start_time</
4b00: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f strong> <em>seco
4b10: 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c nds</em></dt>..<
4b20: 64 64 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 dd>Time since se
4b30: 73 73 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e ssion started in
4b40: 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 seconds since e
4b50: 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e poch.</dd>..<dt>
4b60: 3c 73 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c <strong>timeout<
4b70: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 /strong> <em>sec
4b80: 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 onds</em></dt>..
4b90: 3c 64 64 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e <dd>Max duration
4ba0: 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 of session in s
4bb0: 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 econds before ti
4bc0: 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 me-out.</dd>..<d
4bd0: 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 t><strong>lifeti
4be0: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e me</strong> <em>
4bf0: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 seconds</em></dt
4c00: 3e 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 >..<dd>Session t
4c10: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 icket lifetime h
4c20: 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c int in seconds.<
4c30: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4c40: 67 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 g>session_id</st
4c50: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 rong> <em>binary
4c60: 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 _string</em></dt
4c70: 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 >..<dd>Unique se
4c80: 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 ssion id for use
4c90: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
4ca0: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 session.</dd>..
4cb0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 <dt><strong>sess
4cc0: 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f ion_ticket</stro
4cd0: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
4ce0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
4cf0: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
4d00: 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 ion ticket for u
4d10: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 se in resuming t
4d20: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e he session.</dd>
4d30: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 ..<dt><strong>ti
4d40: 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 cket_app_data</s
4d50: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 trong> <em>binar
4d60: 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 y_string</em></d
4d70: 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 t>..<dd>Unique s
4d80: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 ession ticket ap
4d90: 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c plication data.<
4da0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4db0: 67 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 g>master_key</st
4dc0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 rong> <em>binary
4dd0: 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 _string</em></dt
4de0: 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 >..<dd>Unique se
4df0: 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 ssion master key
4e00: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4e10: 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 ong>session_cach
4e20: 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 e_mode</strong>
4e30: 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 <em>mode</em></d
4e40: 74 3e 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 t>..<dd>Server c
4e50: 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e ache mode (clien
4e60: 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f t, server, or bo
4e70: 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f th).</dd>. </
4e80: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
4e90: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
4ea0: 6d 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 me="tls::ciphers
4eb0: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 "><strong>tls::c
4ec0: 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a iphers</strong>.
4ed0: 20 20 20 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f <em>?protoco
4ee0: 6c 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 l? ?verbose? ?su
4ef0: 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 pported?</em></a
4f00: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 57 ></dt>. <dd>W
4f10: 69 74 68 6f 75 74 20 61 6e 79 20 61 72 67 73 2c ithout any args,
4f20: 20 72 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 returns a list
4f30: 6f 66 20 61 6c 6c 20 73 79 6d 6d 65 74 72 69 63 of all symmetric
4f40: 20 63 69 70 68 65 72 73 20 66 6f 72 20 75 73 65 ciphers for use
4f50: 20 77 69 74 68 0a 09 74 68 65 20 3c 61 20 68 72 with..the <a hr
4f60: 65 66 3d 22 23 2d 63 69 70 68 65 72 22 3e 3c 62 ef="#-cipher"><b
4f70: 3e 2d 63 69 70 68 65 72 3c 2f 62 3e 3c 2f 61 3e >-cipher</b></a>
4f80: 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 20 3c 65 option. With <e
4f90: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c m>protocol</em>,
4fa0: 0a 09 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 ..only the ciphe
4fb0: 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 rs supported for
4fc0: 20 74 68 61 74 20 70 72 6f 74 6f 63 6f 6c 20 61 that protocol a
4fd0: 72 65 20 72 65 74 75 72 6e 65 64 2e 20 53 65 65 re returned. See
4fe0: 0a 09 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 .. <a href="#tls
4ff0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 62 3e ::protocols"><b>
5000: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f tls::protocols</
5010: 62 3e 3c 2f 61 3e 20 63 6f 6d 6d 61 6e 64 20 66 b></a> command f
5020: 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 or the supported
5030: 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 49 66 0a 09 protocols. If..
5040: 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e <em>verbose</em>
5050: 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 is specified as
5060: 20 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 true then a ver
5070: 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 bose, human read
5080: 61 62 6c 65 0a 09 6c 69 73 74 20 69 73 20 72 65 able..list is re
5090: 74 75 72 6e 65 64 20 77 69 74 68 20 61 64 64 69 turned with addi
50a0: 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 tional informati
50b0: 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 on on the cipher
50c0: 2e 20 49 66 0a 09 3c 65 6d 3e 73 75 70 70 6f 72 . If..<em>suppor
50d0: 74 65 64 3c 2f 65 6d 3e 20 69 73 20 73 70 65 63 ted</em> is spec
50e0: 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 ified as true, t
50f0: 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 hen only the cip
5100: 68 65 72 73 0a 09 73 75 70 70 6f 72 74 65 64 20 hers..supported
5110: 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c for protocol wil
5120: 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64 l be listed.</dd
5130: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
5140: 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f me="tls::protoco
5150: 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a ls"><strong>tls:
5160: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f :protocols</stro
5170: 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 ng></a></dt>.
5180: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c <dd>Returns a l
5190: 69 73 74 20 6f 66 20 74 68 65 20 73 75 70 70 6f ist of the suppo
51a0: 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 rted protocols.
51b0: 56 61 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65 Valid values are
51c0: 3a 0a 09 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 :..<b>ssl2</b>,
51d0: 3c 62 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e <b>ssl3</b>, <b>
51e0: 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 tls1</b>, <b>tls
51f0: 31 2e 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 1.1</b>, <b>tls1
5200: 2e 32 3c 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e .2</b>,..and <b>
5210: 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 tls1.3</b>. Exac
5220: 74 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f t list depends o
5230: 6e 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f n OpenSSL versio
5240: 6e 20 61 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 n and..compile t
5250: 69 6d 65 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a ime flags.</dd>.
5260: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
5270: 3d 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e ="tls::version">
5280: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 <strong>tls::ver
5290: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 sion</strong></a
52a0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 ></dt>. <dd>R
52b0: 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 eturns the OpenS
52c0: 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e SL version strin
52d0: 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c g.</dd>.</dl>..<
52e0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c h3><a name="CALL
52f0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 BACK OPTIONS">CA
5300: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f LLBACK OPTIONS</
5310: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 a></h3>..<p>.As
5320: 69 6e 64 69 63 61 74 65 64 20 61 62 6f 76 65 2c indicated above,
5330: 20 69 6e 64 69 76 69 64 75 61 6c 20 63 68 61 6e individual chan
5340: 6e 65 6c 73 20 63 61 6e 20 62 65 20 67 69 76 65 nels can be give
5350: 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c n their own call
5360: 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 backs.to handle
5370: 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f intermediate pro
5380: 63 65 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f cessing by the O
5390: 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 penSSL library,
53a0: 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e using the.<stron
53b0: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f g>-command</stro
53c0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 ng>, <strong>-pa
53d0: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c ssword</strong>,
53e0: 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 2d 76 61 and.<strong>-va
53f0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f lidate_command</
5400: 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 20 strong> options
5410: 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72 passed to either
5420: 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a of.<strong>tls:
5430: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e :socket</strong>
5440: 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a or <strong>tls:
5450: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
5460: 2e 0a 49 66 20 74 68 65 20 63 61 6c 6c 62 61 63 ..If the callbac
5470: 6b 20 67 65 6e 65 72 61 74 65 73 20 61 6e 20 65 k generates an e
5480: 72 72 6f 72 2c 20 74 68 65 20 3c 62 3e 62 67 65 rror, the <b>bge
5490: 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 rror</b> command
54a0: 20 77 69 6c 6c 20 62 65 0a 69 6e 76 6f 6b 65 64 will be.invoked
54b0: 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72 20 with the error
54c0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 0a 3c 2f 70 information..</p
54d0: 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >..<blockquote>.
54e0: 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 <dl>.. <dt><s
54f0: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
5500: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
5510: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
5520: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 <dd>..Invokes
5530: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c the specified <
5540: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
5550: 20 73 63 72 69 70 74 20 61 74 20 73 65 76 65 72 script at sever
5560: 61 6c 20 70 6f 69 6e 74 73 0a 09 64 75 72 69 6e al points..durin
5570: 67 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 68 61 g the OpenSSL ha
5580: 6e 64 73 68 61 6b 65 20 61 6e 64 20 75 73 65 2e ndshake and use.
5590: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 See below for t
55a0: 68 65 20 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 he possible..arg
55b0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
55c0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
55d0: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74 ript. Values ret
55e0: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 0a 09 urned from the..
55f0: 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 69 67 6e callback are ign
5600: 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 ored....<br>..<b
5610: 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e r>...<dl>...<dt>
5620: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f .. <strong>erro
5630: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 r</strong> <em>c
5640: 68 61 6e 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 hannelId message
5650: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 </em>..</dt>..<d
5660: 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 d>.. This form
5670: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
5680: 6e 76 6f 6b 65 64 20 77 68 65 6e 65 76 65 72 20 nvoked whenever
5690: 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 an error occurs
56a0: 64 75 72 69 6e 67 20 74 68 65 0a 09 20 20 69 6e during the.. in
56b0: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e itial connection
56c0: 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 , handshake, or
56d0: 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 I/O operations.
56e0: 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c The <em>message<
56f0: 2f 65 6d 3e 0a 09 20 20 61 72 67 75 6d 65 6e 74 /em>.. argument
5700: 20 63 61 6e 20 62 65 20 66 72 6f 6d 20 74 68 65 can be from the
5710: 20 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f Tcl_ErrnoMsg, O
5720: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
5730: 09 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 . <code>ERR_rea
5740: 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 son_error_string
5750: 28 29 3c 2f 63 6f 64 65 3e 2c 20 6f 72 20 61 20 ()</code>, or a
5760: 63 75 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e 0a custom message..
5770: 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 .</dd>...<br>...
5780: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
5790: 69 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 info</strong> <e
57a0: 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f m>channelId majo
57b0: 72 20 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 20 r minor message
57c0: 74 79 70 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e type</em>..</dt>
57d0: 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 ..<dd>.. This f
57e0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
57f0: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 is invoked by th
5800: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 e OpenSSL functi
5810: 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f on.. <code>SSL_
5820: 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 set_info_callbac
5830: 6b 28 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e k()</code> durin
5840: 67 20 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f g the initial co
5850: 6e 6e 65 63 74 69 6f 6e 0a 09 20 20 61 6e 64 20 nnection.. and
5860: 68 61 6e 64 73 68 61 6b 65 20 6f 70 65 72 61 74 handshake operat
5870: 69 6f 6e 73 2e 20 54 68 65 20 3c 65 6d 3e 74 79 ions. The <em>ty
5880: 70 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 pe</em> argument
5890: 20 69 73 20 6e 65 77 20 66 6f 72 0a 09 20 20 54 is new for.. T
58a0: 4c 53 20 31 2e 38 2e 20 54 68 65 20 61 72 67 75 LS 1.8. The argu
58b0: 6d 65 6e 74 73 20 61 72 65 3a 0a 09 20 20 3c 62 ments are:.. <b
58c0: 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20 3c 6c r>.. <ul>.. <l
58d0: 69 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 i>Possible value
58e0: 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72 3c s for <em>major<
58f0: 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f /em> are:.. <co
5900: 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c de>handshake, al
5910: 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 ert, connect, ac
5920: 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 cept</code>.</li
5930: 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c >.. <li>Possibl
5940: 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d e values for <em
5950: 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a >minor</em> are:
5960: 0a 09 20 20 3c 63 6f 64 65 3e 73 74 61 72 74 2c .. <code>start,
5970: 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77 72 69 done, read, wri
5980: 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74 3c 2f te, loop, exit</
5990: 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c code>.</li>.. <
59a0: 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 li>The <em>messa
59b0: 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 ge</em> argument
59c0: 20 69 73 20 61 20 64 65 73 63 72 69 70 74 69 76 is a descriptiv
59d0: 65 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d e string which m
59e0: 61 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 ay.. be generat
59f0: 65 64 20 65 69 74 68 65 72 20 62 79 20 3c 63 6f ed either by <co
5a00: 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 de>SSL_state_str
5a10: 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 ing_long()</code
5a20: 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 > or by.. <code
5a30: 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f >SSL_alert_desc_
5a40: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 string_long()</c
5a50: 6f 64 65 3e 2c 20 64 65 70 65 6e 64 69 6e 67 20 ode>, depending
5a60: 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c on the context.<
5a70: 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f 72 20 /li>.. <li>For
5a80: 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 alerts, the poss
5a90: 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 ible values for
5aa0: 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 61 72 <em>type</em> ar
5ab0: 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61 72 6e e:.. <code>warn
5ac0: 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e 64 20 ing, fatal, and
5ad0: 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e 2e 20 unknown</code>.
5ae0: 46 6f 72 20 6f 74 68 65 72 73 2c 0a 09 20 20 3c For others,.. <
5af0: 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f 64 65 3e code>info</code>
5b00: 20 69 73 20 75 73 65 64 2e 3c 2f 6c 69 3e 0a 09 is used.</li>..
5b10: 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a </ul>..</dd>..
5b20: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
5b30: 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f 6e 67 >message</strong
5b40: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 > <em>channelId
5b50: 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69 6f direction versio
5b60: 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 6d n content_type m
5b70: 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 essage</em>..</d
5b80: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 t>..<dd>.. This
5b90: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
5ba0: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 k is invoked by
5bb0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 the OpenSSL func
5bc0: 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 tion.. <code>SS
5bd0: 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 L_set_msg_callba
5be0: 63 6b 28 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e ck()</code> when
5bf0: 65 76 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 ever a message i
5c00: 73 20 73 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 s sent or.. rec
5c10: 65 69 76 65 64 20 64 75 72 69 6e 67 20 74 68 65 eived during the
5c20: 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 initial connect
5c30: 69 6f 6e 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 ion, handshake,
5c40: 6f 72 20 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e or I/O operation
5c50: 73 2e 0a 09 20 20 49 74 20 69 73 20 6f 6e 6c 79 s... It is only
5c60: 20 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 20 available when
5c70: 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c OpenSSL is compl
5c80: 69 65 64 20 77 69 74 68 20 74 68 65 0a 09 20 20 ied with the..
5c90: 3c 65 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 <em>enable-ssl-t
5ca0: 72 61 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e race</em> option
5cb0: 2e 20 41 72 67 75 6d 65 6e 74 73 20 61 72 65 3a . Arguments are:
5cc0: 20 3c 65 6d 3e 64 69 72 65 63 74 69 6f 6e 3c 2f <em>direction</
5cd0: 65 6d 3e 20 0a 09 20 20 69 73 20 3c 62 3e 53 65 em> .. is <b>Se
5ce0: 6e 74 3c 2f 62 3e 20 6f 72 20 3c 62 3e 52 65 63 nt</b> or <b>Rec
5cf0: 65 69 76 65 64 3c 2f 62 3e 2c 20 3c 65 6d 3e 76 eived</b>, <em>v
5d00: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 74 ersion</em> is t
5d10: 68 65 20 70 72 6f 74 6f 63 6f 6c 0a 09 20 20 76 he protocol.. v
5d20: 65 72 73 69 6f 6e 2c 20 3c 65 6d 3e 63 6f 6e 74 ersion, <em>cont
5d30: 65 6e 74 5f 74 79 70 65 3c 2f 65 6d 3e 20 69 73 ent_type</em> is
5d40: 20 74 68 65 20 6d 65 73 73 61 67 65 20 63 6f 6e the message con
5d50: 74 65 6e 74 20 74 79 70 65 2c 20 61 6e 64 0a 09 tent type, and..
5d60: 20 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 <em>message</e
5d70: 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 m> is more info
5d80: 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65 3e 53 from the <code>S
5d90: 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65 3e 20 SL_trace</code>
5da0: 41 50 49 2e 0a 09 20 20 54 68 69 73 20 63 61 6c API... This cal
5db0: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 lback is new for
5dc0: 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e TLS 1.8...</dd>
5dd0: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 ..<br>...<dt>..
5de0: 20 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e <strong>session
5df0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
5e00: 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f annelId session_
5e10: 69 64 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 id ticket lifeti
5e20: 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 me</em>..</dt>..
5e30: 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 <dd>.. This for
5e40: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
5e50: 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 invoked by the
5e60: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e OpenSSL function
5e70: 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 .. <code>SSL_CT
5e80: 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 X_sess_set_new_c
5e90: 62 28 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 b()</code> whene
5ea0: 76 65 72 20 61 20 6e 65 77 20 73 65 73 73 69 6f ver a new sessio
5eb0: 6e 20 69 64 20 69 73 0a 09 20 20 73 65 6e 74 20 n id is.. sent
5ec0: 62 79 20 74 68 65 20 73 65 72 76 65 72 20 64 75 by the server du
5ed0: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c ring the initial
5ee0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 61 6e 64 20 connection and
5ef0: 68 61 6e 64 73 68 61 6b 65 2c 20 62 75 74 0a 09 handshake, but..
5f00: 20 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 72 65 can also be re
5f10: 63 65 69 76 65 64 20 6c 61 74 65 72 20 69 66 20 ceived later if
5f20: 74 68 65 20 3c 62 3e 2d 70 6f 73 74 5f 68 61 6e the <b>-post_han
5f30: 64 73 68 61 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f dshake</b> optio
5f40: 6e 20 69 73 0a 09 20 20 75 73 65 64 2e 20 41 72 n is.. used. Ar
5f50: 67 75 6d 65 6e 74 73 20 61 72 65 3a 20 3c 65 6d guments are: <em
5f60: 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e >session_id</em>
5f70: 20 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 0a is the current.
5f80: 09 20 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 . session ident
5f90: 69 66 69 65 72 2c 20 3c 65 6d 3e 74 69 63 6b 65 ifier, <em>ticke
5fa0: 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 73 65 t</em> is the se
5fb0: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66 ssion ticket inf
5fc0: 6f 2c 20 61 6e 64 0a 09 20 20 3c 65 6d 3e 6c 69 o, and.. <em>li
5fd0: 66 65 74 69 6d 65 3c 2f 65 6d 3e 20 69 73 20 74 fetime</em> is t
5fe0: 68 65 20 74 68 65 20 74 69 63 6b 65 74 20 6c 69 he the ticket li
5ff0: 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 fetime in second
6000: 73 2e 0a 09 20 20 54 68 69 73 20 63 61 6c 6c 62 s... This callb
6010: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ack is new for T
6020: 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e 0a 09 LS 1.8...</dd>..
6030: 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 <br>..</dl>.
6040: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a </dd>.. <br>.
6050: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 . <dt><strong
6060: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
6070: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
6080: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c </em></dt>. <
6090: 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 dd>..Invokes the
60a0: 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 specified <em>c
60b0: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 allback</em> scr
60c0: 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c ipt when OpenSSL
60d0: 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 needs to..obtai
60e0: 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 n a password. Se
60f0: 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 e below for the
6100: 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e possible argumen
6110: 74 73 20 70 61 73 73 65 64 20 74 6f 0a 09 74 68 ts passed to..th
6120: 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 e callback scrip
6130: 74 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 t. See below for
6140: 20 76 61 6c 69 64 20 72 65 74 75 72 6e 20 76 61 valid return va
6150: 6c 75 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 lues....<br>..<b
6160: 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e r>...<dl>...<dt>
6170: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 .. <strong>pass
6180: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 word</strong> <e
6190: 6d 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 m>rwflag size</e
61a0: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
61b0: 09 20 20 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 . Invoked when
61c0: 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 loading or stori
61d0: 6e 67 20 61 20 50 45 4d 20 63 65 72 74 69 66 69 ng a PEM certifi
61e0: 63 61 74 65 20 77 69 74 68 20 65 6e 63 72 79 70 cate with encryp
61f0: 74 69 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c tion... Where <
6200: 65 6d 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 em>rwflag</em> i
6210: 73 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f s 0 for reading/
6220: 64 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 decryption or 1
6230: 66 6f 72 0a 09 20 20 77 72 69 74 69 6e 67 2f 65 for.. writing/e
6240: 6e 63 72 79 70 74 69 6f 6e 20 28 63 61 6e 20 70 ncryption (can p
6250: 72 6f 6d 70 74 20 75 73 65 72 20 74 6f 20 63 6f rompt user to co
6260: 6e 66 69 72 6d 29 20 61 6e 64 0a 09 20 20 3c 65 nfirm) and.. <e
6270: 6d 3e 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 m>size</em> is t
6280: 68 65 20 6d 61 78 20 70 61 73 73 77 6f 72 64 20 he max password
6290: 6c 65 6e 67 74 68 20 69 6e 20 62 79 74 65 73 2e length in bytes.
62a0: 0a 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b .. The callback
62b0: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 should return t
62c0: 68 65 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 he password as a
62d0: 20 73 74 72 69 6e 67 2e 0a 09 20 20 42 6f 74 68 string... Both
62e0: 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 20 6e arguments are n
62f0: 65 77 20 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a ew for TLS 1.8..
6300: 09 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 64 3e .</dd>. </dd>
6310: 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 0a 20 20 20 .. <br>...
6320: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 <dt><strong>-va
6330: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 lidatecommand</s
6340: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 trong> <em>callb
6350: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ack</em></dt>.
6360: 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 <dd>..Invokes
6370: 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 the specified <e
6380: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 m>callback</em>
6390: 73 63 72 69 70 74 20 64 75 72 69 6e 67 20 68 61 script during ha
63a0: 6e 64 73 68 61 6b 65 20 69 6e 0a 09 6f 72 64 65 ndshake in..orde
63b0: 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 r to validate th
63c0: 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 e provided value
63d0: 28 73 29 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 (s). See below f
63e0: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a or the possible.
63f0: 09 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 .arguments passe
6400: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 d to the callbac
6410: 6b 20 73 63 72 69 70 74 2e 20 49 66 20 6e 6f 74 k script. If not
6420: 20 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65 6e specified, Open
6430: 53 53 4c 0a 09 77 69 6c 6c 20 61 63 63 65 70 74 SSL..will accept
6440: 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 valid certifica
6450: 74 65 73 20 61 6e 64 20 65 78 74 65 6e 73 69 6f tes and extensio
6460: 6e 73 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 ns...To reject t
6470: 68 65 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f he value and abo
6480: 72 74 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f rt the connectio
6490: 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 n, the callback
64a0: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 2e should return 0.
64b0: 0a 09 54 6f 20 61 63 63 65 70 74 20 74 68 65 20 ..To accept the
64c0: 76 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69 6e value and contin
64d0: 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f ue the connectio
64e0: 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 n, it should ret
64f0: 75 72 6e 20 31 2e 0a 09 54 6f 20 72 65 6a 65 63 urn 1...To rejec
6500: 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74 t the value, but
6510: 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f continue the co
6520: 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f nnection, it sho
6530: 75 6c 64 20 72 65 74 75 72 6e 20 32 2e 0a 0a 09 uld return 2....
6540: 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c <br>..<br>...<dl
6550: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 >...<dt>.. <str
6560: 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 ong>alpn</strong
6570: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 > <em>channelId
6580: 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 63 68 3c 2f protocol match</
6590: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
65a0: 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c .. For servers,
65b0: 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 this form of ca
65c0: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 llback is invoke
65d0: 64 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e d when the clien
65e0: 74 20 41 4c 50 4e 0a 09 20 20 65 78 74 65 6e 73 t ALPN.. extens
65f0: 69 6f 6e 20 69 73 20 72 65 63 65 69 76 65 64 2e ion is received.
6600: 20 49 66 20 3c 65 6d 3e 6d 61 74 63 68 3c 2f 65 If <em>match</e
6610: 6d 3e 20 69 73 20 74 72 75 65 2c 20 3c 65 6d 3e m> is true, <em>
6620: 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 0a 09 20 protocol</em>..
6630: 20 69 73 20 74 68 65 20 66 69 72 73 74 20 3c 62 is the first <b
6640: 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 6f 70 74 69 6f >-alpn</b> optio
6650: 6e 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74 n specified prot
6660: 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 ocol common to b
6670: 6f 74 68 0a 09 20 20 74 68 65 20 63 6c 69 65 6e oth.. the clien
6680: 74 20 61 6e 64 20 73 65 72 76 65 72 2e 20 49 66 t and server. If
6690: 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 20 not, the first
66a0: 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 client specified
66b0: 20 70 72 6f 74 6f 63 6f 6c 20 69 73 0a 09 20 20 protocol is..
66c0: 75 73 65 64 2e 20 49 74 20 69 73 20 63 61 6c 6c used. It is call
66d0: 65 64 20 61 66 74 65 72 20 74 68 65 20 68 65 6c ed after the hel
66e0: 6c 6f 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c lo and ALPN call
66f0: 62 61 63 6b 73 2e 0a 09 20 20 54 68 69 73 20 63 backs... This c
6700: 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 allback is new f
6710: 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 or TLS 1.8...</d
6720: 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e d>...<br>...<dt>
6730: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 68 65 6c 6c .. <strong>hell
6740: 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 o</strong> <em>c
6750: 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e hannelId servern
6760: 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a ame</em>..</dt>.
6770: 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 .<dd>.. For ser
6780: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
6790: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
67a0: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c nvoked during cl
67b0: 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 20 20 6d 65 ient hello.. me
67c0: 73 73 61 67 65 20 70 72 6f 63 65 73 73 69 6e 67 ssage processing
67d0: 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20 69 73 . The purpose is
67e0: 20 73 6f 20 74 68 65 20 73 65 72 76 65 72 20 63 so the server c
67f0: 61 6e 20 73 65 6c 65 63 74 20 74 68 65 0a 09 20 an select the..
6800: 20 61 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 appropriate cer
6810: 74 69 66 69 63 61 74 65 20 74 6f 20 70 72 65 73 tificate to pres
6820: 65 6e 74 20 74 6f 20 74 68 65 20 63 6c 69 65 6e ent to the clien
6830: 74 2c 20 61 6e 64 20 74 6f 20 6d 61 6b 65 20 6f t, and to make o
6840: 74 68 65 72 0a 09 20 20 63 6f 6e 66 69 67 75 72 ther.. configur
6850: 61 74 69 6f 6e 20 61 64 6a 75 73 74 6d 65 6e 74 ation adjustment
6860: 73 20 72 65 6c 65 76 61 6e 74 20 74 6f 20 74 68 s relevant to th
6870: 61 74 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 at server name a
6880: 6e 64 20 69 74 73 0a 09 20 20 63 6f 6e 66 69 67 nd its.. config
6890: 75 72 61 74 69 6f 6e 2e 20 49 74 20 69 73 20 63 uration. It is c
68a0: 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74 68 65 alled before the
68b0: 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63 61 SNI and ALPN ca
68c0: 6c 6c 62 61 63 6b 73 2e 0a 09 20 20 54 68 69 73 llbacks... This
68d0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 callback is new
68e0: 20 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09 3c for TLS 1.8...<
68f0: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
6900: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73 6e t>.. <strong>sn
6910: 69 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 i</strong> <em>c
6920: 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e hannelId servern
6930: 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a ame</em>..</dt>.
6940: 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 .<dd>.. For ser
6950: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
6960: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
6970: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 nvoked when the
6980: 53 65 72 76 65 72 20 4e 61 6d 65 0a 09 20 20 49 Server Name.. I
6990: 6e 64 69 63 61 74 69 6f 6e 20 28 53 4e 49 29 20 ndication (SNI)
69a0: 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 extension is rec
69b0: 65 69 76 65 64 2e 20 54 68 65 20 3c 65 6d 3e 73 eived. The <em>s
69c0: 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 ervername</em>..
69d0: 20 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 argument is th
69e0: 65 20 63 6c 69 65 6e 74 20 70 72 6f 76 69 64 65 e client provide
69f0: 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 69 6e d server name in
6a00: 20 74 68 65 20 3c 62 3e 2d 73 65 72 76 65 72 6e the <b>-servern
6a10: 61 6d 65 3c 2f 62 3e 0a 09 20 20 6f 70 74 69 6f ame</b>.. optio
6a20: 6e 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20 69 n. The purpose i
6a30: 73 20 73 6f 20 77 68 65 6e 20 61 20 73 65 72 76 s so when a serv
6a40: 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 er supports mult
6a50: 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 65 0a iple names, the.
6a60: 09 20 20 72 69 67 68 74 20 63 65 72 74 69 66 69 . right certifi
6a70: 63 61 74 65 20 63 61 6e 20 62 65 20 75 73 65 64 cate can be used
6a80: 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 . It is called a
6a90: 66 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 63 fter the hello c
6aa0: 61 6c 6c 62 61 63 6b 0a 09 20 20 62 75 74 20 62 allback.. but b
6ab0: 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 20 63 efore the ALPN c
6ac0: 61 6c 6c 62 61 63 6b 2e 0a 09 20 20 54 68 69 73 allback... This
6ad0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 callback is new
6ae0: 20 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09 3c for TLS 1.8...<
6af0: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
6b00: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 76 65 t>.. <strong>ve
6b10: 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 rify</strong> <e
6b20: 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 64 65 70 74 m>channelId dept
6b30: 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72 h cert status er
6b40: 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a ror</em>..</dt>.
6b50: 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f .<dd>.. This fo
6b60: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
6b70: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 s invoked by Ope
6b80: 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 nSSL when a new
6b90: 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 69 certificate.. i
6ba0: 73 20 72 65 63 65 69 76 65 64 20 66 72 6f 6d 20 s received from
6bb0: 74 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c the peer. It all
6bc0: 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 ows the client t
6bd0: 6f 20 63 68 65 63 6b 20 74 68 65 0a 09 20 20 63 o check the.. c
6be0: 65 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 ertificate verif
6bf0: 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 73 20 ication results
6c00: 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 65 74 68 and choose wheth
6c10: 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65 0a 09 er to continue..
6c20: 20 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69 73 20 or not. It is
6c30: 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63 68 20 called for each
6c40: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 certificate in t
6c50: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
6c60: 68 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e 0a 09 20 hain... <ul>..
6c70: 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 64 65 70 <li>The <em>dep
6c80: 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 th</em> argument
6c90: 20 69 73 20 74 68 65 20 69 6e 74 65 67 65 72 20 is the integer
6ca0: 64 65 70 74 68 20 6f 66 20 74 68 65 0a 09 20 20 depth of the..
6cb0: 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 certificate in t
6cc0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
6cd0: 68 61 69 6e 2c 20 77 68 65 72 65 20 30 20 69 73 hain, where 0 is
6ce0: 20 74 68 65 20 70 65 65 72 20 63 65 72 74 69 66 the peer certif
6cf0: 69 63 61 74 65 0a 09 20 20 61 6e 64 20 68 69 67 icate.. and hig
6d00: 68 65 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 her values going
6d10: 20 75 70 20 74 6f 20 74 68 65 20 43 65 72 74 69 up to the Certi
6d20: 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 ficate Authority
6d30: 20 28 43 41 29 2e 3c 2f 6c 69 3e 0a 09 20 20 3c (CA).</li>.. <
6d40: 6c 69 3e 54 68 65 20 3c 65 6d 3e 63 65 72 74 3c li>The <em>cert<
6d50: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 /em> argument is
6d60: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 a list of key-v
6d70: 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c alue pairs simil
6d80: 61 72 0a 09 20 20 74 6f 20 74 68 6f 73 65 20 72 ar.. to those r
6d90: 65 74 75 72 6e 65 64 20 62 79 0a 09 20 20 3c 61 eturned by.. <a
6da0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 href="#tls::sta
6db0: 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 tus"><strong>tls
6dc0: 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 ::status</strong
6dd0: 3e 3c 2f 61 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c ></a>.</li>.. <
6de0: 6c 69 3e 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 li>The <em>statu
6df0: 73 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 s</em> argument
6e00: 69 73 20 74 68 65 20 62 6f 6f 6c 65 61 6e 20 76 is the boolean v
6e10: 61 6c 69 64 69 74 79 20 6f 66 20 74 68 65 0a 09 alidity of the..
6e20: 20 20 63 75 72 72 65 6e 74 20 63 65 72 74 69 66 current certif
6e30: 69 63 61 74 65 20 77 68 65 72 65 20 30 20 69 73 icate where 0 is
6e40: 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 69 invalid and 1 i
6e50: 73 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 s valid.</li>..
6e60: 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 <li>The <em>err
6e70: 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 or</em> argument
6e80: 20 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 is the error me
6e90: 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 ssage, if any, g
6ea0: 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c enerated.. by <
6eb0: 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f code>X509_STORE_
6ec0: 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c CTX_get_error()<
6ed0: 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 /code>.</li>..
6ee0: 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 </ul>..</dd>..<b
6ef0: 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f r>..</dl>. </
6f00: 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 dd>.</dl>.</bloc
6f10: 6b 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 kquote>..<p>.Ref
6f20: 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 erence implement
6f30: 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 ations of these
6f40: 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 callbacks are pr
6f50: 6f 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 ovided in the.di
6f60: 73 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 stribution as <s
6f70: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 trong>tls::callb
6f80: 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 ack</strong>, <s
6f90: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 trong>tls::passw
6fa0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e ord</strong>,.an
6fb0: 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 d <strong>tls::v
6fc0: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c alidate_command<
6fd0: 2f 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 /strong> respect
6fe0: 69 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 ively. Note tha
6ff0: 74 20 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e t these are.<em>
7000: 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c sample</em> impl
7010: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 ementations only
7020: 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 . In a more rea
7030: 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e listic deploymen
7040: 74 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 t.you would spec
7050: 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c ify your own cal
7060: 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e lback scripts on
7070: 20 65 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 each TLS channe
7080: 6c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 l using the.<str
7090: 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 ong>-command</st
70a0: 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d rong>, <strong>-
70b0: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
70c0: 3e 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d >, and <strong>-
70d0: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
70e0: 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e </strong> option
70f0: 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 s..</p>..<p>.The
7100: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f default behavio
7110: 72 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f r when the <stro
7120: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ng>-command</str
7130: 6f 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 ong> and <strong
7140: 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 >-validate_comma
7150: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 nd</strong>.opti
7160: 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 ons are not spec
7170: 69 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 ified is for TLS
7180: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
7190: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
71a0: 72 79 20 63 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 ry callbacks.int
71b0: 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 ernally. The def
71c0: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 ault behavior wh
71d0: 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d en the <strong>-
71e0: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
71f0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 0a > option is not.
7200: 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 specified is for
7210: 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 TLS to process
7220: 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c the associated l
7230: 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 ibrary callbacks
7240: 20 62 79 20 61 74 74 65 6d 70 74 69 6e 67 0a 74 by attempting.t
7250: 6f 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 o call <strong>t
7260: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 ls::password</st
7270: 72 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 rong>..The diffe
7280: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 rence between th
7290: 65 73 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 ese two behavior
72a0: 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e s is a consequen
72b0: 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e ce of maintainin
72c0: 67 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 g.compatibility
72d0: 77 69 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 with earlier imp
72e0: 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f lementations..</
72f0: 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 p>..<p>.<em>.The
7300: 20 75 73 65 20 6f 66 20 74 68 65 20 72 65 66 65 use of the refe
7310: 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 rence callbacks
7320: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c <strong>tls::cal
7330: 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 0a lback</strong>,.
7340: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 <strong>tls::pas
7350: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 sword</strong>,
7360: 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a and <strong>tls:
7370: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e :validate_comman
7380: 64 3c 2f 73 74 72 6f 6e 67 3e 0a 69 73 20 6e 6f d</strong>.is no
7390: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 t recommended.
73a0: 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d 6f They may be remo
73b0: 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 ved from future
73c0: 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a releases..</em>.
73d0: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d </p>..<h3><a nam
73e0: 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47 3c e="DEBUG">DEBUG<
73f0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b 65 /a></h3>..TLS ke
7400: 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 65 y logging can be
7410: 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74 74 enabled by sett
7420: 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d ing the environm
7430: 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 3e ent variable.<b>
7440: 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 SSLKEYLOGFILE</b
7450: 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 > to the name of
7460: 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67 the file to log
7470: 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 to. Then whenev
7480: 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 65 72 er TLS.key mater
7490: 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65 64 ial is generated
74a0: 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74 20 or received it
74b0: 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 will be logged t
74c0: 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69 73 o the file. This
74d0: 0a 69 73 20 75 73 65 66 75 6c 20 66 6f 72 20 6c .is useful for l
74e0: 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61 20 ogging key data
74f0: 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 for network logg
7500: 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 ing tools to use
7510: 20 74 6f 0a 64 65 63 72 79 70 74 20 74 68 65 20 to.decrypt the
7520: 64 61 74 61 2e 0a 0a 3c 70 3e 0a 54 68 65 20 3c data...<p>.The <
7530: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 strong>tls::debu
7540: 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 g</strong> varia
7550: 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d ble provides som
7560: 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e e additional.con
7570: 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 65 20 trol over these
7580: 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 reference callba
7590: 63 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 65 20 cks. Its value
75a0: 69 73 20 7a 65 72 6f 20 62 79 20 64 65 66 61 75 is zero by defau
75b0: 6c 74 2e 0a 48 69 67 68 65 72 20 76 61 6c 75 65 lt..Higher value
75c0: 73 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 20 64 s produce more d
75d0: 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 iagnostic output
75e0: 2c 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 , and will also
75f0: 66 6f 72 63 65 20 74 68 65 0a 76 65 72 69 66 79 force the.verify
7600: 20 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f method in <stro
7610: 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b ng>tls::callback
7620: 3c 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 63 63 </strong> to acc
7630: 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 ept the.certific
7640: 61 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 ate, even when i
7650: 74 20 69 73 20 69 6e 76 61 6c 69 64 20 69 66 20 t is invalid if
7660: 74 68 65 20 3c 62 3e 74 6c 73 3a 3a 76 61 6c 69 the <b>tls::vali
7670: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e date_command</b>
7680: 0a 63 61 6c 6c 62 61 63 6b 20 69 73 20 75 73 65 .callback is use
7690: 64 20 66 6f 72 20 74 68 65 20 3c 62 3e 2d 76 61 d for the <b>-va
76a0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 lidatecommand</b
76b0: 3e 20 6f 70 74 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a > option..</p>..
76c0: 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 <p>.<em>.The use
76d0: 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 of the variable
76e0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 <strong>tls::de
76f0: 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 bug</strong> is
7700: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e not recommended.
7710: 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 .It may be remov
7720: 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 ed from future r
7730: 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c eleases..</em>.<
7740: 2f 70 3e 0a 0a 3c 68 34 3e 3c 61 20 6e 61 6d 65 /p>..<h4><a name
7750: 3d 22 44 45 42 55 47 5f 45 58 41 4d 50 4c 45 53 ="DEBUG_EXAMPLES
7760: 22 3e 44 65 62 75 67 20 45 78 61 6d 70 6c 65 73 ">Debug Examples
7770: 3c 2f 61 3e 3c 2f 68 34 3e 0a 0a 3c 70 3e 54 68 </a></h4>..<p>Th
7780: 65 73 65 20 65 78 61 6d 70 6c 65 73 20 75 73 65 ese examples use
7790: 20 74 68 65 20 64 65 66 61 75 6c 74 20 55 6e 69 the default Uni
77a0: 78 20 70 6c 61 74 66 6f 72 6d 20 53 53 4c 20 63 x platform SSL c
77b0: 65 72 74 69 66 69 63 61 74 65 73 2e 20 46 6f 72 ertificates. For
77c0: 20 73 74 61 6e 64 61 72 64 0a 69 6e 73 74 61 6c standard.instal
77d0: 6c 61 74 69 6f 6e 73 2c 20 2d 63 61 64 69 72 20 lations, -cadir
77e0: 61 6e 64 20 2d 63 61 66 69 6c 65 20 73 68 6f 75 and -cafile shou
77f0: 6c 64 20 6e 6f 74 20 62 65 20 6e 65 65 64 65 64 ld not be needed
7800: 2e 20 49 66 20 79 6f 75 72 20 63 65 72 74 69 66 . If your certif
7810: 69 63 61 74 65 73 0a 61 72 65 20 69 6e 20 6e 6f icates.are in no
7820: 6e 2d 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 74 n-standard locat
7830: 69 6f 6e 73 2c 20 75 70 64 61 74 65 20 2d 63 61 ions, update -ca
7840: 64 69 72 20 6f 72 20 75 73 65 20 2d 63 61 66 69 dir or use -cafi
7850: 6c 65 20 61 73 20 6e 65 65 64 65 64 2e 3c 2f 70 le as needed.</p
7860: 3e 0a 3c 62 72 3e 0a 45 78 61 6d 70 6c 65 20 23 >.<br>.Example #
7870: 31 3a 20 55 73 65 20 48 54 54 50 20 70 61 63 6b 1: Use HTTP pack
7880: 61 67 65 0a 0a 0a 3c 70 72 65 3e 3c 63 6f 64 65 age...<pre><code
7890: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 >.package requir
78a0: 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 e http.package r
78b0: 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 equire tls.set u
78c0: 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e rl "https://www.
78d0: 74 63 6c 2e 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a tcl.tk/"..http::
78e0: 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20 34 register https 4
78f0: 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 43 [list ::tls::
7900: 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 socket -autoserv
7910: 65 72 6e 61 6d 65 20 74 72 75 65 20 2d 72 65 71 ername true -req
7920: 75 69 72 65 20 74 72 75 65 20 2d 63 61 64 69 72 uire true -cadir
7930: 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 20 /etc/ssl/certs
7940: 5c 0a 20 20 20 20 2d 63 6f 6d 6d 61 6e 64 20 3a \. -command :
7950: 3a 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d :tls::callback -
7960: 70 61 73 73 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a password ::tls::
7970: 70 61 73 73 77 6f 72 64 20 2d 76 61 6c 69 64 61 password -valida
7980: 74 65 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a tecommand ::tls:
7990: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e :validate_comman
79a0: 64 5d 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 d]..# Check for
79b0: 65 72 72 6f 72 0a 73 65 74 20 74 6f 6b 65 6e 20 error.set token
79c0: 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 [http::geturl $u
79d0: 72 6c 5d 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 rl].if {[http::s
79e0: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 tatus $token] ne
79f0: 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 "ok"} {. put
7a00: 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 s [format "Error
7a10: 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 %s" [http::stat
7a20: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 us $token]].}..#
7a30: 20 47 65 74 20 77 65 62 20 70 61 67 65 0a 73 65 Get web page.se
7a40: 74 20 64 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 t data [http::da
7a50: 74 61 20 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 ta $token].puts
7a60: 5b 73 74 72 69 6e 67 20 6c 65 6e 67 74 68 20 24 [string length $
7a70: 64 61 74 61 5d 0a 0a 23 20 43 6c 65 61 6e 75 70 data]..# Cleanup
7a80: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 .::http::cleanup
7a90: 20 24 74 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c $token.</code><
7aa0: 2f 70 72 65 3e 0a 0a 45 78 61 6d 70 6c 65 20 23 /pre>..Example #
7ab0: 32 3a 20 55 73 65 20 72 61 77 20 73 6f 63 6b 65 2: Use raw socke
7ac0: 74 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 t.<pre><code>.pa
7ad0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c ckage require tl
7ae0: 73 0a 0a 73 65 74 20 75 72 6c 20 22 77 77 77 2e s..set url "www.
7af0: 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 22 0a 73 65 tcl-lang.org".se
7b00: 74 20 70 6f 72 74 20 34 34 33 0a 0a 73 65 74 20 t port 443..set
7b10: 63 68 20 5b 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 ch [tls::socket
7b20: 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 -autoservername
7b30: 31 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 24 75 1 -servername $u
7b40: 72 6c 20 2d 72 65 71 75 65 73 74 20 31 20 2d 72 rl -request 1 -r
7b50: 65 71 75 69 72 65 20 31 20 5c 0a 20 20 20 20 2d equire 1 \. -
7b60: 61 6c 70 6e 20 7b 68 74 74 70 2f 31 2e 31 7d 20 alpn {http/1.1}
7b70: 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f -cadir /etc/ssl/
7b80: 63 65 72 74 73 20 2d 63 6f 6d 6d 61 6e 64 20 3a certs -command :
7b90: 3a 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 20 5c :tls::callback \
7ba0: 0a 20 20 20 20 2d 70 61 73 73 77 6f 72 64 20 3a . -password :
7bb0: 3a 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 20 2d :tls::password -
7bc0: 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 20 validatecommand
7bd0: 3a 3a 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f ::tls::validate_
7be0: 63 6f 6d 6d 61 6e 64 20 24 75 72 6c 20 24 70 6f command $url $po
7bf0: 72 74 5d 0a 63 68 61 6e 20 63 6f 6e 66 69 67 75 rt].chan configu
7c00: 72 65 20 24 63 68 20 2d 62 75 66 66 65 72 73 69 re $ch -buffersi
7c10: 7a 65 20 36 35 35 33 36 0a 74 6c 73 3a 3a 68 61 ze 65536.tls::ha
7c20: 6e 64 73 68 61 6b 65 20 24 63 68 0a 0a 70 75 74 ndshake $ch..put
7c30: 73 20 24 63 68 20 22 47 45 54 20 2f 20 48 54 54 s $ch "GET / HTT
7c40: 50 2f 31 2e 31 22 0a 66 6c 75 73 68 20 24 63 68 P/1.1".flush $ch
7c50: 0a 61 66 74 65 72 20 35 30 30 0a 73 65 74 20 64 .after 500.set d
7c60: 61 74 61 20 5b 72 65 61 64 20 24 63 68 5d 0a 0a ata [read $ch]..
7c70: 61 72 72 61 79 20 73 65 74 20 73 74 61 74 75 73 array set status
7c80: 20 5b 74 6c 73 3a 3a 73 74 61 74 75 73 20 24 63 [tls::status $c
7c90: 68 5d 0a 61 72 72 61 79 20 73 65 74 20 63 6f 6e h].array set con
7ca0: 6e 20 5b 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 n [tls::connecti
7cb0: 6f 6e 20 24 63 68 5d 0a 61 72 72 61 79 20 73 65 on $ch].array se
7cc0: 74 20 63 68 61 6e 20 5b 63 68 61 6e 20 63 6f 6e t chan [chan con
7cd0: 66 69 67 75 72 65 20 24 63 68 5d 0a 63 6c 6f 73 figure $ch].clos
7ce0: 65 20 24 63 68 0a 70 61 72 72 61 79 20 73 74 61 e $ch.parray sta
7cf0: 74 75 73 0a 70 61 72 72 61 79 20 63 6f 6e 6e 0a tus.parray conn.
7d00: 70 61 72 72 61 79 20 63 68 61 6e 0a 3c 2f 63 6f parray chan.</co
7d10: 64 65 3e 3c 2f 70 72 65 3e 0a 0a 0a 3c 68 33 3e de></pre>...<h3>
7d20: 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 20 45 <a name="HTTPS E
7d30: 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58 XAMPLE">HTTPS EX
7d40: 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a AMPLE</a></h3>..
7d50: 3c 70 3e 54 68 65 73 65 20 65 78 61 6d 70 6c 65 <p>These example
7d60: 73 20 75 73 65 20 74 68 65 20 64 65 66 61 75 6c s use the defaul
7d70: 74 20 55 6e 69 78 20 70 6c 61 74 66 6f 72 6d 20 t Unix platform
7d80: 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 73 SSL certificates
7d90: 2e 20 46 6f 72 20 73 74 61 6e 64 61 72 64 0a 69 . For standard.i
7da0: 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20 2d 63 nstallations, -c
7db0: 61 64 69 72 20 61 6e 64 20 2d 63 61 66 69 6c 65 adir and -cafile
7dc0: 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 6e should not be n
7dd0: 65 65 64 65 64 2e 20 49 66 20 79 6f 75 72 20 63 eeded. If your c
7de0: 65 72 74 69 66 69 63 61 74 65 73 0a 61 72 65 20 ertificates.are
7df0: 69 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72 64 20 in non-standard
7e00: 6c 6f 63 61 74 69 6f 6e 73 2c 20 75 70 64 61 74 locations, updat
7e10: 65 20 2d 63 61 64 69 72 20 6f 72 20 75 73 65 20 e -cadir or use
7e20: 2d 63 61 66 69 6c 65 20 61 73 20 6e 65 65 64 65 -cafile as neede
7e30: 64 2e 3c 2f 70 3e 0a 0a 45 78 61 6d 70 6c 65 20 d.</p>..Example
7e40: 23 31 3a 20 47 65 74 20 77 65 62 20 70 61 67 65 #1: Get web page
7e50: 0a 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 ..<pre><code>.pa
7e60: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 ckage require ht
7e70: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 tp.package requi
7e80: 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 22 re tls.set url "
7e90: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e https://www.tcl.
7ea0: 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a 72 65 67 69 tk/"..http::regi
7eb0: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b ster https 443 [
7ec0: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b list ::tls::sock
7ed0: 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 et -autoserverna
7ee0: 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69 72 65 me true -require
7ef0: 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f 65 74 true -cadir /et
7f00: 63 2f 73 73 6c 2f 63 65 72 74 73 5d 0a 0a 23 20 c/ssl/certs]..#
7f10: 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f 72 0a Check for error.
7f20: 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74 70 3a set token [http:
7f30: 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a 69 66 :geturl $url].if
7f40: 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 {[http::status
7f50: 24 74 6f 6b 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d $token] ne "ok"}
7f60: 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 6f 72 {. puts [for
7f70: 6d 61 74 20 22 45 72 72 6f 72 20 25 73 22 20 5b mat "Error %s" [
7f80: 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f http::status $to
7f90: 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 47 65 74 20 77 ken]].}..# Get w
7fa0: 65 62 20 70 61 67 65 0a 73 65 74 20 64 61 74 61 eb page.set data
7fb0: 20 5b 68 74 74 70 3a 3a 64 61 74 61 20 24 74 6f [http::data $to
7fc0: 6b 65 6e 5d 0a 70 75 74 73 20 24 64 61 74 61 0a ken].puts $data.
7fd0: 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 .# Cleanup.::htt
7fe0: 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b 65 p::cleanup $toke
7ff0: 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a n.</code></pre>.
8000: 0a 45 78 61 6d 70 6c 65 20 23 32 3a 20 44 6f 77 .Example #2: Dow
8010: 6e 6c 6f 61 64 20 66 69 6c 65 0a 0a 3c 70 72 65 nload file..<pre
8020: 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 ><code>.package
8030: 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 require http.pac
8040: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 kage require tls
8050: 0a 0a 73 65 74 20 75 72 6c 20 22 68 74 74 70 73 ..set url "https
8060: 3a 2f 2f 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 ://wiki.tcl-lang
8070: 2e 6f 72 67 2f 73 69 74 65 6d 61 70 2e 78 6d 6c .org/sitemap.xml
8080: 22 0a 73 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b ".set filename [
8090: 66 69 6c 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a file tail $url].
80a0: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 .http::register
80b0: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 https 443 [list
80c0: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 ::tls::socket -a
80d0: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72 utoservername tr
80e0: 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65 ue -require true
80f0: 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c -cadir /etc/ssl
8100: 2f 63 65 72 74 73 5d 0a 0a 23 20 47 65 74 20 66 /certs]..# Get f
8110: 69 6c 65 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e ile.set ch [open
8120: 20 24 66 69 6c 65 6e 61 6d 65 20 77 62 5d 0a 73 $filename wb].s
8130: 65 74 20 74 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70 et token [::http
8140: 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 20 2d 62 ::geturl $url -b
8150: 6c 6f 63 6b 73 69 7a 65 20 36 35 35 33 36 20 2d locksize 65536 -
8160: 63 68 61 6e 6e 65 6c 20 24 63 68 5d 0a 0a 23 20 channel $ch]..#
8170: 43 6c 65 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 Cleanup.close $c
8180: 68 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 h.::http::cleanu
8190: 70 20 24 74 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e p $token.</code>
81a0: 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e </pre>..<h3><a n
81b0: 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 43 4f 4e ame="SPECIAL CON
81c0: 53 49 44 45 52 41 54 49 4f 4e 53 22 3e 53 50 45 SIDERATIONS">SPE
81d0: 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 CIAL CONSIDERATI
81e0: 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 ONS</a></h3>..<p
81f0: 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 69 65 >The capabilitie
8200: 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61 67 s of this packag
8210: 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d e can vary enorm
8220: 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70 6f 6e ously based upon
8230: 20 68 6f 77 20 74 68 65 0a 6c 69 6e 6b 65 64 20 how the.linked
8240: 74 6f 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 to OpenSSL libra
8250: 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 ry was configure
8260: 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65 77 d and built. New
8270: 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 versions may ob
8280: 73 6f 6c 65 74 65 0a 6f 6c 64 65 72 20 70 72 6f solete.older pro
8290: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 tocol versions,
82a0: 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 add or remove ci
82b0: 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 phers, change de
82c0: 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 fault values, et
82d0: 63 2e 0a 55 73 65 20 74 68 65 20 3c 73 74 72 6f c..Use the <stro
82e0: 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c ng>tls::protocol
82f0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61 s</strong> comma
8300: 6e 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 74 68 nds to obtain th
8310: 65 20 73 75 70 70 6f 72 74 65 64 0a 70 72 6f 74 e supported.prot
8320: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2e 3c 2f ocol versions.</
8330: 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d p>..<h3><a name=
8340: 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 "SEE ALSO">SEE A
8350: 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 LSO</a></h3>..<p
8360: 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c ><strong>socket<
8370: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e /strong>, <stron
8380: 67 3e 66 69 6c 65 65 76 65 6e 74 3c 2f 73 74 72 g>fileevent</str
8390: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 68 74 ong>, <strong>ht
83a0: 74 70 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 61 20 tp</strong>,.<a
83b0: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 href="http://www
83c0: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c .openssl.org/"><
83d0: 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f strong>OpenSSL</
83e0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a strong></a></p>.
83f0: 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70 .<hr>..<pre>.Cop
8400: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 yright © 19
8410: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 0a 99 Matt Newman..
8420: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b Copyright ©
8430: 20 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53 2004 Starfish S
8440: 79 73 74 65 6d 73 2e 0a 43 6f 70 79 72 69 67 68 ystems..Copyrigh
8450: 74 20 26 63 6f 70 79 3b 20 32 30 32 33 20 42 72 t © 2023 Br
8460: 69 61 6e 20 4f 27 48 61 67 61 6e 2e 0a 3c 2f 70 ian O'Hagan..</p
8470: 72 65 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 re>.</body>.</ht
8480: 6d 6c 3e 0a ml>.